dioxus/packages/html/Cargo.toml
ASR-ASU 2f49a89638
Add the onresize event handler to Element (#2479)
* Add the capability to handle resize event for web target

* Add the capability to handle resize event for desktop target

* Return all the sizes, not just the first one

* Fix conversion from platform to generic ResizedData for liveview

* Update the generated interpreter js code base

* Fix clippy warnings

* Fix inconsistent use of block_size and inline_size

* Rename `onresized` event to `onresize`

* Remove the the special-casing logic from the binding logic

* Propagating the resize events using CustomEvent

* Fix case convention in core ts

* revert changes to unified bindings

* Cleanup as suggested

* add a resize example

* Fix desktop resize events

* remove tracing from resize example

* use the raw resize entry so we can downcast on web

* remove unused ResizeEventDetail

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-08-15 01:23:49 +00:00

104 lines
2.9 KiB
TOML

[package]
name = "dioxus-html"
version = { workspace = true }
authors = ["Jonathan Kelley"]
edition = "2021"
description = "HTML Element pack for Dioxus - a concurrent renderer-agnostic Virtual DOM for interactive user experiences"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
homepage = "https://dioxuslabs.com"
keywords = ["dom", "ui", "gui", "react"]
[dependencies]
dioxus-core = { workspace = true }
dioxus-core-macro = { workspace = true }
dioxus-rsx = { workspace = true, optional = true }
dioxus-html-internal-macro = { workspace = true }
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"
keyboard-types = { version = "0.7", default-features = false }
async-trait = { version = "0.1.58", optional = true }
tokio = { workspace = true, features = ["fs", "io-util"], optional = true }
futures-channel = { workspace = true }
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 }
[dev-dependencies]
serde_json = "1"
dioxus = { workspace = true }
dioxus-web = { workspace = true }
tokio = { workspace = true, features = ["time"] }
manganis = { workspace = true }
[features]
default = ["serialize", "mounted", "document", "file-engine"]
serialize = [
"dep:serde",
"dep:serde_json",
"dep:serde_repr",
"euclid/serde",
"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",
]
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", "dioxus-rsx/hot_reload_traits"]
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"]