[package]
name = "dockview_dioxus"
version = "0.1.2"
edition = "2024"
description = "A tiling/docking layout for Dioxus — panes split, resize, tab, float, and maximize, with the arrangement saved to JSON and restored on reload."
license = "BlueOak-1.0.0"
repository = "https://github.com/valeratrades/dockview_dioxus"
documentation = "https://docs.rs/dockview_dioxus"
readme = "../README.md"
keywords = ["dioxus", "layout", "docking", "tiling", "wasm"]
categories = ["gui", "wasm"]

# A packed-grid tiling layout library for Dioxus. Web-only (DOM-backed).
[lib]

# `web` is default so `dx serve --example insilico` infers the platform (web) with no
# `--platform` flag — dx reads it from the enabled renderer feature. `dioxus/web` still
# compiles on the host, so native `cargo test` stays green. Consumers on another renderer
# set `default-features = false`.
[features]
default = ["web"]
web = ["dioxus/web"]

# localStorage persistence is web-only; gated so native `cargo check` stays green.
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
web-sys = { version = "0.3", features = ["Window", "Storage", "Document", "Element", "HtmlElement", "DomRect", "Node", "NodeList", "EventTarget", "KeyboardEvent"] }

[dependencies]
dioxus.workspace = true
serde.workspace = true
serde_json.workspace = true

[dev-dependencies]
gloo-timers = { workspace = true, features = ["futures"] }

# Examples live at the repo root (workspace level), so point back in from the package.
[[example]]
name = "insilico"
path = "../examples/insilico.rs"

[[test]]
name = "integration"
path = "tests/integration/main.rs"

[lints]
workspace = true
