[package]
name = "leptos_router"
version = "0.8.9"
authors = ["Greg Johnston", "Ben Wishovich"]
license = "MIT"
readme = "../README.md"
repository = "https://github.com/leptos-rs/leptos"
description = "Router for the Leptos web framework."
rust-version.workspace = true
edition.workspace = true

[dependencies]
leptos = { workspace = true }
leptos_router_macro = { workspace = true }
any_spawner = { workspace = true }
either_of = { workspace = true }
or_poisoned = { workspace = true }
reactive_graph = { workspace = true }
tachys = { workspace = true, features = ["reactive_graph"] }
futures = { workspace = true, default-features = true }
url = { workspace = true, default-features = true }
js-sys = { workspace = true, default-features = true }
wasm-bindgen = { workspace = true, default-features = true }
tracing = { optional = true, workspace = true, default-features = true }
send_wrapper = { workspace = true, default-features = true }
thiserror = { workspace = true, default-features = true }
percent-encoding = { optional = true, workspace = true, default-features = true }
gloo-net = { workspace = true, default-features = true }

[dependencies.web-sys]
features = [
  "Document",
  "Window",
  "console",
  # History/Routing
  "History",
  "HtmlAnchorElement",
  "Location",
  "MouseEvent",
  "Url",
  # Form
  "FormData",
  "HtmlButtonElement",
  "HtmlFormElement",
  "HtmlInputElement",
  "SubmitEvent",
  "Url",
  "UrlSearchParams",
  # Fetching in Hydrate Mode
  "Headers",
  "Request",
  "RequestInit",
  "RequestMode",
  "Response",
]
workspace = true
default-features = true

[build-dependencies]
rustc_version = { workspace = true, default-features = true }

[features]
tracing = ["dep:tracing"]
ssr = ["dep:percent-encoding"]
nightly = []

[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]

[package.metadata.cargo-all-features]
denylist = ["tracing"]
max_combination_size = 2

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
  'cfg(leptos_debuginfo)',
  'cfg(erase_components)',
  'cfg(rustc_nightly)',
] }
