copperflow 0.3.3 → 0.4.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.
Files changed (466) hide show
  1. package/README.md +142 -12
  2. package/dist/app/THIRD_PARTY_LICENSES.txt +5 -0
  3. package/dist/app/assets/NewPartDialog-BBJaZFCo.js +160 -0
  4. package/dist/app/assets/VerifyPartDialog-BHLqD_WJ.css +1 -0
  5. package/dist/app/assets/VerifyPartDialog-Ey6xpQ_U.js +2 -0
  6. package/dist/app/assets/index-BKoIKo22.css +1 -0
  7. package/dist/app/assets/index-DPmr2dR1.js +20 -0
  8. package/dist/app/assets/texture-worker-CyI_g_XZ.js +1 -0
  9. package/dist/app/index.html +2 -2
  10. package/dist/cli-commands.js +170 -23
  11. package/dist/cli-commands.js.map +1 -1
  12. package/dist/cli-impedance.d.ts +4 -0
  13. package/dist/cli-impedance.js +56 -0
  14. package/dist/cli-impedance.js.map +1 -0
  15. package/dist/cli-library.d.ts +5 -0
  16. package/dist/cli-library.js +58 -0
  17. package/dist/cli-library.js.map +1 -0
  18. package/dist/cli-modules.d.ts +6 -0
  19. package/dist/cli-modules.js +33 -0
  20. package/dist/cli-modules.js.map +1 -0
  21. package/dist/cli-simulate.d.ts +3 -0
  22. package/dist/cli-simulate.js +54 -0
  23. package/dist/cli-simulate.js.map +1 -0
  24. package/dist/cli-studio.d.ts +1 -0
  25. package/dist/cli-studio.js +27 -0
  26. package/dist/cli-studio.js.map +1 -0
  27. package/dist/core/analyze.js +5 -2
  28. package/dist/core/analyze.js.map +1 -1
  29. package/dist/core/board-import.d.ts +39 -0
  30. package/dist/core/board-import.js +114 -0
  31. package/dist/core/board-import.js.map +1 -0
  32. package/dist/core/board-shape-edit.d.ts +13 -0
  33. package/dist/core/board-shape-edit.js +134 -0
  34. package/dist/core/board-shape-edit.js.map +1 -0
  35. package/dist/core/bom.d.ts +6 -1
  36. package/dist/core/bom.js +23 -4
  37. package/dist/core/bom.js.map +1 -1
  38. package/dist/core/case-results.d.ts +4 -0
  39. package/dist/core/case-results.js +9 -0
  40. package/dist/core/case-results.js.map +1 -0
  41. package/dist/core/change-files.d.ts +31 -0
  42. package/dist/core/change-files.js +67 -0
  43. package/dist/core/change-files.js.map +1 -0
  44. package/dist/core/change-render.d.ts +18 -0
  45. package/dist/core/change-render.js +48 -0
  46. package/dist/core/change-render.js.map +1 -0
  47. package/dist/core/change-view.d.ts +33 -0
  48. package/dist/core/change-view.js +73 -0
  49. package/dist/core/change-view.js.map +1 -0
  50. package/dist/core/change-words.d.ts +39 -0
  51. package/dist/core/change-words.js +214 -0
  52. package/dist/core/change-words.js.map +1 -0
  53. package/dist/core/checklist-text.d.ts +21 -0
  54. package/dist/core/checklist-text.js +59 -0
  55. package/dist/core/checklist-text.js.map +1 -0
  56. package/dist/core/edit.js +12 -3
  57. package/dist/core/edit.js.map +1 -1
  58. package/dist/core/fabrication.d.ts +9 -2
  59. package/dist/core/fabrication.js +29 -10
  60. package/dist/core/fabrication.js.map +1 -1
  61. package/dist/core/git.d.ts +16 -0
  62. package/dist/core/git.js +51 -0
  63. package/dist/core/git.js.map +1 -0
  64. package/dist/core/home.d.ts +2 -0
  65. package/dist/core/home.js +10 -0
  66. package/dist/core/home.js.map +1 -0
  67. package/dist/core/index.d.ts +1 -0
  68. package/dist/core/index.js +1 -0
  69. package/dist/core/index.js.map +1 -1
  70. package/dist/core/instance-copper.d.ts +25 -0
  71. package/dist/core/instance-copper.js +142 -0
  72. package/dist/core/instance-copper.js.map +1 -0
  73. package/dist/core/instance-move.d.ts +23 -0
  74. package/dist/core/instance-move.js +59 -0
  75. package/dist/core/instance-move.js.map +1 -0
  76. package/dist/core/instance-requests.d.ts +3 -2
  77. package/dist/core/instance-requests.js +17 -3
  78. package/dist/core/instance-requests.js.map +1 -1
  79. package/dist/core/library-modules.d.ts +29 -0
  80. package/dist/core/library-modules.js +324 -0
  81. package/dist/core/library-modules.js.map +1 -0
  82. package/dist/core/library-sources.d.ts +33 -0
  83. package/dist/core/library-sources.js +179 -0
  84. package/dist/core/library-sources.js.map +1 -0
  85. package/dist/core/library.d.ts +46 -0
  86. package/dist/core/library.js +54 -16
  87. package/dist/core/library.js.map +1 -1
  88. package/dist/core/modules.d.ts +45 -0
  89. package/dist/core/modules.js +301 -0
  90. package/dist/core/modules.js.map +1 -0
  91. package/dist/core/new-circuit-sheets.d.ts +11 -2
  92. package/dist/core/new-circuit-sheets.js +35 -6
  93. package/dist/core/new-circuit-sheets.js.map +1 -1
  94. package/dist/core/order-report.d.ts +10 -0
  95. package/dist/core/order-report.js +93 -0
  96. package/dist/core/order-report.js.map +1 -0
  97. package/dist/core/pin-header.d.ts +5 -0
  98. package/dist/core/pin-header.js +77 -0
  99. package/dist/core/pin-header.js.map +1 -0
  100. package/dist/core/pin-map.d.ts +46 -0
  101. package/dist/core/pin-map.js +101 -0
  102. package/dist/core/pin-map.js.map +1 -0
  103. package/dist/core/placement-write.d.ts +2 -0
  104. package/dist/core/placement-write.js +12 -6
  105. package/dist/core/placement-write.js.map +1 -1
  106. package/dist/core/plain-sheet.d.ts +12 -0
  107. package/dist/core/plain-sheet.js +169 -0
  108. package/dist/core/plain-sheet.js.map +1 -0
  109. package/dist/core/render.d.ts +24 -4
  110. package/dist/core/render.js +16 -6
  111. package/dist/core/render.js.map +1 -1
  112. package/dist/core/sheet-card.d.ts +37 -0
  113. package/dist/core/sheet-card.js +163 -0
  114. package/dist/core/sheet-card.js.map +1 -0
  115. package/dist/core/sheet-files.js +10 -3
  116. package/dist/core/sheet-files.js.map +1 -1
  117. package/dist/core/simulate.d.ts +19 -0
  118. package/dist/core/simulate.js +72 -0
  119. package/dist/core/simulate.js.map +1 -0
  120. package/dist/core/step-export.d.ts +17 -0
  121. package/dist/core/step-export.js +35 -0
  122. package/dist/core/step-export.js.map +1 -0
  123. package/dist/core/supplier-prop.d.ts +6 -0
  124. package/dist/core/supplier-prop.js +21 -0
  125. package/dist/core/supplier-prop.js.map +1 -0
  126. package/dist/core/types.d.ts +20 -0
  127. package/dist/core/workspace.d.ts +6 -1
  128. package/dist/core/workspace.js +15 -3
  129. package/dist/core/workspace.js.map +1 -1
  130. package/dist/engine/board.js +3 -1
  131. package/dist/engine/board.js.map +1 -1
  132. package/dist/engine/checks/drc-parts.js +7 -7
  133. package/dist/engine/checks/drc-parts.js.map +1 -1
  134. package/dist/engine/checks/erc.js +35 -3
  135. package/dist/engine/checks/erc.js.map +1 -1
  136. package/dist/engine/checks/fast-lines.d.ts +60 -0
  137. package/dist/engine/checks/fast-lines.js +209 -0
  138. package/dist/engine/checks/fast-lines.js.map +1 -0
  139. package/dist/engine/checks/index.js +2 -0
  140. package/dist/engine/checks/index.js.map +1 -1
  141. package/dist/engine/component.d.ts +2 -0
  142. package/dist/engine/component.js +18 -1
  143. package/dist/engine/component.js.map +1 -1
  144. package/dist/engine/design-diff.d.ts +120 -0
  145. package/dist/engine/design-diff.js +249 -0
  146. package/dist/engine/design-diff.js.map +1 -0
  147. package/dist/engine/design.d.ts +3 -0
  148. package/dist/engine/design.js +7 -2
  149. package/dist/engine/design.js.map +1 -1
  150. package/dist/engine/dxf/board.d.ts +42 -0
  151. package/dist/engine/dxf/board.js +218 -0
  152. package/dist/engine/dxf/board.js.map +1 -0
  153. package/dist/engine/dxf/index.d.ts +2 -0
  154. package/dist/engine/dxf/index.js +3 -0
  155. package/dist/engine/dxf/index.js.map +1 -0
  156. package/dist/engine/dxf/reader.d.ts +43 -0
  157. package/dist/engine/dxf/reader.js +142 -0
  158. package/dist/engine/dxf/reader.js.map +1 -0
  159. package/dist/engine/elaborate.js +14 -4
  160. package/dist/engine/elaborate.js.map +1 -1
  161. package/dist/engine/fab/designator-places.d.ts +101 -0
  162. package/dist/engine/fab/designator-places.js +259 -0
  163. package/dist/engine/fab/designator-places.js.map +1 -0
  164. package/dist/engine/fab/designators.d.ts +26 -14
  165. package/dist/engine/fab/designators.js +320 -70
  166. package/dist/engine/fab/designators.js.map +1 -1
  167. package/dist/engine/fab/export.d.ts +17 -1
  168. package/dist/engine/fab/export.js +26 -4
  169. package/dist/engine/fab/export.js.map +1 -1
  170. package/dist/engine/fab/layers.js +6 -6
  171. package/dist/engine/fab/layers.js.map +1 -1
  172. package/dist/engine/fab/names.d.ts +2 -2
  173. package/dist/engine/fab/names.js +4 -2
  174. package/dist/engine/fab/names.js.map +1 -1
  175. package/dist/engine/fab/picture/board-picture.d.ts +52 -0
  176. package/dist/engine/fab/picture/board-picture.js +102 -0
  177. package/dist/engine/fab/picture/board-picture.js.map +1 -0
  178. package/dist/engine/fab/picture/board-view.d.ts +20 -0
  179. package/dist/engine/fab/picture/board-view.js +50 -0
  180. package/dist/engine/fab/picture/board-view.js.map +1 -0
  181. package/dist/engine/fab/picture/compose.d.ts +50 -0
  182. package/dist/engine/fab/picture/compose.js +208 -0
  183. package/dist/engine/fab/picture/compose.js.map +1 -0
  184. package/dist/engine/fab/picture/layer-images.d.ts +9 -0
  185. package/dist/engine/fab/picture/layer-images.js +67 -0
  186. package/dist/engine/fab/picture/layer-images.js.map +1 -0
  187. package/dist/engine/fab/picture/looks.d.ts +152 -0
  188. package/dist/engine/fab/picture/looks.js +53 -0
  189. package/dist/engine/fab/picture/looks.js.map +1 -0
  190. package/dist/engine/fab/picture/png.d.ts +31 -0
  191. package/dist/engine/fab/picture/png.js +47 -0
  192. package/dist/engine/fab/picture/png.js.map +1 -0
  193. package/dist/engine/fab/picture/raster.d.ts +46 -0
  194. package/dist/engine/fab/picture/raster.js +170 -0
  195. package/dist/engine/fab/picture/raster.js.map +1 -0
  196. package/dist/engine/fab/stroke-font.d.ts +2 -2
  197. package/dist/engine/fab/stroke-font.js +7 -6
  198. package/dist/engine/fab/stroke-font.js.map +1 -1
  199. package/dist/engine/fab/zip.d.ts +2 -1
  200. package/dist/engine/fab/zip.js +1 -1
  201. package/dist/engine/fab/zip.js.map +1 -1
  202. package/dist/engine/impedance.d.ts +72 -0
  203. package/dist/engine/impedance.js +133 -0
  204. package/dist/engine/impedance.js.map +1 -0
  205. package/dist/engine/line-length.d.ts +15 -0
  206. package/dist/engine/line-length.js +116 -0
  207. package/dist/engine/line-length.js.map +1 -0
  208. package/dist/engine/model.d.ts +17 -1
  209. package/dist/engine/model.js.map +1 -1
  210. package/dist/engine/pcb-place/block-board.d.ts +9 -0
  211. package/dist/engine/pcb-place/block-board.js +256 -0
  212. package/dist/engine/pcb-place/block-board.js.map +1 -0
  213. package/dist/engine/pcb-place/blocks.d.ts +31 -6
  214. package/dist/engine/pcb-place/blocks.js +37 -8
  215. package/dist/engine/pcb-place/blocks.js.map +1 -1
  216. package/dist/engine/pcb-place/constructive.d.ts +3 -2
  217. package/dist/engine/pcb-place/constructive.js +14 -2
  218. package/dist/engine/pcb-place/constructive.js.map +1 -1
  219. package/dist/engine/pcb-place/index.d.ts +8 -0
  220. package/dist/engine/pcb-place/index.js +7 -0
  221. package/dist/engine/pcb-place/index.js.map +1 -1
  222. package/dist/engine/pcb-place/roles.d.ts +3 -1
  223. package/dist/engine/pcb-place/roles.js +5 -0
  224. package/dist/engine/pcb-place/roles.js.map +1 -1
  225. package/dist/engine/pcb-place/scope.js +6 -1
  226. package/dist/engine/pcb-place/scope.js.map +1 -1
  227. package/dist/engine/pcb.d.ts +6 -0
  228. package/dist/engine/pcb.js +12 -1
  229. package/dist/engine/pcb.js.map +1 -1
  230. package/dist/engine/router/replicate.js +4 -0
  231. package/dist/engine/router/replicate.js.map +1 -1
  232. package/dist/engine/router/route-board.d.ts +2 -0
  233. package/dist/engine/router/route-board.js +27 -1
  234. package/dist/engine/router/route-board.js.map +1 -1
  235. package/dist/engine/rules/impedance-widths.d.ts +20 -0
  236. package/dist/engine/rules/impedance-widths.js +57 -0
  237. package/dist/engine/rules/impedance-widths.js.map +1 -0
  238. package/dist/engine/rules/load.js +11 -2
  239. package/dist/engine/rules/load.js.map +1 -1
  240. package/dist/engine/rules/pairs.d.ts +27 -0
  241. package/dist/engine/rules/pairs.js +86 -0
  242. package/dist/engine/rules/pairs.js.map +1 -0
  243. package/dist/engine/rules/profiles.js +16 -0
  244. package/dist/engine/rules/profiles.js.map +1 -1
  245. package/dist/engine/rules/schema.d.ts +44 -0
  246. package/dist/engine/rules/schema.js +16 -1
  247. package/dist/engine/rules/schema.js.map +1 -1
  248. package/dist/engine/sheet-ports.d.ts +17 -1
  249. package/dist/engine/sheet-ports.js +38 -1
  250. package/dist/engine/sheet-ports.js.map +1 -1
  251. package/dist/engine/sim/answer.d.ts +13 -0
  252. package/dist/engine/sim/answer.js +101 -0
  253. package/dist/engine/sim/answer.js.map +1 -0
  254. package/dist/engine/sim/cases.d.ts +29 -0
  255. package/dist/engine/sim/cases.js +63 -0
  256. package/dist/engine/sim/cases.js.map +1 -0
  257. package/dist/engine/sim/devices.d.ts +109 -0
  258. package/dist/engine/sim/devices.js +137 -0
  259. package/dist/engine/sim/devices.js.map +1 -0
  260. package/dist/engine/sim/elements.d.ts +49 -0
  261. package/dist/engine/sim/elements.js +2 -0
  262. package/dist/engine/sim/elements.js.map +1 -0
  263. package/dist/engine/sim/from-circuit.d.ts +52 -0
  264. package/dist/engine/sim/from-circuit.js +354 -0
  265. package/dist/engine/sim/from-circuit.js.map +1 -0
  266. package/dist/engine/sim/limits.d.ts +12 -0
  267. package/dist/engine/sim/limits.js +79 -0
  268. package/dist/engine/sim/limits.js.map +1 -0
  269. package/dist/engine/sim/linear.d.ts +2 -0
  270. package/dist/engine/sim/linear.js +49 -0
  271. package/dist/engine/sim/linear.js.map +1 -0
  272. package/dist/engine/sim/model-schema.d.ts +246 -0
  273. package/dist/engine/sim/model-schema.js +115 -0
  274. package/dist/engine/sim/model-schema.js.map +1 -0
  275. package/dist/engine/sim/part-models.d.ts +47 -0
  276. package/dist/engine/sim/part-models.js +102 -0
  277. package/dist/engine/sim/part-models.js.map +1 -0
  278. package/dist/engine/sim/run.d.ts +14 -0
  279. package/dist/engine/sim/run.js +13 -0
  280. package/dist/engine/sim/run.js.map +1 -0
  281. package/dist/engine/sim/solve.d.ts +42 -0
  282. package/dist/engine/sim/solve.js +294 -0
  283. package/dist/engine/sim/solve.js.map +1 -0
  284. package/dist/engine/sim/spice.d.ts +5 -0
  285. package/dist/engine/sim/spice.js +66 -0
  286. package/dist/engine/sim/spice.js.map +1 -0
  287. package/dist/engine/sim/values.d.ts +4 -0
  288. package/dist/engine/sim/values.js +40 -0
  289. package/dist/engine/sim/values.js.map +1 -0
  290. package/dist/engine/solid/heights.d.ts +29 -0
  291. package/dist/engine/solid/heights.js +87 -0
  292. package/dist/engine/solid/heights.js.map +1 -0
  293. package/dist/engine/solid/limits.d.ts +7 -0
  294. package/dist/engine/solid/limits.js +20 -0
  295. package/dist/engine/solid/limits.js.map +1 -0
  296. package/dist/engine/solid/model.d.ts +54 -0
  297. package/dist/engine/solid/model.js +147 -0
  298. package/dist/engine/solid/model.js.map +1 -0
  299. package/dist/engine/solid/step.d.ts +5 -0
  300. package/dist/engine/solid/step.js +164 -0
  301. package/dist/engine/solid/step.js.map +1 -0
  302. package/dist/engine/solid/thickness.d.ts +11 -0
  303. package/dist/engine/solid/thickness.js +10 -0
  304. package/dist/engine/solid/thickness.js.map +1 -0
  305. package/dist/library/kicad/board.d.ts +26 -0
  306. package/dist/library/kicad/board.js +96 -0
  307. package/dist/library/kicad/board.js.map +1 -0
  308. package/dist/library/kicad/copper.d.ts +44 -0
  309. package/dist/library/kicad/copper.js +106 -0
  310. package/dist/library/kicad/copper.js.map +1 -0
  311. package/dist/library/kicad/footprints.d.ts +62 -0
  312. package/dist/library/kicad/footprints.js +184 -0
  313. package/dist/library/kicad/footprints.js.map +1 -0
  314. package/dist/library/kicad/geometry.d.ts +36 -0
  315. package/dist/library/kicad/geometry.js +84 -0
  316. package/dist/library/kicad/geometry.js.map +1 -0
  317. package/dist/library/kicad/import.d.ts +58 -0
  318. package/dist/library/kicad/import.js +240 -0
  319. package/dist/library/kicad/import.js.map +1 -0
  320. package/dist/library/kicad/plan.d.ts +40 -0
  321. package/dist/library/kicad/plan.js +139 -0
  322. package/dist/library/kicad/plan.js.map +1 -0
  323. package/dist/library/kicad/read.d.ts +30 -0
  324. package/dist/library/kicad/read.js +105 -0
  325. package/dist/library/kicad/read.js.map +1 -0
  326. package/dist/library/kicad/sexpr.d.ts +36 -0
  327. package/dist/library/kicad/sexpr.js +153 -0
  328. package/dist/library/kicad/sexpr.js.map +1 -0
  329. package/dist/library/kicad/tally.d.ts +32 -0
  330. package/dist/library/kicad/tally.js +55 -0
  331. package/dist/library/kicad/tally.js.map +1 -0
  332. package/dist/library/kicad/write.d.ts +37 -0
  333. package/dist/library/kicad/write.js +146 -0
  334. package/dist/library/kicad/write.js.map +1 -0
  335. package/dist/library/new-part.d.ts +2 -0
  336. package/dist/library/new-part.js +1 -0
  337. package/dist/library/new-part.js.map +1 -1
  338. package/dist/mcp/batch.d.ts +2 -2
  339. package/dist/mcp/batch.js +12 -12
  340. package/dist/mcp/batch.js.map +1 -1
  341. package/dist/mcp/board-import-tool.d.ts +25 -0
  342. package/dist/mcp/board-import-tool.js +35 -0
  343. package/dist/mcp/board-import-tool.js.map +1 -0
  344. package/dist/mcp/board-summary.d.ts +1 -1
  345. package/dist/mcp/board-summary.js +1 -1
  346. package/dist/mcp/board-summary.js.map +1 -1
  347. package/dist/mcp/copper-summary.d.ts +2 -0
  348. package/dist/mcp/copper-summary.js +4 -2
  349. package/dist/mcp/copper-summary.js.map +1 -1
  350. package/dist/mcp/copper-tools.d.ts +4 -4
  351. package/dist/mcp/copper-tools.js +19 -19
  352. package/dist/mcp/copper-tools.js.map +1 -1
  353. package/dist/mcp/create-part.d.ts +24 -1
  354. package/dist/mcp/create-part.js +9 -8
  355. package/dist/mcp/create-part.js.map +1 -1
  356. package/dist/mcp/datasheet-tools.d.ts +1 -1
  357. package/dist/mcp/datasheet-tools.js +4 -4
  358. package/dist/mcp/datasheet-tools.js.map +1 -1
  359. package/dist/mcp/fast-summary.d.ts +3 -0
  360. package/dist/mcp/fast-summary.js +46 -0
  361. package/dist/mcp/fast-summary.js.map +1 -0
  362. package/dist/mcp/fillet-tools.d.ts +2 -2
  363. package/dist/mcp/fillet-tools.js +6 -6
  364. package/dist/mcp/fillet-tools.js.map +1 -1
  365. package/dist/mcp/guide.d.ts +1 -1
  366. package/dist/mcp/guide.js +4 -3
  367. package/dist/mcp/guide.js.map +1 -1
  368. package/dist/mcp/import-part.d.ts +1 -1
  369. package/dist/mcp/import-part.js +4 -4
  370. package/dist/mcp/import-part.js.map +1 -1
  371. package/dist/mcp/make-sheet.d.ts +1 -1
  372. package/dist/mcp/make-sheet.js +6 -6
  373. package/dist/mcp/make-sheet.js.map +1 -1
  374. package/dist/mcp/module-tools.d.ts +4 -0
  375. package/dist/mcp/module-tools.js +21 -0
  376. package/dist/mcp/module-tools.js.map +1 -0
  377. package/dist/mcp/new-circuit.d.ts +13 -2
  378. package/dist/mcp/new-circuit.js +30 -28
  379. package/dist/mcp/new-circuit.js.map +1 -1
  380. package/dist/mcp/open-studio.d.ts +30 -0
  381. package/dist/mcp/open-studio.js +97 -0
  382. package/dist/mcp/open-studio.js.map +1 -0
  383. package/dist/mcp/place-tools.d.ts +2 -2
  384. package/dist/mcp/place-tools.js +14 -11
  385. package/dist/mcp/place-tools.js.map +1 -1
  386. package/dist/mcp/pour-tools.d.ts +4 -4
  387. package/dist/mcp/pour-tools.js +18 -18
  388. package/dist/mcp/pour-tools.js.map +1 -1
  389. package/dist/mcp/project-tools.d.ts +3 -3
  390. package/dist/mcp/project-tools.js +8 -8
  391. package/dist/mcp/project-tools.js.map +1 -1
  392. package/dist/mcp/render-tool.d.ts +33 -2
  393. package/dist/mcp/render-tool.js +23 -7
  394. package/dist/mcp/render-tool.js.map +1 -1
  395. package/dist/mcp/route-tools.d.ts +2 -2
  396. package/dist/mcp/route-tools.js +10 -10
  397. package/dist/mcp/route-tools.js.map +1 -1
  398. package/dist/mcp/server.js +60 -34
  399. package/dist/mcp/server.js.map +1 -1
  400. package/dist/mcp/sheet-card-tools.d.ts +30 -0
  401. package/dist/mcp/sheet-card-tools.js +47 -0
  402. package/dist/mcp/sheet-card-tools.js.map +1 -0
  403. package/dist/mcp/simulate-tool.d.ts +10 -0
  404. package/dist/mcp/simulate-tool.js +12 -0
  405. package/dist/mcp/simulate-tool.js.map +1 -0
  406. package/dist/render/render.js +8178 -118
  407. package/dist/studio/change-route.d.ts +18 -0
  408. package/dist/studio/change-route.js +24 -0
  409. package/dist/studio/change-route.js.map +1 -0
  410. package/dist/studio/http-error.d.ts +5 -0
  411. package/dist/studio/http-error.js +9 -0
  412. package/dist/studio/http-error.js.map +1 -0
  413. package/dist/studio/idle.d.ts +7 -0
  414. package/dist/studio/idle.js +34 -0
  415. package/dist/studio/idle.js.map +1 -0
  416. package/dist/studio/live.d.ts +2 -0
  417. package/dist/studio/live.js.map +1 -1
  418. package/dist/studio/place-runner.js +1 -1
  419. package/dist/studio/place-runner.js.map +1 -1
  420. package/dist/studio/run-studio.d.ts +21 -0
  421. package/dist/studio/run-studio.js +68 -0
  422. package/dist/studio/run-studio.js.map +1 -0
  423. package/dist/studio/server.d.ts +5 -0
  424. package/dist/studio/server.js +66 -16
  425. package/dist/studio/server.js.map +1 -1
  426. package/dist/studio/studio-control.d.ts +6 -0
  427. package/dist/studio/studio-control.js +14 -0
  428. package/dist/studio/studio-control.js.map +1 -0
  429. package/dist/studio/studio-note.d.ts +33 -0
  430. package/dist/studio/studio-note.js +130 -0
  431. package/dist/studio/studio-note.js.map +1 -0
  432. package/dist/studio/verify-routes.d.ts +42 -0
  433. package/dist/studio/verify-routes.js +110 -0
  434. package/dist/studio/verify-routes.js.map +1 -0
  435. package/dist/version.d.ts +1 -1
  436. package/dist/version.js +1 -1
  437. package/library/modules/CanNode/CanNode.sheet.tsx +65 -0
  438. package/library/modules/CanNode/module.json +4 -0
  439. package/library/modules/CanNode/parts/MCP2515-I-SO/MCP2515_I_SO.tsx +11 -0
  440. package/library/modules/CanNode/parts/MCP2515-I-SO/part.yaml +66 -0
  441. package/library/modules/CanNode/parts/MCP2515-I-SO/verification.md +43 -0
  442. package/library/modules/CanNode/parts/TJA1051T-3/TJA1051T_3.tsx +11 -0
  443. package/library/modules/CanNode/parts/TJA1051T-3/part.yaml +36 -0
  444. package/library/modules/CanNode/parts/TJA1051T-3/verification.md +29 -0
  445. package/library/modules/DigitalInput24V/DigitalInput24V.sheet.tsx +24 -0
  446. package/library/modules/DigitalInput24V/module.json +4 -0
  447. package/library/modules/RelayDriver/RelayDriver.sheet.tsx +39 -0
  448. package/library/modules/RelayDriver/module.json +4 -0
  449. package/library/modules/RelayDriver/parts/AO3400A/AO3400A.tsx +11 -0
  450. package/library/modules/RelayDriver/parts/AO3400A/part.yaml +55 -0
  451. package/library/modules/RelayDriver/parts/AO3400A/verification.md +34 -0
  452. package/library/modules/RelayDriver/parts/SRD-12VDC-SL-C/SRD_12VDC_SL_C.tsx +12 -0
  453. package/library/modules/RelayDriver/parts/SRD-12VDC-SL-C/footprint.yaml +70 -0
  454. package/library/modules/RelayDriver/parts/SRD-12VDC-SL-C/part.yaml +45 -0
  455. package/library/modules/RelayDriver/parts/SRD-12VDC-SL-C/verification.md +40 -0
  456. package/package.json +2 -1
  457. package/skills/copperflow/SKILL.md +16 -16
  458. package/skills/copperflow/references/copper.md +89 -6
  459. package/skills/copperflow/references/design-rules.md +48 -0
  460. package/skills/copperflow/references/modules.md +106 -0
  461. package/skills/copperflow/references/planning.md +55 -11
  462. package/skills/copperflow/references/writing-circuits.md +32 -3
  463. package/skills/copperflow-plan/SKILL.md +7 -4
  464. package/dist/app/assets/NewPartDialog-B_cnPuI-.js +0 -160
  465. package/dist/app/assets/index-CSWIIMFE.css +0 -1
  466. package/dist/app/assets/index-CjN3tctq.js +0 -19
@@ -0,0 +1,65 @@
1
+ import { MCP2515_I_SO } from "./parts/MCP2515-I-SO/MCP2515_I_SO"
2
+ import { TJA1051T_3 } from "./parts/TJA1051T-3/TJA1051T_3"
3
+ export default function CanNode() {
4
+ return (
5
+ <sheet does="CAN node: MCP2515 on 3.3 V, 8 MHz crystal (CL 18 pF, 27 pF caps), TJA1051T/3 with VIO 3.3 V and VCC 5 V, 120 ohm termination to the TERM port" sources={["https://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J.pdf (p1 pinout, p4 Table 1-1)","https://www.nxp.com/docs/en/data-sheet/TJA1051.pdf (p4 Table 3; S low selects Normal mode, p5)","https://abracon.com/Resonators/abl.pdf (ABL HC49/US: CL 18 pF, C0 7 pF max, p1)"]} cases={[{ name: "termination: 1 V across CANH and TERM", set: { V5: 5, V3V3: 3.3, GND: 0, CANH: 1, TERM: 0 }, expect: { "R2.i": [0.0083, 0.00837] } }, { name: "supplies reach the pins", set: { V5: 5, V3V3: 3.3, GND: 0 }, expect: { RESET: [3.29, 3.31], V3V3: [3.29, 3.31], V5: [4.99, 5.01] } }]}>
6
+ <port name="V5" type="power_in" carries="5 V in, 70 mA at most (transceiver, bus dominant)" />
7
+ <port name="V3V3" type="power_in" carries="3.3 V in, 10 mA (controller 5 mA typ, VIO)" />
8
+ <port name="GND" type="ground" carries="logic and bus ground" />
9
+ <port name="SCK" type="input" carries="SPI clock from the host, 3.3 V logic, 10 MHz at most" />
10
+ <port name="MOSI" type="input" carries="SPI data from the host, 3.3 V logic" />
11
+ <port name="MISO" type="output" carries="SPI data to the host, 3.3 V logic" />
12
+ <port name="CS" type="input" carries="SPI chip select, active low, 3.3 V logic" />
13
+ <port name="INT" type="output" carries="interrupt to the host, active low, 3.3 V logic" />
14
+ <port name="CANH" type="bidirectional" carries="CAN high line, up to 1 Mbit/s" />
15
+ <port name="CANL" type="bidirectional" carries="CAN low line" />
16
+ <port name="TERM" type="passive" carries="far end of the 120 ohm from CANH; join to CANL to terminate" />
17
+ <MCP2515_I_SO name="U1" noConnect="pin3,pin4,pin5,pin6,pin10,pin11" pcbX={0} pcbY={0} pcbRotation={0} />
18
+ <TJA1051T_3 name="U2" pcbX={11} pcbY={1} pcbRotation={270} />
19
+ <crystal name="Y1" manufacturerPartNumber="ABL-8.000MHZ-B2" frequency="8MHz" footprint="hc49" pcbX={-8.8} pcbY={-3.175} pcbRotation={90} />
20
+ <capacitor name="C1" capacitance="27pF" footprint="0603" pcbX={-4.45} pcbY={-7.15} pcbRotation={0} />
21
+ <capacitor name="C2" capacitance="27pF" footprint="0603" pcbX={-7.7} pcbY={3.63} pcbRotation={0} />
22
+ <capacitor name="C3" capacitance="100nF" footprint="0603" pcbX={7} pcbY={3.5} pcbRotation={270} />
23
+ <capacitor name="C4" capacitance="100nF" footprint="0603" pcbX={11} pcbY={5.7} pcbRotation={0} />
24
+ <capacitor name="C5" capacitance="100nF" footprint="0603" pcbX={7.25} pcbY={-1.2} pcbRotation={90} />
25
+ <resistor name="R1" resistance="10k" footprint="0603" pcbX={7.75} pcbY={6} pcbRotation={180} />
26
+ <resistor name="R2" resistance="120" footprint="0805" pcbX={11.635} pcbY={-4.65} pcbRotation={270} />
27
+ <trace from="U1.VDD" to="net.V3V3" />
28
+ <trace from="C3.pin1" to="net.V3V3" />
29
+ <trace from="U2.VIO" to="net.V3V3" />
30
+ <trace from="C5.pin1" to="net.V3V3" />
31
+ <trace from="R1.pin1" to="net.V3V3" />
32
+ <trace from="U2.VCC" to="net.V5" />
33
+ <trace from="C4.pin1" to="net.V5" />
34
+ <trace from="U1.VSS" to="net.GND" />
35
+ <trace from="U2.GND" to="net.GND" />
36
+ <trace from="U2.S" to="net.GND" />
37
+ <trace from="C1.pin2" to="net.GND" />
38
+ <trace from="C2.pin2" to="net.GND" />
39
+ <trace from="C3.pin2" to="net.GND" />
40
+ <trace from="C4.pin2" to="net.GND" />
41
+ <trace from="C5.pin2" to="net.GND" />
42
+ <trace from="U1.SCK" to="net.SCK" />
43
+ <trace from="U1.SI" to="net.MOSI" />
44
+ <trace from="U1.SO" to="net.MISO" />
45
+ <trace from="U1.CS" to="net.CS" />
46
+ <trace from="U1.INT" to="net.INT" />
47
+ <trace from="U1.RESET" to="net.RESET" />
48
+ <trace from="R1.pin2" to="net.RESET" />
49
+ <trace from="U1.OSC1" to="net.OSC1" />
50
+ <trace from="Y1.pin1" to="net.OSC1" />
51
+ <trace from="C1.pin1" to="net.OSC1" />
52
+ <trace from="U1.OSC2" to="net.OSC2" />
53
+ <trace from="Y1.pin2" to="net.OSC2" />
54
+ <trace from="C2.pin1" to="net.OSC2" />
55
+ <trace from="U1.TXCAN" to="net.TXCAN" />
56
+ <trace from="U2.TXD" to="net.TXCAN" />
57
+ <trace from="U1.RXCAN" to="net.RXCAN" />
58
+ <trace from="U2.RXD" to="net.RXCAN" />
59
+ <trace from="U2.CANH" to="net.CANH" />
60
+ <trace from="R2.pin1" to="net.CANH" />
61
+ <trace from="U2.CANL" to="net.CANL" />
62
+ <trace from="R2.pin2" to="net.TERM" />
63
+ </sheet>
64
+ )
65
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "savedFrom": "copperflow library",
3
+ "savedAt": "2026-11-17T07:48:20.947Z"
4
+ }
@@ -0,0 +1,11 @@
1
+ // Generated by copperflow from parts/MCP2515-I-SO/part.yaml. Edit part.yaml, then run: copperflow parts build
2
+ export const MCP2515_I_SO = (props: { name: string; [prop: string]: unknown }) => (
3
+ <chip
4
+ footprint={"soic18w"}
5
+ manufacturerPartNumber={"MCP2515-I/SO"}
6
+ pinLabels={{"pin1":"TXCAN","pin2":"RXCAN","pin3":"CLKOUT","pin4":"TX0RTS","pin5":"TX1RTS","pin6":"TX2RTS","pin7":"OSC2","pin8":"OSC1","pin9":"VSS","pin10":"RX1BF","pin11":"RX0BF","pin12":"INT","pin13":"SCK","pin14":"SI","pin15":"SO","pin16":"CS","pin17":"RESET","pin18":"VDD"}}
7
+ pinAttributes={{"pin1":{"isOutput":true},"pin2":{"isInput":true},"pin3":{"isOutput":true},"pin4":{"isInput":true},"pin5":{"isInput":true},"pin6":{"isInput":true},"pin7":{"isOutput":true},"pin8":{"isInput":true},"pin9":{"requiresGround":true},"pin10":{"isOutput":true},"pin11":{"isOutput":true},"pin12":{"isOutput":true},"pin13":{"isInput":true},"pin14":{"isInput":true},"pin15":{"isOutput":true},"pin16":{"isInput":true},"pin17":{"isInput":true},"pin18":{"requiresPower":true}}}
8
+ height={2.65}
9
+ {...props}
10
+ />
11
+ )
@@ -0,0 +1,66 @@
1
+ title: MCP2515 stand-alone CAN controller with SPI, SOIC-18 wide
2
+ manufacturer: Microchip Technology
3
+ mpn: MCP2515-I/SO
4
+ origin: written 2026-11-17
5
+ footprint: soic18w
6
+ height: 2.65
7
+ height_source: "p82, 18-lead SOIC 7.50 mm body, overall height A max 2.65 mm"
8
+ pins:
9
+ "1":
10
+ name: TXCAN
11
+ type: output
12
+ "2":
13
+ name: RXCAN
14
+ type: input
15
+ "3":
16
+ name: CLKOUT
17
+ type: output
18
+ "4":
19
+ name: TX0RTS
20
+ type: input
21
+ "5":
22
+ name: TX1RTS
23
+ type: input
24
+ "6":
25
+ name: TX2RTS
26
+ type: input
27
+ "7":
28
+ name: OSC2
29
+ type: output
30
+ "8":
31
+ name: OSC1
32
+ type: input
33
+ "9":
34
+ name: VSS
35
+ type: ground
36
+ "10":
37
+ name: RX1BF
38
+ type: output
39
+ "11":
40
+ name: RX0BF
41
+ type: output
42
+ "12":
43
+ name: INT
44
+ type: output
45
+ "13":
46
+ name: SCK
47
+ type: input
48
+ "14":
49
+ name: SI
50
+ type: input
51
+ "15":
52
+ name: SO
53
+ type: output
54
+ "16":
55
+ name: CS
56
+ type: input
57
+ "17":
58
+ name: RESET
59
+ type: input
60
+ "18":
61
+ name: VDD
62
+ type: power_in
63
+ datasheet:
64
+ url: https://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J.pdf
65
+ title: MCP2515 datasheet DS20001801J
66
+ datasheet_pages: 1 (18-lead SOIC pinout), 4 (Table 1-1 pinout description)
@@ -0,0 +1,43 @@
1
+ # Verification of MCP2515 stand-alone CAN controller with SPI, SOIC-18 wide
2
+
3
+ Status: not verified
4
+ Content: 1cf0d2ad3ec8 (changes when part.yaml changes)
5
+
6
+ Check each item against the datasheet and write the page next to it. When everything is
7
+ checked, run in a terminal: copperflow parts verify MCP2515-I-SO --by "<your name>" --against "<datasheet, revision, page>"
8
+
9
+ - [ ] Pins from MCP2515 datasheet DS20001801J, page(s) 1 (18-lead SOIC pinout), 4 (Table 1-1 pinout description): compare each pin
10
+ - [ ] Pin 1 is TXCAN (output)
11
+ - [ ] Pin 2 is RXCAN (input)
12
+ - [ ] Pin 3 is CLKOUT (output)
13
+ - [ ] Pin 4 is TX0RTS (input)
14
+ - [ ] Pin 5 is TX1RTS (input)
15
+ - [ ] Pin 6 is TX2RTS (input)
16
+ - [ ] Pin 7 is OSC2 (output)
17
+ - [ ] Pin 8 is OSC1 (input)
18
+ - [ ] Pin 9 is VSS (ground)
19
+ - [ ] Pin 10 is RX1BF (output)
20
+ - [ ] Pin 11 is RX0BF (output)
21
+ - [ ] Pin 12 is INT (output)
22
+ - [ ] Pin 13 is SCK (input)
23
+ - [ ] Pin 14 is SI (input)
24
+ - [ ] Pin 15 is SO (output)
25
+ - [ ] Pin 16 is CS (input)
26
+ - [ ] Pin 17 is RESET (input)
27
+ - [ ] Pin 18 is VDD (power in)
28
+ - [ ] Footprint soic18w matches the package drawing
29
+ - [ ] Height 2.65 mm, p82, 18-lead SOIC 7.50 mm body, overall height A max 2.65 mm: compare
30
+
31
+ ## Notes
32
+
33
+ - [ ] Compare the pads with the land pattern in the maker's datasheet; this package's outline was not taken from the drawing.
34
+
35
+ ## Where each item was read
36
+
37
+ MCP2515 datasheet DS20001801J: https://ww1.microchip.com/downloads/en/DeviceDoc/MCP2515-Stand-Alone-CAN-Controller-with-SPI-20001801J.pdf
38
+
39
+ - Page 1, Package Types, 18-lead PDIP/SOIC: pins 1 to 18.
40
+ - Page 4, Table 1-1 Pinout Description: names, PDIP/SOIC pin numbers and I/O types; TX0RTS to TX2RTS have
41
+ 100 k internal pull-ups to VDD.
42
+ - The pads are the generated soic18w land pattern (7.5 mm body, 1.27 mm pitch), not taken from Microchip's
43
+ package drawing: compare them with the SO 18-lead drawing at the end of the datasheet.
@@ -0,0 +1,11 @@
1
+ // Generated by copperflow from parts/TJA1051T-3/part.yaml. Edit part.yaml, then run: copperflow parts build
2
+ export const TJA1051T_3 = (props: { name: string; [prop: string]: unknown }) => (
3
+ <chip
4
+ footprint={"soic8"}
5
+ manufacturerPartNumber={"TJA1051T/3/1J"}
6
+ pinLabels={{"pin1":"TXD","pin2":"GND","pin3":"VCC","pin4":"RXD","pin5":"VIO","pin6":"CANL","pin7":"CANH","pin8":"S"}}
7
+ pinAttributes={{"pin1":{"isInput":true},"pin2":{"requiresGround":true},"pin3":{"requiresPower":true},"pin4":{"isOutput":true},"pin5":{"requiresPower":true},"pin6":{"isBidirectional":true},"pin7":{"isBidirectional":true},"pin8":{"isInput":true}}}
8
+ height={1.75}
9
+ {...props}
10
+ />
11
+ )
@@ -0,0 +1,36 @@
1
+ title: TJA1051T/3 high-speed CAN transceiver with VIO, SO8
2
+ manufacturer: NXP Semiconductors
3
+ mpn: TJA1051T/3/1J
4
+ origin: written 2026-11-17
5
+ footprint: soic8
6
+ height: 1.75
7
+ height_source: "p15, Fig 9, SOT96-1 (SO8), A max 1.75 mm"
8
+ pins:
9
+ "1":
10
+ name: TXD
11
+ type: input
12
+ "2":
13
+ name: GND
14
+ type: ground
15
+ "3":
16
+ name: VCC
17
+ type: power_in
18
+ "4":
19
+ name: RXD
20
+ type: output
21
+ "5":
22
+ name: VIO
23
+ type: power_in
24
+ "6":
25
+ name: CANL
26
+ type: bidirectional
27
+ "7":
28
+ name: CANH
29
+ type: bidirectional
30
+ "8":
31
+ name: S
32
+ type: input
33
+ datasheet:
34
+ url: https://www.nxp.com/docs/en/data-sheet/TJA1051.pdf
35
+ title: TJA1051 product data sheet Rev. 9
36
+ datasheet_pages: 4 (Table 3 pin description, Fig 2 pin configuration)
@@ -0,0 +1,29 @@
1
+ # Verification of TJA1051T/3 high-speed CAN transceiver with VIO, SO8
2
+
3
+ Status: not verified
4
+ Content: 7fd5fc15d390 (changes when part.yaml changes)
5
+
6
+ Check each item against the datasheet and write the page next to it. When everything is
7
+ checked, run in a terminal: copperflow parts verify TJA1051T-3 --by "<your name>" --against "<datasheet, revision, page>"
8
+
9
+ - [ ] Pins from TJA1051 product data sheet Rev. 9, page(s) 4 (Table 3 pin description, Fig 2 pin configuration): compare each pin
10
+ - [ ] Pin 1 is TXD (input)
11
+ - [ ] Pin 2 is GND (ground)
12
+ - [ ] Pin 3 is VCC (power in)
13
+ - [ ] Pin 4 is RXD (output)
14
+ - [ ] Pin 5 is VIO (power in)
15
+ - [ ] Pin 6 is CANL (bidirectional)
16
+ - [ ] Pin 7 is CANH (bidirectional)
17
+ - [ ] Pin 8 is S (input)
18
+ - [ ] Footprint soic8 matches the package drawing
19
+ - [ ] Height 1.75 mm, p15, Fig 9, SOT96-1 (SO8), A max 1.75 mm: compare
20
+
21
+ ## Where each item was read
22
+
23
+ TJA1051 product data sheet, Rev. 9, 28 November 2017: https://www.nxp.com/docs/en/data-sheet/TJA1051.pdf
24
+
25
+ - Page 4, Fig 2 c (TJA1051T/3, SO8) and Table 3 Pin description: 1 TXD, 2 GND, 3 VCC, 4 RXD, 5 VIO
26
+ (TJA1051T/3 and TJA1051TK/3 only), 6 CANL, 7 CANH, 8 S.
27
+ - Page 5: a LOW level on S selects Normal mode.
28
+ - The orderable number TJA1051T/3/1J was not found in this data sheet's text; check NXP's ordering page.
29
+ - The pads are the generated soic8 land pattern, not taken from NXP's SOT96-1 drawing.
@@ -0,0 +1,24 @@
1
+ export default function DigitalInput24V() {
2
+ return (
3
+ <sheet does="24 V digital input: 4.53k/1k divider, BZT52C3V6 zener across the 1k, 1k/100nF RC out; low at 5 V, high from 15 V, 3.07 to 3.45 V and 4.6 mA at 24 V" sources={["https://www.diodes.com/assets/Datasheets/ds18004.pdf (BZT52C3V6: 3.4 to 3.8 V at 5 mA, ZZT 90 ohm max, p2; typical curves Fig. 2, p3)","IEC 61131-2 type 1 input: on at 15 to 30 V, off below 5 V","YAGEO RC_L chip resistors: 1206 rated 1/4 W at 70 C (R1 takes 157 mW at 30 V)"]} cases={[{"name":"5 V in reads low","set":{"IN":5,"GND":0},"expect":{"OUT":[0,0.99]}},{"name":"15 V in reads high","set":{"IN":15,"GND":0},"expect":{"OUT":[2.31,3.6]}},{"name":"24 V in","set":{"IN":24,"GND":0},"expect":{"OUT":[3,3.5],"R1.i":[0.0045,0.0047]}},{"name":"30 V in stays under the pin limit","set":{"IN":30,"GND":0},"expect":{"OUT":[0,3.6],"R1.p":[0,0.25]}}]}>
4
+ <port name="IN" type="input" carries="0 to 30 V from the field; 4.6 mA at 24 V, 5.9 mA at 30 V" />
5
+ <port name="OUT" type="output" carries="3.3 V logic: low at 5 V in, high from 15 V, at most 3.53 V; 870 Hz low pass" />
6
+ <port name="GND" type="ground" carries="field and logic ground, 6 mA at most" />
7
+ <resistor name="R1" resistance="4.53k" footprint="1206" pcbX={8.5} pcbY={2.6} pcbRotation={180} />
8
+ <resistor name="R2" resistance="1k" footprint="0603" pcbX={4.5} pcbY={2.1} pcbRotation={180} />
9
+ <diode name="D1" manufacturerPartNumber="BZT52C3V6-7-F" footprint="sod123" pcbX={4.5} pcbY={0} pcbRotation={0} vf="0.9V" vfAt="10mA" vz="3.6V" vzAt="5mA" zz="90" pdmax="370mW" />
10
+ <resistor name="R3" resistance="1k" footprint="0603" pcbX={1.25} pcbY={2.1} pcbRotation={180} />
11
+ <capacitor name="C1" capacitance="100nF" footprint="0603" pcbX={0} pcbY={0} pcbRotation={0} />
12
+ <trace from="R1.pin1" to="net.IN" />
13
+ <trace from="R1.pin2" to="net.DIV" />
14
+ <trace from="R2.pin1" to="net.DIV" />
15
+ <trace from="D1.cathode" to="net.DIV" />
16
+ <trace from="R3.pin1" to="net.DIV" />
17
+ <trace from="R3.pin2" to="net.OUT" />
18
+ <trace from="C1.pin1" to="net.OUT" />
19
+ <trace from="R2.pin2" to="net.GND" />
20
+ <trace from="D1.anode" to="net.GND" />
21
+ <trace from="C1.pin2" to="net.GND" />
22
+ </sheet>
23
+ )
24
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "savedFrom": "copperflow library",
3
+ "savedAt": "2026-11-17T07:48:18.630Z"
4
+ }
@@ -0,0 +1,39 @@
1
+ import { SRD_12VDC_SL_C } from "./parts/SRD-12VDC-SL-C/SRD_12VDC_SL_C"
2
+ import { AO3400A } from "./parts/AO3400A/AO3400A"
3
+ export default function RelayDriver() {
4
+ return (
5
+ <sheet does="12 V SPDT relay switched by 3.3 V or 5 V logic: AO3400A low side (RDS(on) spec at 2.5 V), 1N4148W flyback, 100k pull-down, LED on while driven" sources={["https://www.circuitbasics.com/wp-content/uploads/2015/11/SRD-05VDC-SL-C-Datasheet.pdf (Songle SRD: p1 drilling and wiring, p2 coil 12 V 400 ohm 30 mA, contacts)","https://www.aosmd.com/res/datasheets/AO3400A.pdf (p2: VGS(th) 1.45 V max, RDS(on) < 48 mOhm at VGS 2.5 V)","https://www.diodes.com/assets/Datasheets/ds30086.pdf (1N4148W-7-F, SOD123, p1)","https://www.kingbrightusa.com/images/catalog/SPEC/APTD1608LZGCK.pdf (p2: VF 2.65 V typ at 2 mA)"]} cases={[{ name: "3.3 V control", set: { V12: 12, GND: 0, CTRL: 3.3 }, expect: { "K1.coil.i": [0.027, 0.033], "Q1.vgs": [2.5, 12], "LED1.i": [0.0015, 0.0025] } }, { name: "5 V control", set: { V12: 12, GND: 0, CTRL: 5 }, expect: { "K1.coil.i": [0.027, 0.033], "Q1.vgs": [2.5, 12], "LED1.i": [0.0015, 0.0025] } }, { name: "0 V control", set: { V12: 12, GND: 0, CTRL: 0 }, expect: { "K1.coil.i": [0, 0.0001], "LED1.i": [-0.000001, 0.00001] } }, { name: "control open", set: { V12: 12, GND: 0, CTRL: "open" }, expect: { "K1.coil.i": [0, 0.0001], "LED1.i": [-0.000001, 0.00001] } }]}>
6
+ <port name="V12" type="power_in" carries="12 V in, 33 mA (coil 30 mA, LED 2 mA)" />
7
+ <port name="GND" type="ground" carries="return of coil and logic, 33 mA" />
8
+ <port name="CTRL" type="input" carries="0 off; 3.3 V or 5 V logic on, 0.03 mA; open is off" />
9
+ <port name="COM" type="passive" carries="contact common, 10 A 250 VAC / 28 VDC resistive at most" />
10
+ <port name="NO" type="passive" carries="normally open contact, closed while CTRL is high, 10 A at most" />
11
+ <port name="NC" type="passive" carries="normally closed contact, open while CTRL is high, 10 A at most" />
12
+ <SRD_12VDC_SL_C name="K1" pcbX={0} pcbY={0} pcbRotation={0} />
13
+ <AO3400A name="Q1" pcbX={-12} pcbY={-5} pcbRotation={0} />
14
+ <diode name="D1" manufacturerPartNumber="1N4148W-7-F" vf="0.715V" vfAt="1mA" vf2="0.855V" vf2At="10mA" ifmax="300mA" pdmax="400mW" footprint="sod123" pcbX={-11.15} pcbY={0} pcbRotation={90} />
15
+ <resistor name="R1" resistance="100" footprint="0603" pcbX={-12.25} pcbY={-7.85} pcbRotation={180} />
16
+ <resistor name="R2" resistance="100k" footprint="0603" pcbX={-9} pcbY={-9} pcbRotation={0} />
17
+ <resistor name="R3" resistance="4.7k" footprint="0603" pcbX={-7} pcbY={9} pcbRotation={180} />
18
+ <led name="LED1" color="green" manufacturerPartNumber="APTD1608LZGCK" vf="2.65V" vfAt="2mA" ifmax="25mA" pdmax="102.5mW" footprint="0603" pcbX={-10.8} pcbY={4.3} pcbRotation={270} />
19
+ <trace from="K1.COIL1" to="net.V12" />
20
+ <trace from="D1.cathode" to="net.V12" />
21
+ <trace from="R3.pin1" to="net.V12" />
22
+ <trace from="K1.COIL2" to="net.DRV" />
23
+ <trace from="D1.anode" to="net.DRV" />
24
+ <trace from="Q1.D" to="net.DRV" />
25
+ <trace from="LED1.cathode" to="net.DRV" />
26
+ <trace from="R3.pin2" to="net.LEDA" />
27
+ <trace from="LED1.anode" to="net.LEDA" />
28
+ <trace from="R1.pin1" to="net.CTRL" />
29
+ <trace from="R1.pin2" to="net.GATE" />
30
+ <trace from="R2.pin1" to="net.GATE" />
31
+ <trace from="Q1.G" to="net.GATE" />
32
+ <trace from="Q1.S" to="net.GND" />
33
+ <trace from="R2.pin2" to="net.GND" />
34
+ <trace from="K1.COM" to="net.COM" />
35
+ <trace from="K1.NO" to="net.NO" />
36
+ <trace from="K1.NC" to="net.NC" />
37
+ </sheet>
38
+ )
39
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "savedFrom": "copperflow library",
3
+ "savedAt": "2026-11-17T07:48:15.979Z"
4
+ }
@@ -0,0 +1,11 @@
1
+ // Generated by copperflow from parts/AO3400A/part.yaml. Edit part.yaml, then run: copperflow parts build
2
+ export const AO3400A = (props: { name: string; [prop: string]: unknown }) => (
3
+ <chip
4
+ footprint={"sot23"}
5
+ manufacturerPartNumber={"AO3400A"}
6
+ supplierPartNumbers={{"lcsc":["C20917"]}}
7
+ pinLabels={{"pin1":"G","pin2":"S","pin3":"D"}}
8
+ pinAttributes={{"pin1":{"isInput":true},"pin2":{"isPassive":true},"pin3":{"isPassive":true}}}
9
+ {...props}
10
+ />
11
+ )
@@ -0,0 +1,55 @@
1
+ title: AO3400A 30 V N-channel MOSFET, RDS(on) < 48 mOhm at VGS 2.5 V
2
+ manufacturer: Alpha and Omega Semiconductor
3
+ mpn: AO3400A
4
+ origin: written 2026-11-17
5
+ footprint: sot23
6
+ pins:
7
+ "1":
8
+ name: G
9
+ type: input
10
+ "2":
11
+ name: S
12
+ type: passive
13
+ "3":
14
+ name: D
15
+ type: passive
16
+ suppliers:
17
+ lcsc: C20917
18
+ datasheet:
19
+ url: https://www.aosmd.com/res/datasheets/AO3400A.pdf
20
+ title: AO3400A datasheet
21
+ datasheet_pages: 1 (SOT23 pin drawing), 2 (VGS(th), RDS(on))
22
+ model:
23
+ kind: nmos
24
+ pins:
25
+ gate: G
26
+ source: S
27
+ drain: D
28
+ figures:
29
+ vth:
30
+ value: 1.45
31
+ source: p2, Electrical Characteristics, VGS(th) max
32
+ rdson:
33
+ value: 0.048
34
+ source: p2, Electrical Characteristics, RDS(ON) max at VGS 2.5 V
35
+ rdsonAt:
36
+ value: 2.5
37
+ source: p2, Electrical Characteristics, RDS(ON) at VGS 2.5 V
38
+ vsd:
39
+ value: 1
40
+ source: p2, Electrical Characteristics, VSD max at IS 1 A
41
+ vsdAt:
42
+ value: 1
43
+ source: p2, Electrical Characteristics, VSD at IS 1 A
44
+ vdsmax:
45
+ value: 30
46
+ source: p1, Absolute Maximum Ratings, VDS
47
+ vgsmax:
48
+ value: 12
49
+ source: p1, Absolute Maximum Ratings, VGS
50
+ idmax:
51
+ value: 5.7
52
+ source: p1, Absolute Maximum Ratings, ID at TA 25 C
53
+ pdmax:
54
+ value: 1.4
55
+ source: p1, Absolute Maximum Ratings, PD at TA 25 C
@@ -0,0 +1,34 @@
1
+ # Verification of AO3400A 30 V N-channel MOSFET, RDS(on) < 48 mOhm at VGS 2.5 V
2
+
3
+ Status: not verified
4
+ Content: 07c6bbd2c035 (changes when part.yaml changes)
5
+
6
+ Check each item against the datasheet and write the page next to it. When everything is
7
+ checked, run in a terminal: copperflow parts verify AO3400A --by "<your name>" --against "<datasheet, revision, page>"
8
+
9
+ - [ ] Pins from AO3400A datasheet, page(s) 1 (SOT23 pin drawing), 2 (VGS(th), RDS(on)): compare each pin
10
+ - [ ] Pin 1 is G (input)
11
+ - [ ] Pin 2 is S (passive)
12
+ - [ ] Pin 3 is D (passive)
13
+ - [ ] Footprint sot23 matches the package drawing
14
+ - [ ] lcsc part C20917 is this exact part
15
+ - [ ] Model nmos pins: gate G, source S, drain D
16
+ - [ ] Model vth 1.45 V, p2, Electrical Characteristics, VGS(th) max: compare
17
+ - [ ] Model rdson 48.0 mΩ, p2, Electrical Characteristics, RDS(ON) max at VGS 2.5 V: compare
18
+ - [ ] Model rdsonAt 2.50 V, p2, Electrical Characteristics, RDS(ON) at VGS 2.5 V: compare
19
+ - [ ] Model vsd 1.00 V, p2, Electrical Characteristics, VSD max at IS 1 A: compare
20
+ - [ ] Model vsdAt 1.00 A, p2, Electrical Characteristics, VSD at IS 1 A: compare
21
+ - [ ] Model vdsmax 30.0 V, p1, Absolute Maximum Ratings, VDS: compare
22
+ - [ ] Model vgsmax 12.0 V, p1, Absolute Maximum Ratings, VGS: compare
23
+ - [ ] Model idmax 5.70 A, p1, Absolute Maximum Ratings, ID at TA 25 C: compare
24
+ - [ ] Model pdmax 1.40 W, p1, Absolute Maximum Ratings, PD at TA 25 C: compare
25
+
26
+ ## Where each item was read
27
+
28
+ AO3400A datasheet, Rev 3.1, July 2023: https://www.aosmd.com/res/datasheets/AO3400A.pdf
29
+
30
+ - Page 1: SOT23, top-view drawing with G and S on the row of two pins and D alone; pin numbers 1 G, 2 S, 3 D
31
+ follow the usual SOT23 numbering of that drawing; compare it.
32
+ - Page 1: VDS 30 V, VGS +/-12 V, ID 5.7 A at 25 C.
33
+ - Page 2: VGS(th) 0.65 / 1.05 / 1.45 V (min / typ / max) at VDS = VGS, ID 250 uA;
34
+ RDS(on) max 26.5 mOhm at VGS 10 V, 32 mOhm at 4.5 V, 48 mOhm at VGS 2.5 V, ID 3 A.
@@ -0,0 +1,12 @@
1
+ // Generated by copperflow from parts/SRD-12VDC-SL-C/part.yaml. Edit part.yaml, then run: copperflow parts build
2
+ export const SRD_12VDC_SL_C = (props: { name: string; [prop: string]: unknown }) => (
3
+ <chip
4
+ footprint={"parts/SRD-12VDC-SL-C/footprint.yaml"}
5
+ manufacturerPartNumber={"SRD-12VDC-SL-C"}
6
+ supplierPartNumbers={{"lcsc":["C30431"]}}
7
+ pinLabels={{"pin1":"COM","pin2":"COIL1","pin3":"COIL2","pin4":"NO","pin5":"NC"}}
8
+ pinAttributes={{"pin1":{"isPassive":true},"pin2":{"isPassive":true},"pin3":{"isPassive":true},"pin4":{"isPassive":true},"pin5":{"isPassive":true}}}
9
+ height={15.3}
10
+ {...props}
11
+ />
12
+ )
@@ -0,0 +1,70 @@
1
+ pads:
2
+ - number: "1"
3
+ shape: circle
4
+ x: -8.15
5
+ y: 0
6
+ width: 2.5
7
+ height: 2.5
8
+ layers: through
9
+ drill: 1.3
10
+ - number: "2"
11
+ shape: circle
12
+ x: -6.15
13
+ y: 6
14
+ width: 2.5
15
+ height: 2.5
16
+ layers: through
17
+ drill: 1.3
18
+ - number: "3"
19
+ shape: circle
20
+ x: -6.15
21
+ y: -6
22
+ width: 2.5
23
+ height: 2.5
24
+ layers: through
25
+ drill: 1.3
26
+ - number: "4"
27
+ shape: circle
28
+ x: 6.05
29
+ y: -6
30
+ width: 2.5
31
+ height: 2.5
32
+ layers: through
33
+ drill: 1.3
34
+ - number: "5"
35
+ shape: circle
36
+ x: 6.05
37
+ y: 6
38
+ width: 2.5
39
+ height: 2.5
40
+ layers: through
41
+ drill: 1.3
42
+ courtyard:
43
+ - - -9.8
44
+ - -8
45
+ - - 9.8
46
+ - -8
47
+ - - 9.8
48
+ - 8
49
+ - - -9.8
50
+ - 8
51
+ silkscreen:
52
+ - - - -9.7
53
+ - -7.9
54
+ - - 9.7
55
+ - -7.9
56
+ - - 9.7
57
+ - 7.9
58
+ - - -9.7
59
+ - 7.9
60
+ - - -9.7
61
+ - -7.9
62
+ body:
63
+ - - -9.55
64
+ - -7.75
65
+ - - 9.55
66
+ - -7.75
67
+ - - 9.55
68
+ - 7.75
69
+ - - -9.55
70
+ - 7.75
@@ -0,0 +1,45 @@
1
+ title: Songle SRD relay, 12 V coil (400 ohm, 30 mA), SPDT changeover, 10 A
2
+ description: "Pads from the DRILLING drawing on page 1 of the Songle SRD
3
+ datasheet, read as the bottom view and mirrored to the top view. The datasheet
4
+ gives no hole size: 1.3 mm drill chosen for the 1.1 x 0.4 mm contact leads.
5
+ Pin numbers are this library's own (the datasheet numbers none)."
6
+ manufacturer: Ningbo Songle Relay
7
+ mpn: SRD-12VDC-SL-C
8
+ origin: written 2026-11-17
9
+ footprint: footprint.yaml
10
+ height: 15.3
11
+ height_source: "p1, 5. DIMENSION, body 15.3 mm max"
12
+ pins:
13
+ "1":
14
+ name: COM
15
+ type: passive
16
+ "2":
17
+ name: COIL1
18
+ type: passive
19
+ "3":
20
+ name: COIL2
21
+ type: passive
22
+ "4":
23
+ name: NO
24
+ type: passive
25
+ "5":
26
+ name: NC
27
+ type: passive
28
+ suppliers:
29
+ lcsc: C30431
30
+ datasheet:
31
+ url: https://www.circuitbasics.com/wp-content/uploads/2015/11/SRD-05VDC-SL-C-Datasheet.pdf
32
+ title: Songle Relay SRD datasheet
33
+ datasheet_pages: 1 (DRILLING and WIRING DIAGRAM), 2 (coil data, contact rating)
34
+ model:
35
+ kind: relay
36
+ pins:
37
+ coil1: COIL1
38
+ coil2: COIL2
39
+ com: COM
40
+ no: NO
41
+ nc: NC
42
+ figures:
43
+ coil:
44
+ value: 400
45
+ source: p2, 6. Coil data chart, SRD high sensitivity 12 V
@@ -0,0 +1,40 @@
1
+ # Verification of Songle SRD relay, 12 V coil (400 ohm, 30 mA), SPDT changeover, 10 A
2
+
3
+ Status: not verified
4
+ Content: 0f44efc32ccc (changes when part.yaml or footprint.yaml changes)
5
+
6
+ Check each item against the datasheet and write the page next to it. When everything is
7
+ checked, run in a terminal: copperflow parts verify SRD-12VDC-SL-C --by "<your name>" --against "<datasheet, revision, page>"
8
+
9
+ - [ ] Pins from Songle Relay SRD datasheet, page(s) 1 (DRILLING and WIRING DIAGRAM), 2 (coil data, contact rating): compare each pin
10
+ - [ ] Pin 1 is COM (passive)
11
+ - [ ] Pin 2 is COIL1 (passive)
12
+ - [ ] Pin 3 is COIL2 (passive)
13
+ - [ ] Pin 4 is NO (passive)
14
+ - [ ] Pin 5 is NC (passive)
15
+ - [ ] Footprint footprint.yaml matches the package drawing
16
+ - [ ] Every pad in footprint.yaml matches the recommended land pattern (position, size, drill)
17
+ - [ ] lcsc part C30431 is this exact part
18
+ - [ ] Height 15.3 mm, p1, 5. DIMENSION, body 15.3 mm max: compare
19
+ - [ ] Model relay pins: coil1 COIL1, coil2 COIL2, com COM, no NO, nc NC
20
+ - [ ] Model coil 400 Ω, p2, 6. Coil data chart, SRD high sensitivity 12 V: compare
21
+
22
+ ## Where each item was read
23
+
24
+ Songle Relay SRD datasheet, 2 pages: https://www.circuitbasics.com/wp-content/uploads/2015/11/SRD-05VDC-SL-C-Datasheet.pdf
25
+ (the same 2-page sheet covers every SRD coil voltage; the LCSC copy for C30431 could not be opened).
26
+
27
+ - Page 1, DRILLING: common 1.4 mm in from the body edge on the centre line; coil pins 2 +/- 0.05 mm further in,
28
+ 12 +/- 0.05 mm apart (6 mm either side); contact pins 12.2 +/- 0.05 mm beyond the coil pins, 12 mm apart.
29
+ - Page 1, DIMENSION: body 19.1 x 15.5 mm max, 15.3 mm high; leads 1 x 0.4 mm (contacts) and 0.6 mm, 0.3 mm thick.
30
+ No hole size is given: the 1.3 mm drill and 2.5 mm round pads are this part's choice, not the datasheet's.
31
+ - Page 1, WIRING DIAGRAM: coil between the two pins beside the common; the blade from the common rests on the
32
+ contact on the side drawn at the bottom of the diagram (normally closed); the other contact is normally open.
33
+ - The datasheet does not say whether the drilling and wiring drawings are seen from the top or the bottom.
34
+ They were read as the bottom view (the usual convention for a drilling plan) and mirrored: on this
35
+ footprint (top view, common on the left) NC is pad 5 at y = +6 and NO is pad 4 at y = -6. If the drawing
36
+ is a top view, NO and NC are swapped. Check with an ohmmeter on a relay in hand.
37
+ - Pin numbers 1 to 5 are this library's own; the datasheet numbers no pins.
38
+ - Page 2, COIL DATA: 12 V coil (high sensitivity, L, 0.36 W): 30 mA, 400 ohm +/- 10 %, pull-in 75 % max,
39
+ drop-out 10 % min. CONTACT RATING (form C): 7 A 28 VDC, 10 A 125 VAC, 7 A 240 VAC resistive.
40
+ - Page 1, RATING: UL/CUL 10 A 125 VAC 28 VDC, TUV 10 A 240 VAC 28 VDC.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copperflow",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "Design circuits in code with a human and an AI agent editing the same files.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Eren Kürpe",
@@ -29,6 +29,7 @@
29
29
  },
30
30
  "files": [
31
31
  "dist",
32
+ "library",
32
33
  "skills",
33
34
  "LICENSE",
34
35
  "NOTICE"