@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.
- package/index.cjs +40 -162
- package/index.d.cts +8 -18
- package/index.d.mts +8 -18
- package/index.d.ts +8 -18
- package/index.iife.js +40 -162
- package/index.iife.min.js +1 -1
- package/index.mjs +42 -164
- package/package.json +36 -36
- package/useAsyncValidator/component.cjs +5 -29
- package/useAsyncValidator/component.mjs +5 -29
- package/useAsyncValidator.cjs +3 -21
- package/useAsyncValidator.d.cts +1 -1
- package/useAsyncValidator.d.mts +1 -1
- package/useAsyncValidator.d.ts +1 -1
- package/useAsyncValidator.iife.js +3 -21
- package/useAsyncValidator.iife.min.js +1 -1
- package/useAsyncValidator.mjs +3 -21
- package/useAxios.cjs +5 -21
- package/useAxios.d.cts +1 -1
- package/useAxios.d.mts +1 -1
- package/useAxios.d.ts +1 -1
- package/useAxios.iife.js +5 -21
- package/useAxios.iife.min.js +1 -1
- package/useAxios.mjs +5 -21
- package/useChangeCase.d.cts +2 -14
- package/useChangeCase.d.mts +2 -14
- package/useChangeCase.d.ts +2 -14
- package/useCookies.cjs +2 -18
- package/useCookies.iife.js +2 -18
- package/useCookies.iife.min.js +1 -1
- package/useCookies.mjs +2 -18
- package/useDrauu.cjs +1 -17
- package/useDrauu.d.cts +1 -1
- package/useDrauu.d.mts +1 -1
- package/useDrauu.d.ts +1 -1
- package/useDrauu.iife.js +1 -17
- package/useDrauu.iife.min.js +1 -1
- package/useDrauu.mjs +1 -17
- package/useFocusTrap/component.d.cts +1 -1
- package/useFocusTrap/component.d.mts +1 -1
- package/useFocusTrap/component.d.ts +1 -1
- package/useFocusTrap.cjs +4 -34
- package/useFocusTrap.d.cts +1 -1
- package/useFocusTrap.d.mts +1 -1
- package/useFocusTrap.d.ts +1 -1
- package/useFocusTrap.iife.js +4 -34
- package/useFocusTrap.iife.min.js +1 -1
- package/useFocusTrap.mjs +4 -34
- package/useFuse.d.cts +1 -1
- package/useFuse.d.mts +1 -1
- package/useFuse.d.ts +1 -1
- package/useIDBKeyval.cjs +17 -19
- package/useIDBKeyval.d.cts +8 -6
- package/useIDBKeyval.d.mts +8 -6
- package/useIDBKeyval.d.ts +8 -6
- package/useIDBKeyval.iife.js +18 -21
- package/useIDBKeyval.iife.min.js +1 -1
- package/useIDBKeyval.mjs +18 -20
- package/useJwt.d.cts +1 -1
- package/useJwt.d.mts +1 -1
- package/useJwt.d.ts +1 -1
- package/useNProgress.d.cts +1 -1
- package/useNProgress.d.mts +1 -1
- package/useNProgress.d.ts +1 -1
- package/useSortable/component.cjs +13 -36
- package/useSortable/component.mjs +14 -37
- package/useSortable.cjs +9 -32
- package/useSortable.d.cts +1 -1
- package/useSortable.d.mts +1 -1
- package/useSortable.d.ts +1 -1
- package/useSortable.iife.js +9 -32
- package/useSortable.iife.min.js +1 -1
- package/useSortable.mjs +10 -33
package/index.cjs
CHANGED
|
@@ -16,25 +16,6 @@ var nprogress = require('nprogress');
|
|
|
16
16
|
var QRCode = require('qrcode');
|
|
17
17
|
var Sortable = require('sortablejs');
|
|
18
18
|
|
|
19
|
-
var __defProp$6 = Object.defineProperty;
|
|
20
|
-
var __defProps$2 = Object.defineProperties;
|
|
21
|
-
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
22
|
-
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
23
|
-
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
24
|
-
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
25
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
26
|
-
var __spreadValues$6 = (a, b) => {
|
|
27
|
-
for (var prop in b || (b = {}))
|
|
28
|
-
if (__hasOwnProp$6.call(b, prop))
|
|
29
|
-
__defNormalProp$6(a, prop, b[prop]);
|
|
30
|
-
if (__getOwnPropSymbols$6)
|
|
31
|
-
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
32
|
-
if (__propIsEnum$6.call(b, prop))
|
|
33
|
-
__defNormalProp$6(a, prop, b[prop]);
|
|
34
|
-
}
|
|
35
|
-
return a;
|
|
36
|
-
};
|
|
37
|
-
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
38
19
|
const AsyncValidatorSchema = Schema.default || Schema;
|
|
39
20
|
function useAsyncValidator(value, rules, options = {}) {
|
|
40
21
|
const {
|
|
@@ -94,32 +75,14 @@ function useAsyncValidator(value, rules, options = {}) {
|
|
|
94
75
|
shared.until(isFinished).toBe(true).then(() => resolve(shell)).catch((error) => reject(error));
|
|
95
76
|
});
|
|
96
77
|
}
|
|
97
|
-
return
|
|
78
|
+
return {
|
|
79
|
+
...shell,
|
|
98
80
|
then(onFulfilled, onRejected) {
|
|
99
81
|
return waitUntilFinished().then(onFulfilled, onRejected);
|
|
100
82
|
}
|
|
101
|
-
}
|
|
83
|
+
};
|
|
102
84
|
}
|
|
103
85
|
|
|
104
|
-
var __defProp$5 = Object.defineProperty;
|
|
105
|
-
var __defProps$1 = Object.defineProperties;
|
|
106
|
-
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
107
|
-
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
108
|
-
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
109
|
-
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
110
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
111
|
-
var __spreadValues$5 = (a, b) => {
|
|
112
|
-
for (var prop in b || (b = {}))
|
|
113
|
-
if (__hasOwnProp$5.call(b, prop))
|
|
114
|
-
__defNormalProp$5(a, prop, b[prop]);
|
|
115
|
-
if (__getOwnPropSymbols$5)
|
|
116
|
-
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
117
|
-
if (__propIsEnum$5.call(b, prop))
|
|
118
|
-
__defNormalProp$5(a, prop, b[prop]);
|
|
119
|
-
}
|
|
120
|
-
return a;
|
|
121
|
-
};
|
|
122
|
-
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
123
86
|
function useAxios(...args) {
|
|
124
87
|
const url = typeof args[0] === "string" ? args[0] : void 0;
|
|
125
88
|
const argsPlaceholder = typeof url === "string" ? 1 : 0;
|
|
@@ -196,7 +159,7 @@ function useAxios(...args) {
|
|
|
196
159
|
loading(true);
|
|
197
160
|
executeCounter += 1;
|
|
198
161
|
const currentExecuteCounter = executeCounter;
|
|
199
|
-
instance(_url,
|
|
162
|
+
instance(_url, { ...defaultConfig, ...typeof executeUrl === "object" ? executeUrl : config, cancelToken: cancelToken.token }).then((r) => {
|
|
200
163
|
response.value = r;
|
|
201
164
|
const result2 = r.data;
|
|
202
165
|
data.value = result2;
|
|
@@ -226,7 +189,10 @@ function useAxios(...args) {
|
|
|
226
189
|
abort,
|
|
227
190
|
execute
|
|
228
191
|
};
|
|
229
|
-
return
|
|
192
|
+
return {
|
|
193
|
+
...result,
|
|
194
|
+
...promise
|
|
195
|
+
};
|
|
230
196
|
}
|
|
231
197
|
|
|
232
198
|
var changeCase = /*#__PURE__*/Object.freeze({
|
|
@@ -258,22 +224,6 @@ function useChangeCase(input, type, options) {
|
|
|
258
224
|
});
|
|
259
225
|
}
|
|
260
226
|
|
|
261
|
-
var __defProp$4 = Object.defineProperty;
|
|
262
|
-
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
263
|
-
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
264
|
-
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
265
|
-
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
266
|
-
var __spreadValues$4 = (a, b) => {
|
|
267
|
-
for (var prop in b || (b = {}))
|
|
268
|
-
if (__hasOwnProp$4.call(b, prop))
|
|
269
|
-
__defNormalProp$4(a, prop, b[prop]);
|
|
270
|
-
if (__getOwnPropSymbols$4)
|
|
271
|
-
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
272
|
-
if (__propIsEnum$4.call(b, prop))
|
|
273
|
-
__defNormalProp$4(a, prop, b[prop]);
|
|
274
|
-
}
|
|
275
|
-
return a;
|
|
276
|
-
};
|
|
277
227
|
function createCookies(req) {
|
|
278
228
|
const universalCookie = new Cookie(req ? req.headers.cookie : null);
|
|
279
229
|
return (dependencies, { doNotParse = false, autoUpdateDependencies = false } = {}) => useCookies(dependencies, { doNotParse, autoUpdateDependencies }, universalCookie);
|
|
@@ -304,14 +254,14 @@ function useCookies(dependencies, { doNotParse = false, autoUpdateDependencies =
|
|
|
304
254
|
if (autoUpdateDependencies && watchingDependencies && !watchingDependencies.includes(args[0]))
|
|
305
255
|
watchingDependencies.push(args[0]);
|
|
306
256
|
touches.value;
|
|
307
|
-
return cookies.get(args[0],
|
|
257
|
+
return cookies.get(args[0], { doNotParse, ...args[1] });
|
|
308
258
|
},
|
|
309
259
|
/**
|
|
310
260
|
* Reactive get all cookies
|
|
311
261
|
*/
|
|
312
262
|
getAll: (...args) => {
|
|
313
263
|
touches.value;
|
|
314
|
-
return cookies.getAll(
|
|
264
|
+
return cookies.getAll({ doNotParse, ...args[0] });
|
|
315
265
|
},
|
|
316
266
|
set: (...args) => cookies.set(...args),
|
|
317
267
|
remove: (...args) => cookies.remove(...args),
|
|
@@ -329,22 +279,6 @@ function shouldUpdate(dependencies, newCookies, oldCookies) {
|
|
|
329
279
|
return false;
|
|
330
280
|
}
|
|
331
281
|
|
|
332
|
-
var __defProp$3 = Object.defineProperty;
|
|
333
|
-
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
334
|
-
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
335
|
-
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
336
|
-
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
337
|
-
var __spreadValues$3 = (a, b) => {
|
|
338
|
-
for (var prop in b || (b = {}))
|
|
339
|
-
if (__hasOwnProp$3.call(b, prop))
|
|
340
|
-
__defNormalProp$3(a, prop, b[prop]);
|
|
341
|
-
if (__getOwnPropSymbols$3)
|
|
342
|
-
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
343
|
-
if (__propIsEnum$3.call(b, prop))
|
|
344
|
-
__defNormalProp$3(a, prop, b[prop]);
|
|
345
|
-
}
|
|
346
|
-
return a;
|
|
347
|
-
};
|
|
348
282
|
function useDrauu(target, options) {
|
|
349
283
|
const drauuInstance = vueDemi.ref();
|
|
350
284
|
let disposables = [];
|
|
@@ -417,7 +351,7 @@ function useDrauu(target, options) {
|
|
|
417
351
|
return;
|
|
418
352
|
if (drauuInstance.value)
|
|
419
353
|
cleanup();
|
|
420
|
-
drauuInstance.value = drauu.createDrauu(
|
|
354
|
+
drauuInstance.value = drauu.createDrauu({ el, ...options });
|
|
421
355
|
syncStatus();
|
|
422
356
|
disposables = [
|
|
423
357
|
drauuInstance.value.on("canceled", () => onCanceledHook.trigger()),
|
|
@@ -452,40 +386,9 @@ function useDrauu(target, options) {
|
|
|
452
386
|
};
|
|
453
387
|
}
|
|
454
388
|
|
|
455
|
-
var __defProp$2 = Object.defineProperty;
|
|
456
|
-
var __defProps = Object.defineProperties;
|
|
457
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
458
|
-
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
459
|
-
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
460
|
-
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
461
|
-
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
462
|
-
var __spreadValues$2 = (a, b) => {
|
|
463
|
-
for (var prop in b || (b = {}))
|
|
464
|
-
if (__hasOwnProp$2.call(b, prop))
|
|
465
|
-
__defNormalProp$2(a, prop, b[prop]);
|
|
466
|
-
if (__getOwnPropSymbols$2)
|
|
467
|
-
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
468
|
-
if (__propIsEnum$2.call(b, prop))
|
|
469
|
-
__defNormalProp$2(a, prop, b[prop]);
|
|
470
|
-
}
|
|
471
|
-
return a;
|
|
472
|
-
};
|
|
473
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
474
|
-
var __objRest$1 = (source, exclude) => {
|
|
475
|
-
var target = {};
|
|
476
|
-
for (var prop in source)
|
|
477
|
-
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
478
|
-
target[prop] = source[prop];
|
|
479
|
-
if (source != null && __getOwnPropSymbols$2)
|
|
480
|
-
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
481
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
482
|
-
target[prop] = source[prop];
|
|
483
|
-
}
|
|
484
|
-
return target;
|
|
485
|
-
};
|
|
486
389
|
function useFocusTrap(target, options = {}) {
|
|
487
390
|
let trap;
|
|
488
|
-
const
|
|
391
|
+
const { immediate, ...focusTrapOptions } = options;
|
|
489
392
|
const hasFocus = vueDemi.ref(false);
|
|
490
393
|
const isPaused = vueDemi.ref(false);
|
|
491
394
|
const activate = (opts) => trap && trap.activate(opts);
|
|
@@ -507,7 +410,8 @@ function useFocusTrap(target, options = {}) {
|
|
|
507
410
|
(el) => {
|
|
508
411
|
if (!el)
|
|
509
412
|
return;
|
|
510
|
-
trap = focusTrap.createFocusTrap(el,
|
|
413
|
+
trap = focusTrap.createFocusTrap(el, {
|
|
414
|
+
...focusTrapOptions,
|
|
511
415
|
onActivate() {
|
|
512
416
|
hasFocus.value = true;
|
|
513
417
|
if (options.onActivate)
|
|
@@ -518,7 +422,7 @@ function useFocusTrap(target, options = {}) {
|
|
|
518
422
|
if (options.onDeactivate)
|
|
519
423
|
options.onDeactivate();
|
|
520
424
|
}
|
|
521
|
-
})
|
|
425
|
+
});
|
|
522
426
|
if (immediate)
|
|
523
427
|
activate();
|
|
524
428
|
},
|
|
@@ -574,22 +478,6 @@ function useFuse(search, data, options) {
|
|
|
574
478
|
};
|
|
575
479
|
}
|
|
576
480
|
|
|
577
|
-
var __defProp$1 = Object.defineProperty;
|
|
578
|
-
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
579
|
-
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
580
|
-
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
581
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
582
|
-
var __spreadValues$1 = (a, b) => {
|
|
583
|
-
for (var prop in b || (b = {}))
|
|
584
|
-
if (__hasOwnProp$1.call(b, prop))
|
|
585
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
586
|
-
if (__getOwnPropSymbols$1)
|
|
587
|
-
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
588
|
-
if (__propIsEnum$1.call(b, prop))
|
|
589
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
590
|
-
}
|
|
591
|
-
return a;
|
|
592
|
-
};
|
|
593
481
|
function useIDBKeyval(key, initialValue, options = {}) {
|
|
594
482
|
const {
|
|
595
483
|
flush = "pre",
|
|
@@ -626,7 +514,7 @@ function useIDBKeyval(key, initialValue, options = {}) {
|
|
|
626
514
|
if (Array.isArray(data.value))
|
|
627
515
|
await idbKeyval.update(key, () => JSON.parse(JSON.stringify(data.value)));
|
|
628
516
|
else if (typeof data.value === "object")
|
|
629
|
-
await idbKeyval.update(key, () =>
|
|
517
|
+
await idbKeyval.update(key, () => ({ ...data.value }));
|
|
630
518
|
else
|
|
631
519
|
await idbKeyval.update(key, () => data.value);
|
|
632
520
|
}
|
|
@@ -634,8 +522,21 @@ function useIDBKeyval(key, initialValue, options = {}) {
|
|
|
634
522
|
onError(e);
|
|
635
523
|
}
|
|
636
524
|
}
|
|
637
|
-
|
|
638
|
-
|
|
525
|
+
const {
|
|
526
|
+
pause: pauseWatch,
|
|
527
|
+
resume: resumeWatch
|
|
528
|
+
} = core.watchPausable(data, () => write(), { flush, deep });
|
|
529
|
+
async function setData(value) {
|
|
530
|
+
pauseWatch();
|
|
531
|
+
data.value = value;
|
|
532
|
+
await write();
|
|
533
|
+
resumeWatch();
|
|
534
|
+
}
|
|
535
|
+
return {
|
|
536
|
+
set: setData,
|
|
537
|
+
isFinished,
|
|
538
|
+
data
|
|
539
|
+
};
|
|
639
540
|
}
|
|
640
541
|
|
|
641
542
|
function useJwt(encodedJwt, options = {}) {
|
|
@@ -703,37 +604,9 @@ function useQRCode(text, options) {
|
|
|
703
604
|
return result;
|
|
704
605
|
}
|
|
705
606
|
|
|
706
|
-
var __defProp = Object.defineProperty;
|
|
707
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
708
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
709
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
710
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
711
|
-
var __spreadValues = (a, b) => {
|
|
712
|
-
for (var prop in b || (b = {}))
|
|
713
|
-
if (__hasOwnProp.call(b, prop))
|
|
714
|
-
__defNormalProp(a, prop, b[prop]);
|
|
715
|
-
if (__getOwnPropSymbols)
|
|
716
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
717
|
-
if (__propIsEnum.call(b, prop))
|
|
718
|
-
__defNormalProp(a, prop, b[prop]);
|
|
719
|
-
}
|
|
720
|
-
return a;
|
|
721
|
-
};
|
|
722
|
-
var __objRest = (source, exclude) => {
|
|
723
|
-
var target = {};
|
|
724
|
-
for (var prop in source)
|
|
725
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
726
|
-
target[prop] = source[prop];
|
|
727
|
-
if (source != null && __getOwnPropSymbols)
|
|
728
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
729
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
730
|
-
target[prop] = source[prop];
|
|
731
|
-
}
|
|
732
|
-
return target;
|
|
733
|
-
};
|
|
734
607
|
function useSortable(el, list, options = {}) {
|
|
735
608
|
let sortable;
|
|
736
|
-
const
|
|
609
|
+
const { document = core.defaultDocument, ...resetOptions } = options;
|
|
737
610
|
const defaultOptions = {
|
|
738
611
|
onUpdate: (e) => {
|
|
739
612
|
moveArrayElement(list, e.oldIndex, e.newIndex);
|
|
@@ -743,7 +616,7 @@ function useSortable(el, list, options = {}) {
|
|
|
743
616
|
const target = typeof el === "string" ? document == null ? void 0 : document.querySelector(el) : core.unrefElement(el);
|
|
744
617
|
if (!target)
|
|
745
618
|
return;
|
|
746
|
-
sortable = new Sortable(target,
|
|
619
|
+
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
747
620
|
};
|
|
748
621
|
const stop = () => sortable == null ? void 0 : sortable.destroy();
|
|
749
622
|
const option = (name, value) => {
|
|
@@ -757,10 +630,15 @@ function useSortable(el, list, options = {}) {
|
|
|
757
630
|
return { stop, start, option };
|
|
758
631
|
}
|
|
759
632
|
function moveArrayElement(list, from, to) {
|
|
760
|
-
const
|
|
633
|
+
const _valueIsRef = vueDemi.isRef(list);
|
|
634
|
+
const array = _valueIsRef ? [...core.toValue(list)] : core.toValue(list);
|
|
761
635
|
if (to >= 0 && to < array.length) {
|
|
762
636
|
const element = array.splice(from, 1)[0];
|
|
763
|
-
vueDemi.nextTick(() =>
|
|
637
|
+
vueDemi.nextTick(() => {
|
|
638
|
+
array.splice(to, 0, element);
|
|
639
|
+
if (_valueIsRef)
|
|
640
|
+
list.value = array;
|
|
641
|
+
});
|
|
764
642
|
}
|
|
765
643
|
}
|
|
766
644
|
|
package/index.d.cts
CHANGED
|
@@ -161,19 +161,7 @@ declare const changeCase_pathCase: typeof pathCase;
|
|
|
161
161
|
declare const changeCase_sentenceCase: typeof sentenceCase;
|
|
162
162
|
declare const changeCase_snakeCase: typeof snakeCase;
|
|
163
163
|
declare namespace changeCase {
|
|
164
|
-
export {
|
|
165
|
-
changeCase_camelCase as camelCase,
|
|
166
|
-
changeCase_capitalCase as capitalCase,
|
|
167
|
-
changeCase_constantCase as constantCase,
|
|
168
|
-
changeCase_dotCase as dotCase,
|
|
169
|
-
changeCase_headerCase as headerCase,
|
|
170
|
-
changeCase_noCase as noCase,
|
|
171
|
-
changeCase_paramCase as paramCase,
|
|
172
|
-
changeCase_pascalCase as pascalCase,
|
|
173
|
-
changeCase_pathCase as pathCase,
|
|
174
|
-
changeCase_sentenceCase as sentenceCase,
|
|
175
|
-
changeCase_snakeCase as snakeCase,
|
|
176
|
-
};
|
|
164
|
+
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 };
|
|
177
165
|
}
|
|
178
166
|
|
|
179
167
|
type ChangeCaseType = keyof typeof changeCase;
|
|
@@ -353,16 +341,18 @@ interface UseIDBOptions extends ConfigurableFlush {
|
|
|
353
341
|
*/
|
|
354
342
|
writeDefaults?: boolean;
|
|
355
343
|
}
|
|
344
|
+
interface UseIDBKeyvalReturn<T> {
|
|
345
|
+
data: RemovableRef<T>;
|
|
346
|
+
isFinished: Ref<boolean>;
|
|
347
|
+
set(value: T): Promise<void>;
|
|
348
|
+
}
|
|
356
349
|
/**
|
|
357
350
|
*
|
|
358
351
|
* @param key
|
|
359
352
|
* @param initialValue
|
|
360
353
|
* @param options
|
|
361
354
|
*/
|
|
362
|
-
declare function useIDBKeyval<T>(key: IDBValidKey, initialValue: MaybeRefOrGetter<T>, options?: UseIDBOptions):
|
|
363
|
-
data: RemovableRef<T>;
|
|
364
|
-
isFinished: Ref<boolean>;
|
|
365
|
-
};
|
|
355
|
+
declare function useIDBKeyval<T>(key: IDBValidKey, initialValue: MaybeRefOrGetter<T>, options?: UseIDBOptions): UseIDBKeyvalReturn<T>;
|
|
366
356
|
|
|
367
357
|
interface UseJwtOptions<Fallback> {
|
|
368
358
|
/**
|
|
@@ -434,4 +424,4 @@ declare function useSortable<T>(selector: string, list: MaybeRefOrGetter$1<T[]>,
|
|
|
434
424
|
declare function useSortable<T>(el: MaybeRefOrGetter$1<HTMLElement | null | undefined>, list: MaybeRefOrGetter$1<T[]>, options?: UseSortableOptions): UseSortableReturn;
|
|
435
425
|
declare function moveArrayElement<T>(list: MaybeRefOrGetter$1<T[]>, from: number, to: number): void;
|
|
436
426
|
|
|
437
|
-
export { AsyncValidatorError, ChangeCaseType, EasyUseAxiosReturn, FuseOptions, StrictUseAxiosReturn, UseAsyncValidatorExecuteReturn, UseAsyncValidatorOptions, UseAsyncValidatorReturn, UseAxiosOptions, UseAxiosReturn, UseDrauuOptions, UseDrauuReturn, UseFocusTrapOptions, UseFocusTrapReturn, UseFuseOptions, UseFuseReturn, UseIDBOptions, UseJwtOptions, UseJwtReturn, UseNProgressOptions, UseNProgressReturn, UseSortableOptions, UseSortableReturn, createCookies, moveArrayElement, useAsyncValidator, useAxios, useChangeCase, useCookies, useDrauu, useFocusTrap, useFuse, useIDBKeyval, useJwt, useNProgress, useQRCode, useSortable };
|
|
427
|
+
export { type AsyncValidatorError, type ChangeCaseType, type EasyUseAxiosReturn, type FuseOptions, type StrictUseAxiosReturn, type UseAsyncValidatorExecuteReturn, type UseAsyncValidatorOptions, type UseAsyncValidatorReturn, type UseAxiosOptions, type UseAxiosReturn, type UseDrauuOptions, type UseDrauuReturn, type UseFocusTrapOptions, type UseFocusTrapReturn, type UseFuseOptions, type UseFuseReturn, type UseIDBKeyvalReturn, type UseIDBOptions, type UseJwtOptions, type UseJwtReturn, type UseNProgressOptions, type UseNProgressReturn, type UseSortableOptions, type UseSortableReturn, createCookies, moveArrayElement, useAsyncValidator, useAxios, useChangeCase, useCookies, useDrauu, useFocusTrap, useFuse, useIDBKeyval, useJwt, useNProgress, useQRCode, useSortable };
|
package/index.d.mts
CHANGED
|
@@ -161,19 +161,7 @@ declare const changeCase_pathCase: typeof pathCase;
|
|
|
161
161
|
declare const changeCase_sentenceCase: typeof sentenceCase;
|
|
162
162
|
declare const changeCase_snakeCase: typeof snakeCase;
|
|
163
163
|
declare namespace changeCase {
|
|
164
|
-
export {
|
|
165
|
-
changeCase_camelCase as camelCase,
|
|
166
|
-
changeCase_capitalCase as capitalCase,
|
|
167
|
-
changeCase_constantCase as constantCase,
|
|
168
|
-
changeCase_dotCase as dotCase,
|
|
169
|
-
changeCase_headerCase as headerCase,
|
|
170
|
-
changeCase_noCase as noCase,
|
|
171
|
-
changeCase_paramCase as paramCase,
|
|
172
|
-
changeCase_pascalCase as pascalCase,
|
|
173
|
-
changeCase_pathCase as pathCase,
|
|
174
|
-
changeCase_sentenceCase as sentenceCase,
|
|
175
|
-
changeCase_snakeCase as snakeCase,
|
|
176
|
-
};
|
|
164
|
+
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 };
|
|
177
165
|
}
|
|
178
166
|
|
|
179
167
|
type ChangeCaseType = keyof typeof changeCase;
|
|
@@ -353,16 +341,18 @@ interface UseIDBOptions extends ConfigurableFlush {
|
|
|
353
341
|
*/
|
|
354
342
|
writeDefaults?: boolean;
|
|
355
343
|
}
|
|
344
|
+
interface UseIDBKeyvalReturn<T> {
|
|
345
|
+
data: RemovableRef<T>;
|
|
346
|
+
isFinished: Ref<boolean>;
|
|
347
|
+
set(value: T): Promise<void>;
|
|
348
|
+
}
|
|
356
349
|
/**
|
|
357
350
|
*
|
|
358
351
|
* @param key
|
|
359
352
|
* @param initialValue
|
|
360
353
|
* @param options
|
|
361
354
|
*/
|
|
362
|
-
declare function useIDBKeyval<T>(key: IDBValidKey, initialValue: MaybeRefOrGetter<T>, options?: UseIDBOptions):
|
|
363
|
-
data: RemovableRef<T>;
|
|
364
|
-
isFinished: Ref<boolean>;
|
|
365
|
-
};
|
|
355
|
+
declare function useIDBKeyval<T>(key: IDBValidKey, initialValue: MaybeRefOrGetter<T>, options?: UseIDBOptions): UseIDBKeyvalReturn<T>;
|
|
366
356
|
|
|
367
357
|
interface UseJwtOptions<Fallback> {
|
|
368
358
|
/**
|
|
@@ -434,4 +424,4 @@ declare function useSortable<T>(selector: string, list: MaybeRefOrGetter$1<T[]>,
|
|
|
434
424
|
declare function useSortable<T>(el: MaybeRefOrGetter$1<HTMLElement | null | undefined>, list: MaybeRefOrGetter$1<T[]>, options?: UseSortableOptions): UseSortableReturn;
|
|
435
425
|
declare function moveArrayElement<T>(list: MaybeRefOrGetter$1<T[]>, from: number, to: number): void;
|
|
436
426
|
|
|
437
|
-
export { AsyncValidatorError, ChangeCaseType, EasyUseAxiosReturn, FuseOptions, StrictUseAxiosReturn, UseAsyncValidatorExecuteReturn, UseAsyncValidatorOptions, UseAsyncValidatorReturn, UseAxiosOptions, UseAxiosReturn, UseDrauuOptions, UseDrauuReturn, UseFocusTrapOptions, UseFocusTrapReturn, UseFuseOptions, UseFuseReturn, UseIDBOptions, UseJwtOptions, UseJwtReturn, UseNProgressOptions, UseNProgressReturn, UseSortableOptions, UseSortableReturn, createCookies, moveArrayElement, useAsyncValidator, useAxios, useChangeCase, useCookies, useDrauu, useFocusTrap, useFuse, useIDBKeyval, useJwt, useNProgress, useQRCode, useSortable };
|
|
427
|
+
export { type AsyncValidatorError, type ChangeCaseType, type EasyUseAxiosReturn, type FuseOptions, type StrictUseAxiosReturn, type UseAsyncValidatorExecuteReturn, type UseAsyncValidatorOptions, type UseAsyncValidatorReturn, type UseAxiosOptions, type UseAxiosReturn, type UseDrauuOptions, type UseDrauuReturn, type UseFocusTrapOptions, type UseFocusTrapReturn, type UseFuseOptions, type UseFuseReturn, type UseIDBKeyvalReturn, type UseIDBOptions, type UseJwtOptions, type UseJwtReturn, type UseNProgressOptions, type UseNProgressReturn, type UseSortableOptions, type UseSortableReturn, createCookies, moveArrayElement, useAsyncValidator, useAxios, useChangeCase, useCookies, useDrauu, useFocusTrap, useFuse, useIDBKeyval, useJwt, useNProgress, useQRCode, useSortable };
|
package/index.d.ts
CHANGED
|
@@ -161,19 +161,7 @@ declare const changeCase_pathCase: typeof pathCase;
|
|
|
161
161
|
declare const changeCase_sentenceCase: typeof sentenceCase;
|
|
162
162
|
declare const changeCase_snakeCase: typeof snakeCase;
|
|
163
163
|
declare namespace changeCase {
|
|
164
|
-
export {
|
|
165
|
-
changeCase_camelCase as camelCase,
|
|
166
|
-
changeCase_capitalCase as capitalCase,
|
|
167
|
-
changeCase_constantCase as constantCase,
|
|
168
|
-
changeCase_dotCase as dotCase,
|
|
169
|
-
changeCase_headerCase as headerCase,
|
|
170
|
-
changeCase_noCase as noCase,
|
|
171
|
-
changeCase_paramCase as paramCase,
|
|
172
|
-
changeCase_pascalCase as pascalCase,
|
|
173
|
-
changeCase_pathCase as pathCase,
|
|
174
|
-
changeCase_sentenceCase as sentenceCase,
|
|
175
|
-
changeCase_snakeCase as snakeCase,
|
|
176
|
-
};
|
|
164
|
+
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 };
|
|
177
165
|
}
|
|
178
166
|
|
|
179
167
|
type ChangeCaseType = keyof typeof changeCase;
|
|
@@ -353,16 +341,18 @@ interface UseIDBOptions extends ConfigurableFlush {
|
|
|
353
341
|
*/
|
|
354
342
|
writeDefaults?: boolean;
|
|
355
343
|
}
|
|
344
|
+
interface UseIDBKeyvalReturn<T> {
|
|
345
|
+
data: RemovableRef<T>;
|
|
346
|
+
isFinished: Ref<boolean>;
|
|
347
|
+
set(value: T): Promise<void>;
|
|
348
|
+
}
|
|
356
349
|
/**
|
|
357
350
|
*
|
|
358
351
|
* @param key
|
|
359
352
|
* @param initialValue
|
|
360
353
|
* @param options
|
|
361
354
|
*/
|
|
362
|
-
declare function useIDBKeyval<T>(key: IDBValidKey, initialValue: MaybeRefOrGetter<T>, options?: UseIDBOptions):
|
|
363
|
-
data: RemovableRef<T>;
|
|
364
|
-
isFinished: Ref<boolean>;
|
|
365
|
-
};
|
|
355
|
+
declare function useIDBKeyval<T>(key: IDBValidKey, initialValue: MaybeRefOrGetter<T>, options?: UseIDBOptions): UseIDBKeyvalReturn<T>;
|
|
366
356
|
|
|
367
357
|
interface UseJwtOptions<Fallback> {
|
|
368
358
|
/**
|
|
@@ -434,4 +424,4 @@ declare function useSortable<T>(selector: string, list: MaybeRefOrGetter$1<T[]>,
|
|
|
434
424
|
declare function useSortable<T>(el: MaybeRefOrGetter$1<HTMLElement | null | undefined>, list: MaybeRefOrGetter$1<T[]>, options?: UseSortableOptions): UseSortableReturn;
|
|
435
425
|
declare function moveArrayElement<T>(list: MaybeRefOrGetter$1<T[]>, from: number, to: number): void;
|
|
436
426
|
|
|
437
|
-
export { AsyncValidatorError, ChangeCaseType, EasyUseAxiosReturn, FuseOptions, StrictUseAxiosReturn, UseAsyncValidatorExecuteReturn, UseAsyncValidatorOptions, UseAsyncValidatorReturn, UseAxiosOptions, UseAxiosReturn, UseDrauuOptions, UseDrauuReturn, UseFocusTrapOptions, UseFocusTrapReturn, UseFuseOptions, UseFuseReturn, UseIDBOptions, UseJwtOptions, UseJwtReturn, UseNProgressOptions, UseNProgressReturn, UseSortableOptions, UseSortableReturn, createCookies, moveArrayElement, useAsyncValidator, useAxios, useChangeCase, useCookies, useDrauu, useFocusTrap, useFuse, useIDBKeyval, useJwt, useNProgress, useQRCode, useSortable };
|
|
427
|
+
export { type AsyncValidatorError, type ChangeCaseType, type EasyUseAxiosReturn, type FuseOptions, type StrictUseAxiosReturn, type UseAsyncValidatorExecuteReturn, type UseAsyncValidatorOptions, type UseAsyncValidatorReturn, type UseAxiosOptions, type UseAxiosReturn, type UseDrauuOptions, type UseDrauuReturn, type UseFocusTrapOptions, type UseFocusTrapReturn, type UseFuseOptions, type UseFuseReturn, type UseIDBKeyvalReturn, type UseIDBOptions, type UseJwtOptions, type UseJwtReturn, type UseNProgressOptions, type UseNProgressReturn, type UseSortableOptions, type UseSortableReturn, createCookies, moveArrayElement, useAsyncValidator, useAxios, useChangeCase, useCookies, useDrauu, useFocusTrap, useFuse, useIDBKeyval, useJwt, useNProgress, useQRCode, useSortable };
|