main
tag: v0.10.0
tag: v0.11.0
tag: v0.12.0
tag: v0.13.0
tag: v0.14.0
tag: v0.14.1
tag: v0.15.0
tag: v0.16.0
tag: v0.16.1
tag: v0.17.0
tag: v0.18.0
tag: v0.19.0
tag: v0.20.0
tag: v0.21.0
tag: v0.22.0
tag: v0.23.0
tag: v0.24.0
tag: v0.25.0
tag: v0.25.1
tag: v0.26.0
tag: v0.27.0
tag: v0.28.0
tag: v0.29.0
tag: v0.30.0
tag: v0.31.0
tag: v0.32.0
tag: v0.33.0
tag: v0.34.0
tag: v0.35.0
tag: v0.36.0
tag: v0.37.0
tag: v0.38.0
tag: v0.39.0
tag: v0.40.0
tag: v0.41.0
tag: v0.41.1
tag: v0.42.0
tag: v0.43.0
tag: v0.44.0
tag: v0.44.1
tag: v0.5.0
tag: v0.5.1
tag: v0.6.0
tag: v0.7.0
tag: v0.8.0
tag: v0.9.0
Files
Commits
Tags
Notes
Issues
Use focus ring for the ring and say reach and focus are not colours
The theme header used focus cue and focus-ring for two different tokens.
The distinction it draws is right and only its words were wrong. Reach
and focus are absent here for a different reason, now stated: they are
not colours and not this crate's.
Takes makeover-layout 0.19.0.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
3 files changed,
+17 insertions,
-9 deletions
1
1
[package]
2
2
name = "makeover-tui"
3
-
version = "0.17.0"
3
+
version = "0.18.0"
4
4
edition = "2024"
5
5
description = "The terminal renderer for makeover-layout, on ratatui. Colour stops being the constraint above 256 entries; geometry never does, because an edge occupies a whole cell on every side."
6
6
license = "MIT"
19
19
# compile against an API added in a later one -- which is what `Depth::Overlay`
20
20
# would do here. The rest of the suite has pinned this way since
21
21
# makeover-webview found it the hard way.
22
-
makeover-layout = "0.18.0"
22
+
makeover-layout = "0.19.0"
23
23
makeover = { version = "2.5", optional = true }
24
24
25
25
[lints.rust]
16
16
//! # What is deliberately absent
17
17
//!
18
18
//! Tokens a consumer derives for itself. `alloy_tui` mixes a `border-subtle`
19
-
//! and its own focus-ring `border-strong` out of the authored border, holding
20
-
//! the latter to WCAG AA-UI against the page because Alloy spends it as the
21
-
//! entire focus cue. makeover emits a `border-strong` too, and it is a flat 5%
22
-
//! darkening: a firmer divider, not a focus ring. Those are different tokens
19
+
//! and its own `border-strong` out of the authored border, holding the latter
20
+
//! to WCAG AA-UI against the page because Alloy spends it as its entire **focus
21
+
//! ring**. makeover emits a `border-strong` too, and it is a flat 5% darkening:
22
+
//! a firmer divider, and not a focus ring at all. Those are different tokens
23
23
//! wearing one name, and on Akari Dawn they land at 1.63:1 and 3.27:1. This
24
24
//! struct carries makeover's, and a consumer that needs its own keeps deriving
25
25
//! it. Adopting one for the other would take a focus ring to half its floor.
26
+
//!
27
+
//! **Reach** and **focus** are absent for a different reason: they are not
28
+
//! colours and not this crate's at all. A terminal consumer derives reach from
29
+
//! draw order and tracks focus itself; a description states neither. The three
30
+
//! terms are defined once in `makeover_layout`'s crate header, "Reach, focus
31
+
//! and the focus ring".
26
32
27
33
use makeover::{Rgb, ThemeColors};
28
34
use ratatui::style::Color;
651
651
.contains(Modifier::REVERSED)
652
652
);
653
653
assert_eq!(line.spans[0].style, style.muted);
654
-
// Focus is a state and does not suppress anything.
655
-
let focused_state = Act::new("Save").state(State::Focus);
656
-
let line = act(&style, &focused_state, true);
654
+
// The same call on a control the description says nothing about: the
655
+
// mark is this renderer's own focus flag and always was, which is why
656
+
// only `Disabled` can override it.
657
+
let unstated = Act::new("Save");
658
+
let line = act(&style, &unstated, true);
657
659
assert!(
658
660
line.spans[0]
659
661
.style