@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.
Files changed (55) hide show
  1. package/index.cjs +42 -42
  2. package/index.d.cts +1 -1
  3. package/index.d.mts +1 -1
  4. package/index.d.ts +1 -1
  5. package/index.iife.js +42 -42
  6. package/index.iife.min.js +1 -1
  7. package/index.mjs +43 -43
  8. package/package.json +5 -5
  9. package/useAsyncValidator/component.cjs +1 -1
  10. package/useAsyncValidator/component.mjs +1 -1
  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 +3 -3
  15. package/useAxios.cjs +8 -8
  16. package/useAxios.iife.js +8 -8
  17. package/useAxios.iife.min.js +1 -1
  18. package/useAxios.mjs +8 -8
  19. package/useCookies.cjs +1 -1
  20. package/useCookies.iife.js +1 -1
  21. package/useCookies.iife.min.js +1 -1
  22. package/useCookies.mjs +2 -2
  23. package/useDrauu.cjs +13 -13
  24. package/useDrauu.iife.js +13 -13
  25. package/useDrauu.iife.min.js +1 -1
  26. package/useDrauu.mjs +14 -14
  27. package/useFocusTrap.cjs +2 -2
  28. package/useFocusTrap.iife.js +2 -2
  29. package/useFocusTrap.iife.min.js +1 -1
  30. package/useFocusTrap.mjs +3 -3
  31. package/useFuse.cjs +5 -5
  32. package/useFuse.iife.js +5 -5
  33. package/useFuse.iife.min.js +1 -1
  34. package/useFuse.mjs +5 -5
  35. package/useIDBKeyval.cjs +1 -1
  36. package/useIDBKeyval.iife.js +1 -1
  37. package/useIDBKeyval.iife.min.js +1 -1
  38. package/useIDBKeyval.mjs +2 -2
  39. package/useJwt.cjs +1 -1
  40. package/useJwt.iife.js +1 -1
  41. package/useJwt.iife.min.js +1 -1
  42. package/useJwt.mjs +1 -1
  43. package/useQRCode.cjs +1 -1
  44. package/useQRCode.d.cts +1 -1
  45. package/useQRCode.d.mts +1 -1
  46. package/useQRCode.d.ts +1 -1
  47. package/useQRCode.iife.js +1 -1
  48. package/useQRCode.iife.min.js +1 -1
  49. package/useQRCode.mjs +2 -2
  50. package/useSortable/component.cjs +3 -3
  51. package/useSortable/component.mjs +4 -4
  52. package/useSortable.cjs +7 -7
  53. package/useSortable.iife.js +7 -7
  54. package/useSortable.iife.min.js +1 -1
  55. 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.ref(false);
13
- const canRedo = vue.ref(false);
14
- const altPressed = vue.ref(false);
15
- const shiftPressed = vue.ref(false);
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: undefined,
21
+ dasharray: void 0,
22
22
  fill: "transparent",
23
23
  mode: "draw",
24
- ...options == null ? undefined : options.brush
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 ? undefined : _a.undo();
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 ? undefined : _a.redo();
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 ? undefined : _a.clear();
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 ? undefined : _a.cancel();
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 ? undefined : _a.load(svg);
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 ? undefined : _a.dump();
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 ? undefined : _a.unmount();
60
+ (_a = drauuInstance.value) == null ? void 0 : _a.unmount();
61
61
  };
62
62
  const syncStatus = () => {
63
63
  if (drauuInstance.value) {
@@ -1 +1 @@
1
- (function(E,t,k,H,a){"use strict";function V(p,r){const n=a.ref();let l=[];const s=t.createEventHook(),d=t.createEventHook(),c=t.createEventHook(),f=t.createEventHook(),i=t.createEventHook(),v=a.ref(!1),h=a.ref(!1),S=a.ref(!1),_=a.ref(!1),u=a.ref({color:"black",size:3,arrowEnd:!1,cornerRadius:0,dasharray:void 0,fill:"transparent",mode:"draw",...r?.brush});a.watch(u,()=>{const e=n.value;e&&(e.brush=u.value,e.mode=u.value.mode)},{deep:!0});const C=()=>{var e;return(e=n.value)==null?void 0:e.undo()},U=()=>{var e;return(e=n.value)==null?void 0:e.redo()},b=()=>{var e;return(e=n.value)==null?void 0:e.clear()},D=()=>{var e;return(e=n.value)==null?void 0:e.cancel()},w=e=>{var o;return(o=n.value)==null?void 0:o.load(e)},y=()=>{var e;return(e=n.value)==null?void 0:e.dump()},m=()=>{var e;l.forEach(o=>o()),(e=n.value)==null||e.unmount()},g=()=>{n.value&&(v.value=n.value.canUndo(),h.value=n.value.canRedo(),S.value=n.value.altPressed,_.value=n.value.shiftPressed)};return a.watch(()=>t.unrefElement(p),e=>{!e||typeof SVGSVGElement>"u"||!(e instanceof SVGSVGElement)||(n.value&&m(),n.value=H.createDrauu({el:e,...r}),g(),l=[n.value.on("canceled",()=>d.trigger()),n.value.on("committed",o=>c.trigger(o)),n.value.on("start",()=>f.trigger()),n.value.on("end",()=>i.trigger()),n.value.on("changed",()=>{g(),s.trigger()})])},{flush:"post"}),k.tryOnScopeDispose(()=>m()),{drauuInstance:n,load:w,dump:y,clear:b,cancel:D,undo:C,redo:U,canUndo:v,canRedo:h,brush:u,onChanged:s.on,onCommitted:c.on,onStart:f.on,onEnd:i.on,onCanceled:d.on}}E.useDrauu=V})(this.VueUse=this.VueUse||{},VueUse,VueUse,Drauu,Vue);
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 = ref(false);
15
- const canRedo = ref(false);
16
- const altPressed = ref(false);
17
- const shiftPressed = ref(false);
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: undefined,
23
+ dasharray: void 0,
24
24
  fill: "transparent",
25
25
  mode: "draw",
26
- ...options == null ? undefined : options.brush
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 ? undefined : _a.undo();
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 ? undefined : _a.redo();
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 ? undefined : _a.clear();
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 ? undefined : _a.cancel();
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 ? undefined : _a.load(svg);
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 ? undefined : _a.dump();
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 ? undefined : _a.unmount();
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.ref(false);
12
- const isPaused = vue.ref(false);
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 = () => {
@@ -4,8 +4,8 @@
4
4
  function useFocusTrap(target, options = {}) {
5
5
  let trap;
6
6
  const { immediate, ...focusTrapOptions } = options;
7
- const hasFocus = vue.ref(false);
8
- const isPaused = vue.ref(false);
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 = () => {
@@ -1 +1 @@
1
- (function(f,u,l,p,a){"use strict";function v(h,s={}){let t;const{immediate:V,...d}=s,c=a.ref(!1),n=a.ref(!1),i=e=>t&&t.activate(e),o=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(h);return u.toArray(e).map(A=>{const r=a.toValue(A);return typeof r=="string"?r:u.unrefElement(r)}).filter(l.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(()=>o()),{hasFocus:c,isPaused:n,activate:i,deactivate:o,pause:m,unpause:T}}f.useFocusTrap=v})(this.VueUse=this.VueUse||{},VueUse,VueUse,focusTrap,Vue);
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 { ref, computed, toValue, watch } from 'vue';
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 = ref(false);
10
- const isPaused = ref(false);
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 ? undefined : _b.fuseOptions
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 ? undefined : _a.fuseOptions;
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 ? undefined : resolved.matchAllWhenSearchEmpty) && !vue.toValue(search))
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 ? undefined : resolved.resultLimit;
37
- return fuse.value.search(vue.toValue(search), limit ? { limit } : undefined);
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 ? undefined : _b.fuseOptions
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 ? undefined : _a.fuseOptions;
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 ? undefined : resolved.matchAllWhenSearchEmpty) && !vue.toValue(search))
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 ? undefined : resolved.resultLimit;
35
- return fuse.value.search(vue.toValue(search), limit ? { limit } : undefined);
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,
@@ -1 +1 @@
1
- (function(o,i,e){"use strict";function c(r,l,s){const a=()=>{var t,u;return new i((t=e.toValue(l))!=null?t:[],(u=e.toValue(s))==null?void 0:u.fuseOptions)},n=e.ref(a());e.watch(()=>{var t;return(t=e.toValue(s))==null?void 0:t.fuseOptions},()=>{n.value=a()},{deep:!0}),e.watch(()=>e.toValue(l),t=>{n.value.setCollection(t)},{deep:!0});const d=e.computed(()=>{const t=e.toValue(s);if(t?.matchAllWhenSearchEmpty&&!e.toValue(r))return e.toValue(l).map((f,V)=>({item:f,refIndex:V}));const u=t?.resultLimit;return n.value.search(e.toValue(r),u?{limit:u}:void 0)});return{fuse:n,results:d}}o.useFuse=c})(this.VueUse=this.VueUse||{},Fuse,Vue);
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 ? undefined : _b.fuseOptions
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 ? undefined : _a.fuseOptions;
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 ? undefined : resolved.matchAllWhenSearchEmpty) && !toValue(search))
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 ? undefined : resolved.resultLimit;
35
- return fuse.value.search(toValue(search), limit ? { limit } : undefined);
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.ref(false);
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() {
@@ -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.cjs CHANGED
@@ -12,7 +12,7 @@ function useJwt(encodedJwt, options = {}) {
12
12
  try {
13
13
  return jwtDecode.jwtDecode(encodedJwt2, options2);
14
14
  } catch (err) {
15
- onError == null ? undefined : onError(err);
15
+ onError == null ? void 0 : onError(err);
16
16
  return fallbackValue;
17
17
  }
18
18
  };
package/useJwt.iife.js CHANGED
@@ -10,7 +10,7 @@
10
10
  try {
11
11
  return jwtDecode.jwtDecode(encodedJwt2, options2);
12
12
  } catch (err) {
13
- onError == null ? undefined : onError(err);
13
+ onError == null ? void 0 : onError(err);
14
14
  return fallbackValue;
15
15
  }
16
16
  };
@@ -1 +1 @@
1
- (function(c,n,e){"use strict";function o(t,a={}){const{onError:u,fallbackValue:l=null}=a,r=(i,h)=>{try{return n.jwtDecode(i,h)}catch(V){return u?.(V),l}},s=e.computed(()=>r(e.toValue(t),{header:!0})),d=e.computed(()=>r(e.toValue(t)));return{header:s,payload:d}}c.useJwt=o})(this.VueUse=this.VueUse||{},jwt_decode,Vue);
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
@@ -10,7 +10,7 @@ function useJwt(encodedJwt, options = {}) {
10
10
  try {
11
11
  return jwtDecode(encodedJwt2, options2);
12
12
  } catch (err) {
13
- onError == null ? undefined : onError(err);
13
+ onError == null ? void 0 : onError(err);
14
14
  return fallbackValue;
15
15
  }
16
16
  };
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
@@ -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
@@ -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
@@ -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) => {
@@ -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 !== undefined)
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 = undefined;
23
+ sortable = void 0;
24
24
  };
25
25
  const option = (name, value) => {
26
- if (value !== undefined)
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, defaultDocument, useVModel } from '@vueuse/core';
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 !== undefined)
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 = undefined;
21
+ sortable = void 0;
22
22
  };
23
23
  const option = (name, value) => {
24
- if (value !== undefined)
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 ? undefined : document.querySelector(el) : core.unrefElement(el);
17
- if (!target || sortable !== undefined)
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 ? undefined : sortable.destroy();
23
- sortable = undefined;
22
+ sortable == null ? void 0 : sortable.destroy();
23
+ sortable = void 0;
24
24
  };
25
25
  const option = (name, value) => {
26
- if (value !== undefined)
27
- sortable == null ? undefined : sortable.option(name, value);
26
+ if (value !== void 0)
27
+ sortable == null ? void 0 : sortable.option(name, value);
28
28
  else
29
- return sortable == null ? undefined : sortable.option(name);
29
+ return sortable == null ? void 0 : sortable.option(name);
30
30
  };
31
31
  core.tryOnMounted(start);
32
32
  core.tryOnScopeDispose(stop);
@@ -10,20 +10,20 @@
10
10
  }
11
11
  };
12
12
  const start = () => {
13
- const target = typeof el === "string" ? document == null ? undefined : document.querySelector(el) : core.unrefElement(el);
14
- if (!target || sortable !== undefined)
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 ? undefined : sortable.destroy();
20
- sortable = undefined;
19
+ sortable == null ? void 0 : sortable.destroy();
20
+ sortable = void 0;
21
21
  };
22
22
  const option = (name, value) => {
23
- if (value !== undefined)
24
- sortable == null ? undefined : sortable.option(name, value);
23
+ if (value !== void 0)
24
+ sortable == null ? void 0 : sortable.option(name, value);
25
25
  else
26
- return sortable == null ? undefined : sortable.option(name);
26
+ return sortable == null ? void 0 : sortable.option(name);
27
27
  };
28
28
  core.tryOnMounted(start);
29
29
  core.tryOnScopeDispose(stop);
@@ -1 +1 @@
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);
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, defaultDocument } from '@vueuse/core';
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 ? undefined : document.querySelector(el) : unrefElement(el);
15
- if (!target || sortable !== undefined)
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 ? undefined : sortable.destroy();
21
- sortable = undefined;
20
+ sortable == null ? void 0 : sortable.destroy();
21
+ sortable = void 0;
22
22
  };
23
23
  const option = (name, value) => {
24
- if (value !== undefined)
25
- sortable == null ? undefined : sortable.option(name, value);
24
+ if (value !== void 0)
25
+ sortable == null ? void 0 : sortable.option(name, value);
26
26
  else
27
- return sortable == null ? undefined : sortable.option(name);
27
+ return sortable == null ? void 0 : sortable.option(name);
28
28
  };
29
29
  tryOnMounted(start);
30
30
  tryOnScopeDispose(stop);