[workspace]
members = [".", "crates/slt-wasm"]

[package]
name = "superlighttui"
version = "0.17.1"
edition = "2021"
description = "Super Light TUI - A lightweight, ergonomic terminal UI library"
license = "MIT"
repository = "https://github.com/subinium/SuperLightTUI"
homepage = "https://github.com/subinium/SuperLightTUI"
documentation = "https://docs.rs/superlighttui"
readme = "README.md"
keywords = ["tui", "terminal", "cli", "ui", "immediate-mode"]
categories = ["command-line-interface"]
rust-version = "1.81"
exclude = ["examples/", ".github/", "assets/", "AUDIT-REPORT.md", "CLAUDE.md"]

[lib]
name = "slt"

[dependencies]
crossterm = { version = "0.28", features = ["bracketed-paste"], optional = true }
unicode-width = "0.2"
tokio = { version = "1", features = ["rt", "sync", "macros", "time"], optional = true }
serde = { version = "1", features = ["derive"], optional = true }
image = { version = "0.25", optional = true, default-features = false, features = ["png", "jpeg"] }
compact_str = { version = "0.9.0", default-features = false }
flate2 = { version = "1", optional = true }
qrcode = { version = "0.14", optional = true, default-features = false }
tree-sitter-highlight = { version = "0.26", optional = true }
tree-sitter-rust = { version = "0.24", optional = true }
tree-sitter-python = { version = "0.25", optional = true }
tree-sitter-javascript = { version = "0.25", optional = true }
tree-sitter-go = { version = "0.25", optional = true }
tree-sitter-bash = { version = "0.25", optional = true }
tree-sitter-json = { version = "0.24", optional = true }
tree-sitter-toml-ng = { version = "0.7", optional = true }
tree-sitter-c = { version = "0.24", optional = true }
tree-sitter-cpp = { version = "0.23", optional = true }
tree-sitter-typescript = { version = "0.23", optional = true }
tree-sitter-java = { version = "0.23", optional = true }
tree-sitter-ruby = { version = "0.23", optional = true }
tree-sitter-css = { version = "0.25", optional = true }
tree-sitter-html = { version = "0.23", optional = true }
tree-sitter-yaml = { version = "0.7", optional = true }

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
insta = "1"
proptest = "1"

[features]
crossterm = ["dep:crossterm"]
default = ["crossterm"]
async = ["dep:tokio", "crossterm"]
serde = ["dep:serde"]
image = ["dep:image"]
qrcode = ["dep:qrcode"]
syntax-rust = ["dep:tree-sitter-highlight", "dep:tree-sitter-rust"]
syntax-python = ["dep:tree-sitter-highlight", "dep:tree-sitter-python"]
syntax-javascript = ["dep:tree-sitter-highlight", "dep:tree-sitter-javascript"]
syntax-go = ["dep:tree-sitter-highlight", "dep:tree-sitter-go"]
syntax-bash = ["dep:tree-sitter-highlight", "dep:tree-sitter-bash"]
syntax-json = ["dep:tree-sitter-highlight", "dep:tree-sitter-json"]
syntax-toml = ["dep:tree-sitter-highlight", "dep:tree-sitter-toml-ng"]
syntax-c = ["dep:tree-sitter-highlight", "dep:tree-sitter-c"]
syntax-cpp = ["dep:tree-sitter-highlight", "dep:tree-sitter-cpp"]
syntax-typescript = ["dep:tree-sitter-highlight", "dep:tree-sitter-typescript"]
syntax-java = ["dep:tree-sitter-highlight", "dep:tree-sitter-java"]
syntax-ruby = ["dep:tree-sitter-highlight", "dep:tree-sitter-ruby"]
syntax-css = ["dep:tree-sitter-highlight", "dep:tree-sitter-css"]
syntax-html = ["dep:tree-sitter-highlight", "dep:tree-sitter-html"]
syntax-yaml = ["dep:tree-sitter-highlight", "dep:tree-sitter-yaml"]
syntax = [
    "syntax-rust",
    "syntax-python",
    "syntax-javascript",
    "syntax-typescript",
    "syntax-go",
    "syntax-bash",
    "syntax-json",
    "syntax-toml",
    "syntax-c",
    "syntax-cpp",
    "syntax-java",
    "syntax-ruby",
    "syntax-css",
    "syntax-html",
    "syntax-yaml",
]
kitty-compress = ["dep:flate2"]
full = ["crossterm", "async", "serde", "image", "qrcode", "kitty-compress"]

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

[[example]]
name = "hello"
path = "examples/hello.rs"

[[example]]
name = "counter"
path = "examples/counter.rs"

[[example]]
name = "demo"
path = "examples/demo.rs"

[[example]]
name = "anim"
path = "examples/anim.rs"

[[example]]
name = "inline"
path = "examples/inline.rs"

[[example]]
name = "async_demo"
path = "examples/async_demo.rs"
required-features = ["async"]

[[example]]
name = "demo_dashboard"
path = "examples/demo_dashboard.rs"

[[example]]
name = "demo_cli"
path = "examples/demo_cli.rs"

[[example]]
name = "demo_spreadsheet"
path = "examples/demo_spreadsheet.rs"

[[example]]
name = "demo_website"
path = "examples/demo_website.rs"

[[example]]
name = "demo_infoviz"
path = "examples/demo_infoviz.rs"

[[example]]
name = "demo_wiki"
path = "examples/demo_wiki.rs"

[[example]]
name = "demo_fire"
path = "examples/demo_fire.rs"

[[example]]
name = "demo_game"
path = "examples/demo_game.rs"

[[example]]
name = "demo_kitty_image"
path = "examples/demo_kitty_image.rs"

[[bench]]
name = "benchmarks"
harness = false
