Skip to content

Commit

Permalink
chore(cargo): update project metadata (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun authored Mar 17, 2023
1 parent 24820cf commit ed12ab1
Show file tree
Hide file tree
Showing 49 changed files with 201 additions and 201 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "tui"
name = "ratatui"
version = "0.19.0"
authors = ["Florian Dehau <work@fdehau.com>"]
description = """
A library to build rich terminal user interfaces or dashboards
"""
documentation = "https://docs.rs/tui/0.19.0/tui/"
documentation = "https://docs.rs/ratatui/latest/ratatui/"
keywords = ["tui", "terminal", "dashboard"]
repository = "https://github.com/fdehau/tui-rs"
repository = "https://github.com/tui-rs-revival/ratatui"
readme = "README.md"
license = "MIT"
exclude = ["assets/*", ".github", "Makefile.toml", "CONTRIBUTING.md", "*.log", "tags"]
Expand Down
12 changes: 6 additions & 6 deletions examples/barchart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout},
style::{Color, Modifier, Style},
widgets::{BarChart, Block, Borders},
Frame, Terminal,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};

struct App<'a> {
data: Vec<(&'a str, u64)>,
Expand Down
4 changes: 2 additions & 2 deletions examples/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{error::Error, io};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Alignment, Constraint, Direction, Layout},
style::{Color, Modifier, Style},
text::Span,
widgets::{Block, BorderType, Borders},
Frame, Terminal,
};
use std::{error::Error, io};

fn main() -> Result<(), Box<dyn Error>> {
// setup terminal
Expand Down
12 changes: 6 additions & 6 deletions examples/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout, Rect},
style::{Color, Style},
Expand All @@ -19,6 +14,11 @@ use tui::{
},
Frame, Terminal,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};

struct App {
x: f64,
Expand Down
12 changes: 6 additions & 6 deletions examples/chart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout},
style::{Color, Modifier, Style},
Expand All @@ -17,6 +12,11 @@ use tui::{
widgets::{Axis, Block, Borders, Chart, Dataset, GraphType},
Frame, Terminal,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};

const DATA: [(f64, f64); 5] = [(0.0, 0.0), (1.0, 1.0), (2.0, 2.0), (3.0, 3.0), (4.0, 4.0)];
const DATA2: [(f64, f64); 7] = [
Expand Down
4 changes: 2 additions & 2 deletions examples/custom_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{error::Error, io};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
buffer::Buffer,
layout::Rect,
style::Style,
widgets::Widget,
Frame, Terminal,
};
use std::{error::Error, io};

#[derive(Default)]
struct Label<'a> {
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use rand::{
distributions::{Distribution, Uniform},
rngs::ThreadRng,
};
use tui::widgets::ListState;
use ratatui::widgets::ListState;

const TASKS: [&str; 24] = [
"Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9", "Item10",
Expand Down
8 changes: 4 additions & 4 deletions examples/demo/crossterm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use ratatui::{
backend::{Backend, CrosstermBackend},
Terminal,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};
use tui::{
backend::{Backend, CrosstermBackend},
Terminal,
};

pub fn run(tick_rate: Duration, enhanced_graphics: bool) -> Result<(), Box<dyn Error>> {
// setup terminal
Expand Down
8 changes: 4 additions & 4 deletions examples/demo/termion.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use crate::{app::App, ui};
use ratatui::{
backend::{Backend, TermionBackend},
Terminal,
};
use std::{error::Error, io, sync::mpsc, thread, time::Duration};
use termion::{
event::Key,
input::{MouseTerminal, TermRead},
raw::IntoRawMode,
screen::IntoAlternateScreen,
};
use tui::{
backend::{Backend, TermionBackend},
Terminal,
};

pub fn run(tick_rate: Duration, enhanced_graphics: bool) -> Result<(), Box<dyn Error>> {
// setup terminal
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/ui.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::app::App;
use tui::{
use ratatui::{
backend::Backend,
layout::{Constraint, Direction, Layout, Rect},
style::{Color, Modifier, Style},
Expand Down
12 changes: 6 additions & 6 deletions examples/gauge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout},
style::{Color, Modifier, Style},
text::Span,
widgets::{Block, Borders, Gauge},
Frame, Terminal,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};

struct App {
progress1: u16,
Expand Down
4 changes: 2 additions & 2 deletions examples/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{error::Error, io};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout},
widgets::{Block, Borders},
Frame, Terminal,
};
use std::{error::Error, io};

fn main() -> Result<(), Box<dyn Error>> {
// setup terminal
Expand Down
12 changes: 6 additions & 6 deletions examples/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Corner, Direction, Layout},
style::{Color, Modifier, Style},
text::{Span, Spans},
widgets::{Block, Borders, List, ListItem, ListState},
Frame, Terminal,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};

struct StatefulList<T> {
state: ListState,
Expand Down
10 changes: 5 additions & 5 deletions examples/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ use crossterm::event::{self, Event, KeyCode};
use crossterm::terminal::{disable_raw_mode, enable_raw_mode};
use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen};

use tui::backend::{Backend, CrosstermBackend};
use tui::layout::Alignment;
use tui::text::Spans;
use tui::widgets::{Block, Borders, Paragraph};
use tui::{Frame, Terminal};
use ratatui::backend::{Backend, CrosstermBackend};
use ratatui::layout::Alignment;
use ratatui::text::Spans;
use ratatui::widgets::{Block, Borders, Paragraph};
use ratatui::{Frame, Terminal};

type Result<T> = std::result::Result<T, Box<dyn Error>>;

Expand Down
12 changes: 6 additions & 6 deletions examples/paragraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Alignment, Constraint, Direction, Layout},
style::{Color, Modifier, Style},
text::{Span, Spans},
widgets::{Block, Borders, Paragraph, Wrap},
Frame, Terminal,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};

struct App {
scroll: u16,
Expand Down
4 changes: 2 additions & 2 deletions examples/popup.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use std::{error::Error, io};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Alignment, Constraint, Direction, Layout, Rect},
style::{Color, Modifier, Style},
text::Span,
widgets::{Block, Borders, Clear, Paragraph, Wrap},
Frame, Terminal,
};
use std::{error::Error, io};

use crossterm::{
event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
Expand Down
12 changes: 6 additions & 6 deletions examples/sparkline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ use rand::{
distributions::{Distribution, Uniform},
rngs::ThreadRng,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout},
style::{Color, Style},
widgets::{Block, Borders, Sparkline},
Frame, Terminal,
};
use std::{
error::Error,
io,
time::{Duration, Instant},
};

#[derive(Clone)]
pub struct RandomSignal {
Expand Down
4 changes: 2 additions & 2 deletions examples/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{error::Error, io};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Layout},
style::{Color, Modifier, Style},
widgets::{Block, Borders, Cell, Row, Table, TableState},
Frame, Terminal,
};
use std::{error::Error, io};

struct App<'a> {
state: TableState,
Expand Down
4 changes: 2 additions & 2 deletions examples/tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{error::Error, io};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout},
style::{Color, Modifier, Style},
text::{Span, Spans},
widgets::{Block, Borders, Tabs},
Frame, Terminal,
};
use std::{error::Error, io};

struct App<'a> {
pub titles: Vec<&'a str>,
Expand Down
4 changes: 2 additions & 2 deletions examples/user_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ use crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
use std::{error::Error, io};
use tui::{
use ratatui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout},
style::{Color, Modifier, Style},
text::{Span, Spans, Text},
widgets::{Block, Borders, List, ListItem, Paragraph},
Frame, Terminal,
};
use std::{error::Error, io};
use unicode_width::UnicodeWidthStr;

enum InputMode {
Expand Down
Loading

0 comments on commit ed12ab1

Please sign in to comment.