Releases: vueuse/vueuse
Releases · vueuse/vueuse
v10.9.0
🚀 Features
- whenever: Override once option - by @chizukicn in #3800 (bd946)
🐞 Bug Fixes
- useActiveElement/useFocusWithin: Replace computedWithControl with locally tracked ref - by @jaketig in #3815 (b1426)
- useClipboard: Fix issue when permission is not defined - by @Mister-Hope in #3812 (a9f02)
- useIDBKeyval: Use toRaw instead of overriding the original object - by @ferferga in #3805 (1b67d)
- useMounted: Compatible with vue2.7 - by @yanbowe in #3802 (ee297)
- useScrollLock: InitialOverflow is not working - by @BJ0815 in #3798 (74e86)
View changes on GitHub
v10.8.0
🚀 Features
- createInjectionState: InjectionKey use composable name - by @zhangxuyang950313 in #3788 (c2cfd)
- nuxt: Move to ESM-first and fix types - by @userquin in #3606 (b3d74)
- throttleFilter: Support object as argument - by @17359898647 and Anthony Fu in #3722 (66d09)
- useAxios: Support
abortPrevious
option - by @jahnli and @antfu in #3735 (b94de) - useBreakpoints: Enable passing ref or getter to get breakpoints - by @Doctor-wu in #3621 (d3317)
- useBreakpoints: Add
strategy
option to allow desktop-first convention - by @jack-allocate and @antfu in #3783 (15fc0) - useBreakpoints: Add
active
getter, add breakpoints for Vuetify v3 - by @altrusl, @Doctor-wu and @antfu in #3687 (3ae45) - useCurrentElement: Allow get current element from a specific component - by @linspw and @antfu in #3750 (0a9aa)
- useCycleList: Add
go
function - by @Jokerzhzh and @antfu in #3615 (2ae36) - useDraggable: Add disabled parameter - by @huiliangShen and banruo in #3613 (dee9a)
- useEventSource: Add
autoReconnect
andimmediate
to options, update typings - by @schelmo in #3793 (b33ab) - useMutationObserver: Allow multiple targets - by @chirokas in #3741 (98fac)
- useParallax: Can work with different screen orientation - by @huiliangShen and banruo in #3675 (3fd94)
- useTextareaAutosize: Allow configuring
styleProp
to support nativerows
attribute - by @yakudik, alexander.kudinov, Anthony Fu and @antfu in #3552 (5025e)
🐞 Bug Fixes
- Stricter types - by @antfu (a086e)
- createReusableTemplate: Improve types - by @louiss0, louiss0, Anthony Fu and @antfu in #3641 (75168)
- useAnimate: Immediate option set false not working - by @huiliangShen, banruo and Anthony Fu in #3763 (12c09)
- useCloned: Correct return type - by @17359898647 in #3711 (e262f)
- useCounter: Allow
delta
to be negative - by @leewakin, @Doctor-wu and @antfu in #3650 (cf29c) - useDraggable: Avoid moving out of container - by @wangliangxin and wangliangxin3 in #3768 (55b94)
- useElementVisiblity: Can configurable threshold - by @huiliangShen and @Doctor-wu in #3715 (ce9bb)
- useFetch: Mark
isFinished
,isFetching
readonly - by @baboon-king and @antfu in #3616 (31d4a) - useFetch: Remove unnecessary spread operator in iterable conversion - by @BlackCrowxyz in #3660 (f5587)
- useFileSystemAccess: UpdateData on modified file - by @PhE in #3780 (668ca)
- useGamepad: Explicitly ensure gamepad index is available - by @AntoninRousset and AntoninRousset in #3653 (8c735)
- useGamepad: Improve data updating logic - by @okydk in #3775 (9b8ed)
- useMounted: Hold the instance, close #3785, close #3795 - by @antfu in #3785 and #3795 (2f66e)
- useRafFn: Fix
fpsLimit
option, fix #3481, close #3482 - by @antfu in #3481 and #3482 (69990) - useResizeObserver: Do not watch deep to avoid cicular calls - by @birdxiao, birdxiao and @antfu in #3753 (48421)
- useRouteParams,useRouteQuery: Set route param/query to undefined when null or defaultValue - by @mtdvlpr and @antfu in #3583 (c44fe)
- useScroll: Add
onError
hook and avoid throws by default, fix #3580 - by @steklopod, @antfu and Brendo Maciel in #3605 and #3580 (fab86) - useStorage: Ensure setting value to null syncs to other instances - by @callumacrae and @antfu in #3737 (f7ea1)
- useUserMedia: Stop stream on scope dispose - by @Waleed-KH in #3757 (6d44d)
- useWebSocket: Reset
wsRef
on close, fix #3706 - by @a982246809 and @Doctor-wu in #3707 and #3706 (9a47a) - useWebSocket:
immediate
should only be applied once, close #3676 - by @antfu in #3676 (93b96)
View changes on GitHub
v10.7.2
🐞 Bug Fixes
- computedEager: Adapt to changes in vue3.4+ - by @Doctor-wu in #3689 (b6d8f)
- nuxt: Move
nuxt
out of dependencies - by @antfu (866a1) - useAxios: Ignore undefined options - by @geektheripper, @Doctor-wu, @antfu and Doctorwu in #3662 (37eae)
- useBattery: Fake signal API support in some utilities - by @tachibana-shin and @Doctor-wu in #3634 (30245)
- useDraggable: Can not work well when parent element is scrollable - by @huiliangShen and banruo in #3692 (bdd79)
- useStorageAsync: Correct ssr handler - by @Doctor-wu in #3703 (c197e)
- useTimeAgo: Support custom UnitNames type for units field - by @nickmessing and @Doctor-wu in #3684 (1d6be)
View changes on GitHub
v10.7.1
🚀 Features
- syncRef: Enhance type - by @Doctor-wu in #3678 (dad66)
🐞 Bug Fixes
- Fix
tryOnMounted
in vue2 - by @Doctor-wu in #3658 (ce420) - nuxt: Stable optimizeDeps augmenting - by @antfu (98985)
- useDropzone: Avoid circular reference - by @diegopf in #3683 (15a38)
- useElementBounding: Trigger by css or style - by @huiliangShen in #3664 (70dbd)
- useIpcRenderer: Set explicit return type - by @antfu (dd820)
- useMouse: Handle Touch class compatibility for Firefox - by @elschilling in #3679 (5719b)
- useVirtualList: Ensure component applies overflow style - by @reubns in #3626 (286c3)
View changes on GitHub
v10.7.0
🚀 Features
- Upgrade deps - by @antfu in #3614 (fccf2)
- isIOS: Detect new iPad - by @Doctor-wu and @antfu in #3582 (47d2d)
- onLongPress: Add
distanceThreshold
option - by @donaldxdonald and @antfu in #3578 (0e04a) - tryOnMounted: Support target arguement - by @tolking and @antfu in #3185 (f2aeb)
- useBreakpoints: Make parameters reactivity - by @Doctor-wu in #3592 (dc624)
- useFileDialog: Trigger onChange when reset - by @Doctor-wu in #3548 (7e2da)
- useInfiniteScroll: Add the
canLoadMore
option - by @Alfred-Skyblue in #3558 (e780f) - usePointerSwipe: Add
disableTextSelect
option - by @aminmokhtari94 in #3604 (fd67b) - useTitle: Restore title on unmounted - by @Doctor-wu and @antfu in #3570 (0ab76)
🐞 Bug Fixes
- createEventHook: Make createEventHook union type can be inferred correctly - by @Doctor-wu in #3569 (e48ca)
- createEventHook:
trigger
should not ignore falsy values - by @romansp and @Alfred-Skyblue in #3561 (3733b) - syncRef: SyncRef typing issue for boolean - by @s-montigny-desautels in #3553 (acb2f)
- useAxios: Reset
isAborted
value on success - by @17359898647 and @antfu in #3547 (4b159) - useDark: In Vue 2.6 mode.system is undefined - by @Teaghy, hguan and @antfu in #3562 (68688)
- useDropZone: Fix file types filter - by @getname1997 and @antfu in #3540 (8f42a)
- useElementVisibility: Use last intersection entry - by @ziolko-appfire, Mateusz Zieliński and @antfu in #3365 (07d39)
- useFetch: Immediately modify the status after the request is completed - by @tolking and @antfu in #3603 (3456d)
- useFetch: Clone 'Response' on reading - by @mymx2 and @antfu in #3607 and #3608 (8cbfd)
- useMemoize: Use shallowReactive to wrap Map - by @antfu (fecbe)
- useMousePressed: Change type of element parameter to MaybeComputedElementRef - by @4350pChris in #3566 (17f97)
- useOffsetPagination: Don't mutate props when it's readonly - by @Doctor-wu in #3581 (4dace)
- useScreenOrientation: Add fault tolerance to lock and unlock - by @satrong in #3575 (be3cc)
- useStorage: Fix undefined defaults - by @Doctor-wu in #3597 (04220)
View changes on GitHub
v10.6.1
🐞 Bug Fixes
- useScroll: Can not read properties of null (reading document) - by @Jokerzhzh and @joaopslins in #3544 (e9742)
- useVirtualList:
.style
can be undefined - by @antfu (3d6b9)
View changes on GitHub
v10.6.0
🚀 Features
- createEventHook: Allow trigger to optionally have no parameters - by @curtgrimes in #3507 (6040e)
- onLongClick: Return stop function - by @its-lee and lee in #3506 (8eb0b)
- syncRef: Enhance syncRef type restrict - by @Doctor-wu in #3515 (89266)
- useClipboard: UseClipboard component - by @alexzvn, Alexzvn and @antfu in #3359 (71b46)
- useClipboardItems: New function - by @Doctor-wu and @antfu in #3477 (1aa50)
- useDateFormat: Add date ordinal formatting - by @Jokerzhzh and @antfu in #3474 (61ceb)
- useDropZone: Add
dataTypes
option - by @rtugeek and @antfu in #3471 (3f3f1) - useElementSize: Stop function - by @chaii3 and @antfu in #3367 (5f545)
- useFileDialog: Add directory parameters - by @huiliangShen and banruo in #3513 (cefca)
- useMutationObserver: Add
takeRecords
function - by @Alfred-Skyblue in #3480 (f9136) - useStorage: Add
waitOnMounted
option for SSR - by @posva and @antfu in #3504 (dc6f2) - useWindowScroll: Allow rewriting back to scroll - by @nothing-sy, chensiyuan and @antfu in #3500 (931b2)
- watchOnce: Return function for manual watcher stopping - by @valerypatorius in #3475 (bb0a7)
🐞 Bug Fixes
- onClickOutside: Adjust shouldListen handling timing - by @Doctor-wu in #3503 (69851)
- onScrollLock: Cache the el initial overflow value - by @Doctor-wu in #3527 (03866)
- useAxios: Bail out on request abort - by @jahnli in #3394 (151f9)
- useClipboard: Use legacy way when without permission - by @Cat1007, catye, @posva and @antfu in #3379 (37e86)
- useDraggable: Element can't relative parent element move - by @huiliangShen and banruo in #3531 (08246)
- useElementSize: Get value in onMounted hook - by @chaii3 and @antfu in #3366 (165c8)
- useFetch: Don't set isFetching to false when a request is aborted because of a refetch - by @mweghorst and @antfu in #3479 (75ca2)
- useMouseInElement: Optimize outside computation - by @qiYuei, fengmingjian and @antfu in #3380 (7c88d)
- useRouteQuery,useRouteParams: Prevent reset on other scope dispose - by @s-montigny-desautels and @antfu in #3418 (771e7)
- useScroll: Trigger once
onMounted
to get correct inital arrivedStates values - by @nicooprat and @antfu in #3384 (86bd8) - useSortable: Prevent from creating multi instances - by @Doctor-wu in #3501 (d9846)
- useStorage: Fix defaults not unwrapped - by @Alfred-Skyblue in #3534 (b6d2b)
- useWebSocket: Webworker support - by @binary-signal and @antfu in #3469 (9b014)
View changes on GitHub
v10.5.0
🚀 Features
- Add
Promisify
type definition - by @Alfred-Skyblue in #3420 (b067b) - createInjectionState: Allow provide and inject in same component - by @xiaoxiangmoe and @antfu in #3387 (5d948)
- createInjectionState: Add injectionKey option - by @PPetau and @antfu in #3404 (90d34)
- rxjs: Add useExtractedObservable and watchExtractedObservable - by @Voltra in #3453 (23b8c)
- useFavicon: Add link tag if it doesn't exist - by @babu-ch in #3444 (d1fcc)
- useMousePressed: Add capture option - by @DerZade and @antfu in #3392 (d5c81)
- useMutationObserver: Use MaybeComputedElementRef - by @huodoushigemi in #3430 (8167b)
- useRafFn: Option fpsLimit - by @f820602h and @antfu in #3459 (8e4c0)
🐞 Bug Fixes
- Vue 2 support for provideLocal and injectLocal - by @xiaoxiangmoe in #3464 (cf757)
- useBreakpoints: Add missing breakpoint for the bootstrap - by @edtorba in #3413 (ec9a4)
- useDrauu: Spread options for
brush
- by @17359898647 in #3463 (87ea3) - useVModels: Type error with passive: true - by @chaii3 in #3362 (51f01)
- useWebNotification: Condition check on permission - by @SampsonCrowley in #3422 (2f2b4)
- useWebSocket: Ssr support - by @huangyan321 in #3370 (c3a69)
View changes on GitHub
v10.4.1
v10.4.0
🚀 Features
- refAutoReset: Support maybe-ref as value - by @moander in #3342 (71685)
- useAsyncQueue: Support in infinite tasks in typescript - by @ethansnow2012 in #3333 (22e26)
- useBreakpoints: Add breakpoints for PrimeFlex - by @adrianrudnik and @antfu in #3317 (8b5ed)
- useDraggable: Allowing calculations of bounds with fixed element - by @linspw in #3335 (c08e5)
- useFetch: Introduce
updateDataOnError
option - by @climba03003 and @antfu in #3092 (945ca) - useIdbKeyval: Ability to wait for IDB writes - by @AbdallahAlhaddad and @antfu in #3338 (77a86)
- useWebNotification: Add
requestPermissions
option, returnpermissionGranted
andensurePermissions
- by @michealroberts and @antfu in #3325 (a1753)
🐞 Bug Fixes
- syncRef: Avoid infinite sync - by @chaii3 and @antfu in #3312 (bc966)
- useElementSize: Add
as
prop for component usage - by @menghany in #3274 (791f7) - useElementVisibility: Adjust threshold to 0 to fix visibility issue with large element - by @erikkkwu in #3308 (429ed)
- useFileSystemAccess: Make options to be optional - by @171h in #3320 (a9c8b)
- useMouse: Position won't be changed on page scroll when
type
ispage
, closes #2922 - by @CatsJuice and @antfu in #3244 and #2922 (c2f64) - useScroll: Evade edge case when window or document is Proxy - by @MinatoHikari in #3280 (c1b29)
- useScrollLock: Support using window or document - by @lzl0304 in #3319 (8acdb)
- useSortable: Fixed moveArrayElement repeatedly triggering side effects - by @Alfred-Skyblue in #3322 (b8515)
- useStorage: Read object only when it's serialized differently - by @chenglu4343, chenglu and @antfu in #2782 and #3091 (6fabe)
- useVModel: Clone set to true triggered infinite loop - by @motian and @antfu in #3097 (48f4c)
- useWebWorker: Prevent error event bubbling - by @Luvoy and @antfu in #3141 (34206)
- useWebsocket: PongTimeout auto-reconnect no work - by @shanyi-front and @antfu in #3321 (93372)
- useWebsocket: Reset pongTimeout on close - by @alipay404 and @antfu in #3324 (aea27)
- utils: Update
isClient
to checkdocument
too - by @brc-dd and @antfu in #3329 (786cb)