From c30dce5a800c5c51ea60ee6db4272568f78ca49a Mon Sep 17 00:00:00 2001 From: Baptiste de Montangon Date: Wed, 28 Aug 2024 14:08:10 +0200 Subject: [PATCH 1/4] fixed some imports --- src/core/element_maybe_signal.rs | 2 +- src/core/elements_maybe_signal.rs | 2 +- src/math/use_abs.rs | 2 +- src/math/use_and.rs | 2 +- src/math/use_ceil.rs | 2 +- src/math/use_floor.rs | 2 +- src/math/use_max.rs | 2 +- src/math/use_min.rs | 2 +- src/math/use_not.rs | 2 +- src/math/use_or.rs | 2 +- src/math/use_round.rs | 2 +- src/signal_debounced.rs | 2 +- src/signal_throttled.rs | 2 +- src/storage/use_local_storage.rs | 2 +- src/storage/use_storage.rs | 2 +- src/use_active_element.rs | 2 +- src/use_breakpoints.rs | 2 +- src/use_clipboard.rs | 2 +- src/use_color_mode.rs | 2 +- src/use_device_orientation.rs | 2 +- src/use_display_media.rs | 2 +- src/use_document_visibility.rs | 2 +- src/use_draggable.rs | 8 ++++---- src/use_drop_zone.rs | 2 +- src/use_element_bounding.rs | 2 +- src/use_element_hover.rs | 2 +- src/use_element_size.rs | 2 +- src/use_element_visibility.rs | 2 +- src/use_event_source.rs | 2 +- src/use_favicon.rs | 2 +- src/use_geolocation.rs | 2 +- src/use_idle.rs | 2 +- src/use_infinite_scroll.rs | 5 +++-- src/use_intersection_observer.rs | 6 +++--- src/use_interval.rs | 2 +- src/use_interval_fn.rs | 2 +- src/use_intl_number_format.rs | 2 +- src/use_media_query.rs | 2 +- src/use_mutation_observer.rs | 4 ++-- src/use_permission.rs | 2 +- src/use_preferred_contrast.rs | 2 +- src/use_raf_fn.rs | 2 +- src/use_resize_observer.rs | 4 ++-- src/use_scroll.rs | 2 +- src/use_service_worker.rs | 4 ++-- src/use_sorted.rs | 2 +- src/use_timestamp.rs | 4 ++-- src/use_web_notification.rs | 8 ++++---- src/utils/filters/debounce.rs | 2 +- src/utils/filters/throttle.rs | 2 +- src/utils/pausable.rs | 2 +- src/watch_with_options.rs | 2 +- 52 files changed, 66 insertions(+), 65 deletions(-) diff --git a/src/core/element_maybe_signal.rs b/src/core/element_maybe_signal.rs index 6c79465..b5e2aa7 100644 --- a/src/core/element_maybe_signal.rs +++ b/src/core/element_maybe_signal.rs @@ -1,7 +1,7 @@ use crate::{UseDocument, UseWindow}; use cfg_if::cfg_if; use leptos::html::{CreateElement, ElementType}; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use send_wrapper::SendWrapper; use std::marker::PhantomData; diff --git a/src/core/elements_maybe_signal.rs b/src/core/elements_maybe_signal.rs index 86cb9de..0b60861 100644 --- a/src/core/elements_maybe_signal.rs +++ b/src/core/elements_maybe_signal.rs @@ -2,7 +2,7 @@ use crate::core::ElementMaybeSignal; use crate::{UseDocument, UseWindow}; use cfg_if::cfg_if; use leptos::html::ElementType; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use send_wrapper::SendWrapper; use std::marker::PhantomData; diff --git a/src/math/use_abs.rs b/src/math/use_abs.rs index 1e64ec9..5aef965 100644 --- a/src/math/use_abs.rs +++ b/src/math/use_abs.rs @@ -1,5 +1,5 @@ use crate::math::shared::use_simple_math; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use num::Float; use paste::paste; diff --git a/src/math/use_and.rs b/src/math/use_and.rs index d77dd03..b1b60e0 100644 --- a/src/math/use_and.rs +++ b/src/math/use_and.rs @@ -1,5 +1,5 @@ use crate::math::shared::use_binary_logic; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use paste::paste; diff --git a/src/math/use_ceil.rs b/src/math/use_ceil.rs index 60d3c8a..51cf4e6 100644 --- a/src/math/use_ceil.rs +++ b/src/math/use_ceil.rs @@ -1,5 +1,5 @@ use crate::math::shared::use_simple_math; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use num::Float; use paste::paste; diff --git a/src/math/use_floor.rs b/src/math/use_floor.rs index d0ec1a5..683de98 100644 --- a/src/math/use_floor.rs +++ b/src/math/use_floor.rs @@ -1,5 +1,5 @@ use crate::math::shared::use_simple_math; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use num::Float; use paste::paste; diff --git a/src/math/use_max.rs b/src/math/use_max.rs index b41478c..4acded2 100644 --- a/src/math/use_max.rs +++ b/src/math/use_max.rs @@ -1,5 +1,5 @@ use crate::math::shared::use_partial_cmp; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::cmp::Ordering; diff --git a/src/math/use_min.rs b/src/math/use_min.rs index 6bf1ab1..130979c 100644 --- a/src/math/use_min.rs +++ b/src/math/use_min.rs @@ -1,5 +1,5 @@ use crate::math::shared::use_partial_cmp; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::cmp::Ordering; diff --git a/src/math/use_not.rs b/src/math/use_not.rs index c9b8c8b..338f938 100644 --- a/src/math/use_not.rs +++ b/src/math/use_not.rs @@ -1,4 +1,4 @@ -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; /// Reactive `NOT` condition. diff --git a/src/math/use_or.rs b/src/math/use_or.rs index 09a36e4..59258dd 100644 --- a/src/math/use_or.rs +++ b/src/math/use_or.rs @@ -1,5 +1,5 @@ use crate::math::shared::use_binary_logic; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use paste::paste; diff --git a/src/math/use_round.rs b/src/math/use_round.rs index bdf2c98..6725904 100644 --- a/src/math/use_round.rs +++ b/src/math/use_round.rs @@ -1,5 +1,5 @@ use crate::math::shared::use_simple_math; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use num::Float; use paste::paste; diff --git a/src/signal_debounced.rs b/src/signal_debounced.rs index 06fe8e3..de30e13 100644 --- a/src/signal_debounced.rs +++ b/src/signal_debounced.rs @@ -1,6 +1,6 @@ use crate::utils::signal_filtered; use crate::{use_debounce_fn_with_options, DebounceOptions}; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use paste::paste; diff --git a/src/signal_throttled.rs b/src/signal_throttled.rs index 0554b2c..4643410 100644 --- a/src/signal_throttled.rs +++ b/src/signal_throttled.rs @@ -1,6 +1,6 @@ use crate::utils::signal_filtered; use crate::{use_throttle_fn_with_options, ThrottleOptions}; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use paste::paste; diff --git a/src/storage/use_local_storage.rs b/src/storage/use_local_storage.rs index 8886be5..ce858e1 100644 --- a/src/storage/use_local_storage.rs +++ b/src/storage/use_local_storage.rs @@ -1,6 +1,6 @@ use super::{use_storage_with_options, StorageType, UseStorageOptions}; use codee::{Decoder, Encoder}; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; #[allow(rustdoc::bare_urls)] diff --git a/src/storage/use_storage.rs b/src/storage/use_storage.rs index 6e01c1e..6e046ae 100644 --- a/src/storage/use_storage.rs +++ b/src/storage/use_storage.rs @@ -1,7 +1,7 @@ use crate::{core::MaybeRwSignal, storage::StorageType, utils::FilterOptions}; use codee::{CodecError, Decoder, Encoder}; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::sync::Arc; use thiserror::Error; diff --git a/src/use_active_element.rs b/src/use_active_element.rs index eda5670..1aebe3b 100644 --- a/src/use_active_element.rs +++ b/src/use_active_element.rs @@ -3,7 +3,7 @@ use crate::{use_document, use_event_listener_with_options, use_window, UseEventListenerOptions}; use leptos::ev::{blur, focus}; use leptos::html::{AnyElement, ToHtmlElement}; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; /// Reactive `document.activeElement` diff --git a/src/use_breakpoints.rs b/src/use_breakpoints.rs index 98719d5..6099d42 100644 --- a/src/use_breakpoints.rs +++ b/src/use_breakpoints.rs @@ -1,6 +1,6 @@ use crate::{use_media_query, use_window}; use leptos::logging::error; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use paste::paste; use std::collections::HashMap; diff --git a/src/use_clipboard.rs b/src/use_clipboard.rs index 3469391..d20dfe7 100644 --- a/src/use_clipboard.rs +++ b/src/use_clipboard.rs @@ -1,7 +1,7 @@ use crate::{js, js_fut, use_event_listener, use_supported, UseTimeoutFnReturn}; use default_struct_builder::DefaultBuilder; use leptos::ev::{copy, cut}; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; /// Reactive [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API). diff --git a/src/use_color_mode.rs b/src/use_color_mode.rs index 2760fbf..c0b0771 100644 --- a/src/use_color_mode.rs +++ b/src/use_color_mode.rs @@ -8,7 +8,7 @@ use crate::{ }; use codee::string::FromToStringCodec; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::fmt::{Display, Formatter}; use std::marker::PhantomData; diff --git a/src/use_device_orientation.rs b/src/use_device_orientation.rs index 0fb9c5b..2d24807 100644 --- a/src/use_device_orientation.rs +++ b/src/use_device_orientation.rs @@ -1,5 +1,5 @@ use cfg_if::cfg_if; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; /// Reactive [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent). /// Provide web developers with information from the physical orientation of diff --git a/src/use_display_media.rs b/src/use_display_media.rs index 483875b..ecf558e 100644 --- a/src/use_display_media.rs +++ b/src/use_display_media.rs @@ -1,8 +1,8 @@ use crate::core::MaybeRwSignal; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; use leptos::prelude::*; +use leptos::reactive_graph::wrappers::read::Signal; use wasm_bindgen::{JsCast, JsValue}; /// Reactive [`mediaDevices.getDisplayMedia`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia) streaming. diff --git a/src/use_document_visibility.rs b/src/use_document_visibility.rs index 675a430..48f3704 100644 --- a/src/use_document_visibility.rs +++ b/src/use_document_visibility.rs @@ -3,7 +3,7 @@ use crate::use_event_listener; use cfg_if::cfg_if; use leptos::ev::visibilitychange; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; /// Reactively track `document.visibilityState` diff --git a/src/use_draggable.rs b/src/use_draggable.rs index 73ef1fe..59e8aa3 100644 --- a/src/use_draggable.rs +++ b/src/use_draggable.rs @@ -2,8 +2,8 @@ use crate::core::{ElementMaybeSignal, MaybeRwSignal, PointerType, Position}; use crate::{use_event_listener_with_options, use_window, UseEventListenerOptions, UseWindow}; use default_struct_builder::DefaultBuilder; use leptos::ev::{pointerdown, pointermove, pointerup}; -use leptos::prelude::wrappers::read::Signal; use leptos::prelude::*; +use leptos::reactive_graph::wrappers::read::Signal; use std::marker::PhantomData; use std::sync::Arc; use wasm_bindgen::JsCast; @@ -137,7 +137,7 @@ where }; #[cfg(debug_assertions)] - let zone = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let zone = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); if !on_start(UseDraggableCallbackArgs { position, @@ -172,7 +172,7 @@ where set_position.set(position); #[cfg(debug_assertions)] - let zone = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let zone = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_move(UseDraggableCallbackArgs { position, @@ -197,7 +197,7 @@ where set_start_position.set(None); #[cfg(debug_assertions)] - let zone = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let zone = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_end(UseDraggableCallbackArgs { position: position.get_untracked(), diff --git a/src/use_drop_zone.rs b/src/use_drop_zone.rs index 2c3ad99..8612b32 100644 --- a/src/use_drop_zone.rs +++ b/src/use_drop_zone.rs @@ -1,7 +1,7 @@ use crate::core::ElementMaybeSignal; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::fmt::{Debug, Formatter}; use std::sync::Arc; diff --git a/src/use_element_bounding.rs b/src/use_element_bounding.rs index 90a7b8c..f743901 100644 --- a/src/use_element_bounding.rs +++ b/src/use_element_bounding.rs @@ -1,7 +1,7 @@ use crate::core::ElementMaybeSignal; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; /// Reactive [bounding box](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect) of an HTML element diff --git a/src/use_element_hover.rs b/src/use_element_hover.rs index b865519..da4bb5a 100644 --- a/src/use_element_hover.rs +++ b/src/use_element_hover.rs @@ -4,7 +4,7 @@ use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; use leptos::ev::{mouseenter, mouseleave}; use leptos::leptos_dom::helpers::TimeoutHandle; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; cfg_if! { if #[cfg(not(feature = "ssr"))] { diff --git a/src/use_element_size.rs b/src/use_element_size.rs index dabcb3a..dd8ec71 100644 --- a/src/use_element_size.rs +++ b/src/use_element_size.rs @@ -1,7 +1,7 @@ use crate::core::{ElementMaybeSignal, Size}; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; cfg_if! { if #[cfg(not(feature = "ssr"))] { diff --git a/src/use_element_visibility.rs b/src/use_element_visibility.rs index 90020cb..df495f8 100644 --- a/src/use_element_visibility.rs +++ b/src/use_element_visibility.rs @@ -6,7 +6,7 @@ use std::marker::PhantomData; #[cfg(not(feature = "ssr"))] use crate::{use_intersection_observer_with_options, UseIntersectionObserverOptions}; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; /// Tracks the visibility of an element within the viewport. /// diff --git a/src/use_event_source.rs b/src/use_event_source.rs index 759bfb1..63ee4e6 100644 --- a/src/use_event_source.rs +++ b/src/use_event_source.rs @@ -234,7 +234,7 @@ where ); } else { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_failed(); } diff --git a/src/use_favicon.rs b/src/use_favicon.rs index b8fbc0e..429c7be 100644 --- a/src/use_favicon.rs +++ b/src/use_favicon.rs @@ -3,7 +3,7 @@ use crate::core::MaybeRwSignal; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use wasm_bindgen::JsCast; diff --git a/src/use_geolocation.rs b/src/use_geolocation.rs index a92be6b..f405534 100644 --- a/src/use_geolocation.rs +++ b/src/use_geolocation.rs @@ -1,6 +1,6 @@ use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; /// Reactive [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API). diff --git a/src/use_idle.rs b/src/use_idle.rs index 9ecad2f..26abf35 100644 --- a/src/use_idle.rs +++ b/src/use_idle.rs @@ -3,7 +3,7 @@ use crate::filter_builder_methods; use crate::utils::{DebounceOptions, FilterOptions, ThrottleOptions}; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; /// diff --git a/src/use_infinite_scroll.rs b/src/use_infinite_scroll.rs index 10fc1c8..660e800 100644 --- a/src/use_infinite_scroll.rs +++ b/src/use_infinite_scroll.rs @@ -6,7 +6,7 @@ use crate::{ use default_struct_builder::DefaultBuilder; use futures_util::join; use gloo_timers::future::sleep; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::future::Future; use std::sync::Arc; @@ -159,7 +159,8 @@ where let measure = measure.clone(); leptos::spawn::spawn_local(async move { #[cfg(debug_assertions)] - let zone = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let zone = + leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); join!( on_load_more.with_value(|f| f(state)), diff --git a/src/use_intersection_observer.rs b/src/use_intersection_observer.rs index 8720845..1351bfc 100644 --- a/src/use_intersection_observer.rs +++ b/src/use_intersection_observer.rs @@ -1,7 +1,7 @@ use crate::core::{ElementMaybeSignal, ElementsMaybeSignal}; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::marker::PhantomData; @@ -101,11 +101,11 @@ where let stop = || {}; } else { use send_wrapper::SendWrapper; - + let closure_js = Closure::::new( move |entries: js_sys::Array, observer| { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); callback( entries diff --git a/src/use_interval.rs b/src/use_interval.rs index 9d108e1..16c85b6 100644 --- a/src/use_interval.rs +++ b/src/use_interval.rs @@ -1,7 +1,7 @@ use crate::utils::Pausable; use crate::{use_interval_fn_with_options, UseIntervalFnOptions}; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::rc::Rc; diff --git a/src/use_interval_fn.rs b/src/use_interval_fn.rs index b5c7fa3..1723594 100644 --- a/src/use_interval_fn.rs +++ b/src/use_interval_fn.rs @@ -104,7 +104,7 @@ where move || { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); callback(); } diff --git a/src/use_intl_number_format.rs b/src/use_intl_number_format.rs index f11af81..d5a2e24 100644 --- a/src/use_intl_number_format.rs +++ b/src/use_intl_number_format.rs @@ -4,7 +4,7 @@ use crate::js; use crate::utils::js_value_from_to_string; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::fmt::Display; use wasm_bindgen::{JsCast, JsValue}; diff --git a/src/use_media_query.rs b/src/use_media_query.rs index e63475b..a7b6271 100644 --- a/src/use_media_query.rs +++ b/src/use_media_query.rs @@ -3,7 +3,7 @@ use crate::use_event_listener; use cfg_if::cfg_if; use leptos::ev::change; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::cell::RefCell; use std::rc::Rc; diff --git a/src/use_mutation_observer.rs b/src/use_mutation_observer.rs index 23802c0..13c180d 100644 --- a/src/use_mutation_observer.rs +++ b/src/use_mutation_observer.rs @@ -1,7 +1,7 @@ use crate::core::ElementsMaybeSignal; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use wasm_bindgen::prelude::*; cfg_if! { if #[cfg(not(feature = "ssr"))] { @@ -90,7 +90,7 @@ where let closure_js = Closure::::new( move |entries: js_sys::Array, observer| { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); callback( entries diff --git a/src/use_permission.rs b/src/use_permission.rs index a3f1e24..2644eb8 100644 --- a/src/use_permission.rs +++ b/src/use_permission.rs @@ -1,4 +1,4 @@ -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::fmt::Display; diff --git a/src/use_preferred_contrast.rs b/src/use_preferred_contrast.rs index feb2856..88c1ab3 100644 --- a/src/use_preferred_contrast.rs +++ b/src/use_preferred_contrast.rs @@ -1,5 +1,5 @@ use crate::use_media_query; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::fmt::Display; diff --git a/src/use_raf_fn.rs b/src/use_raf_fn.rs index 714e487..1316964 100644 --- a/src/use_raf_fn.rs +++ b/src/use_raf_fn.rs @@ -102,7 +102,7 @@ pub fn use_raf_fn_with_options( }; #[cfg(debug_assertions)] - let zone = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let zone = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); callback(UseRafFnCallbackArgs { delta, timestamp }); diff --git a/src/use_resize_observer.rs b/src/use_resize_observer.rs index db4289f..046cdcb 100644 --- a/src/use_resize_observer.rs +++ b/src/use_resize_observer.rs @@ -1,7 +1,7 @@ use crate::core::ElementsMaybeSignal; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; cfg_if! { if #[cfg(not(feature = "ssr"))] { use crate::use_supported; @@ -91,7 +91,7 @@ where let closure_js = Closure::::new( move |entries: js_sys::Array, observer| { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); callback( entries diff --git a/src/use_scroll.rs b/src/use_scroll.rs index 6faa594..665ea40 100644 --- a/src/use_scroll.rs +++ b/src/use_scroll.rs @@ -2,7 +2,7 @@ use crate::core::{Direction, Directions, ElementMaybeSignal}; use crate::UseEventListenerOptions; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::rc::Rc; diff --git a/src/use_service_worker.rs b/src/use_service_worker.rs index 8095c97..5f7d6e0 100644 --- a/src/use_service_worker.rs +++ b/src/use_service_worker.rs @@ -1,6 +1,6 @@ use default_struct_builder::DefaultBuilder; use leptos::prelude::actions::Action; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use send_wrapper::SendWrapper; use std::sync::Arc; @@ -54,7 +54,7 @@ pub fn use_service_worker_with_options( let on_controller_change = options.on_controller_change.clone(); let js_closure = Closure::wrap(Box::new(move |_event: JsValue| { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_controller_change(); }) as Box) diff --git a/src/use_sorted.rs b/src/use_sorted.rs index eea7202..5cf6e4b 100644 --- a/src/use_sorted.rs +++ b/src/use_sorted.rs @@ -1,4 +1,4 @@ -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::cmp::Ordering; use std::ops::DerefMut; diff --git a/src/use_timestamp.rs b/src/use_timestamp.rs index a02812d..19a16ba 100644 --- a/src/use_timestamp.rs +++ b/src/use_timestamp.rs @@ -4,7 +4,7 @@ use crate::{ use_interval_fn_with_options, use_raf_fn_with_options, UseIntervalFnOptions, UseRafFnOptions, }; use default_struct_builder::DefaultBuilder; -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; use std::rc::Rc; @@ -87,7 +87,7 @@ pub fn use_timestamp_with_controls_and_options(options: UseTimestampOptions) -> update(); #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); callback(ts.get_untracked()); } diff --git a/src/use_web_notification.rs b/src/use_web_notification.rs index 8bc48d0..1b3dc98 100644 --- a/src/use_web_notification.rs +++ b/src/use_web_notification.rs @@ -75,7 +75,7 @@ pub fn use_web_notification_with_options( let on_click = Rc::clone(&options.on_click); move |e: web_sys::Event| { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_click(e); } @@ -86,7 +86,7 @@ pub fn use_web_notification_with_options( let on_close = Rc::clone(&options.on_close); move |e: web_sys::Event| { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_close(e); } @@ -97,7 +97,7 @@ pub fn use_web_notification_with_options( let on_error = Rc::clone(&options.on_error); move |e: web_sys::Event| { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_error(e); } @@ -108,7 +108,7 @@ pub fn use_web_notification_with_options( let on_show = Rc::clone(&options.on_show); move |e: web_sys::Event| { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_show(e); } diff --git a/src/utils/filters/debounce.rs b/src/utils/filters/debounce.rs index a1fed99..2bf9ac3 100644 --- a/src/utils/filters/debounce.rs +++ b/src/utils/filters/debounce.rs @@ -52,7 +52,7 @@ where let last_return_val = Arc::clone(&last_return_value); let invoke = move || { #[cfg(debug_assertions)] - let zone = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let zone = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); let return_value = _invoke(); diff --git a/src/utils/filters/throttle.rs b/src/utils/filters/throttle.rs index d12785a..e11ea63 100644 --- a/src/utils/filters/throttle.rs +++ b/src/utils/filters/throttle.rs @@ -58,7 +58,7 @@ where let last_return_val = Arc::clone(&last_return_value); let invoke = move || { #[cfg(debug_assertions)] - let zone = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let zone = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); let return_value = _invoke(); diff --git a/src/utils/pausable.rs b/src/utils/pausable.rs index e4ee096..9101461 100644 --- a/src/utils/pausable.rs +++ b/src/utils/pausable.rs @@ -1,4 +1,4 @@ -use leptos::prelude::wrappers::read::Signal; +use leptos::reactive_graph::wrappers::read::Signal; /// Pausable effect pub struct Pausable diff --git a/src/watch_with_options.rs b/src/watch_with_options.rs index 4aea34d..58177fc 100644 --- a/src/watch_with_options.rs +++ b/src/watch_with_options.rs @@ -111,7 +111,7 @@ where move || { #[cfg(debug_assertions)] - let _z = leptos::prelude::diagnostics::SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); let ret = callback( cur_deps_value From b3361c58c9560af8c3e3709ad59b8bb52aa85c46 Mon Sep 17 00:00:00 2001 From: Baptiste de Montangon Date: Wed, 28 Aug 2024 14:15:06 +0200 Subject: [PATCH 2/4] fixed more imports --- src/on_click_outside.rs | 2 +- src/use_drop_zone.rs | 4 ++-- src/use_event_listener.rs | 2 +- src/use_timeout_fn.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/on_click_outside.rs b/src/on_click_outside.rs index 89a44d9..9ff3895 100644 --- a/src/on_click_outside.rs +++ b/src/on_click_outside.rs @@ -114,7 +114,7 @@ where #[cfg(not(feature = "ssr"))] { - use leptos::prelude::diagnostics::SpecialNonReactiveZone; + use leptos::reactive_graph::diagnostics::SpecialNonReactiveZone; let OnClickOutsideOptions { ignore, capture, diff --git a/src/use_drop_zone.rs b/src/use_drop_zone.rs index 8612b32..ef3a394 100644 --- a/src/use_drop_zone.rs +++ b/src/use_drop_zone.rs @@ -1,8 +1,8 @@ use crate::core::ElementMaybeSignal; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; +use leptos::reactive_graph::wrappers::read::Signal; use std::fmt::{Debug, Formatter}; use std::sync::Arc; @@ -77,7 +77,7 @@ where #[cfg(not(feature = "ssr"))] { - use leptos::prelude::diagnostics::SpecialNonReactiveZone; + use leptos::reactive_graph::diagnostics::SpecialNonReactiveZone; let UseDropZoneOptions { on_drop, on_enter, diff --git a/src/use_event_listener.rs b/src/use_event_listener.rs index 366a3c0..5ce8b89 100644 --- a/src/use_event_listener.rs +++ b/src/use_event_listener.rs @@ -119,7 +119,7 @@ where #[cfg(not(feature = "ssr"))] { - use leptos::prelude::diagnostics::SpecialNonReactiveZone; + use leptos::reactive_graph::diagnostics::SpecialNonReactiveZone; use send_wrapper::SendWrapper; let event_name = event.name(); let closure_js = Closure::wrap(Box::new(move |e| { diff --git a/src/use_timeout_fn.rs b/src/use_timeout_fn.rs index e18cb3a..de639e2 100644 --- a/src/use_timeout_fn.rs +++ b/src/use_timeout_fn.rs @@ -51,7 +51,7 @@ where #[cfg(not(feature = "ssr"))] { use leptos::leptos_dom::helpers::TimeoutHandle; - use leptos::prelude::diagnostics::SpecialNonReactiveZone; + use leptos::reactive_graph::diagnostics::SpecialNonReactiveZone; use std::sync::{Arc, Mutex}; use std::time::Duration; From e86365a3d731d537987cf2659403b06e7d12f279 Mon Sep 17 00:00:00 2001 From: Baptiste de Montangon Date: Wed, 28 Aug 2024 14:16:41 +0200 Subject: [PATCH 3/4] more imports fixed --- src/use_service_worker.rs | 4 ++-- src/use_web_notification.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/use_service_worker.rs b/src/use_service_worker.rs index 5f7d6e0..308b21d 100644 --- a/src/use_service_worker.rs +++ b/src/use_service_worker.rs @@ -1,7 +1,7 @@ use default_struct_builder::DefaultBuilder; -use leptos::prelude::actions::Action; -use leptos::reactive_graph::wrappers::read::Signal; use leptos::prelude::*; +use leptos::reactive_graph::actions::Action; +use leptos::reactive_graph::wrappers::read::Signal; use send_wrapper::SendWrapper; use std::sync::Arc; use wasm_bindgen::{prelude::Closure, JsCast, JsValue}; diff --git a/src/use_web_notification.rs b/src/use_web_notification.rs index 1b3dc98..6fcf55f 100644 --- a/src/use_web_notification.rs +++ b/src/use_web_notification.rs @@ -1,7 +1,8 @@ use crate::{use_supported, use_window}; use cfg_if::cfg_if; use default_struct_builder::DefaultBuilder; -use leptos::prelude::{wrappers::read::Signal, *}; +use leptos::prelude::*; +use leptos::reactive_graph::wrappers::read::Signal; use std::rc::Rc; use wasm_bindgen::JsValue; From 7bdec2558456eb96028dba16928506c4437119b0 Mon Sep 17 00:00:00 2001 From: Baptiste de Montangon Date: Wed, 28 Aug 2024 14:24:33 +0200 Subject: [PATCH 4/4] fixed some warnings --- src/on_click_outside.rs | 3 +-- src/use_drop_zone.rs | 9 ++++----- src/use_event_listener.rs | 3 +-- src/use_timeout_fn.rs | 5 +++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/on_click_outside.rs b/src/on_click_outside.rs index 9ff3895..f3d2cc8 100644 --- a/src/on_click_outside.rs +++ b/src/on_click_outside.rs @@ -114,7 +114,6 @@ where #[cfg(not(feature = "ssr"))] { - use leptos::reactive_graph::diagnostics::SpecialNonReactiveZone; let OnClickOutsideOptions { ignore, capture, @@ -183,7 +182,7 @@ where } #[cfg(debug_assertions)] - let _z = SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); handler(event.into()); } diff --git a/src/use_drop_zone.rs b/src/use_drop_zone.rs index ef3a394..c2fe13c 100644 --- a/src/use_drop_zone.rs +++ b/src/use_drop_zone.rs @@ -77,7 +77,6 @@ where #[cfg(not(feature = "ssr"))] { - use leptos::reactive_graph::diagnostics::SpecialNonReactiveZone; let UseDropZoneOptions { on_drop, on_enter, @@ -109,7 +108,7 @@ where update_files(&event); #[cfg(debug_assertions)] - let _z = SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_enter(UseDropZoneEvent { files: files.get_untracked().into_iter().collect(), @@ -122,7 +121,7 @@ where update_files(&event); #[cfg(debug_assertions)] - let _z = SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_over(UseDropZoneEvent { files: files.get_untracked().into_iter().collect(), @@ -140,7 +139,7 @@ where update_files(&event); #[cfg(debug_assertions)] - let _z = SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_leave(UseDropZoneEvent { files: files.get_untracked().into_iter().collect(), @@ -156,7 +155,7 @@ where update_files(&event); #[cfg(debug_assertions)] - let _z = SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); on_drop(UseDropZoneEvent { files: files.get_untracked().into_iter().collect(), diff --git a/src/use_event_listener.rs b/src/use_event_listener.rs index 5ce8b89..2712831 100644 --- a/src/use_event_listener.rs +++ b/src/use_event_listener.rs @@ -119,12 +119,11 @@ where #[cfg(not(feature = "ssr"))] { - use leptos::reactive_graph::diagnostics::SpecialNonReactiveZone; use send_wrapper::SendWrapper; let event_name = event.name(); let closure_js = Closure::wrap(Box::new(move |e| { #[cfg(debug_assertions)] - let _z = SpecialNonReactiveZone::enter(); + let _z = leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter(); handler(e); }) as Box) diff --git a/src/use_timeout_fn.rs b/src/use_timeout_fn.rs index de639e2..5930163 100644 --- a/src/use_timeout_fn.rs +++ b/src/use_timeout_fn.rs @@ -51,7 +51,6 @@ where #[cfg(not(feature = "ssr"))] { use leptos::leptos_dom::helpers::TimeoutHandle; - use leptos::reactive_graph::diagnostics::SpecialNonReactiveZone; use std::sync::{Arc, Mutex}; use std::time::Duration; @@ -94,7 +93,9 @@ where *timer.lock().unwrap() = None; #[cfg(debug_assertions)] - let _z = SpecialNonReactiveZone::enter(); + let _z = + leptos::reactive_graph::diagnostics::SpecialNonReactiveZone::enter( + ); callback(arg); }