[package]
name        = "animato"
description = "Professional-grade, renderer-agnostic animation library for Rust. Zero mandatory dependencies. no_std-ready."
readme.workspace  = true
version.workspace     = true
edition.workspace     = true
license.workspace     = true
repository.workspace  = true
authors.workspace     = true
rust-version.workspace = true
keywords    = ["animation", "tween", "spring", "easing", "game-development"]
categories  = ["game-development", "graphics", "no-std"]

# For no_std targets, prefer the focused sub-crates directly.
[features]
default  = ["std", "tween", "timeline", "spring", "driver"]
std      = ["animato-core/std", "dep:animato-driver", "animato-tween?/std", "animato-timeline?/std", "animato-spring?/std", "animato-path?/std", "animato-physics?/std", "animato-color?/std", "palette?/std"]
tween    = ["dep:animato-tween", "animato-tween/alloc"]
timeline = ["dep:animato-timeline"]
spring   = ["dep:animato-spring", "animato-spring?/alloc"]
path     = ["dep:animato-path", "animato-path/std"]
physics  = ["dep:animato-physics", "animato-physics/alloc"]
color    = ["dep:animato-color", "dep:palette"]
driver   = ["dep:animato-driver"]
gpu      = ["dep:animato-gpu", "tween", "std"]
bevy     = ["dep:animato-bevy", "tween", "spring", "std"]
wasm     = ["dep:animato-wasm", "driver"]
wasm-dom = ["wasm", "animato-wasm/wasm-dom"]
leptos   = ["dep:animato-leptos"]
leptos-csr = ["leptos", "animato-leptos/csr"]
leptos-hydrate = ["leptos", "animato-leptos/hydrate"]
leptos-ssr = ["leptos", "animato-leptos/ssr"]
dioxus   = ["dep:animato-dioxus"]
dioxus-web = ["dioxus", "animato-dioxus/web"]
dioxus-desktop = ["dioxus", "animato-dioxus/desktop"]
dioxus-router = ["dioxus", "animato-dioxus/router"]
dioxus-native = ["dioxus", "animato-dioxus/native"]
tokio    = ["timeline", "animato-timeline/tokio"]
serde    = [
    "dep:serde",
    "animato-core/serde",
    "animato-tween?/serde",
    "animato-timeline?/serde",
    "animato-spring?/serde",
    "animato-path?/serde",
    "animato-physics?/serde",
    "animato-color?/serde",
]

[dependencies]
animato-core     = { workspace = true }
animato-tween    = { workspace = true, optional = true }
animato-timeline = { workspace = true, optional = true }
animato-spring   = { workspace = true, optional = true }
animato-path     = { workspace = true, optional = true }
animato-physics  = { workspace = true, optional = true }
animato-color    = { workspace = true, optional = true }
animato-driver   = { workspace = true, optional = true }
animato-gpu      = { workspace = true, optional = true }
animato-bevy     = { workspace = true, optional = true }
animato-wasm     = { workspace = true, optional = true }
animato-leptos   = { workspace = true, optional = true }
animato-dioxus   = { workspace = true, optional = true }
palette          = { workspace = true, optional = true }
serde            = { workspace = true, optional = true }

[dev-dependencies]
criterion      = { workspace = true }
animato-core   = { workspace = true }
animato-tween  = { workspace = true, features = ["alloc"] }
animato-timeline = { workspace = true }
animato-spring = { workspace = true, features = ["alloc"] }
animato-path   = { workspace = true, features = ["std"] }
animato-physics = { workspace = true, features = ["alloc"] }
animato-color  = { workspace = true }
animato-driver = { workspace = true }
animato-gpu    = { workspace = true }
animato-bevy   = { workspace = true }
animato-wasm   = { workspace = true }
animato-leptos = { workspace = true }
animato-dioxus = { workspace = true }
bevy_app       = { workspace = true }
bevy_ecs       = { workspace = true }
bevy_time      = { workspace = true }
bevy_transform = { workspace = true }
ratatui        = { workspace = true }
crossterm      = { workspace = true }

# ── Integration tests ─────────────────────────────────────────────────────────
[[test]]
name = "tween_lifecycle"
path = "../../tests/tween_lifecycle.rs"

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

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

[[test]]
name = "keyframe_looping"
path = "../../tests/keyframe_looping.rs"
required-features = ["tween"]

[[test]]
name = "timeline_sequence"
path = "../../tests/timeline_sequence.rs"
required-features = ["tween", "timeline"]

[[test]]
name = "control_features"
path = "../../tests/control_features.rs"
required-features = ["tween", "timeline", "spring", "serde", "tokio"]

[[test]]
name = "path_arc_length"
path = "../../tests/path_arc_length.rs"
required-features = ["path"]

[[test]]
name = "motion_path"
path = "../../tests/motion_path.rs"
required-features = ["path"]

[[test]]
name = "svg_path_parser"
path = "../../tests/svg_path_parser.rs"
required-features = ["path"]

[[test]]
name = "physics_input"
path = "../../tests/physics_input.rs"
required-features = ["physics"]

[[test]]
name = "color_interpolation"
path = "../../tests/color_interpolation.rs"
required-features = ["color", "tween"]

[[test]]
name = "bevy_integration"
path = "../../tests/bevy_integration.rs"
required-features = ["bevy"]

[[test]]
name = "wasm_raf_driver"
path = "../../tests/wasm_raf_driver.rs"
required-features = ["wasm", "tween"]

[[test]]
name = "dioxus_facade"
path = "../../tests/dioxus_facade.rs"
required-features = ["dioxus"]

# ── v0.8.0 tests ──────────────────────────────────────────────────────────────
[[test]]
name = "advanced_easing"
path = "../../tests/advanced_easing.rs"
required-features = ["tween"]

[[test]]
name = "morph_path_integration"
path = "../../tests/morph_path_integration.rs"
required-features = ["path"]

[[test]]
name = "scroll_driver"
path = "../../tests/scroll_driver.rs"
required-features = ["tween", "driver"]

[[test]]
name = "gpu_batch"
path = "../../tests/gpu_batch.rs"
required-features = ["gpu"]

# ── Benchmarks ────────────────────────────────────────────────────────────────
[[bench]]
name    = "easing_bench"
path    = "../../benches/easing_bench.rs"
harness = false

[[bench]]
name    = "tween_update_bench"
path    = "../../benches/tween_update_bench.rs"
harness = false

[[bench]]
name    = "spring_bench"
path    = "../../benches/spring_bench.rs"
harness = false

[[bench]]
name    = "path_bench"
path    = "../../benches/path_bench.rs"
harness = false

[[bench]]
name    = "physics_bench"
path    = "../../benches/physics_bench.rs"
harness = false

[[bench]]
name    = "timeline_bench"
path    = "../../benches/timeline_bench.rs"
harness = false

[[bench]]
name    = "gpu_batch_bench"
path    = "../../benches/gpu_batch_bench.rs"
harness = false

# ── Examples ──────────────────────────────────────────────────────────────────
[[example]]
name = "basic_tween"
path = "../../examples/basic_tween.rs"
required-features = ["tween", "driver"]

[[example]]
name = "spring_demo"
path = "../../examples/spring_demo.rs"
required-features = ["spring", "driver"]

[[example]]
name = "keyframe_track"
path = "../../examples/keyframe_track.rs"
required-features = ["tween"]

[[example]]
name = "timeline_sequence"
path = "../../examples/timeline_sequence.rs"
required-features = ["tween", "timeline"]

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

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

[[example]]
name = "scroll_linked"
path = "../../examples/scroll_linked.rs"
required-features = ["tween", "driver"]

[[example]]
name = "physics_drag"
path = "../../examples/physics_drag.rs"
required-features = ["physics"]

[[example]]
name = "color_animation"
path = "../../examples/color_animation.rs"
required-features = ["color", "tween"]

[[example]]
name = "bevy_transform"
path = "../../examples/bevy_transform.rs"
required-features = ["bevy"]

[[example]]
name = "tui_progress"
path = "../../examples/tui_progress.rs"
required-features = ["tween", "driver"]

[[example]]
name = "tui_spinner"
path = "../../examples/tui_spinner.rs"
required-features = ["tween", "driver"]

[[example]]
name = "gpu_particles"
path = "../../examples/gpu_particles.rs"
required-features = ["gpu"]
