Skip to content

Releases: dannote/boxart

v0.3.3

27 Apr 14:04

Choose a tag to compare

Bug fixes

  • Unicode syntax highlighting tokens — Makeup token text can be chardata
    containing Unicode codepoints. Highlight formatting now uses Unicode-safe
    chardata conversion instead of byte-only iodata conversion, preventing crashes
    when rendering code nodes with characters like curly quotes.

v0.3.2

19 Apr 11:02

Choose a tag to compare

Bug fixes

  • Pie chart FP noiseshow_data: true displayed raw IEEE 754 artifacts like [5.8999999999999995]. Now uses ~g formatting (6 significant digits, trailing zeros stripped) matching the Python original.

v0.3.1

19 Apr 07:18

Choose a tag to compare

Bug fixes

  • Stacked layout gap inflation — when max_width triggered vertical stacking, gap expansions computed for the wide layout were incorrectly reused, adding excessive vertical space between every node pair
  • Mindmap multi-line labels — labels containing \n were inserted raw into connector strings, breaking line alignment. Now joined with · for inline display
  • Gap expansion limited to source/target layers only — intermediate gaps that just carry straight vertical lines no longer get inflated

v0.3.0

18 Apr 16:07

Choose a tag to compare

Progressive compaction

When max_width is set and the graph is too wide, Boxart now tries progressively compact settings — smaller gap, then padding — before falling back to canvas clamping. Ported from termaid's auto-fit behavior.

Layout stacking

When compaction isn't enough, sibling nodes in the same layer are stacked vertically instead of side-by-side, keeping all nodes fully rendered with intact borders.

Syntax highlighting in themed output

Code nodes with :language now render with Makeup syntax colors (keywords, functions, strings, operators) alongside the theme's structural colors.

Bug fixes

  • Labels no longer re-wrapped at hardcoded 20-char width — max_label_width is respected throughout
  • max_width operates at canvas cell level — no broken box-drawing characters
  • Mindmap handles tuple vertices without crashing

Hex.pm · HexDocs · Changelog

v0.2.0

18 Apr 13:41

Choose a tag to compare

New options

  • max_width — clamp output to terminal width by truncating lines
  • max_label_width — configurable word wrapping threshold (default: 20)
Boxart.render(graph, max_width: 80, max_label_width: 30)

Hex.pm · HexDocs · Changelog

v0.1.0

18 Apr 12:26

Choose a tag to compare

Initial release.

Features

  • Directed graph rendering — accepts Graph.t() from libgraph, renders as Unicode/ASCII art
  • Code nodes — source code with line numbers, optional Makeup syntax highlighting
  • 17 node shapes — rectangle, diamond, rounded, hexagon, stadium, circle, cylinder, and more
  • Edge styles — solid, dotted, thick, bidirectional, no-arrow (T-junction)
  • Edge labels
  • Subgraphs
  • All 4 directions — TD, LR, BT, RL
  • ANSI color themes — 7 built-in (default, mono, neon, dracula, nord, amber, phosphor) + custom
  • Rounded/sharp edge corners
  • Configurable padding and gap

Specialized renderers

  • State diagrams — states as rounded boxes with start/end markers
  • Sequence diagrams — lifelines, messages, activation boxes, notes, interaction blocks
  • Git graphs — branch lines, commit markers, tags, fork/merge (LR, TB, BT)
  • Gantt charts — task bars with time axis, sections, milestones
  • Mindmaps — tree layout with left/right branching (accepts Graph.t())
  • Pie charts — horizontal bar charts

All renderers implement the Boxart.Diagram behaviour.

Links