All builder-like functions are now named with_*. There is also now a way
to set each property imperatively with only a mutable reference.
The only widgets I haven't yet converted to this style are the Join*
widgets; they're a bit harder to figure out an appropriate API for.
The previous implementation of Styled used chunks that consisted of a
String and a ContentStyle. The current implementation instead stores a
single String and chunks consisting of a ContentStyle and an ending
index.
This implementation may reduce allocations and makes width-related
operations easier, for example getting the width of a Styled with its
whitespace trimmed.
Previously, when overwriting wide graphemes, those were not first
cleared from the buffer. This could sometimes result in partial
graphemes, which is an invalid buffer state.
Now, when a wide grapheme is overwritten, it is removed from the buffer
entirely and replaced with spaces. Those spaces retain the style of the
removed grapheme.
A similar thing now happens with graphemes that only partially overlap
the buffer, either on the left or the right border. Those parts that are
inside the buffer are rendered as spaces with the grapheme's style.