lini 0.9.0

Pretty diagrams from plain text, with fine-grained control. Compiles to clean, themeable SVG.
Documentation
// Positioning & spacing — pin (the 9 named anchor points), translate (a
// post-placement nudge), and the 1/2/4-value padding & gap forms. Palette colours.
{
  layout: row; gap: 30; padding: 26; align: start; font-weight: normal;
  |dot::block| { font-size: 12; }
}

// pin: lift a child out of flow and centre it on a named point of the parent
anchors |group| { layout: column; gap: 8; } [
       |caption| "pin"
  pins |box| {
    width: 210; height: 150; fill: --sky-wash; stroke: --sky-ink; radius: 8;
  } [
    |dot| { pin: center; color: --teal-ink; } "center"
    |dot| { pin: top left; color: --rose-ink; } "TL"
    |dot| { pin: top; color: --rose-ink; } "T"
    |dot| { pin: top right; color: --rose-ink; } "TR"
    |dot| { pin: left; color: --rose-ink; } "L"
    |dot| { pin: right; color: --rose-ink; } "R"
    |dot| { pin: bottom left; color: --sky-ink; } "BL"
    |dot| { pin: bottom; color: --sky-ink; } "B"
    |dot| { pin: bottom right; color: --sky-ink; } "BR"
  ]
]

// translate: a flow nudge, a tucked-in badge, and exact centre placement
moves |group| { layout: column; gap: 14; } [
       |caption| "translate"
       |row| { gap: 14; align: center; } [
    a |box| { fill: --amber-soft; stroke: --amber-ink; color: --amber-ink; } "A"
    b |box| {
      fill: --amber-soft; stroke: --amber-ink; color: --amber-ink; translate: 0 16;
    } "nudged"
    c |box| { fill: --amber-soft; stroke: --amber-ink; color: --amber-ink; } "C"
  ]
  card |box| {
    width: 140; height: 74; fill: --purple-wash; stroke: --purple-ink; color: --purple-ink;
  } [
    "Card"
    |badge| { translate: -4 4; } "9"
    |block| { pin: center; translate: 0 24; color: --muted; } "id 42"
  ]
]

// padding & gap take 1-, 2-, or 4-value forms
spacing |group| { layout: column; gap: 10; } [
  |caption| "padding"
  |box| { fill: --green-soft; stroke: --green-ink; color: --green-ink; } "scalar"
  |box| {
    padding: 4 14; fill: --green-soft; stroke: --green-ink; color: --green-ink;
  } "v h"
  |box| {
    padding: 2 8 16 24; fill: --green-soft; stroke: --green-ink; color: --green-ink;
  } "t r b l"
  |box| {
    radius: 12; fill: --green-soft; stroke: --green-ink; color: --green-ink;
  } "radius 12"
]