@vueuse/integrations 11.3.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +47 -47
- package/index.d.cts +3 -3
- package/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/index.iife.js +48 -175
- package/index.iife.min.js +1 -1
- package/index.mjs +1 -1
- package/package.json +4 -4
- package/useAsyncValidator/component.cjs +10 -10
- package/useAsyncValidator/component.d.cts +1 -1
- package/useAsyncValidator/component.d.mts +1 -1
- package/useAsyncValidator/component.d.ts +1 -1
- package/useAsyncValidator/component.mjs +1 -1
- package/useAsyncValidator.cjs +8 -8
- package/useAsyncValidator.d.cts +1 -1
- package/useAsyncValidator.d.mts +1 -1
- package/useAsyncValidator.d.ts +1 -1
- package/useAsyncValidator.iife.js +9 -136
- package/useAsyncValidator.iife.min.js +1 -1
- package/useAsyncValidator.mjs +1 -1
- package/useAxios.cjs +7 -7
- package/useAxios.d.cts +1 -1
- package/useAxios.d.mts +1 -1
- package/useAxios.d.ts +1 -1
- package/useAxios.iife.js +8 -135
- package/useAxios.iife.min.js +1 -1
- package/useAxios.mjs +1 -1
- package/useChangeCase.cjs +5 -5
- package/useChangeCase.d.cts +1 -1
- package/useChangeCase.d.mts +1 -1
- package/useChangeCase.d.ts +1 -1
- package/useChangeCase.iife.js +6 -133
- package/useChangeCase.iife.min.js +1 -1
- package/useChangeCase.mjs +1 -1
- package/useCookies.cjs +2 -2
- package/useCookies.iife.js +3 -130
- package/useCookies.iife.min.js +1 -1
- package/useCookies.mjs +1 -1
- package/useDrauu.cjs +9 -9
- package/useDrauu.d.cts +1 -1
- package/useDrauu.d.mts +1 -1
- package/useDrauu.d.ts +1 -1
- package/useDrauu.iife.js +10 -137
- package/useDrauu.iife.min.js +1 -1
- package/useDrauu.mjs +1 -1
- package/useFocusTrap/component.cjs +6 -6
- package/useFocusTrap/component.mjs +1 -1
- package/useFocusTrap.cjs +5 -5
- package/useFocusTrap.d.cts +1 -1
- package/useFocusTrap.d.mts +1 -1
- package/useFocusTrap.d.ts +1 -1
- package/useFocusTrap.iife.js +6 -133
- package/useFocusTrap.iife.min.js +1 -1
- package/useFocusTrap.mjs +1 -1
- package/useFuse.cjs +5 -5
- package/useFuse.d.cts +2 -2
- package/useFuse.d.mts +2 -2
- package/useFuse.d.ts +2 -2
- package/useFuse.iife.js +6 -133
- package/useFuse.iife.min.js +1 -1
- package/useFuse.mjs +1 -1
- package/useIDBKeyval.cjs +4 -4
- package/useIDBKeyval.d.cts +1 -1
- package/useIDBKeyval.d.mts +1 -1
- package/useIDBKeyval.d.ts +1 -1
- package/useIDBKeyval.iife.js +5 -132
- package/useIDBKeyval.iife.min.js +1 -1
- package/useIDBKeyval.mjs +1 -1
- package/useJwt.cjs +3 -3
- package/useJwt.d.cts +1 -1
- package/useJwt.d.mts +1 -1
- package/useJwt.d.ts +1 -1
- package/useJwt.iife.js +4 -131
- package/useJwt.iife.min.js +1 -1
- package/useJwt.mjs +1 -1
- package/useNProgress.cjs +4 -4
- package/useNProgress.d.cts +2 -2
- package/useNProgress.d.mts +2 -2
- package/useNProgress.d.ts +2 -2
- package/useNProgress.iife.js +5 -132
- package/useNProgress.iife.min.js +1 -1
- package/useNProgress.mjs +1 -1
- package/useQRCode.cjs +3 -3
- package/useQRCode.d.cts +1 -1
- package/useQRCode.d.mts +1 -1
- package/useQRCode.d.ts +1 -1
- package/useQRCode.iife.js +4 -131
- package/useQRCode.iife.min.js +1 -1
- package/useQRCode.mjs +1 -1
- package/useSortable/component.cjs +7 -12
- package/useSortable/component.d.cts +1 -1
- package/useSortable/component.d.mts +1 -1
- package/useSortable/component.d.ts +1 -1
- package/useSortable/component.mjs +1 -6
- package/useSortable.cjs +3 -3
- package/useSortable.iife.js +4 -131
- package/useSortable.iife.min.js +1 -1
- package/useSortable.mjs +1 -1
package/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var shared = require('@vueuse/shared');
|
|
4
4
|
var Schema = require('async-validator');
|
|
5
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
6
|
var axios = require('axios');
|
|
7
7
|
var changeCase = require('change-case');
|
|
8
8
|
var Cookie = require('universal-cookie');
|
|
@@ -43,18 +43,18 @@ function useAsyncValidator(value, rules, options = {}) {
|
|
|
43
43
|
manual = false
|
|
44
44
|
} = options;
|
|
45
45
|
const valueRef = shared.toRef(value);
|
|
46
|
-
const errorInfo =
|
|
47
|
-
const isFinished =
|
|
48
|
-
const pass =
|
|
49
|
-
const errors =
|
|
46
|
+
const errorInfo = vue.shallowRef(null);
|
|
47
|
+
const isFinished = vue.ref(true);
|
|
48
|
+
const pass = vue.ref(!immediate || manual);
|
|
49
|
+
const errors = vue.computed(() => {
|
|
50
50
|
var _a;
|
|
51
51
|
return ((_a = errorInfo.value) == null ? void 0 : _a.errors) || [];
|
|
52
52
|
});
|
|
53
|
-
const errorFields =
|
|
53
|
+
const errorFields = vue.computed(() => {
|
|
54
54
|
var _a;
|
|
55
55
|
return ((_a = errorInfo.value) == null ? void 0 : _a.fields) || {};
|
|
56
56
|
});
|
|
57
|
-
const validator =
|
|
57
|
+
const validator = vue.computed(() => new AsyncValidatorSchema(shared.toValue(rules)));
|
|
58
58
|
const execute = async () => {
|
|
59
59
|
isFinished.value = false;
|
|
60
60
|
pass.value = false;
|
|
@@ -75,7 +75,7 @@ function useAsyncValidator(value, rules, options = {}) {
|
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
if (!manual) {
|
|
78
|
-
|
|
78
|
+
vue.watch(
|
|
79
79
|
[valueRef, validator],
|
|
80
80
|
() => execute(),
|
|
81
81
|
{ immediate, deep: true }
|
|
@@ -135,12 +135,12 @@ function useAxios(...args) {
|
|
|
135
135
|
immediate,
|
|
136
136
|
resetOnExecute = false
|
|
137
137
|
} = options;
|
|
138
|
-
const response =
|
|
139
|
-
const data = (shallow ?
|
|
140
|
-
const isFinished =
|
|
141
|
-
const isLoading =
|
|
142
|
-
const isAborted =
|
|
143
|
-
const error =
|
|
138
|
+
const response = vue.shallowRef();
|
|
139
|
+
const data = (shallow ? vue.shallowRef : vue.ref)(initialData);
|
|
140
|
+
const isFinished = vue.ref(false);
|
|
141
|
+
const isLoading = vue.ref(false);
|
|
142
|
+
const isAborted = vue.ref(false);
|
|
143
|
+
const error = vue.shallowRef();
|
|
144
144
|
let abortController = new AbortController();
|
|
145
145
|
const abort = (message) => {
|
|
146
146
|
if (isFinished.value || !isLoading.value)
|
|
@@ -225,16 +225,16 @@ const changeCaseTransforms = /* @__PURE__ */ Object.entries(changeCase__namespac
|
|
|
225
225
|
return acc;
|
|
226
226
|
}, {});
|
|
227
227
|
function useChangeCase(input, type, options) {
|
|
228
|
-
const typeRef =
|
|
228
|
+
const typeRef = vue.computed(() => {
|
|
229
229
|
const t = shared.toValue(type);
|
|
230
230
|
if (!changeCaseTransforms[t])
|
|
231
231
|
throw new Error(`Invalid change case type "${t}"`);
|
|
232
232
|
return t;
|
|
233
233
|
});
|
|
234
234
|
if (typeof input === "function")
|
|
235
|
-
return
|
|
236
|
-
const text =
|
|
237
|
-
return
|
|
235
|
+
return vue.computed(() => changeCaseTransforms[typeRef.value](shared.toValue(input), shared.toValue(options)));
|
|
236
|
+
const text = vue.ref(input);
|
|
237
|
+
return vue.computed({
|
|
238
238
|
get() {
|
|
239
239
|
return changeCaseTransforms[typeRef.value](text.value, shared.toValue(options));
|
|
240
240
|
},
|
|
@@ -251,7 +251,7 @@ function createCookies(req) {
|
|
|
251
251
|
function useCookies(dependencies, { doNotParse = false, autoUpdateDependencies = false } = {}, cookies = new Cookie()) {
|
|
252
252
|
const watchingDependencies = autoUpdateDependencies ? [...dependencies || []] : dependencies;
|
|
253
253
|
let previousCookies = cookies.getAll({ doNotParse: true });
|
|
254
|
-
const touches =
|
|
254
|
+
const touches = vue.ref(0);
|
|
255
255
|
const onChange = () => {
|
|
256
256
|
const newCookies = cookies.getAll({ doNotParse: true });
|
|
257
257
|
if (shouldUpdate(
|
|
@@ -301,18 +301,18 @@ function shouldUpdate(dependencies, newCookies, oldCookies) {
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
function useDrauu(target, options) {
|
|
304
|
-
const drauuInstance =
|
|
304
|
+
const drauuInstance = vue.ref();
|
|
305
305
|
let disposables = [];
|
|
306
306
|
const onChangedHook = core.createEventHook();
|
|
307
307
|
const onCanceledHook = core.createEventHook();
|
|
308
308
|
const onCommittedHook = core.createEventHook();
|
|
309
309
|
const onStartHook = core.createEventHook();
|
|
310
310
|
const onEndHook = core.createEventHook();
|
|
311
|
-
const canUndo =
|
|
312
|
-
const canRedo =
|
|
313
|
-
const altPressed =
|
|
314
|
-
const shiftPressed =
|
|
315
|
-
const brush =
|
|
311
|
+
const canUndo = vue.ref(false);
|
|
312
|
+
const canRedo = vue.ref(false);
|
|
313
|
+
const altPressed = vue.ref(false);
|
|
314
|
+
const shiftPressed = vue.ref(false);
|
|
315
|
+
const brush = vue.ref({
|
|
316
316
|
color: "black",
|
|
317
317
|
size: 3,
|
|
318
318
|
arrowEnd: false,
|
|
@@ -322,7 +322,7 @@ function useDrauu(target, options) {
|
|
|
322
322
|
mode: "draw",
|
|
323
323
|
...options == null ? void 0 : options.brush
|
|
324
324
|
});
|
|
325
|
-
|
|
325
|
+
vue.watch(brush, () => {
|
|
326
326
|
const instance = drauuInstance.value;
|
|
327
327
|
if (instance) {
|
|
328
328
|
instance.brush = brush.value;
|
|
@@ -366,7 +366,7 @@ function useDrauu(target, options) {
|
|
|
366
366
|
shiftPressed.value = drauuInstance.value.shiftPressed;
|
|
367
367
|
}
|
|
368
368
|
};
|
|
369
|
-
|
|
369
|
+
vue.watch(
|
|
370
370
|
() => core.unrefElement(target),
|
|
371
371
|
(el) => {
|
|
372
372
|
if (!el || typeof SVGSVGElement === "undefined" || !(el instanceof SVGSVGElement))
|
|
@@ -411,8 +411,8 @@ function useDrauu(target, options) {
|
|
|
411
411
|
function useFocusTrap(target, options = {}) {
|
|
412
412
|
let trap;
|
|
413
413
|
const { immediate, ...focusTrapOptions } = options;
|
|
414
|
-
const hasFocus =
|
|
415
|
-
const isPaused =
|
|
414
|
+
const hasFocus = vue.ref(false);
|
|
415
|
+
const isPaused = vue.ref(false);
|
|
416
416
|
const activate = (opts) => trap && trap.activate(opts);
|
|
417
417
|
const deactivate = (opts) => trap && trap.deactivate(opts);
|
|
418
418
|
const pause = () => {
|
|
@@ -427,14 +427,14 @@ function useFocusTrap(target, options = {}) {
|
|
|
427
427
|
isPaused.value = false;
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
const targets =
|
|
430
|
+
const targets = vue.computed(() => {
|
|
431
431
|
const _targets = shared.toValue(target);
|
|
432
432
|
return (Array.isArray(_targets) ? _targets : [_targets]).map((el) => {
|
|
433
433
|
const _el = shared.toValue(el);
|
|
434
434
|
return typeof _el === "string" ? _el : core.unrefElement(_el);
|
|
435
435
|
}).filter(shared.notNullish);
|
|
436
436
|
});
|
|
437
|
-
|
|
437
|
+
vue.watch(
|
|
438
438
|
targets,
|
|
439
439
|
(els) => {
|
|
440
440
|
if (!els.length)
|
|
@@ -476,8 +476,8 @@ function useFuse(search, data, options) {
|
|
|
476
476
|
(_b = shared.toValue(options)) == null ? void 0 : _b.fuseOptions
|
|
477
477
|
);
|
|
478
478
|
};
|
|
479
|
-
const fuse =
|
|
480
|
-
|
|
479
|
+
const fuse = vue.ref(createFuse());
|
|
480
|
+
vue.watch(
|
|
481
481
|
() => {
|
|
482
482
|
var _a;
|
|
483
483
|
return (_a = shared.toValue(options)) == null ? void 0 : _a.fuseOptions;
|
|
@@ -487,14 +487,14 @@ function useFuse(search, data, options) {
|
|
|
487
487
|
},
|
|
488
488
|
{ deep: true }
|
|
489
489
|
);
|
|
490
|
-
|
|
490
|
+
vue.watch(
|
|
491
491
|
() => shared.toValue(data),
|
|
492
492
|
(newData) => {
|
|
493
493
|
fuse.value.setCollection(newData);
|
|
494
494
|
},
|
|
495
495
|
{ deep: true }
|
|
496
496
|
);
|
|
497
|
-
const results =
|
|
497
|
+
const results = vue.computed(() => {
|
|
498
498
|
const resolved = shared.toValue(options);
|
|
499
499
|
if ((resolved == null ? void 0 : resolved.matchAllWhenSearchEmpty) && !shared.toValue(search))
|
|
500
500
|
return shared.toValue(data).map((item, index) => ({ item, refIndex: index }));
|
|
@@ -517,8 +517,8 @@ function useIDBKeyval(key, initialValue, options = {}) {
|
|
|
517
517
|
},
|
|
518
518
|
writeDefaults = true
|
|
519
519
|
} = options;
|
|
520
|
-
const isFinished =
|
|
521
|
-
const data = (shallow ?
|
|
520
|
+
const isFinished = vue.ref(false);
|
|
521
|
+
const data = (shallow ? vue.shallowRef : vue.ref)(initialValue);
|
|
522
522
|
const rawInit = shared.toValue(initialValue);
|
|
523
523
|
async function read() {
|
|
524
524
|
try {
|
|
@@ -540,7 +540,7 @@ function useIDBKeyval(key, initialValue, options = {}) {
|
|
|
540
540
|
if (data.value == null) {
|
|
541
541
|
await idbKeyval.del(key);
|
|
542
542
|
} else {
|
|
543
|
-
await idbKeyval.update(key, () =>
|
|
543
|
+
await idbKeyval.update(key, () => vue.toRaw(data.value));
|
|
544
544
|
}
|
|
545
545
|
} catch (e) {
|
|
546
546
|
onError(e);
|
|
@@ -576,8 +576,8 @@ function useJwt(encodedJwt, options = {}) {
|
|
|
576
576
|
return fallbackValue;
|
|
577
577
|
}
|
|
578
578
|
};
|
|
579
|
-
const header =
|
|
580
|
-
const payload =
|
|
579
|
+
const header = vue.computed(() => decodeWithFallback(shared.toValue(encodedJwt), { header: true }));
|
|
580
|
+
const payload = vue.computed(() => decodeWithFallback(shared.toValue(encodedJwt)));
|
|
581
581
|
return {
|
|
582
582
|
header,
|
|
583
583
|
payload
|
|
@@ -585,8 +585,8 @@ function useJwt(encodedJwt, options = {}) {
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
function useNProgress(currentProgress = null, options) {
|
|
588
|
-
const progress =
|
|
589
|
-
const isLoading =
|
|
588
|
+
const progress = vue.ref(currentProgress);
|
|
589
|
+
const isLoading = vue.computed({
|
|
590
590
|
set: (load) => load ? nprogress.start() : nprogress.done(),
|
|
591
591
|
get: () => typeof progress.value === "number" && progress.value < 1
|
|
592
592
|
});
|
|
@@ -597,7 +597,7 @@ function useNProgress(currentProgress = null, options) {
|
|
|
597
597
|
progress.value = n;
|
|
598
598
|
return setProgress.call(nprogress, n);
|
|
599
599
|
};
|
|
600
|
-
|
|
600
|
+
vue.watchEffect(() => {
|
|
601
601
|
if (typeof progress.value === "number" && shared.isClient)
|
|
602
602
|
setProgress.call(nprogress, progress.value);
|
|
603
603
|
});
|
|
@@ -616,8 +616,8 @@ function useNProgress(currentProgress = null, options) {
|
|
|
616
616
|
|
|
617
617
|
function useQRCode(text, options) {
|
|
618
618
|
const src = shared.toRef(text);
|
|
619
|
-
const result =
|
|
620
|
-
|
|
619
|
+
const result = vue.ref("");
|
|
620
|
+
vue.watch(
|
|
621
621
|
src,
|
|
622
622
|
async (value) => {
|
|
623
623
|
if (src.value && shared.isClient)
|
|
@@ -673,11 +673,11 @@ function moveArrayElement(list, from, to, e = null) {
|
|
|
673
673
|
removeNode(e.item);
|
|
674
674
|
insertNodeAt(e.from, e.item, from);
|
|
675
675
|
}
|
|
676
|
-
const _valueIsRef =
|
|
676
|
+
const _valueIsRef = vue.isRef(list);
|
|
677
677
|
const array = _valueIsRef ? [...core.toValue(list)] : core.toValue(list);
|
|
678
678
|
if (to >= 0 && to < array.length) {
|
|
679
679
|
const element = array.splice(from, 1)[0];
|
|
680
|
-
|
|
680
|
+
vue.nextTick(() => {
|
|
681
681
|
array.splice(to, 0, element);
|
|
682
682
|
if (_valueIsRef)
|
|
683
683
|
list.value = array;
|
package/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MaybeRefOrGetter, MaybeRef, ConfigurableFlush, RemovableRef } from '@vueuse/shared';
|
|
2
2
|
import { ValidateError, ValidateOption, Rules } from 'async-validator';
|
|
3
|
-
import
|
|
3
|
+
import * as vue from 'vue';
|
|
4
|
+
import { Ref, ShallowRef, WritableComputedRef, ComputedRef } from 'vue';
|
|
4
5
|
import { AxiosResponse, AxiosRequestConfig, AxiosInstance } from 'axios';
|
|
5
6
|
import * as changeCase from 'change-case';
|
|
6
7
|
import { Options } from 'change-case';
|
|
@@ -10,7 +11,6 @@ import { IncomingMessage } from 'node:http';
|
|
|
10
11
|
import { EventHookOn, MaybeComputedElementRef, Fn, Arrayable, ConfigurableDocument, MaybeRefOrGetter as MaybeRefOrGetter$1 } from '@vueuse/core';
|
|
11
12
|
import { Options as Options$1, Drauu, Brush } from 'drauu';
|
|
12
13
|
import { Options as Options$2, ActivateOptions, DeactivateOptions } from 'focus-trap';
|
|
13
|
-
import * as vue from 'vue-demi';
|
|
14
14
|
import * as fuse_js from 'fuse.js';
|
|
15
15
|
import fuse_js__default, { IFuseOptions, FuseResult } from 'fuse.js';
|
|
16
16
|
import { JwtPayload, JwtHeader } from 'jwt-decode';
|
|
@@ -387,7 +387,7 @@ type UseNProgressOptions = Partial<NProgressOptions>;
|
|
|
387
387
|
*/
|
|
388
388
|
declare function useNProgress(currentProgress?: MaybeRefOrGetter<number | null | undefined>, options?: UseNProgressOptions): {
|
|
389
389
|
isLoading: vue.WritableComputedRef<boolean, boolean>;
|
|
390
|
-
progress: vue.Ref<number | (() => number | null | undefined) | null | undefined, number | vue.Ref<number | null | undefined, number | null | undefined> | vue.ShallowRef<number | null | undefined> | vue.WritableComputedRef<number | null | undefined, number | null | undefined> | vue.ComputedRef<number | null | undefined> | (() => number | null | undefined) | null | undefined>;
|
|
390
|
+
progress: vue.Ref<number | (() => number | null | undefined) | null | undefined, number | vue.Ref<number | null | undefined, number | null | undefined> | vue.ShallowRef<number | null | undefined, number | null | undefined> | vue.WritableComputedRef<number | null | undefined, number | null | undefined> | vue.ComputedRef<number | null | undefined> | (() => number | null | undefined) | null | undefined>;
|
|
391
391
|
start: () => nprogress.NProgress;
|
|
392
392
|
done: (force?: boolean) => nprogress.NProgress;
|
|
393
393
|
remove: () => void;
|
package/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MaybeRefOrGetter, MaybeRef, ConfigurableFlush, RemovableRef } from '@vueuse/shared';
|
|
2
2
|
import { ValidateError, ValidateOption, Rules } from 'async-validator';
|
|
3
|
-
import
|
|
3
|
+
import * as vue from 'vue';
|
|
4
|
+
import { Ref, ShallowRef, WritableComputedRef, ComputedRef } from 'vue';
|
|
4
5
|
import { AxiosResponse, AxiosRequestConfig, AxiosInstance } from 'axios';
|
|
5
6
|
import * as changeCase from 'change-case';
|
|
6
7
|
import { Options } from 'change-case';
|
|
@@ -10,7 +11,6 @@ import { IncomingMessage } from 'node:http';
|
|
|
10
11
|
import { EventHookOn, MaybeComputedElementRef, Fn, Arrayable, ConfigurableDocument, MaybeRefOrGetter as MaybeRefOrGetter$1 } from '@vueuse/core';
|
|
11
12
|
import { Options as Options$1, Drauu, Brush } from 'drauu';
|
|
12
13
|
import { Options as Options$2, ActivateOptions, DeactivateOptions } from 'focus-trap';
|
|
13
|
-
import * as vue from 'vue-demi';
|
|
14
14
|
import * as fuse_js from 'fuse.js';
|
|
15
15
|
import fuse_js__default, { IFuseOptions, FuseResult } from 'fuse.js';
|
|
16
16
|
import { JwtPayload, JwtHeader } from 'jwt-decode';
|
|
@@ -387,7 +387,7 @@ type UseNProgressOptions = Partial<NProgressOptions>;
|
|
|
387
387
|
*/
|
|
388
388
|
declare function useNProgress(currentProgress?: MaybeRefOrGetter<number | null | undefined>, options?: UseNProgressOptions): {
|
|
389
389
|
isLoading: vue.WritableComputedRef<boolean, boolean>;
|
|
390
|
-
progress: vue.Ref<number | (() => number | null | undefined) | null | undefined, number | vue.Ref<number | null | undefined, number | null | undefined> | vue.ShallowRef<number | null | undefined> | vue.WritableComputedRef<number | null | undefined, number | null | undefined> | vue.ComputedRef<number | null | undefined> | (() => number | null | undefined) | null | undefined>;
|
|
390
|
+
progress: vue.Ref<number | (() => number | null | undefined) | null | undefined, number | vue.Ref<number | null | undefined, number | null | undefined> | vue.ShallowRef<number | null | undefined, number | null | undefined> | vue.WritableComputedRef<number | null | undefined, number | null | undefined> | vue.ComputedRef<number | null | undefined> | (() => number | null | undefined) | null | undefined>;
|
|
391
391
|
start: () => nprogress.NProgress;
|
|
392
392
|
done: (force?: boolean) => nprogress.NProgress;
|
|
393
393
|
remove: () => void;
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MaybeRefOrGetter, MaybeRef, ConfigurableFlush, RemovableRef } from '@vueuse/shared';
|
|
2
2
|
import { ValidateError, ValidateOption, Rules } from 'async-validator';
|
|
3
|
-
import
|
|
3
|
+
import * as vue from 'vue';
|
|
4
|
+
import { Ref, ShallowRef, WritableComputedRef, ComputedRef } from 'vue';
|
|
4
5
|
import { AxiosResponse, AxiosRequestConfig, AxiosInstance } from 'axios';
|
|
5
6
|
import * as changeCase from 'change-case';
|
|
6
7
|
import { Options } from 'change-case';
|
|
@@ -10,7 +11,6 @@ import { IncomingMessage } from 'node:http';
|
|
|
10
11
|
import { EventHookOn, MaybeComputedElementRef, Fn, Arrayable, ConfigurableDocument, MaybeRefOrGetter as MaybeRefOrGetter$1 } from '@vueuse/core';
|
|
11
12
|
import { Options as Options$1, Drauu, Brush } from 'drauu';
|
|
12
13
|
import { Options as Options$2, ActivateOptions, DeactivateOptions } from 'focus-trap';
|
|
13
|
-
import * as vue from 'vue-demi';
|
|
14
14
|
import * as fuse_js from 'fuse.js';
|
|
15
15
|
import fuse_js__default, { IFuseOptions, FuseResult } from 'fuse.js';
|
|
16
16
|
import { JwtPayload, JwtHeader } from 'jwt-decode';
|
|
@@ -387,7 +387,7 @@ type UseNProgressOptions = Partial<NProgressOptions>;
|
|
|
387
387
|
*/
|
|
388
388
|
declare function useNProgress(currentProgress?: MaybeRefOrGetter<number | null | undefined>, options?: UseNProgressOptions): {
|
|
389
389
|
isLoading: vue.WritableComputedRef<boolean, boolean>;
|
|
390
|
-
progress: vue.Ref<number | (() => number | null | undefined) | null | undefined, number | vue.Ref<number | null | undefined, number | null | undefined> | vue.ShallowRef<number | null | undefined> | vue.WritableComputedRef<number | null | undefined, number | null | undefined> | vue.ComputedRef<number | null | undefined> | (() => number | null | undefined) | null | undefined>;
|
|
390
|
+
progress: vue.Ref<number | (() => number | null | undefined) | null | undefined, number | vue.Ref<number | null | undefined, number | null | undefined> | vue.ShallowRef<number | null | undefined, number | null | undefined> | vue.WritableComputedRef<number | null | undefined, number | null | undefined> | vue.ComputedRef<number | null | undefined> | (() => number | null | undefined) | null | undefined>;
|
|
391
391
|
start: () => nprogress.NProgress;
|
|
392
392
|
done: (force?: boolean) => nprogress.NProgress;
|
|
393
393
|
remove: () => void;
|