@love-rox/kumihimo-core
v0.9.3
Published
Parser, model and SVG renderer for kumihimo AV signal flow diagrams (系統図)
Downloads
1,041
Maintainers
Readme
@love-rox/kumihimo-core
Parser, model, validator, layout and SVG renderer for kumihimo — AV signal flow diagrams (系統図) written as text.
pnpm add @love-rox/kumihimo-coreThe engine. Text in, a validated model and an SVG out, with nothing that touches a filesystem or a DOM — so the same code runs in a browser, a Markdown pipeline and a CLI.
import { compile } from '@love-rox/kumihimo-core';
const { svg, diagram, diagnostics } = await compile(source, { theme: 'dark' });It never throws. Every stage collects diagnostics and returns a best-effort result, because a picture of a flawed system is exactly what an author needs in order to see the flaw.
Also exports the pipeline in pieces (parse, buildModel, layoutDiagram, renderSvg),
the schedules (cableSchedule, equipmentSchedule, adapterSchedule) and the draw.io
exporter (toDrawio).
Importing other files with use needs a resolver, which the caller supplies — that is how
core stays free of I/O.
See kumihimo.love-rox.cc for the guide and an editor you can type into, or the project README for the other packages.
License
MIT © SASAGAWA Kiyoshi
