Hi, I've just released https://github.com/TimoKramer/charm.clj/releases/tag/v0.2.123. There are a few fixes and features incorporated.
• Adaptive light/dark colors. adaptive takes a light and a dark variant and
resolves against the terminal background at render time. run detects the
background (OSC 11) and the color profile at startup, and reports both to the
application as an :environment message.
• Colors written as plain values now apply. :fg 240, :fg :red and
:fg "#ff8000" were silently dropped before — which also disabled charm's own
default styling in help, list and text-input, and most sample code.
• Pin the environment when detection is wrong. :color-profile and
:dark-background? options on run skip detection, and with it the probe
timeout a silent terminal costs at every startup.
• A faster event loop. It used to poll every 10 ms and handle one message per
iteration, capping throughput near 100 messages a second — a 300-character
paste took three seconds; it now takes 3 ms. :fps is finally read and acts as
the redraw ceiling, and command bodies run on virtual threads, so blocking work
no longer starves the dispatch pool.
• A faster render path. Each line is parsed once per frame instead of up to
three times (165 µs → 83 µs over 40 styled lines), viewports no longer copy all
their content each frame, and CI fails the build on reflection warnings.
• Untrusted content no longer reaches the terminal as instructions. The view
is sanitized before it is written, set-window-title escapes its argument,
signal handlers are restored on exit, and a shutdown hook restores the terminal
when a program exits from the inside. New public charm.ansi.sanitize.
• New options and functions: merge-style, :overflow, :bracketed-paste,
:ctrl-c and :sanitize on run.
• Fixes worth naming: "esc", "pgup" and "pgdown" never matched anything;
key-match? ignored modifiers when the pattern named none, so "c" also fired
on Ctrl+C; truncating a styled line stripped its styling; styling rewrote
┌──┐ as +--+; component ids could collide; :strikethrough never reached
the terminal.
• JLine 4.3.1 → 4.4.5, including two ColorPalette defects we found and got
fixed upstream (jline3 #2260, #2261).
• Potentially breaking: invalid color values now throw instead of rendering
unstyled (`(style :fg "red")` is an error), and the internal
charm.input.keys/key-matches? is gone — use msg/key-match?.
• Requires JDK 22+. Under babashka, JLine 4.4.5 (currently on master).
malli malli 0.20.2 is out with a number of minor fixes & improvements. Details on github: https://github.com/metosin/malli/releases/tag/0.20.2
thank you for including my fix! i've already put it to use
thanks for participating!