Move the history provider into the context (#3048)

* move history providers into a separate crate

* start moving route providers into the renderers

* clean up intoroutable

* remove into routable

* fix router tests

* Provide history providers in each renderer

* implement nested routers

* move the lens out of the history crate

* re-export dioxus history trait in the prelude

* also re-export the history function

* fix history doctests

* some light cleanups

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Evan AlmloffandJonathan Kelley authored and GitHub committed 2024-10-31 12:44:04 -07:00
1 parent e5a1a62644
commit 281087469a
48 files changed
+875 -1419

No files matched your search

+2 -21
View File
@@ -11,24 +11,11 @@ keywords = ["dom", "ui", "gui", "react", "wasm"]
[dependencies]
dioxus-lib = { workspace = true }
dioxus-history = { workspace = true }
dioxus-router-macro = { workspace = true }
gloo = { version = "0.8.0", optional = true }
tracing = { workspace = true }
urlencoding = "2.1.3"
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1.0.91", optional = true }
url = "2.3.1"
wasm-bindgen = { workspace = true, optional = true }
web-sys = { version = "0.3.60", optional = true, features = [
"ScrollRestoration",
] }
js-sys = { version = "0.3.63", optional = true }
gloo-utils = { version = "0.1.6", optional = true }
dioxus-liveview = { workspace = true, optional = true }
dioxus-ssr = { workspace = true, optional = true }
http = { workspace = true, optional = true }
dioxus-fullstack = { workspace = true, optional = true }
tokio = { workspace = true, features = ["full"], optional = true }
dioxus-cli-config = { workspace = true }
rustversion = "1.0.17"
@@ -36,18 +23,11 @@ rustversion = "1.0.17"
# dev-dependncey crates
[target.'cfg(target_family = "wasm")'.dev-dependencies]
console_error_panic_hook = "0.1.7"
dioxus-router = { workspace = true, features = ["web"] }
# dioxus-web = { workspace = true }
gloo = "0.8.0"
wasm-bindgen-test = "0.3.33"
[features]
default = []
ssr = []
liveview = ["dioxus-liveview", "dep:tokio", "dep:serde", "dep:serde_json"]
wasm_test = []
web = ["dep:gloo", "dep:web-sys", "dep:wasm-bindgen", "dep:gloo-utils", "dep:js-sys", "dioxus-router-macro/web"]
fullstack = ["dep:dioxus-fullstack"]
[dev-dependencies]
axum = { workspace = true, features = ["ws"] }
@@ -57,6 +37,7 @@ criterion = { workspace = true, features = ["async_tokio", "html_reports"] }
ciborium = { version = "0.2.1" }
base64 = { version = "0.21.0" }
serde = { version = "1", features = ["derive"] }
tokio = { workspace = true, features = ["full"] }
[package.metadata.docs.rs]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]