opaline 0.2.0

A token-based theme engine for Ratatui TUI applications
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "opaline"
version = "0.2.0"
authors = ["Stefanie Jane <stef@hyperbliss.tech>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A token-based theme engine for Ratatui TUI applications"
homepage = "https://github.com/hyperb1iss/opaline"
readme = "README.md"
keywords = [
    "ratatui",
    "theme",
    "tui",
    "terminal",
    "color",
]
categories = [
    "command-line-interface",
    "config",
]
license = "MIT"
repository = "https://github.com/hyperb1iss/opaline"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
builtin-themes = []
cli = ["dep:colored"]
default = [
    "builtin-themes",
    "gradients",
    "ratatui",
]
discovery = ["dep:dirs"]
global-state = ["dep:parking_lot"]
gradients = []
ratatui = ["dep:ratatui-core"]
widgets = [
    "dep:ratatui",
    "dep:crossterm",
    "ratatui",
    "global-state",
    "builtin-themes",
]

[lib]
name = "opaline"
path = "src/lib.rs"

[[example]]
name = "theme-showcase"
path = "examples/theme_showcase.rs"
required-features = [
    "builtin-themes",
    "gradients",
    "ratatui",
]

[[test]]
name = "adapter_tests"
path = "tests/adapter_tests.rs"

[[test]]
name = "builtins_tests"
path = "tests/builtins_tests.rs"

[[test]]
name = "color_tests"
path = "tests/color_tests.rs"

[[test]]
name = "gradient_tests"
path = "tests/gradient_tests.rs"

[[test]]
name = "loader_tests"
path = "tests/loader_tests.rs"

[[test]]
name = "resolver_tests"
path = "tests/resolver_tests.rs"

[[test]]
name = "style_tests"
path = "tests/style_tests.rs"

[dependencies.colored]
version = "3"
optional = true

[dependencies.crossterm]
version = "0.29"
optional = true

[dependencies.dirs]
version = "6"
optional = true

[dependencies.parking_lot]
version = "0.12"
optional = true

[dependencies.ratatui]
version = "0.30"
features = ["crossterm"]
optional = true
default-features = false

[dependencies.ratatui-core]
version = "0.1"
optional = true

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.thiserror]
version = "2.0"

[dependencies.toml]
version = "0.8"

[dev-dependencies.crossterm]
version = "0.29"

[dev-dependencies.pretty_assertions]
version = "1"

[dev-dependencies.ratatui]
version = "0.30"

[dev-dependencies.serde_json]
version = "1.0.149"

[lints.clippy.all]
level = "deny"
priority = 0

[lints.clippy.as_conversions]
level = "warn"
priority = 22

[lints.clippy.async_yields_async]
level = "warn"
priority = 32

[lints.clippy.cast_possible_truncation]
level = "warn"
priority = 22

[lints.clippy.cast_precision_loss]
level = "warn"
priority = 22

[lints.clippy.cast_sign_loss]
level = "warn"
priority = 22

[lints.clippy.cloned_instead_of_copied]
level = "warn"
priority = 36

[lints.clippy.cognitive_complexity]
level = "warn"
priority = 34

[lints.clippy.dbg_macro]
level = "warn"
priority = 31

[lints.clippy.enum_glob_use]
level = "deny"
priority = 30

[lints.clippy.flat_map_option]
level = "warn"
priority = 36

[lints.clippy.from_iter_instead_of_collect]
level = "warn"
priority = 36

[lints.clippy.future_not_send]
level = "warn"
priority = 32

[lints.clippy.if_not_else]
level = "warn"
priority = 36

[lints.clippy.implicit_clone]
level = "warn"
priority = 33

[lints.clippy.inefficient_to_string]
level = "warn"
priority = 33

[lints.clippy.manual_let_else]
level = "warn"
priority = 36

[lints.clippy.match_same_arms]
level = "warn"
priority = 36

[lints.clippy.missing_errors_doc]
level = "allow"
priority = 20

[lints.clippy.missing_panics_doc]
level = "allow"
priority = 20

[lints.clippy.missing_safety_doc]
level = "allow"
priority = 20

[lints.clippy.module_name_repetitions]
level = "allow"
priority = 21

[lints.clippy.multiple_crate_versions]
level = "allow"
priority = 40

[lints.clippy.must_use_candidate]
level = "allow"
priority = 21

[lints.clippy.needless_continue]
level = "warn"
priority = 36

[lints.clippy.needless_pass_by_value]
level = "warn"
priority = 36

[lints.clippy.out_of_bounds_indexing]
level = "deny"
priority = 30

[lints.clippy.pedantic]
level = "deny"
priority = 10

[lints.clippy.perf]
level = "deny"
priority = 1

[lints.clippy.redundant_else]
level = "warn"
priority = 36

[lints.clippy.result_large_err]
level = "warn"
priority = 35

[lints.clippy.semicolon_if_nothing_returned]
level = "warn"
priority = 36

[lints.clippy.significant_drop_tightening]
level = "allow"
priority = 21

[lints.clippy.string_lit_as_bytes]
level = "warn"
priority = 33

[lints.clippy.style]
level = "warn"
priority = 1

[lints.clippy.todo]
level = "warn"
priority = 31

[lints.clippy.too_many_lines]
level = "warn"
priority = 34

[lints.clippy.trivially_copy_pass_by_ref]
level = "warn"
priority = 36

[lints.clippy.undocumented_unsafe_blocks]
level = "deny"
priority = 30

[lints.clippy.unwrap_used]
level = "deny"
priority = 30

[lints.rust]
unsafe_code = "forbid"

[lints.rust.missing_docs]
level = "allow"
priority = 1

[profile.release]
lto = true
codegen-units = 1
strip = true