velo-circuit
v0.3.0
Published
Framework-agnostic SVG circuit editor based on the Boukamp DSL
Readme
velo-circuit
Framework-agnostic SVG circuit editor for Boukamp DSL circuits used in electrochemical impedance spectroscopy (EIS).
Why velo-circuit
- Unified circuit model from DSL parsing to rendered SVG output
- Pure TypeScript core with no runtime UI framework dependency
- Official adapters for React, Vue, Svelte, Angular, Astro and Vanilla
- Built-in editor interactions: zoom, pan, drag, diagnostics, undo/redo
- Designed to integrate with scientific tooling such as
velo-spectroz
Install
pnpm add velo-circuitor:
npm install velo-circuitQuick Usage (Vanilla)
import { createEditor } from 'velo-circuit';
const editor = createEditor();
editor.mount(document.getElementById('canvas'), {
initialDsl: 'R0-p(R1,C1)-Wo2',
width: 900,
height: 560,
});
editor.on('ast-changed', () => {
console.log(editor.getValue());
});Local Development
pnpm install
pnpm typecheck
pnpm test
pnpm build
pnpm docs:devRelease Workflow
CI runs in GitHub Actions on Node 22 and 24. npm publish is triggered by pushing a tag like v0.2.0.
You can prepare and dispatch a release with:
pnpm release:prepare -- 0.2.0What it does:
- runs
typecheck,test, andbuild - bumps
package.jsonandpackage-lock.jsonto the provided version - creates commit
chore(release): vX.Y.Z - creates tag
vX.Y.Z - pushes branch and tag to GitHub
Required GitHub secret for publish workflow: NPM_TOKEN.
