If you're reading this because you try make sense of some new API or a breaking change, you might also be interested in coming to the chat for explanations or guidance.
- TextView::try_scroll_pages now accepts float values (anything
Into<f64>
)
- reexport crossbeam
- new Ticker tool: emit tick(s) on a channel
- input_field#display returns the curstor position if it's rendered - experimental - Thanks @xubaiwang
- upgrade crossterm to 0.28
- fix compilation with
default-features = false
- Fix #62
ask!
macro doesn't need separate imports anymore
- update Crokey to 1.0.0
- event source's
combining
nowfalse
by default
- list items are now by default indented as blocks. It's possible to revert to the old rendering (only the first line indented) with the list_items_identation_mod field of the skin - Fix #21
- Better support of repeated keys in EventSource
- EventSource by default mandates modifier (or space) for combinations with multiple simple keys. This can be changed with an option
- Major change: termimad and its coolor and crokey dependencies now use the version 0.27 of Crossterm, which brings many breaking changes but allows new capabilities in key events handling. Termimad's EventSource now outputs key combinations along crossterm events.
- paragraphs, code blocks, headers, and tables can be given a left_margin and a right_margin - Fix #11
- can_move_left and can_move_right functions on InputField
- MadSkin and other structs now implement serde::Serialize - Fix #19
- upgrade coolor, removing the ansi_colours dependency, fixing a license incompatibility - Fix #51
- upgrade terminal-clipboard due to RUSTSEC-2021-0019 in its X11 dependency
- dependency version updated
- coolor updated to 0.5.1
- fix shift-key extending the selection
- option for rounded corner tables in skin - see test-template example
skin.limit_to_ascii()
makes the characters used for table borders, bullets, etc. be in the non extended ASCII range - see "high-compatibility" example
- attribute parsing support RapidBlink and SlowBlink
- better error reporting on parsing invalid grey level
- gray panicking on out of range level has been changed to a silent clamping
- skin now deserializable with serde
- several utilities to parse colors and style elements
- utility functions (
FmtText::content_width
andFmtText::set_rendering_width
) and example (content-align) helping base alignments on the content's width rather than the terminal's width
- reexport coolor to ease dependency managment
- FmtText::raw_str function to build a text with no markdown interpretation
- with 1, 2, or 3 spaces before a bullet, you make a deeper list item - Fix #41
- expose the DisplayableLine struct, which can be useful for some widgets
- parsing markdown with options (clean indentation, continue spans); see parse-options example - Fix #38
- fix cases of selection becoming wider than content in input field
- fix coolor version to prevent a dependency version problem with crossterm
- reexport crossterm
- fix some '' not being rendered because being incorrectly considered as escaping
- update crossterm to 0.23.1 and coolor to 0.5
- upgrade coolor to 0.4 (which is pure rust) to fix a cross-compilation problem
- better algorithm for fitting tables, taking into account the whole column and not just its max width
- some fitting functions which could panic on an assert in extrem cases now return a Result (there are unlikely to be used directly so this shouldn't lead to breaking changes)
- fix a case of crash in input field
- fix dimension of drawn Rect
- better support of wide characters in InputField
- update Crossterm to 0.22.1 to fix some bugs
- addition of the small
Rect
utility, which lets you draw rects
- MadSkin blend_with function allows blending a skin with a color, with a given weight, enabling for example fading a skin into its background, which can be useful for displaying behind a dialog
- InputField: fix suppr key at end of line not joining lines
Several event related API have changed in a breaking way in this release
- EventSource now emits instances of TimedEvent, which wrap crossterm events
- InputField: selection & selection based operation (cut, copy, paste)
- InputField: double click selects the word around
- Remove the need to explicitly import minimad for crates using mad_print_inline!
- InputField: remove
\r
from edited strings
- Minimad's new TableBuilder, a facility to build text templates for tables
- insert_str function in InputField
- Home and End key now move to start and end of lines (i.e. no more of text) in multi-lines input fields
- several improvements and small fixes in input fields and scrolling
- TextView and MadView don't erase right of their area anymore
- some scroll API now use unsigned ints instead of i32
- input fields much improved. Can now be several lines - see examples/inputs
- the API of InputFields changed - but adapting user code should be straighforward:
- Replace
set_content(&str)
withset_str(AsRef<str>)
orclear()
. - Use
set_focus(bool)
instead of thefocused
field (now private). - Use
area()
andset_area(Area)
instead of thearea
field (now private).
- Replace
- organize and augment the utilities dedicated to writing text, formatted or not, in a limited size area
- remove the Result type
- upgrade crossterm to 0.21
- password mode in input field
- add
MadSkin::default_dark
andMadSkin::default_light
, two default skins suitable for specific kind of terminals
- change default skin to ensure it's readable whatever the terminal theme
ask!
macro andQuestion
API- the
mad_print_inline
andmad_write_inline
macros now accept any argument supportingto_string()
and not just&str
- fix a bug making tables sometimes exceed the width limit
- support wide chars everywhere, rewritten algorithms for markdown wrapping and fitting
- improved heuristics for table fitting & wrapping
- upgrade crossterm to 0.20 (beware that crossterm's API changed)
- fix some problems (including a crash) with input_field.del_word_right
- eases imports: it's no more needed to import the lazy_static crate and no import is needed for using macros
- fix a pb with wide chars in tables
- consider backspace as having a col width of -1 (they move the cursor to the left when printed in terminal)
- Fix a crash in
input_field.del_word_left()
- Style characters can now be escaped with a '' - Fix #24
- MadSkin::no_style() builds a skin without any style information, suitable for writing in files
- fix a bad column widths reduction
- names of variables in templates can now contain digits
- better column balancing in thight tables
- update crossbeam dependency to 0.8
- new version of minimad -> owning templates allow passing any Display as value
- styled_char and compound_style now implement Debug
- event source intercepts escape sequences and sends them (when finished) in a dedicated channel (not reading this bounded channel is possible: escape sequences are just dropped in that case)
- add the FitStr utility taken from broot (correct string cutting taking real char width in cols) (note that not all functions in termimad precisely take all chars width in cols into account)
- allow default value in template expansion
- allow default value in template expansion
- use the OwningTemplateExpander of Minimad 0.6.6
- fix inverted move_left and move_to_start
- upgrade crossterm to 0.17.7
- interpred lines with just ">" as empty quotes
- fix panic on wrapping long strings without space
- add a bunch of functions modifying the input (moving the cursor or deleting parts)
- fix uppercase letters not used in input field
- Prevent overflowing of large text from input field (some ellipsis added if necessary)
- EventSource: better manage channel errors
- relax the dependency version contraint on crossterm - Fix #18
- input fields now have a "focused" bool in their state
- added event handling functions in input_field for when you don't use termimad events or have a complex event dispatching
- key modifiers in click events in event_source
- the new experimental feature flag:
special-renders
lets you define replacement chars (for now) with a out of skin rendering (contact me if you're interested by this kind of feature)
- clear function in compound_style
- check w in double-click detection
- use crossterm 0.16.0 for slightly improved attributes storage
- use crossterm 0.15 to fix ctrl-J being read as Enter
- fix missing background on space after bullet in list
- use crossterm 0.14.2 for freeBSD compatibility
- fix the Enter key not recognized in combinations on some computers by normalizing '\r' and '\n' into 'Enter'
- allow language specification in code fences
- code fences support
- fix a compilation problem on windows (see #13 (comment))
- port to crossterm 0.14
- skin.print_expander makes using a text template less verbose
- TextView: draw the background till the end of line
- Templates allow going further in separating form from content
- fix skin's background not applied on empty lines at end of text_view
- use version minimad 0.4.3 to fix case of code not detected when following italic without space in between
- fix skin's background not applied on empty lines at end of text_view
- introduce inline templates, and especially the
mad_print_inline!
andmad_write_inline!
macros - add functions to shrink or extend a composite to a given width, using internal elision if possible
- add easy alternate to
skin.print_text
handling IO error
- incorporate crossterm 0.13.2 which fixes a regression on input reader
- compatibility with crossterm 0.13
- mouse support in stderr
- Displaying can be done on stderr or stdout, or in a subshell
- provide a default terminal width when the real one can't be measured
- list view: autoscroll on selection change
- list view: select_first_line & select_last_line
- add ProgressBar
- improvements of ListView
- fix build inconsistencies due to lack of precise sub crate versionning in crossterm
- add modifiable style for the input_field
Some tools that were parts of several Termimad based applications are now shared here:
- an event source emmiting events on a crossbeam channel
- an input field
- a list view with auto-resized columns
- a few utilies exported for apps with specific usages (compute_scrollbar, spacing.print_str, etc.)
- different styles for inline_code and code_block
- rgb now longer a macro but a free function
- two more color functions: ansi and gray
- clean and complete documentation
- support for horizontal rule (line made of dashes)
- support for quote (line starting with '>')
- support for bullet style customization (including colors)
- better wrapping, less frequently breaks words
- Skin API breaking changes to allow for more customization