v0.3 · Get started
Start with schemd 0.3
pronounced like skemd /skɛmd/Compile rotated, multi-domain engineering diagrams into deterministic accessible SVG.
schemd is pronounced like “skemd” (/skɛmd/). Version 0.3 adds exact quarter-turn geometry and typed electrical, digital, quantum, and UML families while preserving the two-line language.
01 / InstallCompile on the server
Install the exact release and compile without a DOM, Canvas, getBBox(), or browser layout:
npm i @schemd/core@0.3.2import { compileSchematic } from '@schemd/core';
const result = compileSchematic(source, {
bounds: { width: 760, height: 430 },
title: 'RC low-pass filter',
mode: 'full'
});The capacitor below is physically vertical: its vector, semantic ports, outward normals, collision rectangle, and routing corridors all rotate together.
source:VIN "V_{in}" at (80, 140) #blue [type=voltage-ac]
resistor:R1 "10 k\Omega" at (250, 140) #amber
junction:OUT "output node" at (420, 140) #cyan
capacitor:C1 "100 nF" at (420, 260) #cyan [orientation=down]
ground:GND "0 V" at (200, 360) #slate
port:LOAD "V_{out}" at (650, 140) #emerald
VIN.positive -> R1.in #blue [ortho]
VIN.negative -> GND.in #slate [ortho]
R1.out -> OUT.node #amber [line]
OUT.node -> C1.in #cyan [ortho]
C1.out -> GND.in #cyan [ortho]
OUT.node -> LOAD.in #emerald [line]02 / MigrationMove from 0.2.x deliberately
Existing declarations remain valid. Omitted orientation is byte-compatible with the canonical right-facing form when a stable idPrefix is supplied. New 0.3 syntax must not be copied into historical 0.2.x documents.
- Keep
in,out,left/l, andright/raliases where they already existed. - Replace UML-pseudostate junction workarounds with
junction. - Replace horizontal shunt workarounds with
[orientation=down]or[orientation=up]. - Use explicit
[width=N]for buses and bus-capable ports.
port:IN "in" at (70, 120) #blue
resistor:R1 "R" at (260, 120) #amber
port:OUT "out" at (540, 120) #emerald
IN.out -> R1.in #blue [line]
R1.out -> OUT.in #emerald [line]Continue with the grammar, component API, playground, and release timeline.