Comments (5)
I'm working on this in ratatui
branch
from tui-textarea.
I confirmed the following change worked.
diff --git a/Cargo.toml b/Cargo.toml
index b706d9a..2d8c2c0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,16 +23,19 @@ include = [
[features]
default = ["crossterm"]
-crossterm = ["dep:crossterm", "tui/crossterm"]
+crossterm = ["dep:crossterm-025", "tui/crossterm"]
termion = ["dep:termion", "tui/termion"]
search = ["dep:regex"]
+crossterm-ratatui = ["dep:crossterm-026", "ratatui/crossterm"]
[dependencies]
-crossterm = { version = "0.25", optional = true }
+crossterm-025 = { package = "crossterm", version = "0.25", optional = true }
regex = { version = "1", optional = true }
termion = { version = "1.5", optional = true }
tui = { version = "0.19", default-features = false }
arbitrary = { version = "1", features = ["derive"], optional = true }
+crossterm-026 = { package = "crossterm", version = "0.26", optional = true }
+ratatui = { version = "0.20.1", default-features = false }
[[example]]
name = "minimal"
This means
I need to check if Cargo allows different versions of same crate to exist in dependencies list.
is possible.
Now I wonder how handle the combination of (tui, ratatui) * (crossterm, termion)
with features of this crate. Current idea is adding the following features separate from original crossterm
and termion
features.
ratatui-crossterm
ratatui-termion
from tui-textarea.
Yes, this should be supported. Though currently I don't have enough velocity to implement this, I'd like to work on this with higher priority when I have enough time.
from tui-textarea.
One thing I need to clarify is version of crossterm dependency.
tui-rs
is depending on v0.25ratatui
is depending on v0.26
Currently tui-textarea
is directly depending on v0.25 to align with tui-rs
. I'm not sure we can switch the version of crossterm
crate depending on tui-rs
or ratatui
respectively. I need to check if Cargo allows different versions of same crate to exist in dependencies list.
from tui-textarea.
Hi @rhysd, thanks for the ratatui support <3
Is it already available?
Just followed the instructions on README.md but got this error:
the package `X` depends on `tui-textarea`, with features: `ratatui-crossterm` but `tui-textarea` does not have these features.
Sorry if it is a silly question, I'm just not familiarized with Cargo releases
Additional Info:
Cargo.toml
crossterm = "0.26.1"
tui = { package = "ratatui", version = "0.20.1" }
tui-textarea = { version = "0.2.0", features = ["ratatui-crossterm"], default-features = false }
from tui-textarea.
Related Issues (20)
- Doesn't work with ratatui 0.24 HOT 3
- Feature request: prompt for single line TextArea HOT 3
- Samples on windows are inefficient HOT 14
- `insert_str` should accept newlines HOT 29
- hard tab now adds extra padding character on display HOT 4
- editor sample crashes on windows every other invokation HOT 4
- remove the <'a> requirement on TextArea HOT 8
- API improvement to allow fluent calls HOT 1
- refactor key input handling HOT 1
- add os clipboard support HOT 26
- Remove Emacs-like shortcuts from `TextArea::input` HOT 11
- Support bracketed-paste terminal mode
- trying to use tui-textarea in another project - version conflict HOT 13
- Support text "hints" HOT 1
- make lines field public HOT 1
- Allow input widgets to appear wherever the are in a terminal session HOT 2
- selection is really hard to use for the non `input` caller HOT 1
- Update to ratatui 0.26 HOT 2
- Feature Request: syntax highlighting HOT 4
- Is this still maintained ? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tui-textarea.