[package]
name = "pure-tui"
version = "0.5.0"
edition = "2024"
description = "A modern terminal-based word processor for Markdown and other structured text documents"
authors = ["Rob Lillack <rob@lillack.net>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/roblillack/pure"
# Whitelist only what's needed to build/install the crate. This keeps the
# published package small by leaving out the demo GIF/cast, insta snapshots,
# benches, test fixtures, examples, and the dedicated `*_tests.rs` modules
# (all gated behind `#[cfg(test)]`/`#[cfg(feature = "recorder")]`, so they are
# never part of a normal lib+bin build).
include = [
    "src/**/*.rs",
    "!src/**/*_tests.rs",
    "Cargo.toml",
    "Cargo.lock",
    "README.md",
    "CHANGELOG.md",
    "LICENSE",
]

[package.metadata.release]
pre-release-replacements = [
    # Roll CHANGELOG's [Unreleased] over to the new version and re-seed a fresh
    # [Unreleased] above it (the Keep a Changelog + cargo-release marker idiom).
    # Order matters: the version/date/compare substitutions run first, *then*
    # the markers re-insert the literal "Unreleased"/"ReleaseDate" tokens so the
    # next release finds them again.
    { file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}" },
    { file = "CHANGELOG.md", search = '\.\.\.HEAD', replace = "...{{tag_name}}", exactly = 1 },
    { file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}" },
    { file = "CHANGELOG.md", search = "<!-- next-header -->", replace = "<!-- next-header -->\n\n## [Unreleased] - ReleaseDate", exactly = 1 },
    { file = "CHANGELOG.md", search = "<!-- next-url -->", replace = "<!-- next-url -->\n[Unreleased]: https://github.com/roblillack/pure/compare/{{tag_name}}...HEAD", exactly = 1 },
]

[features]
# Compiles the headless test harness into the library so `examples/demo`
# can drive the app without a terminal and record `demo.gif`. Without this
# feature, the example plays the same demo live in the terminal instead.
recorder = []

[dependencies]
anyhow = "1.0"
# `osc52` enables the clipboard module (copy via the OSC 52 escape sequence).
crossterm = { version = "0.29.0", features = ["osc52"] }
ratatui = "0.29"
tdoc = { version = "0.10.0", default-features = false }
unicode-width = "0.2.0"

[dev-dependencies]
gif = "0.14"
insta = "1.43"
resvg = "0.47"

[[bench]]
name = "performance"
harness = true
