tsci-agent 0.1.0
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 +60 -0
- package/dist/cli.js +280061 -0
- package/dist/skill/CHECKLIST.md +26 -0
- package/dist/skill/CLI.md +180 -0
- package/dist/skill/LICENSE +21 -0
- package/dist/skill/README.md +32 -0
- package/dist/skill/SKILL.md +163 -0
- package/dist/skill/SYNTAX.md +229 -0
- package/dist/skill/WORKFLOW.md +92 -0
- package/dist/skill/elements/analogsimulation.md +32 -0
- package/dist/skill/elements/battery.md +24 -0
- package/dist/skill/elements/board.md +23 -0
- package/dist/skill/elements/breakout.md +68 -0
- package/dist/skill/elements/breakoutpoint.md +27 -0
- package/dist/skill/elements/cadassembly.md +39 -0
- package/dist/skill/elements/cadmodel.md +31 -0
- package/dist/skill/elements/capacitor.md +28 -0
- package/dist/skill/elements/chip.md +44 -0
- package/dist/skill/elements/connector.md +125 -0
- package/dist/skill/elements/constraint.md +73 -0
- package/dist/skill/elements/copperpour.md +34 -0
- package/dist/skill/elements/coppertext.md +28 -0
- package/dist/skill/elements/courtyardcircle.md +32 -0
- package/dist/skill/elements/courtyardoutline.md +42 -0
- package/dist/skill/elements/courtyardpill.md +29 -0
- package/dist/skill/elements/courtyardrect.md +38 -0
- package/dist/skill/elements/crystal.md +28 -0
- package/dist/skill/elements/currentsource.md +26 -0
- package/dist/skill/elements/cutout.md +35 -0
- package/dist/skill/elements/diode.md +23 -0
- package/dist/skill/elements/fabricationnotedimension.md +27 -0
- package/dist/skill/elements/fabricationnotepath.md +29 -0
- package/dist/skill/elements/fabricationnoterect.md +40 -0
- package/dist/skill/elements/fabricationnotetext.md +32 -0
- package/dist/skill/elements/fiducial.md +34 -0
- package/dist/skill/elements/footprint.md +95 -0
- package/dist/skill/elements/fuse.md +28 -0
- package/dist/skill/elements/group.md +29 -0
- package/dist/skill/elements/hole.md +23 -0
- package/dist/skill/elements/inductor.md +27 -0
- package/dist/skill/elements/jumper.md +23 -0
- package/dist/skill/elements/led.md +23 -0
- package/dist/skill/elements/mosfet.md +26 -0
- package/dist/skill/elements/mountedboard.md +26 -0
- package/dist/skill/elements/net.md +27 -0
- package/dist/skill/elements/netalias.md +25 -0
- package/dist/skill/elements/netlabel.md +60 -0
- package/dist/skill/elements/opamp.md +30 -0
- package/dist/skill/elements/panel.md +24 -0
- package/dist/skill/elements/pcbkeepout.md +22 -0
- package/dist/skill/elements/pcbnotedimension.md +31 -0
- package/dist/skill/elements/pcbnoteline.md +30 -0
- package/dist/skill/elements/pcbnotepath.md +31 -0
- package/dist/skill/elements/pcbnoterect.md +30 -0
- package/dist/skill/elements/pcbnotetext.md +29 -0
- package/dist/skill/elements/pcbtrace.md +30 -0
- package/dist/skill/elements/pinheader.md +34 -0
- package/dist/skill/elements/pinout.md +26 -0
- package/dist/skill/elements/platedhole.md +34 -0
- package/dist/skill/elements/port.md +38 -0
- package/dist/skill/elements/potentiometer.md +27 -0
- package/dist/skill/elements/pushbutton.md +26 -0
- package/dist/skill/elements/resistor.md +27 -0
- package/dist/skill/elements/resonator.md +28 -0
- package/dist/skill/elements/schematicarc.md +39 -0
- package/dist/skill/elements/schematicbox.md +22 -0
- package/dist/skill/elements/schematiccell.md +26 -0
- package/dist/skill/elements/schematiccircle.md +36 -0
- package/dist/skill/elements/schematicline.md +39 -0
- package/dist/skill/elements/schematicpath.md +40 -0
- package/dist/skill/elements/schematicrect.md +38 -0
- package/dist/skill/elements/schematicrow.md +26 -0
- package/dist/skill/elements/schematicsection.md +91 -0
- package/dist/skill/elements/schematictable.md +48 -0
- package/dist/skill/elements/schematictext.md +23 -0
- package/dist/skill/elements/silkscreencircle.md +27 -0
- package/dist/skill/elements/silkscreenline.md +31 -0
- package/dist/skill/elements/silkscreenpath.md +70 -0
- package/dist/skill/elements/silkscreenrect.md +25 -0
- package/dist/skill/elements/silkscreentext.md +23 -0
- package/dist/skill/elements/smtpad.md +35 -0
- package/dist/skill/elements/solderjumper.md +21 -0
- package/dist/skill/elements/subcircuit.md +29 -0
- package/dist/skill/elements/subpanel.md +26 -0
- package/dist/skill/elements/switch.md +21 -0
- package/dist/skill/elements/symbol.md +54 -0
- package/dist/skill/elements/testpoint.md +26 -0
- package/dist/skill/elements/trace.md +28 -0
- package/dist/skill/elements/tracehint.md +24 -0
- package/dist/skill/elements/transistor.md +25 -0
- package/dist/skill/elements/via.md +30 -0
- package/dist/skill/elements/voltageprobe.md +36 -0
- package/dist/skill/elements/voltagesource.md +36 -0
- package/dist/skill/scripts/export_svgs.sh +23 -0
- package/dist/skill/scripts/fetch_ai_txt.sh +15 -0
- package/dist/skill/scripts/smoke_test.sh +48 -0
- package/dist/skill/templates/arduino-shield-led.tsx +14 -0
- package/dist/skill/templates/chip-with-pinouts.tsx +65 -0
- package/dist/skill/templates/group-layout.tsx +13 -0
- package/dist/skill/templates/minimal-board.tsx +13 -0
- package/package.json +39 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# `<led />`
|
|
2
|
+
|
|
3
|
+
Light emitting diodes are diodes that emit light when current passes through them. They are commonly used as indicators on a circuit board such as a "power on indicator" or "data transfer in progress indicator
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="10mm" height="10mm">
|
|
10
|
+
<led name="LED1" footprint="0603" color="red" />
|
|
11
|
+
</board>
|
|
12
|
+
)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
Commonly used: `color`, `wavelength`, `schDisplayValue`, `schOrientation`, `connections`, `laser`, `name`, `footprint`
|
|
18
|
+
|
|
19
|
+
## References
|
|
20
|
+
|
|
21
|
+
- Props: [LedProps](https://github.com/tscircuit/props#ledprops-led)
|
|
22
|
+
- Source: [lib/components/led.ts](https://github.com/tscircuit/props/blob/main/lib/components/led.ts)
|
|
23
|
+
- Local docs: [docs/docs/elements/led.mdx](../docs/docs/elements/led.mdx)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# `<mosfet />`
|
|
2
|
+
|
|
3
|
+
A MOSFET or "metal-oxide-semiconductor field-effect transistor" is a type of transistor that is used to control the flow of current through a circuit.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<mosfet
|
|
10
|
+
name="Q1"
|
|
11
|
+
channelType="n"
|
|
12
|
+
mosfetMode="depletion"
|
|
13
|
+
footprint="sot23"
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Props
|
|
19
|
+
|
|
20
|
+
Commonly used: `channelType`, `mosfetMode`, `name`, `footprint`, `connections`
|
|
21
|
+
|
|
22
|
+
## References
|
|
23
|
+
|
|
24
|
+
- Props: [MosfetProps](https://github.com/tscircuit/props#mosfetprops-mosfet)
|
|
25
|
+
- Source: [lib/components/mosfet.ts](https://github.com/tscircuit/props/blob/main/lib/components/mosfet.ts)
|
|
26
|
+
- Local docs: [docs/docs/elements/mosfet.mdx](../docs/docs/elements/mosfet.mdx)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# `<mountedboard />`
|
|
2
|
+
|
|
3
|
+
Place one board as a mounted child assembly of another.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="40mm" height="30mm">
|
|
10
|
+
<mountedboard name="MB1" boardToBoardDistance="6mm" mountOrientation="faceUp">
|
|
11
|
+
<board width="20mm" height="12mm">
|
|
12
|
+
<chip name="U1" footprint="soic8" />
|
|
13
|
+
</board>
|
|
14
|
+
</mountedboard>
|
|
15
|
+
</board>
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
Commonly used: `boardToBoardDistance`, `mountOrientation`, `width`, `height`, `children`
|
|
22
|
+
|
|
23
|
+
## References
|
|
24
|
+
|
|
25
|
+
- Props: [MountedBoardProps](https://github.com/tscircuit/props#mountedboardprops-mountedboard)
|
|
26
|
+
- Source: [lib/components/mountedboard.ts](https://github.com/tscircuit/props/blob/main/lib/components/mountedboard.ts)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# `<net />`
|
|
2
|
+
|
|
3
|
+
The `<net />` element represents a bunch of traces that are all connected. You should use nets for representing power buses such as "V5", "V3_3" and "GND"
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="10mm" height="10mm">
|
|
10
|
+
<group>
|
|
11
|
+
<capacitor capacitance="1uF" footprint="0603" name="C1" />
|
|
12
|
+
<net name="V5" />
|
|
13
|
+
<trace from="net.V5" to=".C1 .pos" />
|
|
14
|
+
</group>
|
|
15
|
+
</board>
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
Commonly used: `name`, `connectsTo`, `highlightColor`, `isPowerNet`, `isGroundNet`, `footprint`, `connections`
|
|
22
|
+
|
|
23
|
+
## References
|
|
24
|
+
|
|
25
|
+
- Props: [NetProps](https://github.com/tscircuit/props#netprops-net)
|
|
26
|
+
- Source: [lib/components/net.ts](https://github.com/tscircuit/props/blob/main/lib/components/net.ts)
|
|
27
|
+
- Local docs: [docs/docs/elements/net.mdx](../docs/docs/elements/net.mdx)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# `<netalias />`
|
|
2
|
+
|
|
3
|
+
Deprecated schematic net label alias. Prefer `<netlabel />`.
|
|
4
|
+
|
|
5
|
+
Deprecated in `@tscircuit/props`; prefer [`<netlabel />`](./netlabel.md).
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
export default () => (
|
|
11
|
+
<board width="20mm" height="10mm">
|
|
12
|
+
<netalias net="GND" schX={0} schY={0} anchorSide="right" />
|
|
13
|
+
</board>
|
|
14
|
+
)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
Commonly used: `net`, `connection`, `schX`, `schY`, `schRotation`, `anchorSide`, `name`, `footprint`
|
|
20
|
+
|
|
21
|
+
## References
|
|
22
|
+
|
|
23
|
+
- Props: [NetAliasProps](https://github.com/tscircuit/props#netaliasprops-netalias)
|
|
24
|
+
- Source: [lib/components/netalias.ts](https://github.com/tscircuit/props/blob/main/lib/components/netalias.ts)
|
|
25
|
+
- Local docs: [docs/docs/elements/netlabel.mdx](../docs/docs/elements/netlabel.mdx)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# `<netlabel />`
|
|
2
|
+
|
|
3
|
+
The `<netlabel />` element attaches a text label to a net on the schematic. It replaces the old `<netalias />` element.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { sel } from "tscircuit"
|
|
9
|
+
export default () => (
|
|
10
|
+
<board routingDisabled>
|
|
11
|
+
<chip
|
|
12
|
+
name="U1"
|
|
13
|
+
manufacturerPartNumber="I2C_SENSOR"
|
|
14
|
+
footprint="soic4"
|
|
15
|
+
pinLabels={{
|
|
16
|
+
pin1: "SCL",
|
|
17
|
+
pin2: "SDA",
|
|
18
|
+
pin3: "VCC",
|
|
19
|
+
pin4: "GND",
|
|
20
|
+
}}
|
|
21
|
+
schPinArrangement={{
|
|
22
|
+
leftSide: {
|
|
23
|
+
direction: "top-to-bottom",
|
|
24
|
+
pins: ["SCL", "SDA", "VCC", "GND"],
|
|
25
|
+
},
|
|
26
|
+
}}
|
|
27
|
+
connections={{
|
|
28
|
+
SCL: sel.net.SCL,
|
|
29
|
+
SDA: sel.net.SDA,
|
|
30
|
+
VCC: sel.net.V3_3,
|
|
31
|
+
GND: sel.net.GND,
|
|
32
|
+
}}
|
|
33
|
+
/>
|
|
34
|
+
<netlabel
|
|
35
|
+
schX={-2}
|
|
36
|
+
schY={-1}
|
|
37
|
+
anchorSide="top"
|
|
38
|
+
net="GND"
|
|
39
|
+
connection="U1.GND"
|
|
40
|
+
/>
|
|
41
|
+
<netlabel
|
|
42
|
+
schX={-2}
|
|
43
|
+
schY={0.8}
|
|
44
|
+
net="VCC"
|
|
45
|
+
connection="U1.VCC"
|
|
46
|
+
anchorSide="bottom"
|
|
47
|
+
/>
|
|
48
|
+
</board>
|
|
49
|
+
)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Props
|
|
53
|
+
|
|
54
|
+
Commonly used: `net`, `connection`, `connectsTo`, `schX`, `schY`, `schRotation`, `anchorSide`, `name`
|
|
55
|
+
|
|
56
|
+
## References
|
|
57
|
+
|
|
58
|
+
- Props: [NetLabelProps](https://github.com/tscircuit/props#netlabelprops-netlabel)
|
|
59
|
+
- Source: [lib/components/netlabel.ts](https://github.com/tscircuit/props/blob/main/lib/components/netlabel.ts)
|
|
60
|
+
- Local docs: [docs/docs/elements/netlabel.mdx](../docs/docs/elements/netlabel.mdx)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# `<opamp />`
|
|
2
|
+
|
|
3
|
+
Operational amplifier component with standard five-pin aliases.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="24mm" height="16mm">
|
|
10
|
+
<opamp
|
|
11
|
+
name="U1"
|
|
12
|
+
footprint="soic8"
|
|
13
|
+
connections={{
|
|
14
|
+
non_inverting_input: "net.IN+",
|
|
15
|
+
inverting_input: "net.IN-",
|
|
16
|
+
output: "net.OUT",
|
|
17
|
+
}}
|
|
18
|
+
/>
|
|
19
|
+
</board>
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
Commonly used: `connections`, `name`, `footprint`
|
|
26
|
+
|
|
27
|
+
## References
|
|
28
|
+
|
|
29
|
+
- Props: [OpAmpProps](https://github.com/tscircuit/props#opampprops-opamp)
|
|
30
|
+
- Source: [lib/components/opamp.ts](https://github.com/tscircuit/props/blob/main/lib/components/opamp.ts)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# `<panel />`
|
|
2
|
+
|
|
3
|
+
Manufacturing panel that arranges one or more boards.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<panel width="100mm" height="80mm" layoutMode="grid" boardGap="3mm">
|
|
10
|
+
<board width="20mm" height="10mm" />
|
|
11
|
+
<board width="20mm" height="10mm" />
|
|
12
|
+
</panel>
|
|
13
|
+
)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Props
|
|
17
|
+
|
|
18
|
+
Commonly used: `width`, `height`, `children`, `anchorAlignment`, `noSolderMask`, `panelizationMethod`, `boardGap`, `layoutMode`
|
|
19
|
+
|
|
20
|
+
## References
|
|
21
|
+
|
|
22
|
+
- Props: [PanelProps](https://github.com/tscircuit/props#panelprops-panel)
|
|
23
|
+
- Source: [lib/components/panel.ts](https://github.com/tscircuit/props/blob/main/lib/components/panel.ts)
|
|
24
|
+
- Local docs: [docs/docs/guides/tscircuit-essentials/panelization.mdx](../docs/docs/guides/tscircuit-essentials/panelization.mdx)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# `<pcbkeepout />`
|
|
2
|
+
|
|
3
|
+
Keepout region that blocks copper/features in a PCB area.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="20mm" height="20mm">
|
|
10
|
+
<pcbkeepout shape="rect" pcbX={0} pcbY={0} width="6mm" height="4mm" />
|
|
11
|
+
</board>
|
|
12
|
+
)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
Commonly used: `shape`, `radius`, `width`, `height`, `pcbX`, `pcbY`, `layer`
|
|
18
|
+
|
|
19
|
+
## References
|
|
20
|
+
|
|
21
|
+
- Props: [PcbKeepoutProps](https://github.com/tscircuit/props#pcbkeepoutprops-pcbkeepout)
|
|
22
|
+
- Source: [lib/components/pcb-keepout.ts](https://github.com/tscircuit/props/blob/main/lib/components/pcb-keepout.ts)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# `<pcbnotedimension />`
|
|
2
|
+
|
|
3
|
+
The `<pcbnotedimension />` element adds dimension annotations to PCBs showing measurements between two points.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="20mm" height="15mm">
|
|
10
|
+
<resistor name="R1" resistance="10k" footprint="0402" pcbX={-3} pcbY={0} />
|
|
11
|
+
<resistor name="R2" resistance="10k" footprint="0402" pcbX={3} pcbY={0} />
|
|
12
|
+
<pcbnotedimension
|
|
13
|
+
from={{ x: -3, y: 2 }}
|
|
14
|
+
to={{ x: 3, y: 2 }}
|
|
15
|
+
arrowSize={0.8}
|
|
16
|
+
fontSize={1.5}
|
|
17
|
+
color="#ffffff"
|
|
18
|
+
/>
|
|
19
|
+
</board>
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
Commonly used: `from`, `to`, `text`, `offset`, `font`, `fontSize`, `color`, `arrowSize`
|
|
26
|
+
|
|
27
|
+
## References
|
|
28
|
+
|
|
29
|
+
- Props: [PcbNoteDimensionProps](https://github.com/tscircuit/props#pcbnotedimensionprops-pcbnotedimension)
|
|
30
|
+
- Source: [lib/components/pcb-note-dimension.ts](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-dimension.ts)
|
|
31
|
+
- Local docs: [docs/docs/elements/pcbnotedimension.mdx](../docs/docs/elements/pcbnotedimension.mdx)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# `<pcbnoteline />`
|
|
2
|
+
|
|
3
|
+
Draw straight lines on your PCB for annotations, guides, and visual indicators.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="20mm" height="20mm">
|
|
10
|
+
<pcbnoteline
|
|
11
|
+
x1={-5}
|
|
12
|
+
y1={0}
|
|
13
|
+
x2={5}
|
|
14
|
+
y2={0}
|
|
15
|
+
strokeWidth={0.5}
|
|
16
|
+
color="#ff0000"
|
|
17
|
+
/>
|
|
18
|
+
</board>
|
|
19
|
+
)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
|
|
24
|
+
Commonly used: `x1`, `y1`, `x2`, `y2`, `strokeWidth`, `color`, `isDashed`, `name`
|
|
25
|
+
|
|
26
|
+
## References
|
|
27
|
+
|
|
28
|
+
- Props: [PcbNoteLineProps](https://github.com/tscircuit/props#pcbnotelineprops-pcbnoteline)
|
|
29
|
+
- Source: [lib/components/pcb-note-line.ts](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-line.ts)
|
|
30
|
+
- Local docs: [docs/docs/elements/pcbnoteline.mdx](../docs/docs/elements/pcbnoteline.mdx)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# `<pcbnotepath />`
|
|
2
|
+
|
|
3
|
+
Draw complex paths and polylines on your PCB using multiple connected points.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="20mm" height="20mm">
|
|
10
|
+
<pcbnotepath
|
|
11
|
+
strokeWidth={0.3}
|
|
12
|
+
color="#ff0000"
|
|
13
|
+
route={[
|
|
14
|
+
{ x: -5, y: 0 },
|
|
15
|
+
{ x: 0, y: 5 },
|
|
16
|
+
{ x: 5, y: 0 },
|
|
17
|
+
]}
|
|
18
|
+
/>
|
|
19
|
+
</board>
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
Commonly used: `route`, `strokeWidth`, `color`, `name`, `footprint`, `connections`
|
|
26
|
+
|
|
27
|
+
## References
|
|
28
|
+
|
|
29
|
+
- Props: [PcbNotePathProps](https://github.com/tscircuit/props#pcbnotepathprops-pcbnotepath)
|
|
30
|
+
- Source: [lib/components/pcb-note-path.ts](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-path.ts)
|
|
31
|
+
- Local docs: [docs/docs/elements/pcbnotepath.mdx](../docs/docs/elements/pcbnotepath.mdx)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# `<pcbnoterect />`
|
|
2
|
+
|
|
3
|
+
Draw rectangles on your PCB to highlight areas, create visual boundaries, and organize board sections.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="20mm" height="20mm">
|
|
10
|
+
<pcbnoterect
|
|
11
|
+
pcbX={0}
|
|
12
|
+
pcbY={0}
|
|
13
|
+
width={10}
|
|
14
|
+
height={6}
|
|
15
|
+
strokeWidth={0.3}
|
|
16
|
+
color="#ff0000"
|
|
17
|
+
/>
|
|
18
|
+
</board>
|
|
19
|
+
)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
|
|
24
|
+
Commonly used: `width`, `height`, `strokeWidth`, `isFilled`, `hasStroke`, `isStrokeDashed`, `color`, `cornerRadius`
|
|
25
|
+
|
|
26
|
+
## References
|
|
27
|
+
|
|
28
|
+
- Props: [PcbNoteRectProps](https://github.com/tscircuit/props#pcbnoterectprops-pcbnoterect)
|
|
29
|
+
- Source: [lib/components/pcb-note-rect.ts](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-rect.ts)
|
|
30
|
+
- Local docs: [docs/docs/elements/pcbnoterect.mdx](../docs/docs/elements/pcbnoterect.mdx)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# `<pcbnotetext />`
|
|
2
|
+
|
|
3
|
+
Add text annotations and labels to your PCB layout.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="20mm" height="20mm">
|
|
10
|
+
<pcbnotetext
|
|
11
|
+
pcbX={0}
|
|
12
|
+
pcbY={0}
|
|
13
|
+
text="Hello PCB"
|
|
14
|
+
fontSize={1.5}
|
|
15
|
+
anchorAlignment="center"
|
|
16
|
+
/>
|
|
17
|
+
</board>
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Props
|
|
22
|
+
|
|
23
|
+
Commonly used: `text`, `anchorAlignment`, `font`, `fontSize`, `color`, `name`, `footprint`, `connections`
|
|
24
|
+
|
|
25
|
+
## References
|
|
26
|
+
|
|
27
|
+
- Props: [PcbNoteTextProps](https://github.com/tscircuit/props#pcbnotetextprops-pcbnotetext)
|
|
28
|
+
- Source: [lib/components/pcb-note-text.ts](https://github.com/tscircuit/props/blob/main/lib/components/pcb-note-text.ts)
|
|
29
|
+
- Local docs: [docs/docs/elements/pcbnotetext.mdx](../docs/docs/elements/pcbnotetext.mdx)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# `<pcbtrace />`
|
|
2
|
+
|
|
3
|
+
Explicit low-level PCB trace geometry.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="20mm" height="20mm">
|
|
10
|
+
<pcbtrace
|
|
11
|
+
layer="top"
|
|
12
|
+
thickness="0.2mm"
|
|
13
|
+
route={[
|
|
14
|
+
{ x: -4, y: 0 },
|
|
15
|
+
{ x: 0, y: 2 },
|
|
16
|
+
{ x: 4, y: 0 },
|
|
17
|
+
]}
|
|
18
|
+
/>
|
|
19
|
+
</board>
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
Commonly used: `layer`, `thickness`, `route`, `pcbX`, `pcbY`
|
|
26
|
+
|
|
27
|
+
## References
|
|
28
|
+
|
|
29
|
+
- Props: [PcbTraceProps](https://github.com/tscircuit/props#pcbtraceprops-pcbtrace)
|
|
30
|
+
- Source: [lib/components/pcb-trace.ts](https://github.com/tscircuit/props/blob/main/lib/components/pcb-trace.ts)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<pinheader />`
|
|
2
|
+
|
|
3
|
+
The `<pinheader />` element is used to create a male or female pin header with configurable spacing and number of pins.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="30mm" height="10mm">
|
|
10
|
+
<pinheader
|
|
11
|
+
name="J1"
|
|
12
|
+
pinCount={8}
|
|
13
|
+
gender="male"
|
|
14
|
+
pitch="2.54mm"
|
|
15
|
+
footprint="pinrow8_rows2"
|
|
16
|
+
doubleRow={true}
|
|
17
|
+
showSilkscreenPinLabels={true}
|
|
18
|
+
pinLabels={["VCC", "GND", "SDA", "SCL", "MISO", "MOSI", "SCK", "CS"]}
|
|
19
|
+
pcbX={0}
|
|
20
|
+
pcbY={0}
|
|
21
|
+
/>
|
|
22
|
+
</board>
|
|
23
|
+
)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
Commonly used: `pinCount`, `pitch`, `schFacingDirection`, `gender`, `showSilkscreenPinLabels`, `pcbPinLabels`, `doubleRow`, `rightAngle`
|
|
29
|
+
|
|
30
|
+
## References
|
|
31
|
+
|
|
32
|
+
- Props: [PinHeaderProps](https://github.com/tscircuit/props#pinheaderprops-pinheader)
|
|
33
|
+
- Source: [lib/components/pin-header.ts](https://github.com/tscircuit/props/blob/main/lib/components/pin-header.ts)
|
|
34
|
+
- Local docs: [docs/docs/elements/pinheader.mdx](../docs/docs/elements/pinheader.mdx)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# `<pinout />`
|
|
2
|
+
|
|
3
|
+
Chip-style element used to generate or document pinouts.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="30mm" height="18mm">
|
|
10
|
+
<pinout
|
|
11
|
+
name="U1"
|
|
12
|
+
footprint="dip8"
|
|
13
|
+
pinLabels={{ 1: "GND", 8: "VCC" }}
|
|
14
|
+
/>
|
|
15
|
+
</board>
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
Commonly used: `name`, `footprint`, `connections`
|
|
22
|
+
|
|
23
|
+
## References
|
|
24
|
+
|
|
25
|
+
- Props: [PinoutProps](https://github.com/tscircuit/props#pinoutprops-pinout)
|
|
26
|
+
- Source: [lib/components/pinout.ts](https://github.com/tscircuit/props/blob/main/lib/components/pinout.ts)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `<platedhole />`
|
|
2
|
+
|
|
3
|
+
The `<platedhole />` element is used to represent a plated through hole on a PCB.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="10mm" height="10mm">
|
|
10
|
+
<chip name="U1" footprint={
|
|
11
|
+
<footprint>
|
|
12
|
+
<platedhole
|
|
13
|
+
pcbX="0mm"
|
|
14
|
+
pcbY="0mm"
|
|
15
|
+
shape="circle"
|
|
16
|
+
holeDiameter="1mm"
|
|
17
|
+
outerDiameter="2mm"
|
|
18
|
+
portHints={["pin1"]}
|
|
19
|
+
/>
|
|
20
|
+
</footprint>
|
|
21
|
+
} />
|
|
22
|
+
</board>
|
|
23
|
+
)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
Commonly used: `name`, `connectsTo`, `shape`, `holeDiameter`, `outerDiameter`, `padDiameter`, `portHints`, `solderMaskMargin`
|
|
29
|
+
|
|
30
|
+
## References
|
|
31
|
+
|
|
32
|
+
- Props: [CirclePlatedHoleProps](https://github.com/tscircuit/props#circleplatedholeprops-platedhole)
|
|
33
|
+
- Source: [lib/components/platedhole.ts](https://github.com/tscircuit/props/blob/main/lib/components/platedhole.ts)
|
|
34
|
+
- Local docs: [docs/docs/footprints/platedhole.mdx](../docs/docs/footprints/platedhole.mdx)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `<port />`
|
|
2
|
+
|
|
3
|
+
Define connection points within custom schematic symbols.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="10mm" height="10mm">
|
|
10
|
+
<chip
|
|
11
|
+
name="D1"
|
|
12
|
+
symbol={
|
|
13
|
+
<symbol>
|
|
14
|
+
{/* Diode triangle */}
|
|
15
|
+
<schematicline x1={-0.3} y1={-0.4} x2={-0.3} y2={0.4} strokeWidth={0.05} />
|
|
16
|
+
<schematicline x1={-0.3} y1={0.4} x2={0.3} y2={0} strokeWidth={0.05} />
|
|
17
|
+
<schematicline x1={0.3} y1={0} x2={-0.3} y2={-0.4} strokeWidth={0.05} />
|
|
18
|
+
{/* Cathode bar */}
|
|
19
|
+
<schematicline x1={0.3} y1={-0.4} x2={0.3} y2={0.4} strokeWidth={0.05} />
|
|
20
|
+
{/* Ports */}
|
|
21
|
+
<port name="A" schX={-0.3} schY={0} direction="left" />
|
|
22
|
+
<port name="K" schX={0.3} schY={0} direction="right" />
|
|
23
|
+
</symbol>
|
|
24
|
+
}
|
|
25
|
+
/>
|
|
26
|
+
</board>
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
Commonly used: `name`, `pinNumber`, `schStemLength`, `aliases`, `layer`, `layers`, `schX`, `schY`
|
|
33
|
+
|
|
34
|
+
## References
|
|
35
|
+
|
|
36
|
+
- Props: [PortProps](https://github.com/tscircuit/props#portprops-port)
|
|
37
|
+
- Source: [lib/components/port.ts](https://github.com/tscircuit/props/blob/main/lib/components/port.ts)
|
|
38
|
+
- Local docs: [docs/docs/elements/port.mdx](../docs/docs/elements/port.mdx)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# `<potentiometer />`
|
|
2
|
+
|
|
3
|
+
A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. You can also attach two terminals to create a variable resistor.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="10mm" height="10mm">
|
|
10
|
+
<potentiometer
|
|
11
|
+
name="P1"
|
|
12
|
+
maxResistance="10k"
|
|
13
|
+
footprint="pinrow3"
|
|
14
|
+
/>
|
|
15
|
+
</board>
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
Commonly used: `maxResistance`, `pinVariant`, `connections`, `name`, `footprint`
|
|
22
|
+
|
|
23
|
+
## References
|
|
24
|
+
|
|
25
|
+
- Props: [PotentiometerProps](https://github.com/tscircuit/props#potentiometerprops-potentiometer)
|
|
26
|
+
- Source: [lib/components/potentiometer.ts](https://github.com/tscircuit/props/blob/main/lib/components/potentiometer.ts)
|
|
27
|
+
- Local docs: [docs/docs/elements/potentiometer.mdx](../docs/docs/elements/potentiometer.mdx)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# `<pushbutton />`
|
|
2
|
+
|
|
3
|
+
Pushbuttons a common type of switch normally open momentary switch. They are commonly used as a reset or pairing button.
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
export default () => (
|
|
9
|
+
<board width="10mm" height="10mm">
|
|
10
|
+
<pushbutton
|
|
11
|
+
name="SW1"
|
|
12
|
+
footprint="pushbutton"
|
|
13
|
+
/>
|
|
14
|
+
</board>
|
|
15
|
+
)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Props
|
|
19
|
+
|
|
20
|
+
Commonly used: `name`, `footprint`, `connections`
|
|
21
|
+
|
|
22
|
+
## References
|
|
23
|
+
|
|
24
|
+
- Props: [PushButtonProps](https://github.com/tscircuit/props#pushbuttonprops-pushbutton)
|
|
25
|
+
- Source: [lib/components/push-button.ts](https://github.com/tscircuit/props/blob/main/lib/components/push-button.ts)
|
|
26
|
+
- Local docs: [docs/docs/elements/pushbutton.mdx](../docs/docs/elements/pushbutton.mdx)
|