2023-05-26 18:09:01 +01:00
|
|
|
# Changelog
|
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
2023-06-11 17:11:16 +01:00
|
|
|
|
2023-07-17 18:55:42 +01:00
|
|
|
## [Unreleased] -
|
|
|
|
|
|
|
|
### New Functions 🚀
|
|
|
|
|
2023-09-12 23:53:43 +01:00
|
|
|
- `use_geolocation`
|
2023-07-24 23:18:11 +01:00
|
|
|
- `signal_debounced`
|
2023-07-17 18:55:42 +01:00
|
|
|
- `signal_throttled`
|
|
|
|
|
2023-08-16 16:23:29 +01:00
|
|
|
### Breaking Changes 🛠
|
2023-07-24 23:18:11 +01:00
|
|
|
|
2023-07-27 18:06:36 +01:00
|
|
|
- Leptos version is now 0.5
|
|
|
|
- No `cx: Scope` params are supported/needed anymore because of the changes in Leptos.
|
|
|
|
Please check the release notes of Leptos 0.5 for how to upgrade.
|
2023-09-12 23:53:43 +01:00
|
|
|
- `watch` is now deprecated in favor of `leptos::watch` and will be removed in a future release.
|
|
|
|
`watch_with_options` will continue to exist.
|
2023-07-28 21:03:18 +01:00
|
|
|
- `use_websocket`:
|
|
|
|
- takes now a `&str` instead of a `String` as its `url` parameter.
|
|
|
|
- The `ready_state` return type is now renamed to `ConnectionReadyState` instead of `UseWebSocketReadyState`.
|
|
|
|
- The returned signals `ready_state`, `message`, `message_bytes` have now the type
|
2023-07-28 21:08:40 +01:00
|
|
|
`Signal<...>` instead of `ReadSignal<...>` to make them more consistent with other functions.
|
2023-07-28 21:03:18 +01:00
|
|
|
- The options `reconnect_limit` and `reconnect_interval` now take a `u64` instead of `Option<u64>` to improve DX.
|
|
|
|
- The option `manual` has been renamed to `immediate` to make it more consistent with other functions.
|
|
|
|
To port please note that `immediate` is the inverse of `manual` (`immediate` = `!manual`).
|
2023-08-04 15:58:03 +01:00
|
|
|
- `use_color_mode`:
|
|
|
|
- The optional `on_changed` handler parameters have changed slightly. Please refer to the docs for more details.
|
|
|
|
- Throttled or debounced functions cannot be `FnOnce` anymore.
|
|
|
|
- All traits `ClonableFn...` have been removed.
|
2023-07-24 23:18:11 +01:00
|
|
|
|
2023-08-04 13:19:34 +01:00
|
|
|
### Other Changes 🔥
|
|
|
|
|
2023-08-04 15:58:03 +01:00
|
|
|
- Callbacks in options don't require to be cloneable anymore
|
2023-08-04 13:19:34 +01:00
|
|
|
- Callback in `use_raf_fn` doesn't require to be cloneable anymore
|
2023-08-16 16:23:29 +01:00
|
|
|
- `use_scroll` is now callable on the server
|
2023-08-04 13:19:34 +01:00
|
|
|
|
2023-08-10 22:49:36 +01:00
|
|
|
### Fixes 🍕
|
|
|
|
|
|
|
|
- `use_element_visibility` didn't work in some cases on Chrome properly. This has been fixed.
|
|
|
|
|
2023-08-12 22:30:06 +01:00
|
|
|
## [0.6.3] - 2023-08-12
|
|
|
|
|
|
|
|
### Fixes 🍕
|
|
|
|
|
|
|
|
- `use_websocket` panicked after unmount
|
|
|
|
|
2023-08-03 18:37:42 +01:00
|
|
|
## [0.6.2] - 2023-08-03
|
|
|
|
|
|
|
|
### Fixes 🍕
|
|
|
|
|
|
|
|
- `use_event_listener_with_options` removes the handlers now correctly.
|
|
|
|
|
2023-08-03 13:45:58 +01:00
|
|
|
## [0.6.1] - 2023-08-03
|
|
|
|
|
|
|
|
### Fixes 🍕
|
|
|
|
|
|
|
|
- `use_storage` now uses `.get_untracked()` to avoid warnings.
|
|
|
|
|
2023-07-17 03:23:44 +01:00
|
|
|
## [0.6.0] - 2023-07-17
|
2023-07-15 16:48:29 +01:00
|
|
|
|
2023-07-16 01:07:52 +01:00
|
|
|
### New Functions 🚀
|
|
|
|
|
2023-07-17 03:17:08 +01:00
|
|
|
- `use_draggable`
|
2023-07-16 14:17:15 +01:00
|
|
|
- `use_to_string`
|
2023-07-16 14:04:42 +01:00
|
|
|
- `is_err`
|
|
|
|
- `is_ok`
|
2023-07-16 14:00:12 +01:00
|
|
|
- `is_none`
|
|
|
|
- `is_some`
|
2023-07-16 01:07:52 +01:00
|
|
|
- `use_raf_fn`
|
|
|
|
|
2023-08-16 16:23:29 +01:00
|
|
|
### Breaking Changes 🛠
|
2023-07-15 16:48:29 +01:00
|
|
|
|
|
|
|
- The following functions now accept a `MaybeRwSignal` as their initial/default value which means
|
|
|
|
you can use a synchronized `RwSignal` in those places.
|
|
|
|
- `use_color_mode`
|
|
|
|
- `use_cycle_list`
|
|
|
|
- `use_favicon`
|
|
|
|
- `use_storage`
|
|
|
|
- `use_local_storage`
|
|
|
|
- `use_session_storage`
|
|
|
|
- Instead of returning `ReadSignal`, the following functions now return `Signal`.
|
|
|
|
- `use_color_mode`
|
|
|
|
- `use_favicon`
|
|
|
|
- `use_storage`
|
|
|
|
- `use_local_storage`
|
|
|
|
- `use_session_storage`
|
|
|
|
|
|
|
|
### Fixes 🍕
|
|
|
|
|
|
|
|
- `use_drop_zone` now uses `.get_untracked()` in event handlers
|
|
|
|
|
|
|
|
## [0.5.0] - 2023-07-15
|
2023-07-14 05:48:37 +01:00
|
|
|
|
|
|
|
### New Functions 🚀
|
|
|
|
|
2023-07-15 00:55:02 +01:00
|
|
|
- `use_drop_zone`
|
2023-07-14 05:48:37 +01:00
|
|
|
- `use_websocket` (thanks @sectore)
|
|
|
|
- `use_intl_number_format`
|
|
|
|
|
2023-07-15 01:00:15 +01:00
|
|
|
### Changes 🔥
|
|
|
|
|
|
|
|
- Crate is ready for Server-Side Rendering. Enable feature `ssr` like you do for `leptos`.
|
|
|
|
|
2023-07-07 23:34:50 +01:00
|
|
|
## [0.4.1] - 2023-07-07
|
2023-07-07 16:38:03 +01:00
|
|
|
|
|
|
|
### New Functions 🚀
|
|
|
|
|
|
|
|
- `use_window_focus`
|
2023-07-07 23:07:56 +01:00
|
|
|
- `use_window_scroll`
|
2023-07-07 23:34:50 +01:00
|
|
|
- `use_document_visibility`
|
2023-07-07 16:38:03 +01:00
|
|
|
|
|
|
|
## [0.4.0] - 2023-07-03
|
2023-07-03 14:46:59 +01:00
|
|
|
|
2023-08-16 16:23:29 +01:00
|
|
|
### Breaking Changes 🛠
|
2023-07-15 16:48:29 +01:00
|
|
|
|
2023-07-03 14:46:59 +01:00
|
|
|
- Required `leptos` version is now 0.4
|
2023-07-15 16:48:29 +01:00
|
|
|
- Following the changes in `leptos` there is no longer a `stable` crate feature required in order to use this library
|
|
|
|
with a stable toolchain.
|
2023-07-03 14:46:59 +01:00
|
|
|
If you want to use it with a nightly toolchain you have to enable the `nightly` feature only on `leptos` directly.
|
|
|
|
No change is required for `leptos-use` itself.
|
|
|
|
|
2023-06-24 01:12:43 +01:00
|
|
|
## [0.3.3] - 2023-06-24
|
|
|
|
|
|
|
|
### New Functions 🚀
|
|
|
|
|
|
|
|
- `use_color_mode`
|
|
|
|
- `use_cycle_list`
|
|
|
|
- `use_active_element`
|
|
|
|
|
|
|
|
### Changes 🔥
|
|
|
|
|
|
|
|
- You can now use this crate with the `stable` toolchain (thanks @lpotthast)
|
|
|
|
- Set leptos dependency to `default-features = false` in order to enable SSR.
|
|
|
|
|
2023-06-17 04:05:51 +01:00
|
|
|
## [0.3.2] - 2023-06-17
|
2023-06-16 04:51:33 +01:00
|
|
|
|
|
|
|
### New Functions 🚀
|
|
|
|
|
|
|
|
- `use_css_var`
|
2023-06-17 04:05:51 +01:00
|
|
|
- `use_element_hover`
|
2023-06-16 04:51:33 +01:00
|
|
|
|
2023-06-15 20:30:05 +01:00
|
|
|
## [0.3.1] - 2023-06-15
|
2023-06-14 16:15:03 +01:00
|
|
|
|
|
|
|
### New Functions 🚀
|
|
|
|
|
|
|
|
- `use_interval_fn`
|
2023-06-15 18:05:43 +02:00
|
|
|
- `use_interval`
|
2023-06-14 16:15:03 +01:00
|
|
|
|
2023-06-13 17:48:32 +01:00
|
|
|
## [0.3.0] - 2023-06-13
|
2023-06-13 00:31:38 +01:00
|
|
|
|
2023-08-16 16:23:29 +01:00
|
|
|
### Breaking Changes 🛠
|
2023-07-15 16:48:29 +01:00
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
- `use_event_listener` no longer returns a `Box<dyn Fn()>` but a `impl Fn() + Clone`
|
|
|
|
|
|
|
|
### Changes 🔥
|
|
|
|
|
|
|
|
- You can now specify a `&str` or `Signal<String>` with CSS selectors wherever a node ref is accepted
|
|
|
|
- Callbacks of the following functions no longer require `Clone`
|
2023-07-15 16:48:29 +01:00
|
|
|
- `use_resize_observer`
|
|
|
|
- `use_intersection_observer`
|
2023-06-13 00:31:38 +01:00
|
|
|
- These functions now also accept multiple target elements in addition to a single one:
|
2023-07-15 16:48:29 +01:00
|
|
|
- `use_resize_observer`
|
|
|
|
- `use_intersection_observer`
|
2023-06-13 00:31:38 +01:00
|
|
|
|
|
|
|
### New Functions 🚀
|
2023-06-11 17:11:16 +01:00
|
|
|
|
|
|
|
- `whenever`
|
2023-06-13 00:31:38 +01:00
|
|
|
- `use_mutation_observer`
|
2023-06-13 17:48:32 +01:00
|
|
|
- `use_abs`
|
|
|
|
- `on_click_outside`
|
2023-06-11 17:11:16 +01:00
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
## [0.2.1] - 2023-06-11
|
2023-06-10 23:59:32 +01:00
|
|
|
|
|
|
|
### New Functions
|
|
|
|
|
|
|
|
- `use_intersection_observer`
|
|
|
|
- `use_element_visibility`
|
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
## [0.2.0] - 2023-06-11
|
|
|
|
|
2023-08-16 16:23:29 +01:00
|
|
|
### Breaking Changes
|
2023-06-08 01:19:36 +01:00
|
|
|
|
2023-06-10 03:19:00 +01:00
|
|
|
- `watch` doesn't accept `immediate` as a direct argument anymore. This is only provided by the option variant.
|
2023-06-10 13:49:00 +01:00
|
|
|
- `watch` has now variant `watch_with_options` which allows for debouncing and throttling.
|
2023-06-08 23:52:14 +01:00
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
### New Functions
|
|
|
|
|
2023-06-09 23:10:33 +01:00
|
|
|
- `use_storage`
|
2023-06-10 03:19:00 +01:00
|
|
|
- `use_local_storage`
|
|
|
|
- `use_session_storage`
|
2023-06-08 23:52:14 +01:00
|
|
|
- `watch_debounced`
|
|
|
|
- `watch_throttled`
|
|
|
|
- `watch_pausable`
|
2023-06-10 03:19:00 +01:00
|
|
|
- `use_ceil`
|
|
|
|
- `use_round`
|
|
|
|
- `use_media_query`
|
2023-06-10 03:47:31 +01:00
|
|
|
- `use_preferred_dark`
|
|
|
|
- `use_preferred_contrast`
|
2023-06-10 13:49:00 +01:00
|
|
|
- `use_favicon`
|
2023-06-10 19:15:41 +01:00
|
|
|
- `use_breakpoints`
|
2023-06-08 23:52:14 +01:00
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
### Other Changes
|
2023-06-08 01:19:36 +01:00
|
|
|
|
2023-06-10 13:49:00 +01:00
|
|
|
- Function count badge in readme
|
2023-06-08 01:19:36 +01:00
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
## [0.1.8/9] - 2023-06-05
|
2023-06-05 03:06:26 +01:00
|
|
|
|
|
|
|
- Fixed documentation and doc tests running for functions behind `#[cfg(web_sys_unstable_apis)]`
|
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
## [0.1.7] - 2023-06-05
|
|
|
|
|
|
|
|
### New Function
|
2023-06-05 00:02:13 +01:00
|
|
|
|
|
|
|
- `use_element_size`
|
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
## [0.1.6] - 2023-06-03
|
|
|
|
|
|
|
|
### Changes
|
2023-06-03 16:23:58 +01:00
|
|
|
|
|
|
|
- Fixed documentation so all feature are documented
|
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
## [0.1.5] - 2023-06-03
|
|
|
|
|
|
|
|
### New Functions
|
2023-06-03 05:25:45 +01:00
|
|
|
|
|
|
|
- `use_floor`
|
2023-06-03 14:58:30 +01:00
|
|
|
- `use_max`
|
|
|
|
- `use_min`
|
2023-06-03 05:25:45 +01:00
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
### Changes
|
|
|
|
|
2023-06-03 05:25:45 +01:00
|
|
|
- New feature: `math` that has to be activated in order to use the math functions.
|
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
## [0.1.4] - 2023-06-02
|
|
|
|
|
|
|
|
### New Functions
|
2023-05-29 01:52:03 +01:00
|
|
|
|
|
|
|
- `use_supported`
|
|
|
|
- `use_resize_observer`
|
|
|
|
- `watch`
|
2023-06-02 13:38:01 +01:00
|
|
|
- `use_mouse`
|
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
### Changes
|
|
|
|
|
2023-06-02 13:38:01 +01:00
|
|
|
- Use the crate `default-struct-builder` to provide ergonimic function options.
|
2023-05-29 01:52:03 +01:00
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
## [0.1.3] - 2023-05-28
|
|
|
|
|
|
|
|
### New Functions
|
2023-05-26 18:09:01 +01:00
|
|
|
|
2023-05-26 19:27:42 +01:00
|
|
|
- `use_scroll`
|
|
|
|
- `use_debounce_fn`
|
|
|
|
|
2023-06-13 00:31:38 +01:00
|
|
|
### Other Changes
|
|
|
|
|
2023-05-26 19:27:42 +01:00
|
|
|
- Better and more beautiful demo integration into the guide.
|