[package]
name = "yew"
version = "0.21.0"
edition = "2021"
authors = [
  "Denis Kolodin <deniskolodin@gmail.com>",
  "Justin Starry <justin@yew.rs>",
]
repository = "https://github.com/yewstack/yew"
homepage = "https://yew.rs"
documentation = "https://docs.rs/yew/"
license = "MIT OR Apache-2.0"
keywords = ["web", "webasm", "javascript"]
categories = ["gui", "wasm", "web-programming"]
description = "A framework for creating reliable and efficient web applications"
readme = "../../README.md"
rust-version = "1.64.0"

[dependencies]
console_error_panic_hook = "0.1"
gloo = "0.10"
indexmap = { version = "2", features = ["std"] }
js-sys = "0.3"
slab = "0.4"
wasm-bindgen = "0.2"
yew-macro = { version = "^0.21.0", path = "../yew-macro" }
thiserror = "1.0"
futures = { version = "0.3", default-features = false, features = ["std"] }
html-escape = { version = "0.2.13", optional = true }
implicit-clone = { version = "0.4.1", features = ["map"] }
base64ct = { version = "1.6.0", features = ["std"], optional = true }
bincode = { version = "1.3.3", optional = true }
serde = { version = "1", features = ["derive"] }
tracing = "0.1.37"
prokio = "0.1.0"
rustversion = "1"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# We still need tokio as we have docs linked to it.
tokio = { version = "1.32", features = ["rt"] }

[dependencies.web-sys]
version = "^0.3.64"
features = [
  "AnimationEvent",
  "Document",
  "DragEvent",
  "Element",
  "ErrorEvent",
  "Event",
  "EventInit",
  "EventTarget",
  "FocusEvent",
  "HtmlElement",
  "HtmlInputElement",
  "HtmlCollection",
  "HtmlTextAreaElement",
  "InputEvent",
  "InputEventInit",
  "KeyboardEvent",
  "Location",
  "MouseEvent",
  "Node",
  "NodeList",
  "PointerEvent",
  "ProgressEvent",
  "ShadowRoot",
  "Text",
  "TouchEvent",
  "TransitionEvent",
  "UiEvent",
  "WheelEvent",
  "Window",
  "HtmlScriptElement",
  "SubmitEvent",
]

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.32", features = ["full"] }

[dev-dependencies]
wasm-bindgen-test = "0.3"
gloo = { version = "0.10", features = ["futures"] }
wasm-bindgen-futures = "0.4"
trybuild = "1"

[dev-dependencies.web-sys]
version = "0.3"
features = ["ShadowRootInit", "ShadowRootMode", "HtmlButtonElement"]

[features]
ssr = ["dep:html-escape", "dep:base64ct", "dep:bincode"]
csr = []
hydration = ["csr", "dep:bincode"]
default = []

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "documenting"]
