Remove native and web features from dioxus-html (#3006)

* remove native and web features from dioxus-html

* Fix downcasting web events

* Fix desktop with tokio disabled
This commit is contained in:
Evan Almloff authored and GitHub committed 2024-10-10 13:35:59 -07:00
1 parent 677e0e7f4f
commit cda8bb24f1
54 files changed
+1768 -1512

No files matched your search

+2 -41
View File
@@ -19,8 +19,6 @@ dioxus-hooks = { workspace = true }
generational-box = { workspace = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_repr = { version = "0.1", optional = true }
wasm-bindgen = { workspace = true, optional = true }
wasm-bindgen-futures = { workspace = true, optional = true }
js-sys = { version = "0.3.56", optional = true }
euclid = "0.22.7"
enumset = "1.1.2"
@@ -32,30 +30,6 @@ serde_json = { version = "1", optional = true }
tracing.workspace = true
rustversion = "1.0.17"
[dependencies.web-sys]
optional = true
version = "0.3.56"
features = [
"Touch",
"TouchList",
"TouchEvent",
"MouseEvent",
"DragEvent",
"InputEvent",
"HtmlInputElement",
"ClipboardEvent",
"KeyboardEvent",
"WheelEvent",
"AnimationEvent",
"TransitionEvent",
"PointerEvent",
"FocusEvent",
"CompositionEvent",
"CustomEvent",
"ResizeObserverEntry",
"ResizeObserverSize"
]
[build-dependencies]
lazy-js-bundle = { workspace = true }
@@ -76,30 +50,17 @@ serialize = [
"keyboard-types/serde",
"dioxus-core/serialize"
]
mounted = [
"web-sys?/Element",
"web-sys?/DomRect",
"web-sys?/ScrollIntoViewOptions",
"web-sys?/ScrollLogicalPosition",
"web-sys?/ScrollBehavior",
"web-sys?/HtmlElement",
]
mounted = []
document = [
"dep:serde",
"dep:serde_json"
]
file_engine = [
"dep:async-trait",
"dep:js-sys",
"web-sys?/File",
"web-sys?/FileList",
"web-sys?/FileReader"
]
wasm-bind = ["dep:web-sys", "dep:wasm-bindgen", "dep:wasm-bindgen-futures"]
native-bind = ["dep:tokio", "file_engine"]
hot-reload-context = ["dep:dioxus-rsx"]
html-to-rsx = []
[package.metadata.docs.rs]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
feature = ["html-to-rsx", "hot-reload-context", "html-to-rsx", "native-bind", "wasm-bind"]
feature = ["html-to-rsx", "hot-reload-context", "html-to-rsx"]