Orhun Parmaksız 2b7ec5cb7f
chore(widgets): enable calendar widget as default (#1521)
We now expect that you disable the default features if you want less
dependencies
2024-11-27 11:06:09 +03:00

116 lines
3.3 KiB
TOML

[package]
name = "ratatui-widgets"
description = "A collection of Ratatui widgets for building terminal user interfaces using Ratatui."
version = "0.3.0"
readme = "README.md"
authors.workspace = true
documentation.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true
exclude.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
all-features = true
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
rustdoc-args = ["--cfg", "docsrs"]
[features]
default = ["all-widgets"]
## enables serialization and deserialization of style and color types using the [`serde`] crate.
## This is useful if you want to save themes to a file.
serde = ["dep:serde", "ratatui-core/serde"]
#! Widgets that add dependencies are gated behind feature flags to prevent unused transitive
#! dependencies. The available features are:
## enables all widgets.
all-widgets = ["calendar"]
## enables the [`calendar`](calendar) widget module and adds a dependency on [`time`].
calendar = ["dep:time"]
## Enable all unstable features.
unstable = ["unstable-rendered-line-info"]
## Enables the [`Paragraph::line_count`](paragraph::Paragraph::line_count)
## [`Paragraph::line_width`](paragraph::Paragraph::line_width) methods
## which are experimental and may change in the future.
## See [Issue 293](https://github.com/ratatui/ratatui/issues/293) for more details.
unstable-rendered-line-info = []
[dependencies]
bitflags.workspace = true
itertools.workspace = true
indoc.workspace = true
instability.workspace = true
ratatui-core = { workspace = true }
strum.workspace = true
time = { version = "0.3.11", optional = true, features = ["local-offset"] }
unicode-segmentation.workspace = true
unicode-width.workspace = true
serde = { workspace = true, optional = true }
document-features = { workspace = true, optional = true }
line-clipping = "0.2.1"
[dev-dependencies]
color-eyre.workspace = true
pretty_assertions.workspace = true
ratatui.workspace = true
rstest.workspace = true
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
cargo = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
# we often split up a module into multiple files with the main type in a file named after the
# module, so we want to allow this pattern
module_inception = "allow"
# nursery or restricted
as_underscore = "warn"
deref_by_slicing = "warn"
else_if_without_else = "warn"
empty_line_after_doc_comments = "warn"
equatable_if_let = "warn"
fn_to_numeric_cast_any = "warn"
format_push_string = "warn"
map_err_ignore = "warn"
missing_const_for_fn = "warn"
mixed_read_write_in_expression = "warn"
mod_module_files = "warn"
needless_pass_by_ref_mut = "warn"
needless_raw_strings = "warn"
or_fun_call = "warn"
redundant_type_annotations = "warn"
rest_pat_in_fully_bound_structs = "warn"
string_lit_chars_any = "warn"
string_slice = "warn"
string_to_string = "warn"
unnecessary_self_imports = "warn"
use_self = "warn"
[[example]]
name = "barchart"
doc-scrape-examples = true
[[example]]
name = "block"
doc-scrape-examples = true