Changed directory to webkitdirectory in bool_attrs definitions.

This commit is contained in:
Kaid committed 2023-07-10 17:19:11 +08:00
commit e39d8708fa
285 files changed
+20566 -1330

No files matched your search

+12 -8
View File
@@ -7,22 +7,20 @@ description = "HTML Element pack for Dioxus - a concurrent renderer-agnostic Vir
license = "MIT/Apache-2.0"
repository = "https://github.com/DioxusLabs/dioxus/"
homepage = "https://dioxuslabs.com"
documentation = "https://dioxuslabs.com"
keywords = ["dom", "ui", "gui", "react"]
[dependencies]
dioxus-core = { path = "../core", version = "^0.3.0" }
dioxus-rsx = { path = "../rsx", version = "^0.0.3", optional = true }
dioxus-core = { workspace = true }
dioxus-rsx = { workspace = true, optional = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_repr = { version = "0.1", optional = true }
wasm-bindgen = { version = "0.2.79", optional = true }
wasm-bindgen = { workspace = true, optional = true }
euclid = "0.22.7"
enumset = "1.0.11"
keyboard-types = "0.6.2"
async-trait = "0.1.58"
serde-value = "0.7.0"
tokio = { version = "1.27", features = ["fs", "io-util"], optional = true }
rfd = { version = "0.11.3", optional = true }
tokio = { workspace = true, features = ["fs", "io-util"], optional = true }
[dependencies.web-sys]
optional = true
@@ -53,7 +51,13 @@ serde_json = "1"
[features]
default = ["serialize"]
serialize = ["serde", "serde_repr", "euclid/serde", "keyboard-types/serde", "dioxus-core/serialize"]
serialize = [
"serde",
"serde_repr",
"euclid/serde",
"keyboard-types/serde",
"dioxus-core/serialize",
]
wasm-bind = ["web-sys", "wasm-bindgen"]
native-bind = ["tokio", "rfd"]
native-bind = ["tokio"]
hot-reload-context = ["dioxus-rsx"]
+1
View File
@@ -129,6 +129,7 @@ pub fn event_bubbles(evt: &str) -> bool {
"loadeddata" => false,
"loadedmetadata" => false,
"loadstart" => false,
"load" => false,
"pause" => false,
"play" => false,
"playing" => false,
+1
View File
@@ -4,6 +4,7 @@ pub type ImageEvent = Event<ImageData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ImageData {
#[cfg_attr(feature = "serialize", serde(default))]
pub load_error: bool,
}
+1
View File
@@ -7,6 +7,7 @@ use keyboard_types::Location;
/// A mouse button type (such as Primary/Secondary)
// note: EnumSetType also derives Copy and Clone for some reason
#[allow(clippy::unused_unit)]
#[derive(EnumSetType, Debug)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
pub enum MouseButton {
+7 -3
View File
@@ -91,7 +91,7 @@ fn fun_name(
// Touch
"touchcancel" | "touchend" | "touchmove" | "touchstart" => Touch(de(data)?),
// Srcoll
// Scroll
"scroll" => Scroll(de(data)?),
// Wheel
@@ -102,7 +102,7 @@ fn fun_name(
| "ended" | "interruptbegin" | "interruptend" | "loadeddata" | "loadedmetadata"
| "loadstart" | "pause" | "play" | "playing" | "progress" | "ratechange" | "seeked"
| "seeking" | "stalled" | "suspend" | "timeupdate" | "volumechange" | "waiting"
| "error" | "load" | "loadend" | "timeout" => Media(de(data)?),
| "loadend" | "timeout" => Media(de(data)?),
// Animation
"animationstart" | "animationend" | "animationiteration" => Animation(de(data)?),
@@ -113,10 +113,11 @@ fn fun_name(
// Toggle
"toggle" => Toggle(de(data)?),
"load" | "error" => Image(de(data)?),
// Mounted
"mounted" => Mounted,
// ImageData => "load" | "error";
// OtherData => "abort" | "afterprint" | "beforeprint" | "beforeunload" | "hashchange" | "languagechange" | "message" | "offline" | "online" | "pagehide" | "pageshow" | "popstate" | "rejectionhandled" | "storage" | "unhandledrejection" | "unload" | "userproximity" | "vrdisplayactivate" | "vrdisplayblur" | "vrdisplayconnect" | "vrdisplaydeactivate" | "vrdisplaydisconnect" | "vrdisplayfocus" | "vrdisplaypointerrestricted" | "vrdisplaypointerunrestricted" | "vrdisplaypresentchange";
other => {
return Err(serde_value::DeserializerError::UnknownVariant(
@@ -137,6 +138,7 @@ impl HtmlEvent {
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
#[serde(untagged)]
#[non_exhaustive]
pub enum EventData {
Mouse(MouseData),
Clipboard(ClipboardData),
@@ -154,6 +156,7 @@ pub enum EventData {
Animation(AnimationData),
Transition(TransitionData),
Toggle(ToggleData),
Image(ImageData),
Mounted,
}
@@ -176,6 +179,7 @@ impl EventData {
EventData::Animation(data) => Rc::new(data) as Rc<dyn Any>,
EventData::Transition(data) => Rc::new(data) as Rc<dyn Any>,
EventData::Toggle(data) => Rc::new(data) as Rc<dyn Any>,
EventData::Image(data) => Rc::new(data) as Rc<dyn Any>,
EventData::Mounted => Rc::new(MountedData::new(())) as Rc<dyn Any>,
}
}