mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-01-23 00:59:22 -05:00
moved websocket into network category and removed feature
This commit is contained in:
parent
45c09b4431
commit
e2dcc81958
13 changed files with 23 additions and 18 deletions
2
.idea/leptos-use.iml
generated
2
.idea/leptos-use.iml
generated
|
@ -45,6 +45,7 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/examples/use_window_scroll/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/examples/use_intl_number_format/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/examples/use_websocket/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/testtest/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/examples/use_event_listener/target" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/docs/book/book" />
|
||||
|
@ -68,6 +69,7 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/examples/use_breakpoints/target" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/examples/use_element_visibility/target" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/examples/use_intersection_observer/target" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/testtest/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
|
|
|
@ -26,6 +26,7 @@ lazy_static = "1"
|
|||
[dependencies.web-sys]
|
||||
version = "0.3"
|
||||
features = [
|
||||
"BinaryType",
|
||||
"CssStyleDeclaration",
|
||||
"CloseEvent",
|
||||
"CustomEvent",
|
||||
|
@ -57,6 +58,7 @@ features = [
|
|||
"TouchEvent",
|
||||
"TouchList",
|
||||
"VisibilityState",
|
||||
"WebSocket",
|
||||
"Window",
|
||||
]
|
||||
|
||||
|
@ -64,7 +66,6 @@ features = [
|
|||
docs = []
|
||||
math = ["num"]
|
||||
storage = ["serde", "serde_json", "web-sys/StorageEvent"]
|
||||
websocket = ["web-sys/BinaryType", "web-sys/WebSocket"]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
|
|
@ -11,10 +11,6 @@
|
|||
- [use_session_storage](storage/use_session_storage.md)
|
||||
- [use_storage](storage/use_storage.md)
|
||||
|
||||
# @WebSocket
|
||||
|
||||
- [use_websocket](websocket/use_websocket.md)
|
||||
|
||||
# Elements
|
||||
|
||||
- [use_active_element](elements/use_active_element.md)
|
||||
|
@ -45,6 +41,10 @@
|
|||
- [use_mouse](sensors/use_mouse.md)
|
||||
- [use_scroll](sensors/use_scroll.md)
|
||||
|
||||
# Network
|
||||
|
||||
- [use_websocket](network/use_websocket.md)
|
||||
|
||||
# Animation
|
||||
|
||||
- [use_interval](animation/use_interval.md)
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
<!-- cmdrun python3 generate_function_overview.py sensors -->
|
||||
|
||||
<!-- cmdrun python3 generate_function_overview.py network -->
|
||||
|
||||
<!-- cmdrun python3 generate_function_overview.py animation -->
|
||||
|
||||
<!-- cmdrun python3 generate_function_overview.py watch -->
|
||||
|
|
3
docs/book/src/network/use_websocket.md
Normal file
3
docs/book/src/network/use_websocket.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# use_websocket
|
||||
|
||||
<!-- cmdrun python3 ../extract_doc_comment.py use_websocket -->
|
|
@ -1,3 +0,0 @@
|
|||
# use_websocket
|
||||
|
||||
<!-- cmdrun python3 ../extract_doc_comment.py websocket/use_websocket websocket -->
|
|
@ -8,7 +8,7 @@ leptos = { version = "0.4", features = ["nightly", "csr"] }
|
|||
console_error_panic_hook = "0.1"
|
||||
console_log = "1"
|
||||
log = "0.4"
|
||||
leptos-use = { path = "../..", features = ["docs", "websocket"] }
|
||||
leptos-use = { path = "../..", features = ["docs"] }
|
||||
web-sys = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
use leptos::*;
|
||||
use leptos_use::docs::demo_or_body;
|
||||
use leptos_use::websocket::*;
|
||||
use leptos_use::{
|
||||
use_websocket, use_websocket_with_options, UseWebSocketOptions, UseWebSocketReadyState,
|
||||
UseWebsocketReturn,
|
||||
};
|
||||
|
||||
use web_sys::{CloseEvent, Event};
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ pub mod math;
|
|||
#[cfg(feature = "storage")]
|
||||
pub mod storage;
|
||||
pub mod utils;
|
||||
#[cfg(feature = "websocket")]
|
||||
pub mod websocket;
|
||||
|
||||
#[cfg(web_sys_unstable_apis)]
|
||||
mod use_element_size;
|
||||
|
@ -46,6 +44,7 @@ mod use_preferred_dark;
|
|||
mod use_scroll;
|
||||
mod use_supported;
|
||||
mod use_throttle_fn;
|
||||
mod use_websocket;
|
||||
mod use_window_focus;
|
||||
mod use_window_scroll;
|
||||
mod watch;
|
||||
|
@ -78,6 +77,7 @@ pub use use_preferred_dark::*;
|
|||
pub use use_scroll::*;
|
||||
pub use use_supported::*;
|
||||
pub use use_throttle_fn::*;
|
||||
pub use use_websocket::*;
|
||||
pub use use_window_focus::*;
|
||||
pub use use_window_scroll::*;
|
||||
pub use watch::*;
|
||||
|
|
|
@ -4,7 +4,7 @@ use leptos::html::{AnyElement, ToHtmlElement};
|
|||
use leptos::*;
|
||||
use web_sys::AddEventListenerOptions;
|
||||
|
||||
///
|
||||
/// Reactive `document.activeElement`
|
||||
///
|
||||
/// ## Demo
|
||||
///
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::utils::{create_filter_wrapper, FilterOptions};
|
||||
use crate::{filter_builder_methods, DebounceOptions, ThrottleOptions};
|
||||
use crate::filter_builder_methods;
|
||||
use crate::utils::{create_filter_wrapper, DebounceOptions, FilterOptions, ThrottleOptions};
|
||||
use default_struct_builder::DefaultBuilder;
|
||||
use leptos::*;
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
mod use_websocket;
|
||||
|
||||
pub use use_websocket::*;
|
Loading…
Add table
Reference in a new issue