[package]
name = "treemd"
version = "0.5.7"
edition = "2024"
authors = ["epistates, inc. <nick@epistates.com>"]
description = "A markdown navigator with tree-based structural navigation and syntax highlighting"
license = "MIT"
keywords = ["markdown", "tui", "viewer", "navigator", "pager"]
categories = ["command-line-utilities", "text-processing"]
repository = "https://github.com/epistates/treemd"
homepage = "https://github.com/epistates/treemd"
documentation = "https://docs.rs/treemd"
readme = "README.md"
rust-version = "1.90"

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

[[bin]]
name = "treemd"
path = "src/main.rs"

[dependencies]
# CLI framework
clap = { version = "4.5", features = ["derive"] }
clap_complete = { version = "4.5", features = ["unstable-dynamic"] }

unicode-width = "0.2"

# Turbovault integration - OFM parsing with code-block awareness
turbovault-parser = "1.2.6"

# Tree data structure for heading hierarchy
indextree = "4.7"

# Terminal styling for CLI mode
termimad = "0.34"

# Serialization for JSON output
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Query language support
indexmap = { version = "2.13", features = ["serde"] }
regex = "1.12"

# TUI framework
ratatui = { version = "0.30", features = ["crossterm_0_29"] }
crossterm = "0.29"
color-eyre = "0.6"

# Image rendering in TUI
ratatui-image = { version = "10", default-features = false, features = ["crossterm", "image-defaults"] }
image = "0.25"
gif = "0.13"

# Syntax highlighting
syntect = "5.3"

# Fuzzy search
nucleo-matcher = "0.3"

# Clipboard support
arboard = { version = "3.6", features = ["wayland-data-control"] }

# Open URLs in default browser
open = "5.3"

# Atomic file operations
tempfile = "3.26"

# Configuration persistence
dirs = "6.0"
toml = "1.0"

# Keybindings system
keybinds = { version = "0.2", features = ["crossterm", "serde"] }
strum = { version = "0.27", features = ["derive"] }

# Terminal color capability detection
supports-color = "3.0"

# File system watching for live reload
notify = "8.0"

# Open files in editor with line:column positioning
opensesame = { version = "0.1.1", features = ["serde"] }

# Unix system calls for TTY handling
[target.'cfg(unix)'.dependencies]
libc = "0.2"

[features]
default = ["unstable-dynamic"]
unstable-dynamic = ["clap_complete/unstable-dynamic"]

[profile.release]
# Enable Link Time Optimization for better performance and smaller binary
lto = true

# Optimize for size (use "3" for speed instead)
opt-level = "z"

# Single codegen unit for better optimization (slower compile, better runtime)
codegen-units = 1

# Strip symbols from binary to reduce size
strip = true

# Abort on panic for smaller binary size
panic = "abort"
