@vueuse/integrations 12.6.1 → 12.8.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 (72) hide show
  1. package/index.cjs +14 -14
  2. package/index.d.cts +17 -17
  3. package/index.d.mts +17 -17
  4. package/index.d.ts +17 -17
  5. package/index.iife.js +14 -14
  6. package/index.iife.min.js +1 -1
  7. package/index.mjs +15 -15
  8. package/package.json +5 -5
  9. package/useAsyncValidator/component.cjs +3 -3
  10. package/useAsyncValidator/component.mjs +4 -4
  11. package/useAsyncValidator.cjs +2 -2
  12. package/useAsyncValidator.d.cts +6 -7
  13. package/useAsyncValidator.d.mts +6 -7
  14. package/useAsyncValidator.d.ts +6 -7
  15. package/useAsyncValidator.iife.js +2 -2
  16. package/useAsyncValidator.iife.min.js +1 -1
  17. package/useAsyncValidator.mjs +3 -3
  18. package/useAxios.cjs +3 -3
  19. package/useAxios.iife.js +3 -3
  20. package/useAxios.iife.min.js +1 -1
  21. package/useAxios.mjs +3 -3
  22. package/useChangeCase.d.cts +1 -2
  23. package/useChangeCase.d.mts +1 -2
  24. package/useChangeCase.d.ts +1 -2
  25. package/useCookies.cjs +1 -1
  26. package/useCookies.iife.js +1 -1
  27. package/useCookies.iife.min.js +1 -1
  28. package/useCookies.mjs +2 -2
  29. package/useDrauu.cjs +4 -4
  30. package/useDrauu.d.cts +3 -3
  31. package/useDrauu.d.mts +3 -3
  32. package/useDrauu.d.ts +3 -3
  33. package/useDrauu.iife.js +4 -4
  34. package/useDrauu.iife.min.js +1 -1
  35. package/useDrauu.mjs +5 -5
  36. package/useFocusTrap/component.cjs +1 -1
  37. package/useFocusTrap/component.mjs +1 -1
  38. package/useFocusTrap.cjs +2 -2
  39. package/useFocusTrap.d.cts +3 -4
  40. package/useFocusTrap.d.mts +3 -4
  41. package/useFocusTrap.d.ts +3 -4
  42. package/useFocusTrap.iife.js +2 -2
  43. package/useFocusTrap.iife.min.js +1 -1
  44. package/useFocusTrap.mjs +3 -3
  45. package/useFuse.d.cts +1 -2
  46. package/useFuse.d.mts +1 -2
  47. package/useFuse.d.ts +1 -2
  48. package/useIDBKeyval.cjs +1 -1
  49. package/useIDBKeyval.d.cts +3 -3
  50. package/useIDBKeyval.d.mts +3 -3
  51. package/useIDBKeyval.d.ts +3 -3
  52. package/useIDBKeyval.iife.js +1 -1
  53. package/useIDBKeyval.iife.min.js +1 -1
  54. package/useIDBKeyval.mjs +2 -2
  55. package/useJwt.d.cts +1 -2
  56. package/useJwt.d.mts +1 -2
  57. package/useJwt.d.ts +1 -2
  58. package/useNProgress.d.cts +1 -1
  59. package/useNProgress.d.mts +1 -1
  60. package/useNProgress.d.ts +1 -1
  61. package/useQRCode.cjs +1 -1
  62. package/useQRCode.d.cts +2 -2
  63. package/useQRCode.d.mts +2 -2
  64. package/useQRCode.d.ts +2 -2
  65. package/useQRCode.iife.js +1 -1
  66. package/useQRCode.iife.min.js +1 -1
  67. package/useQRCode.mjs +2 -2
  68. package/useSortable/component.cjs +1 -1
  69. package/useSortable/component.mjs +1 -1
  70. package/useSortable.d.cts +2 -1
  71. package/useSortable.d.mts +2 -1
  72. package/useSortable.d.ts +2 -1
@@ -1,5 +1,5 @@
1
- import { ConfigurableFlush, RemovableRef, MaybeRefOrGetter } from '@vueuse/shared';
2
- import { Ref } from 'vue';
1
+ import { ConfigurableFlush, RemovableRef } from '@vueuse/shared';
2
+ import { ShallowRef, MaybeRefOrGetter } from 'vue';
3
3
 
4
4
  interface UseIDBOptions extends ConfigurableFlush {
5
5
  /**
@@ -29,7 +29,7 @@ interface UseIDBOptions extends ConfigurableFlush {
29
29
  }
30
30
  interface UseIDBKeyvalReturn<T> {
31
31
  data: RemovableRef<T>;
32
- isFinished: Ref<boolean>;
32
+ isFinished: ShallowRef<boolean>;
33
33
  set: (value: T) => Promise<void>;
34
34
  }
35
35
  /**
package/useIDBKeyval.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ConfigurableFlush, RemovableRef, MaybeRefOrGetter } from '@vueuse/shared';
2
- import { Ref } from 'vue';
1
+ import { ConfigurableFlush, RemovableRef } from '@vueuse/shared';
2
+ import { ShallowRef, MaybeRefOrGetter } from 'vue';
3
3
 
4
4
  interface UseIDBOptions extends ConfigurableFlush {
5
5
  /**
@@ -29,7 +29,7 @@ interface UseIDBOptions extends ConfigurableFlush {
29
29
  }
30
30
  interface UseIDBKeyvalReturn<T> {
31
31
  data: RemovableRef<T>;
32
- isFinished: Ref<boolean>;
32
+ isFinished: ShallowRef<boolean>;
33
33
  set: (value: T) => Promise<void>;
34
34
  }
35
35
  /**
@@ -11,7 +11,7 @@
11
11
  },
12
12
  writeDefaults = true
13
13
  } = options;
14
- const isFinished = vue.ref(false);
14
+ const isFinished = vue.shallowRef(false);
15
15
  const data = (shallow ? vue.shallowRef : vue.ref)(initialValue);
16
16
  const rawInit = vue.toValue(initialValue);
17
17
  async function read() {
@@ -1 +1 @@
1
- (function(i,f,s,a){"use strict";function w(u,r,h={}){const{flush:d="pre",deep:p=!0,shallow:V=!1,onError:c=e=>{console.error(e)},writeDefaults:D=!0}=h,l=a.ref(!1),t=(V?a.shallowRef:a.ref)(r),n=a.toValue(r);async function v(){try{const e=await s.get(u);e===void 0?n!=null&&D&&await s.set(u,n):t.value=e}catch(e){c(e)}l.value=!0}v();async function o(){try{t.value==null?await s.del(u):await s.update(u,()=>a.toRaw(t.value))}catch(e){c(e)}}const{pause:I,resume:U}=f.watchPausable(t,()=>o(),{flush:d,deep:p});async function m(e){I(),t.value=e,await o(),U()}return{set:m,isFinished:l,data:t}}i.useIDBKeyval=w})(this.VueUse=this.VueUse||{},VueUse,idbKeyval,Vue);
1
+ (function(i,f,s,a){"use strict";function w(u,l,h={}){const{flush:d="pre",deep:p=!0,shallow:V=!1,onError:c=e=>{console.error(e)},writeDefaults:D=!0}=h,o=a.shallowRef(!1),t=(V?a.shallowRef:a.ref)(l),n=a.toValue(l);async function v(){try{const e=await s.get(u);e===void 0?n!=null&&D&&await s.set(u,n):t.value=e}catch(e){c(e)}o.value=!0}v();async function r(){try{t.value==null?await s.del(u):await s.update(u,()=>a.toRaw(t.value))}catch(e){c(e)}}const{pause:I,resume:R}=f.watchPausable(t,()=>r(),{flush:d,deep:p});async function U(e){I(),t.value=e,await r(),R()}return{set:U,isFinished:o,data:t}}i.useIDBKeyval=w})(this.VueUse=this.VueUse||{},VueUse,idbKeyval,Vue);
package/useIDBKeyval.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { watchPausable } from '@vueuse/core';
2
2
  import { get, set, del, update } from 'idb-keyval';
3
- import { ref, shallowRef, toValue, toRaw } from 'vue';
3
+ import { shallowRef, ref, toValue, toRaw } from 'vue';
4
4
 
5
5
  function useIDBKeyval(key, initialValue, options = {}) {
6
6
  const {
@@ -12,7 +12,7 @@ function useIDBKeyval(key, initialValue, options = {}) {
12
12
  },
13
13
  writeDefaults = true
14
14
  } = options;
15
- const isFinished = ref(false);
15
+ const isFinished = shallowRef(false);
16
16
  const data = (shallow ? shallowRef : ref)(initialValue);
17
17
  const rawInit = toValue(initialValue);
18
18
  async function read() {
package/useJwt.d.cts CHANGED
@@ -1,6 +1,5 @@
1
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
1
  import { JwtPayload, JwtHeader } from 'jwt-decode';
3
- import { ComputedRef } from 'vue';
2
+ import { ComputedRef, MaybeRefOrGetter } from 'vue';
4
3
 
5
4
  interface UseJwtOptions<Fallback> {
6
5
  /**
package/useJwt.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
1
  import { JwtPayload, JwtHeader } from 'jwt-decode';
3
- import { ComputedRef } from 'vue';
2
+ import { ComputedRef, MaybeRefOrGetter } from 'vue';
4
3
 
5
4
  interface UseJwtOptions<Fallback> {
6
5
  /**
package/useJwt.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
1
  import { JwtPayload, JwtHeader } from 'jwt-decode';
3
- import { ComputedRef } from 'vue';
2
+ import { ComputedRef, MaybeRefOrGetter } from 'vue';
4
3
 
5
4
  interface UseJwtOptions<Fallback> {
6
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as vue from 'vue';
2
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
+ import { MaybeRefOrGetter } from 'vue';
3
3
  import nprogress, { NProgressOptions } from 'nprogress';
4
4
 
5
5
  type UseNProgressOptions = Partial<NProgressOptions>;
@@ -1,5 +1,5 @@
1
1
  import * as vue from 'vue';
2
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
+ import { MaybeRefOrGetter } from 'vue';
3
3
  import nprogress, { NProgressOptions } from 'nprogress';
4
4
 
5
5
  type UseNProgressOptions = Partial<NProgressOptions>;
package/useNProgress.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as vue from 'vue';
2
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
+ import { MaybeRefOrGetter } from 'vue';
3
3
  import nprogress, { NProgressOptions } from 'nprogress';
4
4
 
5
5
  type UseNProgressOptions = Partial<NProgressOptions>;
package/useQRCode.cjs CHANGED
@@ -6,7 +6,7 @@ var vue = require('vue');
6
6
 
7
7
  function useQRCode(text, options) {
8
8
  const src = shared.toRef(text);
9
- const result = vue.ref("");
9
+ const result = vue.shallowRef("");
10
10
  vue.watch(
11
11
  src,
12
12
  async (value) => {
package/useQRCode.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as vue from 'vue';
2
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
+ import { MaybeRefOrGetter } from 'vue';
3
3
  import QRCode from 'qrcode';
4
4
 
5
5
  /**
@@ -9,6 +9,6 @@ import QRCode from 'qrcode';
9
9
  * @param text
10
10
  * @param options
11
11
  */
12
- declare function useQRCode(text: MaybeRefOrGetter<string>, options?: QRCode.QRCodeToDataURLOptions): vue.Ref<string, string>;
12
+ declare function useQRCode(text: MaybeRefOrGetter<string>, options?: QRCode.QRCodeToDataURLOptions): vue.ShallowRef<string, string>;
13
13
 
14
14
  export { useQRCode };
package/useQRCode.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as vue from 'vue';
2
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
+ import { MaybeRefOrGetter } from 'vue';
3
3
  import QRCode from 'qrcode';
4
4
 
5
5
  /**
@@ -9,6 +9,6 @@ import QRCode from 'qrcode';
9
9
  * @param text
10
10
  * @param options
11
11
  */
12
- declare function useQRCode(text: MaybeRefOrGetter<string>, options?: QRCode.QRCodeToDataURLOptions): vue.Ref<string, string>;
12
+ declare function useQRCode(text: MaybeRefOrGetter<string>, options?: QRCode.QRCodeToDataURLOptions): vue.ShallowRef<string, string>;
13
13
 
14
14
  export { useQRCode };
package/useQRCode.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as vue from 'vue';
2
- import { MaybeRefOrGetter } from '@vueuse/shared';
2
+ import { MaybeRefOrGetter } from 'vue';
3
3
  import QRCode from 'qrcode';
4
4
 
5
5
  /**
@@ -9,6 +9,6 @@ import QRCode from 'qrcode';
9
9
  * @param text
10
10
  * @param options
11
11
  */
12
- declare function useQRCode(text: MaybeRefOrGetter<string>, options?: QRCode.QRCodeToDataURLOptions): vue.Ref<string, string>;
12
+ declare function useQRCode(text: MaybeRefOrGetter<string>, options?: QRCode.QRCodeToDataURLOptions): vue.ShallowRef<string, string>;
13
13
 
14
14
  export { useQRCode };
package/useQRCode.iife.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  function useQRCode(text, options) {
5
5
  const src = shared.toRef(text);
6
- const result = vue.ref("");
6
+ const result = vue.shallowRef("");
7
7
  vue.watch(
8
8
  src,
9
9
  async (value) => {
@@ -1 +1 @@
1
- (function(i,e,n,t){"use strict";function o(a,c){const s=e.toRef(a),u=t.ref("");return t.watch(s,async r=>{s.value&&e.isClient&&(u.value=await n.toDataURL(r,c))},{immediate:!0}),u}i.useQRCode=o})(this.VueUse=this.VueUse||{},VueUse,QRCode,Vue);
1
+ (function(i,e,o,t){"use strict";function a(n,c){const s=e.toRef(n),u=t.shallowRef("");return t.watch(s,async l=>{s.value&&e.isClient&&(u.value=await o.toDataURL(l,c))},{immediate:!0}),u}i.useQRCode=a})(this.VueUse=this.VueUse||{},VueUse,QRCode,Vue);
package/useQRCode.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { toRef, isClient } from '@vueuse/shared';
2
2
  import QRCode from 'qrcode';
3
- import { ref, watch } from 'vue';
3
+ import { shallowRef, watch } from 'vue';
4
4
 
5
5
  function useQRCode(text, options) {
6
6
  const src = toRef(text);
7
- const result = ref("");
7
+ const result = shallowRef("");
8
8
  watch(
9
9
  src,
10
10
  async (value) => {
@@ -61,7 +61,7 @@ function moveArrayElement(list, from, to, e = null) {
61
61
  }
62
62
  }
63
63
 
64
- const UseSortable = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
64
+ const UseSortable = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
65
65
  name: "UseSortable",
66
66
  props: {
67
67
  modelValue: {
@@ -59,7 +59,7 @@ function moveArrayElement(list, from, to, e = null) {
59
59
  }
60
60
  }
61
61
 
62
- const UseSortable = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
62
+ const UseSortable = /* @__PURE__ */ /*@__PURE__*/ defineComponent({
63
63
  name: "UseSortable",
64
64
  props: {
65
65
  modelValue: {
package/useSortable.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import { ConfigurableDocument, MaybeRefOrGetter } from '@vueuse/core';
1
+ import { ConfigurableDocument } from '@vueuse/core';
2
2
  import Sortable, { Options } from 'sortablejs';
3
+ import { MaybeRefOrGetter } from 'vue';
3
4
 
4
5
  interface UseSortableReturn {
5
6
  /**
package/useSortable.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { ConfigurableDocument, MaybeRefOrGetter } from '@vueuse/core';
1
+ import { ConfigurableDocument } from '@vueuse/core';
2
2
  import Sortable, { Options } from 'sortablejs';
3
+ import { MaybeRefOrGetter } from 'vue';
3
4
 
4
5
  interface UseSortableReturn {
5
6
  /**
package/useSortable.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { ConfigurableDocument, MaybeRefOrGetter } from '@vueuse/core';
1
+ import { ConfigurableDocument } from '@vueuse/core';
2
2
  import Sortable, { Options } from 'sortablejs';
3
+ import { MaybeRefOrGetter } from 'vue';
3
4
 
4
5
  interface UseSortableReturn {
5
6
  /**