.kicad_sym file. Clipboard building lives in
src/lib/clipboard.ts and runs entirely client-side from the symbol’s pin data.
Two clipboard formats
Canvas
buildCanvasClipboardSexp(symbol) → two-part block: (lib_symbols …) + a (symbol …)
instance block (UUID, position, instances). Paste directly onto a KiCad/Trace schematic
canvas. This is the default “Copy” action.Library
buildKicadSymSexp(symbol) → a standard (kicad_symbol_lib …) wrapper with one symbol.
Paste into a .kicad_sym file or a library editor.input, power_in, passive; right:
everything else (50/50 split if untyped) — and size the body at max(maxSide·2.54 + 2.54, 7.62) mm on a 2.54 mm grid. Generator tag: trace_symbols.
Download the raw library — GET /api/download/[library]
Serves the raw original .kicad_sym from data/ (or data/cern-symbols/), preserving
graphics, multi-unit symbols, and all properties. Falls back to the compiled per-library
JSON if no raw file exists.
Download serves the full-fidelity upstream file; the clipboard reconstructs from parsed
pin data (quick, editable, but graphics-free). Use download when fidelity matters.

