merge master

This commit is contained in:
Evan Almloff committed 2022-12-20 20:48:28 -06:00
1 parent 67921cacc3
commit e5a5850354
105 files changed
+1415 -2106

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ use dioxus_core::Event;
pub type AnimationEvent = Event<AnimationData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq)]
pub struct AnimationData {
pub animation_name: String,
pub pseudo_element: String,
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type ClipboardEvent = Event<ClipboardData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ClipboardData {
// DOMDataTransfer clipboardData
}
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type CompositionEvent = Event<CompositionData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CompositionData {
pub data: String,
}
+2 -3
View File
@@ -8,12 +8,11 @@ pub type DragEvent = Event<DragData>;
/// placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location
/// (such as another DOM element). Applications are free to interpret a drag and drop interaction in an
/// application-specific way.
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, PartialEq)]
pub struct DragData {
/// Inherit mouse data
pub mouse: MouseData,
/// And then add the rest of the drag data
pub data: Box<dyn std::any::Any>,
}
impl_event! {
+1 -1
View File
@@ -3,7 +3,7 @@ use dioxus_core::Event;
pub type FocusEvent = Event<FocusData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct FocusData {/* DOMEventInner: Send + SyncTarget relatedTarget */}
impl_event! [
+6
View File
@@ -16,6 +16,12 @@ pub struct FormData {
pub files: Option<std::sync::Arc<dyn FileEngine>>,
}
impl PartialEq for FormData {
fn eq(&self, other: &Self) -> bool {
self.value == other.value && self.values == other.values
}
}
impl Debug for FormData {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("FormEvent")
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type ImageEvent = Event<ImageData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ImageData {
pub load_error: bool,
}
+1 -1
View File
@@ -7,7 +7,7 @@ use std::str::FromStr;
pub type KeyboardEvent = Event<KeyboardData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone)]
#[derive(Clone, PartialEq, Eq)]
pub struct KeyboardData {
#[deprecated(
since = "0.3.0",
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type MediaEvent = Event<MediaData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MediaData {}
impl_event! [
+1 -1
View File
@@ -10,7 +10,7 @@ pub type MouseEvent = Event<MouseData>;
/// A synthetic event that wraps a web-style [`MouseEvent`](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent)
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Default)]
#[derive(Clone, Default, PartialEq)]
/// Data associated with a mouse event
///
/// Do not use the deprecated fields; they may change or become private in the future.
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type PointerEvent = Event<PointerData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq)]
pub struct PointerData {
// Mouse only
pub alt_key: bool,
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type ScrollEvent = Event<ScrollData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ScrollData {}
impl_event! {
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type SelectionEvent = Event<SelectionData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SelectionData {}
impl_event! [
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type ToggleEvent = Event<ToggleData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ToggleData {}
impl_event! {
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type TouchEvent = Event<TouchData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct TouchData {
pub alt_key: bool,
pub ctrl_key: bool,
+1 -1
View File
@@ -2,7 +2,7 @@ use dioxus_core::Event;
pub type TransitionEvent = Event<TransitionData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq)]
pub struct TransitionData {
pub property_name: String,
pub pseudo_element: String,
+1 -1
View File
@@ -6,7 +6,7 @@ use crate::geometry::{LinesVector, PagesVector, PixelsVector, WheelDelta};
pub type WheelEvent = Event<WheelData>;
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone)]
#[derive(Clone, PartialEq, Default)]
pub struct WheelData {
#[deprecated(since = "0.3.0", note = "use delta() instead")]
pub delta_mode: u32,