Repository navigation
v0.5.0
Code edits itself (ROADMAP task 2). Txt still types its text out.
SVG files become ordinary nodes (ROADMAP task 3).
Added
code.code().to(next, seconds)diffs the two sources. Tokens that stay
slide to their new places, deleted tokens fade and collapse, new tokens
fade in. Lines below the edit shift. Highlighting stays on the six
languages and is taken from each side, not from a half-typed string.insert(line, col, text, seconds),remove(((line, col), (line, col)), seconds)
andreplace(range, text, seconds). Lines are 1-based, columns are
0-based characters, and the range is half-open..flash()on that tween
lights the inserted text for a moment.- A focus on lines that move rides with them and lands on their new numbers
when the tween ends. - Example
code_steps: a function written in a few edits. Svgloads a file (.src(include_bytes!(..))or.file(path)) and
expands it into groups, paths and images..width/.heightkeep the
aspect ratio.svg.find("id")is the element with that id,svg.paths()
is every contour in paint order, and those paths morph throughdata
like a path written by hand. Filters, masks and clip paths are skipped
with a warning.- Example
svg: a logo drawn on path by path, then one part recolored.
Breaking
-
code.code()is no longer aSignal<String>..get(),.set()and
.bind()still work..to()is a diff, not a typewriter:// before — `code()` was a Signal<String>, and `.to()` typed the text let src: Signal<String> = code.code(); src.to(next, 1.0).await; // after — `.to()` slides tokens; `.get()` / `.set()` / `.bind()` remain code.code().to(next, 1.0).await; code.insert(2, 0, " let y = x * 2;\n", 0.6).flash().await;