@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.
- package/index.cjs +14 -14
- package/index.d.cts +17 -17
- package/index.d.mts +17 -17
- package/index.d.ts +17 -17
- package/index.iife.js +14 -14
- package/index.iife.min.js +1 -1
- package/index.mjs +15 -15
- package/package.json +5 -5
- package/useAsyncValidator/component.cjs +3 -3
- package/useAsyncValidator/component.mjs +4 -4
- package/useAsyncValidator.cjs +2 -2
- package/useAsyncValidator.d.cts +6 -7
- package/useAsyncValidator.d.mts +6 -7
- package/useAsyncValidator.d.ts +6 -7
- package/useAsyncValidator.iife.js +2 -2
- package/useAsyncValidator.iife.min.js +1 -1
- package/useAsyncValidator.mjs +3 -3
- package/useAxios.cjs +3 -3
- package/useAxios.iife.js +3 -3
- package/useAxios.iife.min.js +1 -1
- package/useAxios.mjs +3 -3
- package/useChangeCase.d.cts +1 -2
- package/useChangeCase.d.mts +1 -2
- package/useChangeCase.d.ts +1 -2
- package/useCookies.cjs +1 -1
- package/useCookies.iife.js +1 -1
- package/useCookies.iife.min.js +1 -1
- package/useCookies.mjs +2 -2
- package/useDrauu.cjs +4 -4
- package/useDrauu.d.cts +3 -3
- package/useDrauu.d.mts +3 -3
- package/useDrauu.d.ts +3 -3
- package/useDrauu.iife.js +4 -4
- package/useDrauu.iife.min.js +1 -1
- package/useDrauu.mjs +5 -5
- package/useFocusTrap/component.cjs +1 -1
- package/useFocusTrap/component.mjs +1 -1
- package/useFocusTrap.cjs +2 -2
- package/useFocusTrap.d.cts +3 -4
- package/useFocusTrap.d.mts +3 -4
- package/useFocusTrap.d.ts +3 -4
- package/useFocusTrap.iife.js +2 -2
- package/useFocusTrap.iife.min.js +1 -1
- package/useFocusTrap.mjs +3 -3
- package/useFuse.d.cts +1 -2
- package/useFuse.d.mts +1 -2
- package/useFuse.d.ts +1 -2
- package/useIDBKeyval.cjs +1 -1
- package/useIDBKeyval.d.cts +3 -3
- package/useIDBKeyval.d.mts +3 -3
- package/useIDBKeyval.d.ts +3 -3
- package/useIDBKeyval.iife.js +1 -1
- package/useIDBKeyval.iife.min.js +1 -1
- package/useIDBKeyval.mjs +2 -2
- package/useJwt.d.cts +1 -2
- package/useJwt.d.mts +1 -2
- package/useJwt.d.ts +1 -2
- package/useNProgress.d.cts +1 -1
- package/useNProgress.d.mts +1 -1
- package/useNProgress.d.ts +1 -1
- package/useQRCode.cjs +1 -1
- package/useQRCode.d.cts +2 -2
- package/useQRCode.d.mts +2 -2
- package/useQRCode.d.ts +2 -2
- package/useQRCode.iife.js +1 -1
- package/useQRCode.iife.min.js +1 -1
- package/useQRCode.mjs +2 -2
- package/useSortable/component.cjs +1 -1
- package/useSortable/component.mjs +1 -1
- package/useSortable.d.cts +2 -1
- package/useSortable.d.mts +2 -1
- package/useSortable.d.ts +2 -1
package/useIDBKeyval.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigurableFlush, RemovableRef
|
|
2
|
-
import {
|
|
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:
|
|
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
|
|
2
|
-
import {
|
|
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:
|
|
32
|
+
isFinished: ShallowRef<boolean>;
|
|
33
33
|
set: (value: T) => Promise<void>;
|
|
34
34
|
}
|
|
35
35
|
/**
|
package/useIDBKeyval.iife.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
writeDefaults = true
|
|
13
13
|
} = options;
|
|
14
|
-
const isFinished = vue.
|
|
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() {
|
package/useIDBKeyval.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,f,s,a){"use strict";function w(u,
|
|
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 {
|
|
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 =
|
|
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
package/useJwt.d.mts
CHANGED
package/useJwt.d.ts
CHANGED
package/useNProgress.d.cts
CHANGED
package/useNProgress.d.mts
CHANGED
package/useNProgress.d.ts
CHANGED
package/useQRCode.cjs
CHANGED
package/useQRCode.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { MaybeRefOrGetter } from '
|
|
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.
|
|
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 '
|
|
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.
|
|
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 '
|
|
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.
|
|
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
package/useQRCode.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,e,
|
|
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 {
|
|
3
|
+
import { shallowRef, watch } from 'vue';
|
|
4
4
|
|
|
5
5
|
function useQRCode(text, options) {
|
|
6
6
|
const src = toRef(text);
|
|
7
|
-
const result =
|
|
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__ */
|
|
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__ */
|
|
62
|
+
const UseSortable = /* @__PURE__ */ /*@__PURE__*/ defineComponent({
|
|
63
63
|
name: "UseSortable",
|
|
64
64
|
props: {
|
|
65
65
|
modelValue: {
|
package/useSortable.d.cts
CHANGED
package/useSortable.d.mts
CHANGED
package/useSortable.d.ts
CHANGED