From e31709ba8478db2a002a7481235bc0961da847b0 Mon Sep 17 00:00:00 2001 From: Maccesch Date: Tue, 12 Sep 2023 15:24:32 +0100 Subject: [PATCH] updated to leptos 0.5.0-rc1 fixes #29 --- Cargo.toml | 2 +- examples/signal_throttled/src/main.rs | 2 +- examples/ssr/src/main.rs | 1 + examples/use_event_listener/src/main.rs | 1 + examples/use_scroll/src/main.rs | 1 + src/on_click_outside.rs | 1 + src/use_active_element.rs | 1 + src/use_breakpoints.rs | 1 + src/use_cycle_list.rs | 1 + src/use_event_listener.rs | 3 +++ src/watch_debounced.rs | 2 ++ src/watch_pausable.rs | 1 + src/watch_throttled.rs | 2 ++ src/watch_with_options.rs | 3 +++ src/whenever.rs | 4 ++++ 15 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5168467..b1844a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ repository = "https://github.com/Synphonyte/leptos-use" homepage = "https://leptos-use.rs" [dependencies] -leptos = "0.5.0-beta2" +leptos = "0.5.0-rc1" wasm-bindgen = "0.2" js-sys = "0.3" default-struct-builder = "0.5" diff --git a/examples/signal_throttled/src/main.rs b/examples/signal_throttled/src/main.rs index 0fc43ac..2ff7366 100644 --- a/examples/signal_throttled/src/main.rs +++ b/examples/signal_throttled/src/main.rs @@ -5,7 +5,7 @@ use leptos_use::signal_throttled; #[component] fn Demo() -> impl IntoView { let (input, set_input) = create_signal("".to_string()); - let throttled = signal_throttled(input, 1000.0); + let throttled: Signal = signal_throttled(input, 1000.0); view! {
diff --git a/examples/ssr/src/main.rs b/examples/ssr/src/main.rs index a9dfaa5..6b92404 100644 --- a/examples/ssr/src/main.rs +++ b/examples/ssr/src/main.rs @@ -2,6 +2,7 @@ #[tokio::main] async fn main() { use axum::{routing::post, Router}; + use leptos::logging::log; use leptos::*; use leptos_axum::{generate_route_list, LeptosRoutes}; use start_axum::app::*; diff --git a/examples/use_event_listener/src/main.rs b/examples/use_event_listener/src/main.rs index 067c17e..eb2b22d 100644 --- a/examples/use_event_listener/src/main.rs +++ b/examples/use_event_listener/src/main.rs @@ -1,5 +1,6 @@ use leptos::ev::{click, keydown}; use leptos::html::A; +use leptos::logging::log; use leptos::*; use leptos_use::use_event_listener; diff --git a/examples/use_scroll/src/main.rs b/examples/use_scroll/src/main.rs index cd01592..a70b87e 100644 --- a/examples/use_scroll/src/main.rs +++ b/examples/use_scroll/src/main.rs @@ -1,4 +1,5 @@ use leptos::html::Div; +use leptos::logging::log; use leptos::*; use leptos_use::docs::{demo_or_body, BooleanDisplay}; use leptos_use::{use_scroll_with_options, ScrollBehavior, UseScrollOptions, UseScrollReturn}; diff --git a/src/on_click_outside.rs b/src/on_click_outside.rs index fcce00d..705c764 100644 --- a/src/on_click_outside.rs +++ b/src/on_click_outside.rs @@ -25,6 +25,7 @@ static IOS_WORKAROUND: RwLock = RwLock::new(false); /// ``` /// # use leptos::*; /// # use leptos::ev::resize; +/// # use leptos::logging::log; /// # use leptos::html::Div; /// # use leptos_use::on_click_outside; /// # diff --git a/src/use_active_element.rs b/src/use_active_element.rs index 98b8d0f..99bf51f 100644 --- a/src/use_active_element.rs +++ b/src/use_active_element.rs @@ -17,6 +17,7 @@ use web_sys::AddEventListenerOptions; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// use leptos_use::use_active_element; /// # /// # #[component] diff --git a/src/use_breakpoints.rs b/src/use_breakpoints.rs index 0f6da51..8457d1c 100644 --- a/src/use_breakpoints.rs +++ b/src/use_breakpoints.rs @@ -1,4 +1,5 @@ use crate::use_media_query; +use leptos::logging::error; use leptos::*; use paste::paste; use std::collections::HashMap; diff --git a/src/use_cycle_list.rs b/src/use_cycle_list.rs index 9f094f0..ecbb6b5 100644 --- a/src/use_cycle_list.rs +++ b/src/use_cycle_list.rs @@ -12,6 +12,7 @@ use leptos::*; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// use leptos_use::{use_cycle_list, UseCycleListReturn}; /// # /// # #[component] diff --git a/src/use_event_listener.rs b/src/use_event_listener.rs index 51f9d5c..580703b 100644 --- a/src/use_event_listener.rs +++ b/src/use_event_listener.rs @@ -16,6 +16,7 @@ use wasm_bindgen::JsCast; /// ``` /// # use leptos::*; /// # use leptos::ev::visibilitychange; +/// # use leptos::logging::log; /// # use leptos_use::use_event_listener; /// # /// # #[component] @@ -33,6 +34,7 @@ use wasm_bindgen::JsCast; /// ``` /// # use leptos::*; /// # use leptos::ev::click; +/// # use leptos::logging::log; /// # use leptos_use::use_event_listener; /// # /// # #[component] @@ -61,6 +63,7 @@ use wasm_bindgen::JsCast; /// ``` /// # use leptos::*; /// # use leptos::ev::keydown; +/// # use leptos::logging::log; /// # use web_sys::KeyboardEvent; /// # use leptos_use::use_event_listener; /// # diff --git a/src/watch_debounced.rs b/src/watch_debounced.rs index c23d0b5..55d6b26 100644 --- a/src/watch_debounced.rs +++ b/src/watch_debounced.rs @@ -12,6 +12,7 @@ use leptos::*; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::watch_debounced; /// # /// # pub fn Demo() -> impl IntoView { @@ -35,6 +36,7 @@ use leptos::*; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::{watch_debounced_with_options, WatchDebouncedOptions}; /// # /// # pub fn Demo() -> impl IntoView { diff --git a/src/watch_pausable.rs b/src/watch_pausable.rs index 7f0a7c7..62099e7 100644 --- a/src/watch_pausable.rs +++ b/src/watch_pausable.rs @@ -11,6 +11,7 @@ use leptos::*; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::{watch_pausable, WatchPausableReturn}; /// # /// # pub fn Demo() -> impl IntoView { diff --git a/src/watch_throttled.rs b/src/watch_throttled.rs index 535fb54..be45644 100644 --- a/src/watch_throttled.rs +++ b/src/watch_throttled.rs @@ -11,6 +11,7 @@ use default_struct_builder::DefaultBuilder; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::watch_throttled; /// # /// # pub fn Demo() -> impl IntoView { @@ -34,6 +35,7 @@ use default_struct_builder::DefaultBuilder; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::{watch_throttled_with_options, WatchThrottledOptions}; /// # /// # pub fn Demo() -> impl IntoView { diff --git a/src/watch_with_options.rs b/src/watch_with_options.rs index b0ab20d..c119732 100644 --- a/src/watch_with_options.rs +++ b/src/watch_with_options.rs @@ -17,6 +17,7 @@ use std::rc::Rc; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::{watch_with_options, WatchOptions}; /// # /// # pub fn Demo() -> impl IntoView { @@ -41,6 +42,7 @@ use std::rc::Rc; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::{watch_with_options, WatchOptions}; /// # /// # pub fn Demo() -> impl IntoView { @@ -59,6 +61,7 @@ use std::rc::Rc; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::{watch_with_options, WatchOptions}; /// # /// # pub fn Demo() -> impl IntoView { diff --git a/src/whenever.rs b/src/whenever.rs index 74c9bde..b8f4c3c 100644 --- a/src/whenever.rs +++ b/src/whenever.rs @@ -6,6 +6,7 @@ use crate::{watch_with_options, WatchOptions}; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::whenever; /// # /// # pub fn Demo() -> impl IntoView { @@ -23,6 +24,7 @@ use crate::{watch_with_options, WatchOptions}; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::whenever; /// # /// # pub fn Demo() -> impl IntoView { @@ -41,6 +43,7 @@ use crate::{watch_with_options, WatchOptions}; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::whenever; /// # /// # pub fn Demo() -> impl IntoView { @@ -60,6 +63,7 @@ use crate::{watch_with_options, WatchOptions}; /// /// ``` /// # use leptos::*; +/// # use leptos::logging::log; /// # use leptos_use::{WatchOptions, whenever_with_options}; /// # /// # pub fn Demo() -> impl IntoView {