Released on 14/10/2024
- Fixed: macros were not usable from external crates since the
tuirealm::
namespace of the recursive macro was not specified
Released on 14/10/2024
- Added
subclause_and_not!
Released on 13/10/2024
- Fixed docs not building
Released on 13/10/2024
- Dropped support for
tui-rs
. Tui-rs was deprecated a long time ago, so it doesn't really makes sense to keep supporting it. - Added new methods for
TerminalBridge
init
: Initialize a terminal with reasonable defaults for most applications.- Raw mode is enabled
- Alternate screen buffer enabled
- A panic hook is installed that restores the terminal before panicking. Ensure that this method is called after any other panic hooks that may be installed to ensure that the terminal is.
restore
: Restore the terminal to its original stateset_panic_hook
: Sets a panic hook that restores the terminal before panicking.- Added
draw
toTerminalBridge
CmdResult::Custom(&'static str)
changed toCmdResult::Custom(&'static str, State)
- Added new
subclause_and!(Id::Foo, Id::Bar, Id::Baz)
andsubclause_or!(Id::Foo, Id::Bar, Id::Baz)
macros. - Removed
InputListener
. Now useCrosstermInputListener
orTermionInputListener
. - Added Event handling for Mouse Events
- Added
Mouse
inSubEventClause
.
- Added
- Bump
ratatui
version to0.28
- Dont enable
MouseCapture
by default - Add function
enable_mouse_capture
anddisable_mouse_capture
toTerminalBridge
- Max poll for ports:
- Add
Port::set_max_poll
to set the amount aPort
is polled in a singlePort::should_poll
. - Add
EventListenerCfg::port
to add a manually constructedPort
- Previous
EventListenerCfg::port
has been renamed toEventListenerCfg::add_port
- Add
Huge thanks to hasezoey for the contributions.
Released on 04/03/2023
- Bump
ratatui
to0.26
Relesed on 19/10/2023
- Fixed duplicated key events on Windows
- Update dependencies:
- bitflags 2
- termion 2
Released on 22/08/2023
- Bump
crossterm
to0.27
- Added support for
ratatui
- to enable
ratatui
set featureratatui
(enabled by default) - to enable
tui
set featuretui
.
- to enable
- Deprecated features
with-crossterm
,with-termion
Released on 14/08/2022
-
Bump
crossterm
to0.25
-
Bump
tui
to0.19
-
Added events (supported by crossterm)
FocusGained, /// Window focus lost FocusLost, /// Clipboard content pasted Paste(String),
-
Added new key events (supported by crossterm)
/// Caps lock pressed CapsLock, /// Scroll lock pressed ScrollLock, /// Num lock pressed NumLock, /// Print screen key PrintScreen, /// Pause key Pause, /// Menu key Menu, /// keypad begin KeypadBegin, /// Media key Media(MediaKeyCode),
Released on 03/08/2022
- Fixed issue 40
Released on 23/06/2022
- Added
unwrap()
methods toState
andStaateValue
- Added
StateValue::None
Released on 29/04/2022
- Updated
crossterm
to0.23
- Updated
tui
to0.18
- Fixed build issue on nightly toolchain
Released on 06/03/2022
- Updated
tui
to0.17
- Added Injectors
- Properties injectors are trait objects, which must implement the
Injector
trait, which can provide some property (defined as a tuple ofAttribute
andAttrValue
) for components when they're mounted. - Read more in advanced concepts
- Properties injectors are trait objects, which must implement the
Released on 04/01/2022
- Added
focus()
method toApplication
which returns a reference to id of the current active component in theView
Released on 27/12/2021
- Fixed serialization for key events
- Removed serde for
Event
Released on 24/12/2021
- Added
serialize
feature: once this feature is enabled, theSerialize
and theDeserialize
traits will be available for certain entities:Key
,KeyEvent
andKeyModifiers
: this will give you the possibility to use these entities in a serialized data for configuring keybindings.Event
: implemented in order to provide a Port with commands from an external source.
Released on 28/11/2021
- Added
lock_ports()
andunlock_ports()
to pause event listener.- Once
lock_ports()
is called, Ports won't be polled as long asunlock_ports()
is not called. - by default ports are Unlocked
- Once
Released on 27/11/2021
TextSpan
From
trait implementation, now acceptsAsRef<str>
Released on 25/11/2021
Yet, another update 🙄
- Application API:
- Added
lock_subs()
andunlock_subs()
methods.- Once
lock_subs()
is called, events won't be anymore propagated to subscriptions as long asunlock_subs()
is not called. - by default events will be propagated to subs.
- Once
- Added
- Sub Clause:
- Added
Id
toHasAttr
andHasState
sub clauses. - Added new
IsMounted(Id)
sub clause
- Added
Released on 23/11/2021
❗ There's no 1.1.1 version. Since I don't like it as a version number, I decided to skip it
- Application API changes:
- Removed
sanitize
sinceView
is no more accessible - Added
umount_all
method which umounts all components fromView
and active subscriptions
- Removed
Released on 21/11/2021
tick()
will now return aVec<Msg>
. There's no need to pass anUpdate
trait anymore- The reasons behind this is that it was too annoying to handle the model in a separate structure which could not render the Ui.
- Exposed
PollStrategy
at root level
Released on 20/11/2021
- Improved performance for crossterm listener
Released on 13/11/2021
- New API; view docs
Released on 03/08/2021
- ❗ Compatibility with tui
0.16
and crossterm0.20
❗-
You can now set the block title alignment
- Added
title
toProps
BlockTitle
type inProps
, which is made up oftext
andalignment
. Use this instead of setting title inown
map
- Added
-
🔴 A really bad new in
Msg
matching 😭in crossterm
0.20
to solve an issue they removed the#[derive(Eq, PartialEq)]
fromKeyEvent
. This has now caused an issue when matching againstOnKey
events:error: to use a constant of type `KeyEvent` in a pattern, `KeyEvent` must be annotated with `#[derive(PartialEq, Eq)]`
To solve this issue you must from now on use a guard match to match keys:
fn update(model: &mut Model, view: &mut View, msg: Option<(String, Msg)>) -> Option<(String, Msg)> { let ref_msg: Option<(&str, &Msg)> = msg.as_ref().map(|(s, msg)| (s.as_str(), msg)); match ref_msg { None => None, // Exit after None Some(msg) => match msg { (COMPONENT_COUNTER1, key) if key == &MSG_KEY_TAB => { view.active(COMPONENT_COUNTER2); None } (COMPONENT_COUNTER2, key) if key == &MSG_KEY_TAB => { view.active(COMPONENT_COUNTER1); None } (_, key) if key == &MSG_KEY_ESC => { // Quit on esc model.quit(); None } _ => None, }, } }
-
Released on 31/07/2021
- Bugfix:
- Expose
get_data
fromDataset
- Expose
Released on 31/07/2021
- New PropValue values:
Alignment
Dataset
Shape
Style
Table
TextSpan
- Added
unwrap_{type}()
helpers forPropPayload
andPropValue
- ❗ Breaking changes ❗
- Removed
Color
fromPropValue
, usepalette
instead ❗ - ❗ Removed
TextParts
fromProps
, useown
properties instead ❗ - ❗ Removed
TextSpanBuilder
, you can just use the same methods onTextSpan
when creating it ❗ - ❗ Renamed
Canvas
toFrame
❗ - ❗ Moved standard library to tui-realm-stdlib ❗
- ❗ Removed
with-components
feature ❗
- Removed
Released on 23/06/2021
- Fixed TextArea not scrolling properly
- Added
with_highlight_str
andwith_max_scroll_step
to TextArea
Releasaed on 11/06/2021
- Hotfix for 0.4.1: preserve styles on scroll table;
with_highlight_color
method.
Released on 11/06/2021
- Fixed scrolltable not handling focus
- Added
with_highlight_str
andwith_max_scroll_step
to scrolltable
Released on 07/06/2021
- Another Prop API Update
- Removed
input_len
andinput_type
from properties. Useown
instead with newPropValue
- Added
Color
andInputType
toPropValue
- Removed
value
fromProps
- Added
own
: key-value storage (HashMap<&'static str, PropPayload>
) to store any value into properties.
- Removed
- Dependencies:
textwrap
0.14.0
Released on 04/06/2021
- Updated
Linked
inPropPayload
andPayload
with aLinkedList
Released on 02/06/2021
- Fixed input cursor for UTF8 (multi-bytes characters) (issue 5)
- Added
Update
trait to ease update implementation
Released on 15/05/2021
- Changed
PropValue
API to be similiar to theMsg
API. Now there are bothPropPayload
andPropValue
as happens withPayload
andValue
- Fixed index behaviour for checkbox and radio on update
Released on 03/05/2021
- Bumped
tui-rs
to0.15.0
Released on 02/05/2021
- Updated Payload API with
Value
Released on 20/04/2021
- First release