Orrery v0.2.0
Import system, library files, diagram embedding via import, import aliasing, and a breaking change to embedded diagram syntax.
Orrery v0.2.0 introduces an import system for sharing types and diagrams across files. See the Import System tutorial and reference for the full details.
What changed
Added
- Namespaced import system — Reuse type definitions across files with
import "path";and library file headers. Imports use namespace qualification (e.g.,styles::Service), support transitive chaining, and detect circular dependencies. (#45) - Glob import — Bring all types from a file flat into the current scope with
import "path"::*;to eliminate namespace prefixes. Includes last-writer-wins semantics and transitive re-exports. (#46) - Diagram embedding via import — Reference an imported diagram as component content with
embed <name>syntax, e.g.,import "auth_flow"; auth_box: Rectangle embed auth_flow;. (#49) - Import aliasing — Override the derived namespace name with
import "path" as alias;so types are accessed asalias::Type. (#48) - Text label background layering — Text label backgrounds now render above all other diagram elements including arrows and lifelines, keeping labels legible over overlapping content. (#75)
Changed
- BREAKING: Embedded diagram syntax — Embedded diagrams now use
embed { diagram <kind>; ... };rather than the previousembed diagram <kind> { ... };. The diagram header moves inside the braces. (#53)
Quick example
Define reusable types in a library file:
library;
type Service = Rectangle[fill_color="#e6f3ff", rounded=5];
type Database = Oval[fill_color="#e0f0e0"];
Import them in a diagram:
diagram component;
import "shared/styles"::*;
api: Service;
db: Database;
api -> db: "Query";
Update
cargo install orrery-cli