@vueuse/integrations 10.3.0 → 10.4.1

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 (73) hide show
  1. package/index.cjs +40 -162
  2. package/index.d.cts +8 -18
  3. package/index.d.mts +8 -18
  4. package/index.d.ts +8 -18
  5. package/index.iife.js +40 -162
  6. package/index.iife.min.js +1 -1
  7. package/index.mjs +42 -164
  8. package/package.json +36 -36
  9. package/useAsyncValidator/component.cjs +5 -29
  10. package/useAsyncValidator/component.mjs +5 -29
  11. package/useAsyncValidator.cjs +3 -21
  12. package/useAsyncValidator.d.cts +1 -1
  13. package/useAsyncValidator.d.mts +1 -1
  14. package/useAsyncValidator.d.ts +1 -1
  15. package/useAsyncValidator.iife.js +3 -21
  16. package/useAsyncValidator.iife.min.js +1 -1
  17. package/useAsyncValidator.mjs +3 -21
  18. package/useAxios.cjs +5 -21
  19. package/useAxios.d.cts +1 -1
  20. package/useAxios.d.mts +1 -1
  21. package/useAxios.d.ts +1 -1
  22. package/useAxios.iife.js +5 -21
  23. package/useAxios.iife.min.js +1 -1
  24. package/useAxios.mjs +5 -21
  25. package/useChangeCase.d.cts +2 -14
  26. package/useChangeCase.d.mts +2 -14
  27. package/useChangeCase.d.ts +2 -14
  28. package/useCookies.cjs +2 -18
  29. package/useCookies.iife.js +2 -18
  30. package/useCookies.iife.min.js +1 -1
  31. package/useCookies.mjs +2 -18
  32. package/useDrauu.cjs +1 -17
  33. package/useDrauu.d.cts +1 -1
  34. package/useDrauu.d.mts +1 -1
  35. package/useDrauu.d.ts +1 -1
  36. package/useDrauu.iife.js +1 -17
  37. package/useDrauu.iife.min.js +1 -1
  38. package/useDrauu.mjs +1 -17
  39. package/useFocusTrap/component.d.cts +1 -1
  40. package/useFocusTrap/component.d.mts +1 -1
  41. package/useFocusTrap/component.d.ts +1 -1
  42. package/useFocusTrap.cjs +4 -34
  43. package/useFocusTrap.d.cts +1 -1
  44. package/useFocusTrap.d.mts +1 -1
  45. package/useFocusTrap.d.ts +1 -1
  46. package/useFocusTrap.iife.js +4 -34
  47. package/useFocusTrap.iife.min.js +1 -1
  48. package/useFocusTrap.mjs +4 -34
  49. package/useFuse.d.cts +1 -1
  50. package/useFuse.d.mts +1 -1
  51. package/useFuse.d.ts +1 -1
  52. package/useIDBKeyval.cjs +17 -19
  53. package/useIDBKeyval.d.cts +8 -6
  54. package/useIDBKeyval.d.mts +8 -6
  55. package/useIDBKeyval.d.ts +8 -6
  56. package/useIDBKeyval.iife.js +18 -21
  57. package/useIDBKeyval.iife.min.js +1 -1
  58. package/useIDBKeyval.mjs +18 -20
  59. package/useJwt.d.cts +1 -1
  60. package/useJwt.d.mts +1 -1
  61. package/useJwt.d.ts +1 -1
  62. package/useNProgress.d.cts +1 -1
  63. package/useNProgress.d.mts +1 -1
  64. package/useNProgress.d.ts +1 -1
  65. package/useSortable/component.cjs +13 -36
  66. package/useSortable/component.mjs +14 -37
  67. package/useSortable.cjs +9 -32
  68. package/useSortable.d.cts +1 -1
  69. package/useSortable.d.mts +1 -1
  70. package/useSortable.d.ts +1 -1
  71. package/useSortable.iife.js +9 -32
  72. package/useSortable.iife.min.js +1 -1
  73. package/useSortable.mjs +10 -33
@@ -117,25 +117,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
117
117
  ;(function (exports, shared, Schema, vueDemi) {
118
118
  'use strict';
119
119
 
120
- var __defProp = Object.defineProperty;
121
- var __defProps = Object.defineProperties;
122
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
123
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
124
- var __hasOwnProp = Object.prototype.hasOwnProperty;
125
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
126
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
127
- var __spreadValues = (a, b) => {
128
- for (var prop in b || (b = {}))
129
- if (__hasOwnProp.call(b, prop))
130
- __defNormalProp(a, prop, b[prop]);
131
- if (__getOwnPropSymbols)
132
- for (var prop of __getOwnPropSymbols(b)) {
133
- if (__propIsEnum.call(b, prop))
134
- __defNormalProp(a, prop, b[prop]);
135
- }
136
- return a;
137
- };
138
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
139
120
  const AsyncValidatorSchema = Schema.default || Schema;
140
121
  function useAsyncValidator(value, rules, options = {}) {
141
122
  const {
@@ -195,11 +176,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
195
176
  shared.until(isFinished).toBe(true).then(() => resolve(shell)).catch((error) => reject(error));
196
177
  });
197
178
  }
198
- return __spreadProps(__spreadValues({}, shell), {
179
+ return {
180
+ ...shell,
199
181
  then(onFulfilled, onRejected) {
200
182
  return waitUntilFinished().then(onFulfilled, onRejected);
201
183
  }
202
- });
184
+ };
203
185
  }
204
186
 
205
187
  exports.useAsyncValidator = useAsyncValidator;
@@ -1 +1 @@
1
- var VueDemi=function(r,n,v){if(r.install)return r;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),r;if(n.version.slice(0,4)==="2.7."){let o=function(i,f){var c,y={},h={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(u,d){return y[u]=d,this},directive:function(u,d){return d?(n.directive(u,d),h):n.directive(u)},mount:function(u,d){return c||(c=new n(Object.assign({propsData:f},i,{provide:Object.assign(y,i.provide)})),c.$mount(u,d),c)},unmount:function(){c&&(c.$destroy(),c=void 0)}};return h};var P=o;for(var e in n)r[e]=n[e];r.isVue2=!0,r.isVue3=!1,r.install=function(){},r.Vue=n,r.Vue2=n,r.version=n.version,r.warn=n.util.warn,r.hasInjectionContext=()=>!!r.getCurrentInstance(),r.createApp=o}else if(n.version.slice(0,2)==="2.")if(v){for(var e in v)r[e]=v[e];r.isVue2=!0,r.isVue3=!1,r.install=function(){},r.Vue=n,r.Vue2=n,r.version=n.version,r.hasInjectionContext=()=>!!r.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var e in n)r[e]=n[e];r.isVue2=!1,r.isVue3=!0,r.install=function(){},r.Vue=n,r.Vue2=void 0,r.version=n.version,r.set=function(o,i,f){return Array.isArray(o)?(o.length=Math.max(o.length,i),o.splice(i,1,f),f):(o[i]=f,f)},r.del=function(o,i){if(Array.isArray(o)){o.splice(i,1);return}delete o[i]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return r}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(r,n,v,e){"use strict";var P=Object.defineProperty,o=Object.defineProperties,i=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,h=(a,t,s)=>t in a?P(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,u=(a,t)=>{for(var s in t||(t={}))c.call(t,s)&&h(a,s,t[s]);if(f)for(var s of f(t))y.call(t,s)&&h(a,s,t[s]);return a},d=(a,t)=>o(a,i(t));const U=v.default||v;function R(a,t,s={}){const{validateOption:E={},immediate:b=!0,manual:A=!1}=s,I=n.toRef(a),p=e.shallowRef(null),_=e.ref(!0),w=e.ref(!b||A),j=e.computed(()=>{var l;return((l=p.value)==null?void 0:l.errors)||[]}),g=e.computed(()=>{var l;return((l=p.value)==null?void 0:l.fields)||{}}),x=e.computed(()=>new U(n.toValue(t))),C=async()=>{_.value=!1,w.value=!1;try{await x.value.validate(I.value,E),w.value=!0,p.value=null}catch(l){p.value=l}finally{_.value=!0}return{pass:w.value,errorInfo:p.value,errors:j.value,errorFields:g.value}};A||e.watch([I,x],()=>C(),{immediate:b,deep:!0});const F={isFinished:_,pass:w,errors:j,errorInfo:p,errorFields:g,execute:C};function S(){return new Promise((l,O)=>{n.until(_).toBe(!0).then(()=>l(F)).catch($=>O($))})}return d(u({},F),{then(l,O){return S().then(l,O)}})}r.useAsyncValidator=R})(this.VueUse=this.VueUse||{},VueUse,AsyncValidator,VueDemi);
1
+ var VueDemi=function(n,r,f){if(n.install)return n;if(!r)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),n;if(r.version.slice(0,4)==="2.7."){let e=function(o,c){var i,v={},d={config:r.config,use:r.use.bind(r),mixin:r.mixin.bind(r),component:r.component.bind(r),provide:function(a,l){return v[a]=l,this},directive:function(a,l){return l?(r.directive(a,l),d):r.directive(a)},mount:function(a,l){return i||(i=new r(Object.assign({propsData:c},o,{provide:Object.assign(v,o.provide)})),i.$mount(a,l),i)},unmount:function(){i&&(i.$destroy(),i=void 0)}};return d};var A=e;for(var t in r)n[t]=r[t];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version,n.warn=r.util.warn,n.hasInjectionContext=()=>!!n.getCurrentInstance(),n.createApp=e}else if(r.version.slice(0,2)==="2.")if(f){for(var t in f)n[t]=f[t];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=r,n.Vue2=r,n.version=r.version,n.hasInjectionContext=()=>!!n.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(r.version.slice(0,2)==="3."){for(var t in r)n[t]=r[t];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=r,n.Vue2=void 0,n.version=r.version,n.set=function(e,o,c){return Array.isArray(e)?(e.length=Math.max(e.length,o),e.splice(o,1,c),c):(e[o]=c,c)},n.del=function(e,o){if(Array.isArray(e)){e.splice(o,1);return}delete e[o]}}else console.error("[vue-demi] Vue version "+r.version+" is unsupported.");return n}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(n,r,f,t){"use strict";const A=f.default||f;function e(o,c,i={}){const{validateOption:v={},immediate:d=!0,manual:a=!1}=i,l=r.toRef(o),u=t.shallowRef(null),p=t.ref(!0),h=t.ref(!d||a),b=t.computed(()=>{var s;return((s=u.value)==null?void 0:s.errors)||[]}),w=t.computed(()=>{var s;return((s=u.value)==null?void 0:s.fields)||{}}),I=t.computed(()=>new A(r.toValue(c))),x=async()=>{p.value=!1,h.value=!1;try{await I.value.validate(l.value,v),h.value=!0,u.value=null}catch(s){u.value=s}finally{p.value=!0}return{pass:h.value,errorInfo:u.value,errors:b.value,errorFields:w.value}};a||t.watch([l,I],()=>x(),{immediate:d,deep:!0});const C={isFinished:p,pass:h,errors:b,errorInfo:u,errorFields:w,execute:x};function j(){return new Promise((s,y)=>{r.until(p).toBe(!0).then(()=>s(C)).catch(F=>y(F))})}return{...C,then(s,y){return j().then(s,y)}}}n.useAsyncValidator=e})(this.VueUse=this.VueUse||{},VueUse,AsyncValidator,VueDemi);
@@ -2,25 +2,6 @@ import { toRef, toValue, until } from '@vueuse/shared';
2
2
  import Schema from 'async-validator';
3
3
  import { shallowRef, ref, computed, watch } from 'vue-demi';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __defProps = Object.defineProperties;
7
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
5
  const AsyncValidatorSchema = Schema.default || Schema;
25
6
  function useAsyncValidator(value, rules, options = {}) {
26
7
  const {
@@ -80,11 +61,12 @@ function useAsyncValidator(value, rules, options = {}) {
80
61
  until(isFinished).toBe(true).then(() => resolve(shell)).catch((error) => reject(error));
81
62
  });
82
63
  }
83
- return __spreadProps(__spreadValues({}, shell), {
64
+ return {
65
+ ...shell,
84
66
  then(onFulfilled, onRejected) {
85
67
  return waitUntilFinished().then(onFulfilled, onRejected);
86
68
  }
87
- });
69
+ };
88
70
  }
89
71
 
90
72
  export { useAsyncValidator };
package/useAxios.cjs CHANGED
@@ -4,25 +4,6 @@ var vueDemi = require('vue-demi');
4
4
  var shared = require('@vueuse/shared');
5
5
  var axios = require('axios');
6
6
 
7
- var __defProp = Object.defineProperty;
8
- var __defProps = Object.defineProperties;
9
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
10
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
11
- var __hasOwnProp = Object.prototype.hasOwnProperty;
12
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
- var __spreadValues = (a, b) => {
15
- for (var prop in b || (b = {}))
16
- if (__hasOwnProp.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- if (__getOwnPropSymbols)
19
- for (var prop of __getOwnPropSymbols(b)) {
20
- if (__propIsEnum.call(b, prop))
21
- __defNormalProp(a, prop, b[prop]);
22
- }
23
- return a;
24
- };
25
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
7
  function useAxios(...args) {
27
8
  const url = typeof args[0] === "string" ? args[0] : void 0;
28
9
  const argsPlaceholder = typeof url === "string" ? 1 : 0;
@@ -99,7 +80,7 @@ function useAxios(...args) {
99
80
  loading(true);
100
81
  executeCounter += 1;
101
82
  const currentExecuteCounter = executeCounter;
102
- instance(_url, __spreadProps(__spreadValues(__spreadValues({}, defaultConfig), typeof executeUrl === "object" ? executeUrl : config), { cancelToken: cancelToken.token })).then((r) => {
83
+ instance(_url, { ...defaultConfig, ...typeof executeUrl === "object" ? executeUrl : config, cancelToken: cancelToken.token }).then((r) => {
103
84
  response.value = r;
104
85
  const result2 = r.data;
105
86
  data.value = result2;
@@ -129,7 +110,10 @@ function useAxios(...args) {
129
110
  abort,
130
111
  execute
131
112
  };
132
- return __spreadValues(__spreadValues({}, result), promise);
113
+ return {
114
+ ...result,
115
+ ...promise
116
+ };
133
117
  }
134
118
 
135
119
  exports.useAxios = useAxios;
package/useAxios.d.cts CHANGED
@@ -91,4 +91,4 @@ declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(config?: Axios
91
91
  declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(instance?: AxiosInstance): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
92
92
  declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(config?: AxiosRequestConfig<D>, instance?: AxiosInstance): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
93
93
 
94
- export { EasyUseAxiosReturn, StrictUseAxiosReturn, UseAxiosOptions, UseAxiosReturn, useAxios };
94
+ export { type EasyUseAxiosReturn, type StrictUseAxiosReturn, type UseAxiosOptions, type UseAxiosReturn, useAxios };
package/useAxios.d.mts CHANGED
@@ -91,4 +91,4 @@ declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(config?: Axios
91
91
  declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(instance?: AxiosInstance): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
92
92
  declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(config?: AxiosRequestConfig<D>, instance?: AxiosInstance): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
93
93
 
94
- export { EasyUseAxiosReturn, StrictUseAxiosReturn, UseAxiosOptions, UseAxiosReturn, useAxios };
94
+ export { type EasyUseAxiosReturn, type StrictUseAxiosReturn, type UseAxiosOptions, type UseAxiosReturn, useAxios };
package/useAxios.d.ts CHANGED
@@ -91,4 +91,4 @@ declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(config?: Axios
91
91
  declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(instance?: AxiosInstance): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
92
92
  declare function useAxios<T = any, R = AxiosResponse<T>, D = any>(config?: AxiosRequestConfig<D>, instance?: AxiosInstance): EasyUseAxiosReturn<T, R, D> & Promise<EasyUseAxiosReturn<T, R, D>>;
93
93
 
94
- export { EasyUseAxiosReturn, StrictUseAxiosReturn, UseAxiosOptions, UseAxiosReturn, useAxios };
94
+ export { type EasyUseAxiosReturn, type StrictUseAxiosReturn, type UseAxiosOptions, type UseAxiosReturn, useAxios };
package/useAxios.iife.js CHANGED
@@ -117,25 +117,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
117
117
  ;(function (exports, vueDemi, shared, axios) {
118
118
  'use strict';
119
119
 
120
- var __defProp = Object.defineProperty;
121
- var __defProps = Object.defineProperties;
122
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
123
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
124
- var __hasOwnProp = Object.prototype.hasOwnProperty;
125
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
126
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
127
- var __spreadValues = (a, b) => {
128
- for (var prop in b || (b = {}))
129
- if (__hasOwnProp.call(b, prop))
130
- __defNormalProp(a, prop, b[prop]);
131
- if (__getOwnPropSymbols)
132
- for (var prop of __getOwnPropSymbols(b)) {
133
- if (__propIsEnum.call(b, prop))
134
- __defNormalProp(a, prop, b[prop]);
135
- }
136
- return a;
137
- };
138
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
139
120
  function useAxios(...args) {
140
121
  const url = typeof args[0] === "string" ? args[0] : void 0;
141
122
  const argsPlaceholder = typeof url === "string" ? 1 : 0;
@@ -212,7 +193,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
212
193
  loading(true);
213
194
  executeCounter += 1;
214
195
  const currentExecuteCounter = executeCounter;
215
- instance(_url, __spreadProps(__spreadValues(__spreadValues({}, defaultConfig), typeof executeUrl === "object" ? executeUrl : config), { cancelToken: cancelToken.token })).then((r) => {
196
+ instance(_url, { ...defaultConfig, ...typeof executeUrl === "object" ? executeUrl : config, cancelToken: cancelToken.token }).then((r) => {
216
197
  response.value = r;
217
198
  const result2 = r.data;
218
199
  data.value = result2;
@@ -242,7 +223,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
242
223
  abort,
243
224
  execute
244
225
  };
245
- return __spreadValues(__spreadValues({}, result), promise);
226
+ return {
227
+ ...result,
228
+ ...promise
229
+ };
246
230
  }
247
231
 
248
232
  exports.useAxios = useAxios;
@@ -1 +1 @@
1
- var VueDemi=function(e,n,v){if(e.install)return e;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),e;if(n.version.slice(0,4)==="2.7."){let i=function(c,u){var f,y={},w={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(a,p){return y[a]=p,this},directive:function(a,p){return p?(n.directive(a,p),w):n.directive(a)},mount:function(a,p){return f||(f=new n(Object.assign({propsData:u},c,{provide:Object.assign(y,c.provide)})),f.$mount(a,p),f)},unmount:function(){f&&(f.$destroy(),f=void 0)}};return w};var S=i;for(var l in n)e[l]=n[l];e.isVue2=!0,e.isVue3=!1,e.install=function(){},e.Vue=n,e.Vue2=n,e.version=n.version,e.warn=n.util.warn,e.hasInjectionContext=()=>!!e.getCurrentInstance(),e.createApp=i}else if(n.version.slice(0,2)==="2.")if(v){for(var l in v)e[l]=v[l];e.isVue2=!0,e.isVue3=!1,e.install=function(){},e.Vue=n,e.Vue2=n,e.version=n.version,e.hasInjectionContext=()=>!!e.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var l in n)e[l]=n[l];e.isVue2=!1,e.isVue3=!0,e.install=function(){},e.Vue=n,e.Vue2=void 0,e.version=n.version,e.set=function(i,c,u){return Array.isArray(i)?(i.length=Math.max(i.length,c),i.splice(c,1,u),u):(i[c]=u,u)},e.del=function(i,c){if(Array.isArray(i)){i.splice(c,1);return}delete i[c]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return e}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(e,n,v,l){"use strict";var S=Object.defineProperty,i=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,w=(t,r,o)=>r in t?S(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,a=(t,r)=>{for(var o in r||(r={}))f.call(r,o)&&w(t,o,r[o]);if(u)for(var o of u(r))y.call(r,o)&&w(t,o,r[o]);return t},p=(t,r)=>i(t,c(r));function z(...t){const r=typeof t[0]=="string"?t[0]:void 0,o=typeof r=="string"?1:0;let T={},A=l,b={immediate:!!o,shallow:!0};const I=s=>!!s?.request;t.length>0+o&&(I(t[0+o])?A=t[0+o]:T=t[0+o]),t.length>1+o&&I(t[1+o])&&(A=t[1+o]),(t.length===2+o&&!I(t[1+o])||t.length===3+o)&&(b=t[t.length-1]);const{initialData:F,shallow:G,onSuccess:H=v.noop,onError:J=v.noop,immediate:K,resetOnExecute:Q=!1}=b,L=n.shallowRef(),C=(G?n.shallowRef:n.ref)(F),h=n.ref(!1),P=n.ref(!1),j=n.ref(!1),_=n.shallowRef(),N=l.CancelToken.source;let x=N();const E=s=>{h.value||!P.value||(x.cancel(s),x=N(),j.value=!0,P.value=!1,h.value=!1)},U=s=>{P.value=s,h.value=!s},W=()=>{Q&&(C.value=F)},$=()=>new Promise((s,O)=>{v.until(h).toBe(!0).then(()=>_.value?O(_.value):s(q))}),R={then:(...s)=>$().then(...s),catch:(...s)=>$().catch(...s)};let g=0;const k=(s=r,O={})=>{_.value=void 0;const B=typeof s=="string"?s:r??O.url;if(B===void 0)return _.value=new l.AxiosError(l.AxiosError.ERR_INVALID_URL),h.value=!0,R;W(),E(),U(!0),g+=1;const X=g;return A(B,p(a(a({},T),typeof s=="object"?s:O),{cancelToken:x.token})).then(d=>{L.value=d;const M=d.data;C.value=M,H(M)}).catch(d=>{_.value=d,J(d)}).finally(()=>{var d;(d=b.onFinish)==null||d.call(b),X===g&&U(!1)}),R};K&&r&&k();const q={response:L,data:C,error:_,isFinished:h,isLoading:P,cancel:E,isAborted:j,isCanceled:j,abort:E,execute:k};return a(a({},q),R)}e.useAxios=z})(this.VueUse=this.VueUse||{},VueDemi,VueUse,axios);
1
+ var VueDemi=function(e,n,u){if(e.install)return e;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),e;if(n.version.slice(0,4)==="2.7."){let t=function(i,o){var l,v={},d={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(c,f){return v[c]=f,this},directive:function(c,f){return f?(n.directive(c,f),d):n.directive(c)},mount:function(c,f){return l||(l=new n(Object.assign({propsData:o},i,{provide:Object.assign(v,i.provide)})),l.$mount(c,f),l)},unmount:function(){l&&(l.$destroy(),l=void 0)}};return d};var R=t;for(var r in n)e[r]=n[r];e.isVue2=!0,e.isVue3=!1,e.install=function(){},e.Vue=n,e.Vue2=n,e.version=n.version,e.warn=n.util.warn,e.hasInjectionContext=()=>!!e.getCurrentInstance(),e.createApp=t}else if(n.version.slice(0,2)==="2.")if(u){for(var r in u)e[r]=u[r];e.isVue2=!0,e.isVue3=!1,e.install=function(){},e.Vue=n,e.Vue2=n,e.version=n.version,e.hasInjectionContext=()=>!!e.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var r in n)e[r]=n[r];e.isVue2=!1,e.isVue3=!0,e.install=function(){},e.Vue=n,e.Vue2=void 0,e.version=n.version,e.set=function(t,i,o){return Array.isArray(t)?(t.length=Math.max(t.length,i),t.splice(i,1,o),o):(t[i]=o,o)},e.del=function(t,i){if(Array.isArray(t)){t.splice(i,1);return}delete t[i]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return e}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(e,n,u,r){"use strict";function R(...t){const i=typeof t[0]=="string"?t[0]:void 0,o=typeof i=="string"?1:0;let l={},v=r,d={immediate:!!o,shallow:!0};const c=s=>!!s?.request;t.length>0+o&&(c(t[0+o])?v=t[0+o]:l=t[0+o]),t.length>1+o&&c(t[1+o])&&(v=t[1+o]),(t.length===2+o&&!c(t[1+o])||t.length===3+o)&&(d=t[t.length-1]);const{initialData:f,shallow:S,onSuccess:U=u.noop,onError:$=u.noop,immediate:q,resetOnExecute:B=!1}=d,j=n.shallowRef(),w=(S?n.shallowRef:n.ref)(f),p=n.ref(!1),A=n.ref(!1),y=n.ref(!1),h=n.shallowRef(),P=r.CancelToken.source;let C=P();const x=s=>{p.value||!A.value||(C.cancel(s),C=P(),y.value=!0,A.value=!1,p.value=!1)},T=s=>{A.value=s,p.value=!s},M=()=>{B&&(w.value=f)},_=()=>new Promise((s,b)=>{u.until(p).toBe(!0).then(()=>h.value?b(h.value):s(F))}),I={then:(...s)=>_().then(...s),catch:(...s)=>_().catch(...s)};let E=0;const k=(s=i,b={})=>{h.value=void 0;const L=typeof s=="string"?s:i??b.url;if(L===void 0)return h.value=new r.AxiosError(r.AxiosError.ERR_INVALID_URL),p.value=!0,I;M(),x(),T(!0),E+=1;const N=E;return v(L,{...l,...typeof s=="object"?s:b,cancelToken:C.token}).then(a=>{j.value=a;const O=a.data;w.value=O,U(O)}).catch(a=>{h.value=a,$(a)}).finally(()=>{var a;(a=d.onFinish)==null||a.call(d),N===E&&T(!1)}),I};q&&i&&k();const F={response:j,data:w,error:h,isFinished:p,isLoading:A,cancel:x,isAborted:y,isCanceled:y,abort:x,execute:k};return{...F,...I}}e.useAxios=R})(this.VueUse=this.VueUse||{},VueDemi,VueUse,axios);
package/useAxios.mjs CHANGED
@@ -2,25 +2,6 @@ import { shallowRef, ref } from 'vue-demi';
2
2
  import { noop, until } from '@vueuse/shared';
3
3
  import axios, { AxiosError } from 'axios';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __defProps = Object.defineProperties;
7
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
5
  function useAxios(...args) {
25
6
  const url = typeof args[0] === "string" ? args[0] : void 0;
26
7
  const argsPlaceholder = typeof url === "string" ? 1 : 0;
@@ -97,7 +78,7 @@ function useAxios(...args) {
97
78
  loading(true);
98
79
  executeCounter += 1;
99
80
  const currentExecuteCounter = executeCounter;
100
- instance(_url, __spreadProps(__spreadValues(__spreadValues({}, defaultConfig), typeof executeUrl === "object" ? executeUrl : config), { cancelToken: cancelToken.token })).then((r) => {
81
+ instance(_url, { ...defaultConfig, ...typeof executeUrl === "object" ? executeUrl : config, cancelToken: cancelToken.token }).then((r) => {
101
82
  response.value = r;
102
83
  const result2 = r.data;
103
84
  data.value = result2;
@@ -127,7 +108,10 @@ function useAxios(...args) {
127
108
  abort,
128
109
  execute
129
110
  };
130
- return __spreadValues(__spreadValues({}, result), promise);
111
+ return {
112
+ ...result,
113
+ ...promise
114
+ };
131
115
  }
132
116
 
133
117
  export { useAxios };
@@ -14,23 +14,11 @@ declare const changeCase_pathCase: typeof pathCase;
14
14
  declare const changeCase_sentenceCase: typeof sentenceCase;
15
15
  declare const changeCase_snakeCase: typeof snakeCase;
16
16
  declare namespace changeCase {
17
- export {
18
- changeCase_camelCase as camelCase,
19
- changeCase_capitalCase as capitalCase,
20
- changeCase_constantCase as constantCase,
21
- changeCase_dotCase as dotCase,
22
- changeCase_headerCase as headerCase,
23
- changeCase_noCase as noCase,
24
- changeCase_paramCase as paramCase,
25
- changeCase_pascalCase as pascalCase,
26
- changeCase_pathCase as pathCase,
27
- changeCase_sentenceCase as sentenceCase,
28
- changeCase_snakeCase as snakeCase,
29
- };
17
+ export { changeCase_camelCase as camelCase, changeCase_capitalCase as capitalCase, changeCase_constantCase as constantCase, changeCase_dotCase as dotCase, changeCase_headerCase as headerCase, changeCase_noCase as noCase, changeCase_paramCase as paramCase, changeCase_pascalCase as pascalCase, changeCase_pathCase as pathCase, changeCase_sentenceCase as sentenceCase, changeCase_snakeCase as snakeCase };
30
18
  }
31
19
 
32
20
  type ChangeCaseType = keyof typeof changeCase;
33
21
  declare function useChangeCase(input: MaybeRef<string>, type: ChangeCaseType, options?: Options | undefined): WritableComputedRef<string>;
34
22
  declare function useChangeCase(input: MaybeRefOrGetter<string>, type: ChangeCaseType, options?: Options | undefined): ComputedRef<string>;
35
23
 
36
- export { ChangeCaseType, useChangeCase };
24
+ export { type ChangeCaseType, useChangeCase };
@@ -14,23 +14,11 @@ declare const changeCase_pathCase: typeof pathCase;
14
14
  declare const changeCase_sentenceCase: typeof sentenceCase;
15
15
  declare const changeCase_snakeCase: typeof snakeCase;
16
16
  declare namespace changeCase {
17
- export {
18
- changeCase_camelCase as camelCase,
19
- changeCase_capitalCase as capitalCase,
20
- changeCase_constantCase as constantCase,
21
- changeCase_dotCase as dotCase,
22
- changeCase_headerCase as headerCase,
23
- changeCase_noCase as noCase,
24
- changeCase_paramCase as paramCase,
25
- changeCase_pascalCase as pascalCase,
26
- changeCase_pathCase as pathCase,
27
- changeCase_sentenceCase as sentenceCase,
28
- changeCase_snakeCase as snakeCase,
29
- };
17
+ export { changeCase_camelCase as camelCase, changeCase_capitalCase as capitalCase, changeCase_constantCase as constantCase, changeCase_dotCase as dotCase, changeCase_headerCase as headerCase, changeCase_noCase as noCase, changeCase_paramCase as paramCase, changeCase_pascalCase as pascalCase, changeCase_pathCase as pathCase, changeCase_sentenceCase as sentenceCase, changeCase_snakeCase as snakeCase };
30
18
  }
31
19
 
32
20
  type ChangeCaseType = keyof typeof changeCase;
33
21
  declare function useChangeCase(input: MaybeRef<string>, type: ChangeCaseType, options?: Options | undefined): WritableComputedRef<string>;
34
22
  declare function useChangeCase(input: MaybeRefOrGetter<string>, type: ChangeCaseType, options?: Options | undefined): ComputedRef<string>;
35
23
 
36
- export { ChangeCaseType, useChangeCase };
24
+ export { type ChangeCaseType, useChangeCase };
@@ -14,23 +14,11 @@ declare const changeCase_pathCase: typeof pathCase;
14
14
  declare const changeCase_sentenceCase: typeof sentenceCase;
15
15
  declare const changeCase_snakeCase: typeof snakeCase;
16
16
  declare namespace changeCase {
17
- export {
18
- changeCase_camelCase as camelCase,
19
- changeCase_capitalCase as capitalCase,
20
- changeCase_constantCase as constantCase,
21
- changeCase_dotCase as dotCase,
22
- changeCase_headerCase as headerCase,
23
- changeCase_noCase as noCase,
24
- changeCase_paramCase as paramCase,
25
- changeCase_pascalCase as pascalCase,
26
- changeCase_pathCase as pathCase,
27
- changeCase_sentenceCase as sentenceCase,
28
- changeCase_snakeCase as snakeCase,
29
- };
17
+ export { changeCase_camelCase as camelCase, changeCase_capitalCase as capitalCase, changeCase_constantCase as constantCase, changeCase_dotCase as dotCase, changeCase_headerCase as headerCase, changeCase_noCase as noCase, changeCase_paramCase as paramCase, changeCase_pascalCase as pascalCase, changeCase_pathCase as pathCase, changeCase_sentenceCase as sentenceCase, changeCase_snakeCase as snakeCase };
30
18
  }
31
19
 
32
20
  type ChangeCaseType = keyof typeof changeCase;
33
21
  declare function useChangeCase(input: MaybeRef<string>, type: ChangeCaseType, options?: Options | undefined): WritableComputedRef<string>;
34
22
  declare function useChangeCase(input: MaybeRefOrGetter<string>, type: ChangeCaseType, options?: Options | undefined): ComputedRef<string>;
35
23
 
36
- export { ChangeCaseType, useChangeCase };
24
+ export { type ChangeCaseType, useChangeCase };
package/useCookies.cjs CHANGED
@@ -4,22 +4,6 @@ var shared = require('@vueuse/shared');
4
4
  var vueDemi = require('vue-demi');
5
5
  var Cookie = require('universal-cookie');
6
6
 
7
- var __defProp = Object.defineProperty;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
7
  function createCookies(req) {
24
8
  const universalCookie = new Cookie(req ? req.headers.cookie : null);
25
9
  return (dependencies, { doNotParse = false, autoUpdateDependencies = false } = {}) => useCookies(dependencies, { doNotParse, autoUpdateDependencies }, universalCookie);
@@ -50,14 +34,14 @@ function useCookies(dependencies, { doNotParse = false, autoUpdateDependencies =
50
34
  if (autoUpdateDependencies && watchingDependencies && !watchingDependencies.includes(args[0]))
51
35
  watchingDependencies.push(args[0]);
52
36
  touches.value;
53
- return cookies.get(args[0], __spreadValues({ doNotParse }, args[1]));
37
+ return cookies.get(args[0], { doNotParse, ...args[1] });
54
38
  },
55
39
  /**
56
40
  * Reactive get all cookies
57
41
  */
58
42
  getAll: (...args) => {
59
43
  touches.value;
60
- return cookies.getAll(__spreadValues({ doNotParse }, args[0]));
44
+ return cookies.getAll({ doNotParse, ...args[0] });
61
45
  },
62
46
  set: (...args) => cookies.set(...args),
63
47
  remove: (...args) => cookies.remove(...args),
@@ -117,22 +117,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
117
117
  ;(function (exports, shared, vueDemi, Cookie) {
118
118
  'use strict';
119
119
 
120
- var __defProp = Object.defineProperty;
121
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
122
- var __hasOwnProp = Object.prototype.hasOwnProperty;
123
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
124
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
125
- var __spreadValues = (a, b) => {
126
- for (var prop in b || (b = {}))
127
- if (__hasOwnProp.call(b, prop))
128
- __defNormalProp(a, prop, b[prop]);
129
- if (__getOwnPropSymbols)
130
- for (var prop of __getOwnPropSymbols(b)) {
131
- if (__propIsEnum.call(b, prop))
132
- __defNormalProp(a, prop, b[prop]);
133
- }
134
- return a;
135
- };
136
120
  function createCookies(req) {
137
121
  const universalCookie = new Cookie(req ? req.headers.cookie : null);
138
122
  return (dependencies, { doNotParse = false, autoUpdateDependencies = false } = {}) => useCookies(dependencies, { doNotParse, autoUpdateDependencies }, universalCookie);
@@ -163,14 +147,14 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
163
147
  if (autoUpdateDependencies && watchingDependencies && !watchingDependencies.includes(args[0]))
164
148
  watchingDependencies.push(args[0]);
165
149
  touches.value;
166
- return cookies.get(args[0], __spreadValues({ doNotParse }, args[1]));
150
+ return cookies.get(args[0], { doNotParse, ...args[1] });
167
151
  },
168
152
  /**
169
153
  * Reactive get all cookies
170
154
  */
171
155
  getAll: (...args) => {
172
156
  touches.value;
173
- return cookies.getAll(__spreadValues({ doNotParse }, args[0]));
157
+ return cookies.getAll({ doNotParse, ...args[0] });
174
158
  },
175
159
  set: (...args) => cookies.set(...args),
176
160
  remove: (...args) => cookies.remove(...args),
@@ -1 +1 @@
1
- var VueDemi=function(n,e,h){if(n.install)return n;if(!e)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),n;if(e.version.slice(0,4)==="2.7."){let i=function(a,v){var u,C={},g={config:e.config,use:e.use.bind(e),mixin:e.mixin.bind(e),component:e.component.bind(e),provide:function(c,d){return C[c]=d,this},directive:function(c,d){return d?(e.directive(c,d),g):e.directive(c)},mount:function(c,d){return u||(u=new e(Object.assign({propsData:v},a,{provide:Object.assign(C,a.provide)})),u.$mount(c,d),u)},unmount:function(){u&&(u.$destroy(),u=void 0)}};return g};var w=i;for(var l in e)n[l]=e[l];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=e,n.Vue2=e,n.version=e.version,n.warn=e.util.warn,n.hasInjectionContext=()=>!!n.getCurrentInstance(),n.createApp=i}else if(e.version.slice(0,2)==="2.")if(h){for(var l in h)n[l]=h[l];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=e,n.Vue2=e,n.version=e.version,n.hasInjectionContext=()=>!!n.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(e.version.slice(0,2)==="3."){for(var l in e)n[l]=e[l];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=e,n.Vue2=void 0,n.version=e.version,n.set=function(i,a,v){return Array.isArray(i)?(i.length=Math.max(i.length,a),i.splice(a,1,v),v):(i[a]=v,v)},n.del=function(i,a){if(Array.isArray(i)){i.splice(a,1);return}delete i[a]}}else console.error("[vue-demi] Vue version "+e.version+" is unsupported.");return n}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(n,e,h,l){"use strict";var w=Object.defineProperty,i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,u=(s,r,t)=>r in s?w(s,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[r]=t,C=(s,r)=>{for(var t in r||(r={}))a.call(r,t)&&u(s,t,r[t]);if(i)for(var t of i(r))v.call(r,t)&&u(s,t,r[t]);return s};function g(s){const r=new l(s?s.headers.cookie:null);return(t,{doNotParse:f=!1,autoUpdateDependencies:p=!1}={})=>c(t,{doNotParse:f,autoUpdateDependencies:p},r)}function c(s,{doNotParse:r=!1,autoUpdateDependencies:t=!1}={},f=new l){const p=t?[...s||[]]:s;let _=f.getAll({doNotParse:!0});const y=h.ref(0),b=()=>{const o=f.getAll({doNotParse:!0});d(p||null,o,_)&&y.value++,_=o};return f.addChangeListener(b),e.tryOnScopeDispose(()=>{f.removeChangeListener(b)}),{get:(...o)=>(t&&p&&!p.includes(o[0])&&p.push(o[0]),y.value,f.get(o[0],C({doNotParse:r},o[1]))),getAll:(...o)=>(y.value,f.getAll(C({doNotParse:r},o[0]))),set:(...o)=>f.set(...o),remove:(...o)=>f.remove(...o),addChangeListener:(...o)=>f.addChangeListener(...o),removeChangeListener:(...o)=>f.removeChangeListener(...o)}}function d(s,r,t){if(!s)return!0;for(const f of s)if(r[f]!==t[f])return!0;return!1}n.createCookies=g,n.useCookies=c})(this.VueUse=this.VueUse||{},VueUse,VueDemi,UniversalCookie);
1
+ var VueDemi=function(n,e,d){if(n.install)return n;if(!e)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),n;if(e.version.slice(0,4)==="2.7."){let s=function(u,i){var o,a={},r={config:e.config,use:e.use.bind(e),mixin:e.mixin.bind(e),component:e.component.bind(e),provide:function(f,c){return a[f]=c,this},directive:function(f,c){return c?(e.directive(f,c),r):e.directive(f)},mount:function(f,c){return o||(o=new e(Object.assign({propsData:i},u,{provide:Object.assign(a,u.provide)})),o.$mount(f,c),o)},unmount:function(){o&&(o.$destroy(),o=void 0)}};return r};var p=s;for(var l in e)n[l]=e[l];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=e,n.Vue2=e,n.version=e.version,n.warn=e.util.warn,n.hasInjectionContext=()=>!!n.getCurrentInstance(),n.createApp=s}else if(e.version.slice(0,2)==="2.")if(d){for(var l in d)n[l]=d[l];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=e,n.Vue2=e,n.version=e.version,n.hasInjectionContext=()=>!!n.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(e.version.slice(0,2)==="3."){for(var l in e)n[l]=e[l];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=e,n.Vue2=void 0,n.version=e.version,n.set=function(s,u,i){return Array.isArray(s)?(s.length=Math.max(s.length,u),s.splice(u,1,i),i):(s[u]=i,i)},n.del=function(s,u){if(Array.isArray(s)){s.splice(u,1);return}delete s[u]}}else console.error("[vue-demi] Vue version "+e.version+" is unsupported.");return n}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(n,e,d,l){"use strict";function p(i){const o=new l(i?i.headers.cookie:null);return(a,{doNotParse:r=!1,autoUpdateDependencies:f=!1}={})=>s(a,{doNotParse:r,autoUpdateDependencies:f},o)}function s(i,{doNotParse:o=!1,autoUpdateDependencies:a=!1}={},r=new l){const f=a?[...i||[]]:i;let c=r.getAll({doNotParse:!0});const v=d.ref(0),h=()=>{const t=r.getAll({doNotParse:!0});u(f||null,t,c)&&v.value++,c=t};return r.addChangeListener(h),e.tryOnScopeDispose(()=>{r.removeChangeListener(h)}),{get:(...t)=>(a&&f&&!f.includes(t[0])&&f.push(t[0]),v.value,r.get(t[0],{doNotParse:o,...t[1]})),getAll:(...t)=>(v.value,r.getAll({doNotParse:o,...t[0]})),set:(...t)=>r.set(...t),remove:(...t)=>r.remove(...t),addChangeListener:(...t)=>r.addChangeListener(...t),removeChangeListener:(...t)=>r.removeChangeListener(...t)}}function u(i,o,a){if(!i)return!0;for(const r of i)if(o[r]!==a[r])return!0;return!1}n.createCookies=p,n.useCookies=s})(this.VueUse=this.VueUse||{},VueUse,VueDemi,UniversalCookie);
package/useCookies.mjs CHANGED
@@ -2,22 +2,6 @@ import { tryOnScopeDispose } from '@vueuse/shared';
2
2
  import { ref } from 'vue-demi';
3
3
  import Cookie from 'universal-cookie';
4
4
 
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __spreadValues = (a, b) => {
11
- for (var prop in b || (b = {}))
12
- if (__hasOwnProp.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- if (__getOwnPropSymbols)
15
- for (var prop of __getOwnPropSymbols(b)) {
16
- if (__propIsEnum.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- }
19
- return a;
20
- };
21
5
  function createCookies(req) {
22
6
  const universalCookie = new Cookie(req ? req.headers.cookie : null);
23
7
  return (dependencies, { doNotParse = false, autoUpdateDependencies = false } = {}) => useCookies(dependencies, { doNotParse, autoUpdateDependencies }, universalCookie);
@@ -48,14 +32,14 @@ function useCookies(dependencies, { doNotParse = false, autoUpdateDependencies =
48
32
  if (autoUpdateDependencies && watchingDependencies && !watchingDependencies.includes(args[0]))
49
33
  watchingDependencies.push(args[0]);
50
34
  touches.value;
51
- return cookies.get(args[0], __spreadValues({ doNotParse }, args[1]));
35
+ return cookies.get(args[0], { doNotParse, ...args[1] });
52
36
  },
53
37
  /**
54
38
  * Reactive get all cookies
55
39
  */
56
40
  getAll: (...args) => {
57
41
  touches.value;
58
- return cookies.getAll(__spreadValues({ doNotParse }, args[0]));
42
+ return cookies.getAll({ doNotParse, ...args[0] });
59
43
  },
60
44
  set: (...args) => cookies.set(...args),
61
45
  remove: (...args) => cookies.remove(...args),
package/useDrauu.cjs CHANGED
@@ -5,22 +5,6 @@ var drauu = require('drauu');
5
5
  var core = require('@vueuse/core');
6
6
  var shared = require('@vueuse/shared');
7
7
 
8
- var __defProp = Object.defineProperty;
9
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
8
  function useDrauu(target, options) {
25
9
  const drauuInstance = vueDemi.ref();
26
10
  let disposables = [];
@@ -93,7 +77,7 @@ function useDrauu(target, options) {
93
77
  return;
94
78
  if (drauuInstance.value)
95
79
  cleanup();
96
- drauuInstance.value = drauu.createDrauu(__spreadValues({ el }, options));
80
+ drauuInstance.value = drauu.createDrauu({ el, ...options });
97
81
  syncStatus();
98
82
  disposables = [
99
83
  drauuInstance.value.on("canceled", () => onCanceledHook.trigger()),
package/useDrauu.d.cts CHANGED
@@ -29,4 +29,4 @@ interface UseDrauuReturn {
29
29
  */
30
30
  declare function useDrauu(target: MaybeComputedElementRef, options?: UseDrauuOptions): UseDrauuReturn;
31
31
 
32
- export { UseDrauuOptions, UseDrauuReturn, useDrauu };
32
+ export { type UseDrauuOptions, type UseDrauuReturn, useDrauu };
package/useDrauu.d.mts CHANGED
@@ -29,4 +29,4 @@ interface UseDrauuReturn {
29
29
  */
30
30
  declare function useDrauu(target: MaybeComputedElementRef, options?: UseDrauuOptions): UseDrauuReturn;
31
31
 
32
- export { UseDrauuOptions, UseDrauuReturn, useDrauu };
32
+ export { type UseDrauuOptions, type UseDrauuReturn, useDrauu };
package/useDrauu.d.ts CHANGED
@@ -29,4 +29,4 @@ interface UseDrauuReturn {
29
29
  */
30
30
  declare function useDrauu(target: MaybeComputedElementRef, options?: UseDrauuOptions): UseDrauuReturn;
31
31
 
32
- export { UseDrauuOptions, UseDrauuReturn, useDrauu };
32
+ export { type UseDrauuOptions, type UseDrauuReturn, useDrauu };
package/useDrauu.iife.js CHANGED
@@ -117,22 +117,6 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
117
117
  ;(function (exports, vueDemi, drauu, core, shared) {
118
118
  'use strict';
119
119
 
120
- var __defProp = Object.defineProperty;
121
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
122
- var __hasOwnProp = Object.prototype.hasOwnProperty;
123
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
124
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
125
- var __spreadValues = (a, b) => {
126
- for (var prop in b || (b = {}))
127
- if (__hasOwnProp.call(b, prop))
128
- __defNormalProp(a, prop, b[prop]);
129
- if (__getOwnPropSymbols)
130
- for (var prop of __getOwnPropSymbols(b)) {
131
- if (__propIsEnum.call(b, prop))
132
- __defNormalProp(a, prop, b[prop]);
133
- }
134
- return a;
135
- };
136
120
  function useDrauu(target, options) {
137
121
  const drauuInstance = vueDemi.ref();
138
122
  let disposables = [];
@@ -205,7 +189,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
205
189
  return;
206
190
  if (drauuInstance.value)
207
191
  cleanup();
208
- drauuInstance.value = drauu.createDrauu(__spreadValues({ el }, options));
192
+ drauuInstance.value = drauu.createDrauu({ el, ...options });
209
193
  syncStatus();
210
194
  disposables = [
211
195
  drauuInstance.value.on("canceled", () => onCanceledHook.trigger()),