clean up prelude (#4416)
* clear away prelude on dioxus * clippy * wip - drop prelude from dioxus-html * docs clippy * wip * more fixe * delete all preludes * doc... * better export * merge some imports * fewer global imports * global incremental renderer * fix cargo doc
This commit is contained in:
1 parent
54d465a7b5
commit
4f1d039bad
140 files changed
+374
-477
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use dioxus_core::prelude::Callback;
|
||||
use dioxus_core::Callback;
|
||||
use rustc_hash::FxHashMap;
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
use wry::{http::Request, RequestAsyncResponder};
|
||||
|
||||
@@ -8,7 +8,7 @@ use crate::{
|
||||
webview::PendingWebview,
|
||||
AssetRequest, Config, WindowCloseBehaviour, WryEventHandler,
|
||||
};
|
||||
use dioxus_core::{prelude::Callback, VirtualDom};
|
||||
use dioxus_core::{Callback, VirtualDom};
|
||||
use std::{
|
||||
cell::Cell,
|
||||
future::{Future, IntoFuture},
|
||||
@@ -31,7 +31,7 @@ use tao::platform::ios::WindowExtIOS;
|
||||
///
|
||||
/// This function will panic if it is called outside of the context of a Dioxus App.
|
||||
pub fn window() -> DesktopContext {
|
||||
dioxus_core::prelude::consume_context()
|
||||
dioxus_core::consume_context()
|
||||
}
|
||||
|
||||
/// A handle to the [`DesktopService`] that can be passed around.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::{query::Query, DesktopContext, WeakDesktopContext};
|
||||
use dioxus_core::prelude::queue_effect;
|
||||
use dioxus_core::queue_effect;
|
||||
use dioxus_document::{
|
||||
create_element_in_head, Document, Eval, EvalError, Evaluator, LinkProps, MetaProps,
|
||||
ScriptProps, StyleProps,
|
||||
|
||||
@@ -11,8 +11,8 @@ use dioxus_html::{
|
||||
point_interaction::{
|
||||
InteractionElementOffset, InteractionLocation, ModifiersInteraction, PointerInteraction,
|
||||
},
|
||||
prelude::{SerializedMouseData, SerializedPointInteraction},
|
||||
FileEngine, HasDragData, HasFileData, HasFormData, HasMouseData,
|
||||
FileEngine, HasDragData, HasFileData, HasFormData, HasMouseData, SerializedMouseData,
|
||||
SerializedPointInteraction,
|
||||
};
|
||||
|
||||
use serde::Deserialize;
|
||||
@@ -233,7 +233,7 @@ impl InteractionElementOffset for DesktopFileDragEvent {
|
||||
}
|
||||
|
||||
impl ModifiersInteraction for DesktopFileDragEvent {
|
||||
fn modifiers(&self) -> dioxus_html::prelude::Modifiers {
|
||||
fn modifiers(&self) -> dioxus_html::Modifiers {
|
||||
self.mouse.modifiers()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,7 @@ use crate::{
|
||||
assets::*, ipc::UserWindowEvent, shortcut::IntoAccelerator, window, DesktopContext,
|
||||
HotKeyState, ShortcutHandle, ShortcutRegistryError, WryEventHandler,
|
||||
};
|
||||
use dioxus_core::{
|
||||
prelude::{consume_context, use_hook_with_cleanup},
|
||||
use_hook, Runtime,
|
||||
};
|
||||
use dioxus_core::{consume_context, use_hook, use_hook_with_cleanup, Runtime};
|
||||
|
||||
use dioxus_hooks::use_callback;
|
||||
use tao::{event::Event, event_loop::EventLoopWindowTarget};
|
||||
@@ -22,7 +19,7 @@ pub fn use_window() -> DesktopContext {
|
||||
pub fn use_wry_event_handler(
|
||||
mut handler: impl FnMut(&Event<UserWindowEvent>, &EventLoopWindowTarget<UserWindowEvent>) + 'static,
|
||||
) -> WryEventHandler {
|
||||
use dioxus_core::prelude::current_scope_id;
|
||||
use dioxus_core::current_scope_id;
|
||||
|
||||
// Capture the current runtime and scope ID.
|
||||
let runtime = Runtime::current().unwrap();
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
//! tray icon
|
||||
|
||||
use dioxus_core::{
|
||||
prelude::{provide_context, try_consume_context},
|
||||
use_hook,
|
||||
};
|
||||
use dioxus_core::{provide_context, try_consume_context, use_hook};
|
||||
|
||||
#[cfg(not(any(target_os = "ios", target_os = "android")))]
|
||||
pub use tray_icon::*;
|
||||
|
||||
Reference in new issue
Block a user