@vueuse/integrations 12.2.0 → 12.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/index.cjs +46 -46
  2. package/index.d.cts +20 -14
  3. package/index.d.mts +20 -14
  4. package/index.d.ts +20 -14
  5. package/index.iife.js +46 -46
  6. package/index.iife.min.js +1 -1
  7. package/index.mjs +36 -36
  8. package/package.json +3 -3
  9. package/useAsyncValidator/component.cjs +1 -1
  10. package/useAsyncValidator/component.mjs +2 -2
  11. package/useAsyncValidator.cjs +3 -3
  12. package/useAsyncValidator.iife.js +3 -3
  13. package/useAsyncValidator.iife.min.js +1 -1
  14. package/useAsyncValidator.mjs +4 -4
  15. package/useAxios.cjs +6 -6
  16. package/useAxios.d.cts +19 -13
  17. package/useAxios.d.mts +19 -13
  18. package/useAxios.d.ts +19 -13
  19. package/useAxios.iife.js +6 -6
  20. package/useAxios.iife.min.js +1 -1
  21. package/useAxios.mjs +6 -6
  22. package/useChangeCase.cjs +3 -4
  23. package/useChangeCase.iife.js +5 -5
  24. package/useChangeCase.iife.min.js +1 -1
  25. package/useChangeCase.mjs +1 -2
  26. package/useDrauu.cjs +9 -9
  27. package/useDrauu.iife.js +9 -9
  28. package/useDrauu.iife.min.js +1 -1
  29. package/useDrauu.mjs +9 -9
  30. package/useFocusTrap.cjs +3 -3
  31. package/useFocusTrap.d.cts +1 -1
  32. package/useFocusTrap.d.mts +1 -1
  33. package/useFocusTrap.d.ts +1 -1
  34. package/useFocusTrap.iife.js +3 -3
  35. package/useFocusTrap.iife.min.js +1 -1
  36. package/useFocusTrap.mjs +4 -4
  37. package/useFuse.cjs +9 -10
  38. package/useFuse.iife.js +11 -11
  39. package/useFuse.iife.min.js +1 -1
  40. package/useFuse.mjs +6 -7
  41. package/useIDBKeyval.cjs +1 -2
  42. package/useIDBKeyval.iife.js +3 -3
  43. package/useIDBKeyval.iife.min.js +1 -1
  44. package/useIDBKeyval.mjs +1 -2
  45. package/useJwt.cjs +3 -4
  46. package/useJwt.iife.js +5 -5
  47. package/useJwt.iife.min.js +1 -1
  48. package/useJwt.mjs +2 -3
  49. package/useNProgress.cjs +1 -1
  50. package/useNProgress.d.cts +1 -1
  51. package/useNProgress.d.mts +1 -1
  52. package/useNProgress.d.ts +1 -1
  53. package/useNProgress.iife.js +1 -1
  54. package/useNProgress.iife.min.js +1 -1
  55. package/useNProgress.mjs +3 -3
  56. package/useSortable/component.cjs +4 -4
  57. package/useSortable/component.mjs +5 -5
  58. package/useSortable.cjs +8 -8
  59. package/useSortable.iife.js +8 -8
  60. package/useSortable.iife.min.js +1 -1
  61. package/useSortable.mjs +9 -9
@@ -1 +1 @@
1
- (function(r,i,N,c){"use strict";function V(t,s,o={}){let e;const{document:l=i.defaultDocument,...u}=o,d={onUpdate:n=>{m(s,n.oldIndex,n.newIndex,n)}},v=()=>{const n=typeof t=="string"?l?.querySelector(t):i.unrefElement(t);!n||e!==void 0||(e=new N(n,{...d,...u}))},p=()=>{e?.destroy(),e=void 0},h=(n,y)=>{if(y!==void 0)e?.option(n,y);else return e?.option(n)};return i.tryOnMounted(v),i.tryOnScopeDispose(p),{stop:p,start:v,option:h}}function f(t,s,o){const e=t.children[o];t.insertBefore(s,e)}function a(t){t.parentNode&&t.parentNode.removeChild(t)}function m(t,s,o,e=null){e!=null&&(a(e.item),f(e.from,e.item,s));const l=c.isRef(t),u=l?[...i.toValue(t)]:i.toValue(t);if(o>=0&&o<u.length){const d=u.splice(s,1)[0];c.nextTick(()=>{u.splice(o,0,d),l&&(t.value=u)})}}r.insertNodeAt=f,r.moveArrayElement=m,r.removeNode=a,r.useSortable=V})(this.VueUse=this.VueUse||{},VueUse,Sortable,Vue);
1
+ (function(s,d,V,l){"use strict";function h(n,i,o={}){let e;const{document:r=d.defaultDocument,...u}=o,f={onUpdate:t=>{m(i,t.oldIndex,t.newIndex,t)}},p=()=>{const t=typeof n=="string"?r?.querySelector(n):d.unrefElement(n);!t||e!==void 0||(e=new V(t,{...f,...u}))},y=()=>{e?.destroy(),e=void 0},S=(t,N)=>{if(N!==void 0)e?.option(t,N);else return e?.option(t)};return d.tryOnMounted(p),d.tryOnScopeDispose(y),{stop:y,start:p,option:S}}function c(n,i,o){const e=n.children[o];n.insertBefore(i,e)}function a(n){n.parentNode&&n.parentNode.removeChild(n)}function m(n,i,o,e=null){e!=null&&(a(e.item),c(e.from,e.item,i));const r=l.isRef(n),u=r?[...l.toValue(n)]:l.toValue(n);if(o>=0&&o<u.length){const f=u.splice(i,1)[0];l.nextTick(()=>{u.splice(o,0,f),r&&(n.value=u)})}}s.insertNodeAt=c,s.moveArrayElement=m,s.removeNode=a,s.useSortable=h})(this.VueUse=this.VueUse||{},VueUse,Sortable,Vue);
package/useSortable.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { tryOnMounted, tryOnScopeDispose, toValue, unrefElement, defaultDocument } from '@vueuse/core';
1
+ import { tryOnMounted, tryOnScopeDispose, unrefElement, defaultDocument } from '@vueuse/core';
2
2
  import Sortable from 'sortablejs';
3
- import { isRef, nextTick } from 'vue';
3
+ import { isRef, toValue, nextTick } from 'vue';
4
4
 
5
5
  function useSortable(el, list, options = {}) {
6
6
  let sortable;
@@ -11,20 +11,20 @@ function useSortable(el, list, options = {}) {
11
11
  }
12
12
  };
13
13
  const start = () => {
14
- const target = typeof el === "string" ? document == null ? void 0 : document.querySelector(el) : unrefElement(el);
15
- if (!target || sortable !== void 0)
14
+ const target = typeof el === "string" ? document == null ? undefined : document.querySelector(el) : unrefElement(el);
15
+ if (!target || sortable !== undefined)
16
16
  return;
17
17
  sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
18
18
  };
19
19
  const stop = () => {
20
- sortable == null ? void 0 : sortable.destroy();
21
- sortable = void 0;
20
+ sortable == null ? undefined : sortable.destroy();
21
+ sortable = undefined;
22
22
  };
23
23
  const option = (name, value) => {
24
- if (value !== void 0)
25
- sortable == null ? void 0 : sortable.option(name, value);
24
+ if (value !== undefined)
25
+ sortable == null ? undefined : sortable.option(name, value);
26
26
  else
27
- return sortable == null ? void 0 : sortable.option(name);
27
+ return sortable == null ? undefined : sortable.option(name);
28
28
  };
29
29
  tryOnMounted(start);
30
30
  tryOnScopeDispose(stop);