@vueuse/integrations 12.5.0 → 12.7.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 +42 -42
- package/index.d.cts +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/index.iife.js +42 -42
- package/index.iife.min.js +1 -1
- package/index.mjs +43 -43
- package/package.json +5 -5
- package/useAsyncValidator/component.cjs +1 -1
- package/useAsyncValidator/component.mjs +1 -1
- package/useAsyncValidator.cjs +3 -3
- package/useAsyncValidator.iife.js +3 -3
- package/useAsyncValidator.iife.min.js +1 -1
- package/useAsyncValidator.mjs +3 -3
- package/useAxios.cjs +8 -8
- package/useAxios.iife.js +8 -8
- package/useAxios.iife.min.js +1 -1
- package/useAxios.mjs +8 -8
- 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 +13 -13
- package/useDrauu.iife.js +13 -13
- package/useDrauu.iife.min.js +1 -1
- package/useDrauu.mjs +14 -14
- package/useFocusTrap.cjs +2 -2
- package/useFocusTrap.iife.js +2 -2
- package/useFocusTrap.iife.min.js +1 -1
- package/useFocusTrap.mjs +3 -3
- package/useFuse.cjs +5 -5
- package/useFuse.iife.js +5 -5
- package/useFuse.iife.min.js +1 -1
- package/useFuse.mjs +5 -5
- package/useIDBKeyval.cjs +1 -1
- package/useIDBKeyval.iife.js +1 -1
- package/useIDBKeyval.iife.min.js +1 -1
- package/useIDBKeyval.mjs +2 -2
- package/useJwt.cjs +1 -1
- package/useJwt.iife.js +1 -1
- package/useJwt.iife.min.js +1 -1
- package/useJwt.mjs +1 -1
- package/useQRCode.cjs +1 -1
- package/useQRCode.d.cts +1 -1
- package/useQRCode.d.mts +1 -1
- package/useQRCode.d.ts +1 -1
- package/useQRCode.iife.js +1 -1
- package/useQRCode.iife.min.js +1 -1
- package/useQRCode.mjs +2 -2
- package/useSortable/component.cjs +3 -3
- package/useSortable/component.mjs +4 -4
- package/useSortable.cjs +7 -7
- package/useSortable.iife.js +7 -7
- package/useSortable.iife.min.js +1 -1
- package/useSortable.mjs +8 -8
package/useDrauu.iife.js
CHANGED
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
const onCommittedHook = core.createEventHook();
|
|
10
10
|
const onStartHook = core.createEventHook();
|
|
11
11
|
const onEndHook = core.createEventHook();
|
|
12
|
-
const canUndo = vue.
|
|
13
|
-
const canRedo = vue.
|
|
14
|
-
const altPressed = vue.
|
|
15
|
-
const shiftPressed = vue.
|
|
12
|
+
const canUndo = vue.shallowRef(false);
|
|
13
|
+
const canRedo = vue.shallowRef(false);
|
|
14
|
+
const altPressed = vue.shallowRef(false);
|
|
15
|
+
const shiftPressed = vue.shallowRef(false);
|
|
16
16
|
const brush = vue.ref({
|
|
17
17
|
color: "black",
|
|
18
18
|
size: 3,
|
|
19
19
|
arrowEnd: false,
|
|
20
20
|
cornerRadius: 0,
|
|
21
|
-
dasharray:
|
|
21
|
+
dasharray: void 0,
|
|
22
22
|
fill: "transparent",
|
|
23
23
|
mode: "draw",
|
|
24
|
-
...options == null ?
|
|
24
|
+
...options == null ? void 0 : options.brush
|
|
25
25
|
});
|
|
26
26
|
vue.watch(brush, () => {
|
|
27
27
|
const instance = drauuInstance.value;
|
|
@@ -32,32 +32,32 @@
|
|
|
32
32
|
}, { deep: true });
|
|
33
33
|
const undo = () => {
|
|
34
34
|
var _a;
|
|
35
|
-
return (_a = drauuInstance.value) == null ?
|
|
35
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.undo();
|
|
36
36
|
};
|
|
37
37
|
const redo = () => {
|
|
38
38
|
var _a;
|
|
39
|
-
return (_a = drauuInstance.value) == null ?
|
|
39
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.redo();
|
|
40
40
|
};
|
|
41
41
|
const clear = () => {
|
|
42
42
|
var _a;
|
|
43
|
-
return (_a = drauuInstance.value) == null ?
|
|
43
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.clear();
|
|
44
44
|
};
|
|
45
45
|
const cancel = () => {
|
|
46
46
|
var _a;
|
|
47
|
-
return (_a = drauuInstance.value) == null ?
|
|
47
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.cancel();
|
|
48
48
|
};
|
|
49
49
|
const load = (svg) => {
|
|
50
50
|
var _a;
|
|
51
|
-
return (_a = drauuInstance.value) == null ?
|
|
51
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.load(svg);
|
|
52
52
|
};
|
|
53
53
|
const dump = () => {
|
|
54
54
|
var _a;
|
|
55
|
-
return (_a = drauuInstance.value) == null ?
|
|
55
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.dump();
|
|
56
56
|
};
|
|
57
57
|
const cleanup = () => {
|
|
58
58
|
var _a;
|
|
59
59
|
disposables.forEach((dispose) => dispose());
|
|
60
|
-
(_a = drauuInstance.value) == null ?
|
|
60
|
+
(_a = drauuInstance.value) == null ? void 0 : _a.unmount();
|
|
61
61
|
};
|
|
62
62
|
const syncStatus = () => {
|
|
63
63
|
if (drauuInstance.value) {
|
package/useDrauu.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(E,
|
|
1
|
+
(function(E,o,k,H,a){"use strict";function V(p,u){const n=a.ref();let r=[];const s=o.createEventHook(),c=o.createEventHook(),d=o.createEventHook(),v=o.createEventHook(),i=o.createEventHook(),f=a.shallowRef(!1),h=a.shallowRef(!1),w=a.shallowRef(!1),S=a.shallowRef(!1),l=a.ref({color:"black",size:3,arrowEnd:!1,cornerRadius:0,dasharray:void 0,fill:"transparent",mode:"draw",...u?.brush});a.watch(l,()=>{const e=n.value;e&&(e.brush=l.value,e.mode=l.value.mode)},{deep:!0});const R=()=>{var e;return(e=n.value)==null?void 0:e.undo()},_=()=>{var e;return(e=n.value)==null?void 0:e.redo()},C=()=>{var e;return(e=n.value)==null?void 0:e.clear()},U=()=>{var e;return(e=n.value)==null?void 0:e.cancel()},b=e=>{var t;return(t=n.value)==null?void 0:t.load(e)},D=()=>{var e;return(e=n.value)==null?void 0:e.dump()},m=()=>{var e;r.forEach(t=>t()),(e=n.value)==null||e.unmount()},g=()=>{n.value&&(f.value=n.value.canUndo(),h.value=n.value.canRedo(),w.value=n.value.altPressed,S.value=n.value.shiftPressed)};return a.watch(()=>o.unrefElement(p),e=>{!e||typeof SVGSVGElement>"u"||!(e instanceof SVGSVGElement)||(n.value&&m(),n.value=H.createDrauu({el:e,...u}),g(),r=[n.value.on("canceled",()=>c.trigger()),n.value.on("committed",t=>d.trigger(t)),n.value.on("start",()=>v.trigger()),n.value.on("end",()=>i.trigger()),n.value.on("changed",()=>{g(),s.trigger()})])},{flush:"post"}),k.tryOnScopeDispose(()=>m()),{drauuInstance:n,load:b,dump:D,clear:C,cancel:U,undo:R,redo:_,canUndo:f,canRedo:h,brush:l,onChanged:s.on,onCommitted:d.on,onStart:v.on,onEnd:i.on,onCanceled:c.on}}E.useDrauu=V})(this.VueUse=this.VueUse||{},VueUse,VueUse,Drauu,Vue);
|
package/useDrauu.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createEventHook, unrefElement } from '@vueuse/core';
|
|
2
2
|
import { tryOnScopeDispose } from '@vueuse/shared';
|
|
3
3
|
import { createDrauu } from 'drauu';
|
|
4
|
-
import { ref, watch } from 'vue';
|
|
4
|
+
import { ref, shallowRef, watch } from 'vue';
|
|
5
5
|
|
|
6
6
|
function useDrauu(target, options) {
|
|
7
7
|
const drauuInstance = ref();
|
|
@@ -11,19 +11,19 @@ function useDrauu(target, options) {
|
|
|
11
11
|
const onCommittedHook = createEventHook();
|
|
12
12
|
const onStartHook = createEventHook();
|
|
13
13
|
const onEndHook = createEventHook();
|
|
14
|
-
const canUndo =
|
|
15
|
-
const canRedo =
|
|
16
|
-
const altPressed =
|
|
17
|
-
const shiftPressed =
|
|
14
|
+
const canUndo = shallowRef(false);
|
|
15
|
+
const canRedo = shallowRef(false);
|
|
16
|
+
const altPressed = shallowRef(false);
|
|
17
|
+
const shiftPressed = shallowRef(false);
|
|
18
18
|
const brush = ref({
|
|
19
19
|
color: "black",
|
|
20
20
|
size: 3,
|
|
21
21
|
arrowEnd: false,
|
|
22
22
|
cornerRadius: 0,
|
|
23
|
-
dasharray:
|
|
23
|
+
dasharray: void 0,
|
|
24
24
|
fill: "transparent",
|
|
25
25
|
mode: "draw",
|
|
26
|
-
...options == null ?
|
|
26
|
+
...options == null ? void 0 : options.brush
|
|
27
27
|
});
|
|
28
28
|
watch(brush, () => {
|
|
29
29
|
const instance = drauuInstance.value;
|
|
@@ -34,32 +34,32 @@ function useDrauu(target, options) {
|
|
|
34
34
|
}, { deep: true });
|
|
35
35
|
const undo = () => {
|
|
36
36
|
var _a;
|
|
37
|
-
return (_a = drauuInstance.value) == null ?
|
|
37
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.undo();
|
|
38
38
|
};
|
|
39
39
|
const redo = () => {
|
|
40
40
|
var _a;
|
|
41
|
-
return (_a = drauuInstance.value) == null ?
|
|
41
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.redo();
|
|
42
42
|
};
|
|
43
43
|
const clear = () => {
|
|
44
44
|
var _a;
|
|
45
|
-
return (_a = drauuInstance.value) == null ?
|
|
45
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.clear();
|
|
46
46
|
};
|
|
47
47
|
const cancel = () => {
|
|
48
48
|
var _a;
|
|
49
|
-
return (_a = drauuInstance.value) == null ?
|
|
49
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.cancel();
|
|
50
50
|
};
|
|
51
51
|
const load = (svg) => {
|
|
52
52
|
var _a;
|
|
53
|
-
return (_a = drauuInstance.value) == null ?
|
|
53
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.load(svg);
|
|
54
54
|
};
|
|
55
55
|
const dump = () => {
|
|
56
56
|
var _a;
|
|
57
|
-
return (_a = drauuInstance.value) == null ?
|
|
57
|
+
return (_a = drauuInstance.value) == null ? void 0 : _a.dump();
|
|
58
58
|
};
|
|
59
59
|
const cleanup = () => {
|
|
60
60
|
var _a;
|
|
61
61
|
disposables.forEach((dispose) => dispose());
|
|
62
|
-
(_a = drauuInstance.value) == null ?
|
|
62
|
+
(_a = drauuInstance.value) == null ? void 0 : _a.unmount();
|
|
63
63
|
};
|
|
64
64
|
const syncStatus = () => {
|
|
65
65
|
if (drauuInstance.value) {
|
package/useFocusTrap.cjs
CHANGED
|
@@ -8,8 +8,8 @@ var vue = require('vue');
|
|
|
8
8
|
function useFocusTrap(target, options = {}) {
|
|
9
9
|
let trap;
|
|
10
10
|
const { immediate, ...focusTrapOptions } = options;
|
|
11
|
-
const hasFocus = vue.
|
|
12
|
-
const isPaused = vue.
|
|
11
|
+
const hasFocus = vue.shallowRef(false);
|
|
12
|
+
const isPaused = vue.shallowRef(false);
|
|
13
13
|
const activate = (opts) => trap && trap.activate(opts);
|
|
14
14
|
const deactivate = (opts) => trap && trap.deactivate(opts);
|
|
15
15
|
const pause = () => {
|
package/useFocusTrap.iife.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
function useFocusTrap(target, options = {}) {
|
|
5
5
|
let trap;
|
|
6
6
|
const { immediate, ...focusTrapOptions } = options;
|
|
7
|
-
const hasFocus = vue.
|
|
8
|
-
const isPaused = vue.
|
|
7
|
+
const hasFocus = vue.shallowRef(false);
|
|
8
|
+
const isPaused = vue.shallowRef(false);
|
|
9
9
|
const activate = (opts) => trap && trap.activate(opts);
|
|
10
10
|
const deactivate = (opts) => trap && trap.deactivate(opts);
|
|
11
11
|
const pause = () => {
|
package/useFocusTrap.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(l,u,f,p,a){"use strict";function h(v,s={}){let t;const{immediate:V,...d}=s,c=a.shallowRef(!1),n=a.shallowRef(!1),i=e=>t&&t.activate(e),r=e=>t&&t.deactivate(e),m=()=>{t&&(t.pause(),n.value=!0)},T=()=>{t&&(t.unpause(),n.value=!1)},g=a.computed(()=>{const e=a.toValue(v);return u.toArray(e).map(A=>{const o=a.toValue(A);return typeof o=="string"?o:u.unrefElement(o)}).filter(f.notNullish)});return a.watch(g,e=>{e.length&&(t=p.createFocusTrap(e,{...d,onActivate(){c.value=!0,s.onActivate&&s.onActivate()},onDeactivate(){c.value=!1,s.onDeactivate&&s.onDeactivate()}}),V&&i())},{flush:"post"}),u.tryOnScopeDispose(()=>r()),{hasFocus:c,isPaused:n,activate:i,deactivate:r,pause:m,unpause:T}}l.useFocusTrap=h})(this.VueUse=this.VueUse||{},VueUse,VueUse,focusTrap,Vue);
|
package/useFocusTrap.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { toArray, unrefElement, tryOnScopeDispose } from '@vueuse/core';
|
|
2
2
|
import { notNullish } from '@vueuse/shared';
|
|
3
3
|
import { createFocusTrap } from 'focus-trap';
|
|
4
|
-
import {
|
|
4
|
+
import { shallowRef, computed, toValue, watch } from 'vue';
|
|
5
5
|
|
|
6
6
|
function useFocusTrap(target, options = {}) {
|
|
7
7
|
let trap;
|
|
8
8
|
const { immediate, ...focusTrapOptions } = options;
|
|
9
|
-
const hasFocus =
|
|
10
|
-
const isPaused =
|
|
9
|
+
const hasFocus = shallowRef(false);
|
|
10
|
+
const isPaused = shallowRef(false);
|
|
11
11
|
const activate = (opts) => trap && trap.activate(opts);
|
|
12
12
|
const deactivate = (opts) => trap && trap.deactivate(opts);
|
|
13
13
|
const pause = () => {
|
package/useFuse.cjs
CHANGED
|
@@ -8,14 +8,14 @@ function useFuse(search, data, options) {
|
|
|
8
8
|
var _a, _b;
|
|
9
9
|
return new Fuse(
|
|
10
10
|
(_a = vue.toValue(data)) != null ? _a : [],
|
|
11
|
-
(_b = vue.toValue(options)) == null ?
|
|
11
|
+
(_b = vue.toValue(options)) == null ? void 0 : _b.fuseOptions
|
|
12
12
|
);
|
|
13
13
|
};
|
|
14
14
|
const fuse = vue.ref(createFuse());
|
|
15
15
|
vue.watch(
|
|
16
16
|
() => {
|
|
17
17
|
var _a;
|
|
18
|
-
return (_a = vue.toValue(options)) == null ?
|
|
18
|
+
return (_a = vue.toValue(options)) == null ? void 0 : _a.fuseOptions;
|
|
19
19
|
},
|
|
20
20
|
() => {
|
|
21
21
|
fuse.value = createFuse();
|
|
@@ -31,10 +31,10 @@ function useFuse(search, data, options) {
|
|
|
31
31
|
);
|
|
32
32
|
const results = vue.computed(() => {
|
|
33
33
|
const resolved = vue.toValue(options);
|
|
34
|
-
if ((resolved == null ?
|
|
34
|
+
if ((resolved == null ? void 0 : resolved.matchAllWhenSearchEmpty) && !vue.toValue(search))
|
|
35
35
|
return vue.toValue(data).map((item, index) => ({ item, refIndex: index }));
|
|
36
|
-
const limit = resolved == null ?
|
|
37
|
-
return fuse.value.search(vue.toValue(search), limit ? { limit } :
|
|
36
|
+
const limit = resolved == null ? void 0 : resolved.resultLimit;
|
|
37
|
+
return fuse.value.search(vue.toValue(search), limit ? { limit } : void 0);
|
|
38
38
|
});
|
|
39
39
|
return {
|
|
40
40
|
fuse,
|
package/useFuse.iife.js
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
var _a, _b;
|
|
7
7
|
return new Fuse(
|
|
8
8
|
(_a = vue.toValue(data)) != null ? _a : [],
|
|
9
|
-
(_b = vue.toValue(options)) == null ?
|
|
9
|
+
(_b = vue.toValue(options)) == null ? void 0 : _b.fuseOptions
|
|
10
10
|
);
|
|
11
11
|
};
|
|
12
12
|
const fuse = vue.ref(createFuse());
|
|
13
13
|
vue.watch(
|
|
14
14
|
() => {
|
|
15
15
|
var _a;
|
|
16
|
-
return (_a = vue.toValue(options)) == null ?
|
|
16
|
+
return (_a = vue.toValue(options)) == null ? void 0 : _a.fuseOptions;
|
|
17
17
|
},
|
|
18
18
|
() => {
|
|
19
19
|
fuse.value = createFuse();
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
);
|
|
30
30
|
const results = vue.computed(() => {
|
|
31
31
|
const resolved = vue.toValue(options);
|
|
32
|
-
if ((resolved == null ?
|
|
32
|
+
if ((resolved == null ? void 0 : resolved.matchAllWhenSearchEmpty) && !vue.toValue(search))
|
|
33
33
|
return vue.toValue(data).map((item, index) => ({ item, refIndex: index }));
|
|
34
|
-
const limit = resolved == null ?
|
|
35
|
-
return fuse.value.search(vue.toValue(search), limit ? { limit } :
|
|
34
|
+
const limit = resolved == null ? void 0 : resolved.resultLimit;
|
|
35
|
+
return fuse.value.search(vue.toValue(search), limit ? { limit } : void 0);
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
38
|
fuse,
|
package/useFuse.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(a,i,e){"use strict";function c(o,s,n){const r=()=>{var t,u;return new i((t=e.toValue(s))!=null?t:[],(u=e.toValue(n))==null?void 0:u.fuseOptions)},l=e.ref(r());e.watch(()=>{var t;return(t=e.toValue(n))==null?void 0:t.fuseOptions},()=>{l.value=r()},{deep:!0}),e.watch(()=>e.toValue(s),t=>{l.value.setCollection(t)},{deep:!0});const V=e.computed(()=>{const t=e.toValue(n);if(t?.matchAllWhenSearchEmpty&&!e.toValue(o))return e.toValue(s).map((d,f)=>({item:d,refIndex:f}));const u=t?.resultLimit;return l.value.search(e.toValue(o),u?{limit:u}:void 0)});return{fuse:l,results:V}}a.useFuse=c})(this.VueUse=this.VueUse||{},Fuse,Vue);
|
package/useFuse.mjs
CHANGED
|
@@ -6,14 +6,14 @@ function useFuse(search, data, options) {
|
|
|
6
6
|
var _a, _b;
|
|
7
7
|
return new Fuse(
|
|
8
8
|
(_a = toValue(data)) != null ? _a : [],
|
|
9
|
-
(_b = toValue(options)) == null ?
|
|
9
|
+
(_b = toValue(options)) == null ? void 0 : _b.fuseOptions
|
|
10
10
|
);
|
|
11
11
|
};
|
|
12
12
|
const fuse = ref(createFuse());
|
|
13
13
|
watch(
|
|
14
14
|
() => {
|
|
15
15
|
var _a;
|
|
16
|
-
return (_a = toValue(options)) == null ?
|
|
16
|
+
return (_a = toValue(options)) == null ? void 0 : _a.fuseOptions;
|
|
17
17
|
},
|
|
18
18
|
() => {
|
|
19
19
|
fuse.value = createFuse();
|
|
@@ -29,10 +29,10 @@ function useFuse(search, data, options) {
|
|
|
29
29
|
);
|
|
30
30
|
const results = computed(() => {
|
|
31
31
|
const resolved = toValue(options);
|
|
32
|
-
if ((resolved == null ?
|
|
32
|
+
if ((resolved == null ? void 0 : resolved.matchAllWhenSearchEmpty) && !toValue(search))
|
|
33
33
|
return toValue(data).map((item, index) => ({ item, refIndex: index }));
|
|
34
|
-
const limit = resolved == null ?
|
|
35
|
-
return fuse.value.search(toValue(search), limit ? { limit } :
|
|
34
|
+
const limit = resolved == null ? void 0 : resolved.resultLimit;
|
|
35
|
+
return fuse.value.search(toValue(search), limit ? { limit } : void 0);
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
38
|
fuse,
|
package/useIDBKeyval.cjs
CHANGED
|
@@ -14,7 +14,7 @@ function useIDBKeyval(key, initialValue, options = {}) {
|
|
|
14
14
|
},
|
|
15
15
|
writeDefaults = true
|
|
16
16
|
} = options;
|
|
17
|
-
const isFinished = vue.
|
|
17
|
+
const isFinished = vue.shallowRef(false);
|
|
18
18
|
const data = (shallow ? vue.shallowRef : vue.ref)(initialValue);
|
|
19
19
|
const rawInit = vue.toValue(initialValue);
|
|
20
20
|
async function read() {
|
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.cjs
CHANGED
package/useJwt.iife.js
CHANGED
package/useJwt.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(c,
|
|
1
|
+
(function(u,c,t){"use strict";function n(e,a={}){const{onError:o,fallbackValue:l=null}=a,r=(i,h)=>{try{return c.jwtDecode(i,h)}catch(V){return o?.(V),l}},s=t.computed(()=>r(t.toValue(e),{header:!0})),d=t.computed(()=>r(t.toValue(e)));return{header:s,payload:d}}u.useJwt=n})(this.VueUse=this.VueUse||{},jwt_decode,Vue);
|
package/useJwt.mjs
CHANGED
package/useQRCode.cjs
CHANGED
package/useQRCode.d.cts
CHANGED
|
@@ -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
|
@@ -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
|
@@ -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) => {
|
|
@@ -14,16 +14,16 @@ function useSortable(el, list, options = {}) {
|
|
|
14
14
|
};
|
|
15
15
|
const start = () => {
|
|
16
16
|
const target = typeof el === "string" ? document?.querySelector(el) : core.unrefElement(el);
|
|
17
|
-
if (!target || sortable !==
|
|
17
|
+
if (!target || sortable !== void 0)
|
|
18
18
|
return;
|
|
19
19
|
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
20
20
|
};
|
|
21
21
|
const stop = () => {
|
|
22
22
|
sortable?.destroy();
|
|
23
|
-
sortable =
|
|
23
|
+
sortable = void 0;
|
|
24
24
|
};
|
|
25
25
|
const option = (name, value) => {
|
|
26
|
-
if (value !==
|
|
26
|
+
if (value !== void 0)
|
|
27
27
|
sortable?.option(name, value);
|
|
28
28
|
else
|
|
29
29
|
return sortable?.option(name);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tryOnMounted, tryOnScopeDispose, unrefElement,
|
|
1
|
+
import { defaultDocument, tryOnMounted, tryOnScopeDispose, unrefElement, useVModel } from '@vueuse/core';
|
|
2
2
|
import { isRef, toValue, nextTick, defineComponent, ref, reactive, h } from 'vue';
|
|
3
3
|
import Sortable from 'sortablejs';
|
|
4
4
|
|
|
@@ -12,16 +12,16 @@ function useSortable(el, list, options = {}) {
|
|
|
12
12
|
};
|
|
13
13
|
const start = () => {
|
|
14
14
|
const target = typeof el === "string" ? document?.querySelector(el) : unrefElement(el);
|
|
15
|
-
if (!target || sortable !==
|
|
15
|
+
if (!target || sortable !== void 0)
|
|
16
16
|
return;
|
|
17
17
|
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
18
18
|
};
|
|
19
19
|
const stop = () => {
|
|
20
20
|
sortable?.destroy();
|
|
21
|
-
sortable =
|
|
21
|
+
sortable = void 0;
|
|
22
22
|
};
|
|
23
23
|
const option = (name, value) => {
|
|
24
|
-
if (value !==
|
|
24
|
+
if (value !== void 0)
|
|
25
25
|
sortable?.option(name, value);
|
|
26
26
|
else
|
|
27
27
|
return sortable?.option(name);
|
package/useSortable.cjs
CHANGED
|
@@ -13,20 +13,20 @@ function useSortable(el, list, options = {}) {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
const start = () => {
|
|
16
|
-
const target = typeof el === "string" ? document == null ?
|
|
17
|
-
if (!target || sortable !==
|
|
16
|
+
const target = typeof el === "string" ? document == null ? void 0 : document.querySelector(el) : core.unrefElement(el);
|
|
17
|
+
if (!target || sortable !== void 0)
|
|
18
18
|
return;
|
|
19
19
|
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
20
20
|
};
|
|
21
21
|
const stop = () => {
|
|
22
|
-
sortable == null ?
|
|
23
|
-
sortable =
|
|
22
|
+
sortable == null ? void 0 : sortable.destroy();
|
|
23
|
+
sortable = void 0;
|
|
24
24
|
};
|
|
25
25
|
const option = (name, value) => {
|
|
26
|
-
if (value !==
|
|
27
|
-
sortable == null ?
|
|
26
|
+
if (value !== void 0)
|
|
27
|
+
sortable == null ? void 0 : sortable.option(name, value);
|
|
28
28
|
else
|
|
29
|
-
return sortable == null ?
|
|
29
|
+
return sortable == null ? void 0 : sortable.option(name);
|
|
30
30
|
};
|
|
31
31
|
core.tryOnMounted(start);
|
|
32
32
|
core.tryOnScopeDispose(stop);
|
package/useSortable.iife.js
CHANGED
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
const start = () => {
|
|
13
|
-
const target = typeof el === "string" ? document == null ?
|
|
14
|
-
if (!target || sortable !==
|
|
13
|
+
const target = typeof el === "string" ? document == null ? void 0 : document.querySelector(el) : core.unrefElement(el);
|
|
14
|
+
if (!target || sortable !== void 0)
|
|
15
15
|
return;
|
|
16
16
|
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
17
17
|
};
|
|
18
18
|
const stop = () => {
|
|
19
|
-
sortable == null ?
|
|
20
|
-
sortable =
|
|
19
|
+
sortable == null ? void 0 : sortable.destroy();
|
|
20
|
+
sortable = void 0;
|
|
21
21
|
};
|
|
22
22
|
const option = (name, value) => {
|
|
23
|
-
if (value !==
|
|
24
|
-
sortable == null ?
|
|
23
|
+
if (value !== void 0)
|
|
24
|
+
sortable == null ? void 0 : sortable.option(name, value);
|
|
25
25
|
else
|
|
26
|
-
return sortable == null ?
|
|
26
|
+
return sortable == null ? void 0 : sortable.option(name);
|
|
27
27
|
};
|
|
28
28
|
core.tryOnMounted(start);
|
|
29
29
|
core.tryOnScopeDispose(stop);
|
package/useSortable.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(l,u,N,d){"use strict";function V(t,i,o={}){let e;const{document:s=u.defaultDocument,...r}=o,c={onUpdate:n=>{m(i,n.oldIndex,n.newIndex,n)}},p=()=>{const n=typeof t=="string"?s?.querySelector(t):u.unrefElement(t);!n||e!==void 0||(e=new N(n,{...c,...r}))},v=()=>{e?.destroy(),e=void 0},h=(n,y)=>{if(y!==void 0)e?.option(n,y);else return e?.option(n)};return u.tryOnMounted(p),u.tryOnScopeDispose(v),{stop:v,start:p,option:h}}function f(t,i,o){const e=t.children[o];t.insertBefore(i,e)}function a(t){t.parentNode&&t.parentNode.removeChild(t)}function m(t,i,o,e=null){e!=null&&(a(e.item),f(e.from,e.item,i));const s=d.isRef(t),r=s?[...d.toValue(t)]:d.toValue(t);if(o>=0&&o<r.length){const c=r.splice(i,1)[0];d.nextTick(()=>{r.splice(o,0,c),s&&(t.value=r)})}}l.insertNodeAt=f,l.moveArrayElement=m,l.removeNode=a,l.useSortable=V})(this.VueUse=this.VueUse||{},VueUse,Sortable,Vue);
|
package/useSortable.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tryOnMounted, tryOnScopeDispose, unrefElement
|
|
1
|
+
import { defaultDocument, tryOnMounted, tryOnScopeDispose, unrefElement } from '@vueuse/core';
|
|
2
2
|
import Sortable from 'sortablejs';
|
|
3
3
|
import { isRef, toValue, nextTick } from 'vue';
|
|
4
4
|
|
|
@@ -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 ?
|
|
15
|
-
if (!target || sortable !==
|
|
14
|
+
const target = typeof el === "string" ? document == null ? void 0 : document.querySelector(el) : unrefElement(el);
|
|
15
|
+
if (!target || sortable !== void 0)
|
|
16
16
|
return;
|
|
17
17
|
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
18
18
|
};
|
|
19
19
|
const stop = () => {
|
|
20
|
-
sortable == null ?
|
|
21
|
-
sortable =
|
|
20
|
+
sortable == null ? void 0 : sortable.destroy();
|
|
21
|
+
sortable = void 0;
|
|
22
22
|
};
|
|
23
23
|
const option = (name, value) => {
|
|
24
|
-
if (value !==
|
|
25
|
-
sortable == null ?
|
|
24
|
+
if (value !== void 0)
|
|
25
|
+
sortable == null ? void 0 : sortable.option(name, value);
|
|
26
26
|
else
|
|
27
|
-
return sortable == null ?
|
|
27
|
+
return sortable == null ? void 0 : sortable.option(name);
|
|
28
28
|
};
|
|
29
29
|
tryOnMounted(start);
|
|
30
30
|
tryOnScopeDispose(stop);
|