@vueuse/shared 12.4.0 → 12.6.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 +57 -40
- package/index.d.cts +26 -11
- package/index.d.mts +26 -11
- package/index.d.ts +26 -11
- package/index.iife.js +57 -40
- package/index.iife.min.js +1 -1
- package/index.mjs +57 -40
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -9,13 +9,13 @@ function computedEager(fn, options) {
|
|
|
9
9
|
result.value = fn();
|
|
10
10
|
}, {
|
|
11
11
|
...options,
|
|
12
|
-
flush: (_a = options == null ?
|
|
12
|
+
flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
|
|
13
13
|
});
|
|
14
14
|
return vue.readonly(result);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
function computedWithControl(source, fn) {
|
|
18
|
-
let v =
|
|
18
|
+
let v = void 0;
|
|
19
19
|
let track;
|
|
20
20
|
let trigger;
|
|
21
21
|
const dirty = vue.ref(true);
|
|
@@ -25,7 +25,7 @@ function computedWithControl(source, fn) {
|
|
|
25
25
|
};
|
|
26
26
|
vue.watch(source, update, { flush: "sync" });
|
|
27
27
|
const get = typeof fn === "function" ? fn : fn.get;
|
|
28
|
-
const set = typeof fn === "function" ?
|
|
28
|
+
const set = typeof fn === "function" ? void 0 : fn.set;
|
|
29
29
|
const result = vue.customRef((_track, _trigger) => {
|
|
30
30
|
track = _track;
|
|
31
31
|
trigger = _trigger;
|
|
@@ -39,7 +39,7 @@ function computedWithControl(source, fn) {
|
|
|
39
39
|
return v;
|
|
40
40
|
},
|
|
41
41
|
set(v2) {
|
|
42
|
-
set == null ?
|
|
42
|
+
set == null ? void 0 : set(v2);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
});
|
|
@@ -101,7 +101,7 @@ const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
|
101
101
|
const injectLocal = (...args) => {
|
|
102
102
|
var _a;
|
|
103
103
|
const key = args[0];
|
|
104
|
-
const instance = (_a = vue.getCurrentInstance()) == null ?
|
|
104
|
+
const instance = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
105
105
|
if (instance == null && !vue.hasInjectionContext())
|
|
106
106
|
throw new Error("injectLocal must be called in setup");
|
|
107
107
|
if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))
|
|
@@ -111,7 +111,7 @@ const injectLocal = (...args) => {
|
|
|
111
111
|
|
|
112
112
|
const provideLocal = (key, value) => {
|
|
113
113
|
var _a;
|
|
114
|
-
const instance = (_a = vue.getCurrentInstance()) == null ?
|
|
114
|
+
const instance = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
115
115
|
if (instance == null)
|
|
116
116
|
throw new Error("provideLocal must be called in setup");
|
|
117
117
|
if (!localProvidedStateMap.has(instance))
|
|
@@ -122,8 +122,8 @@ const provideLocal = (key, value) => {
|
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
function createInjectionState(composable, options) {
|
|
125
|
-
const key = (options == null ?
|
|
126
|
-
const defaultValue = options == null ?
|
|
125
|
+
const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState");
|
|
126
|
+
const defaultValue = options == null ? void 0 : options.defaultValue;
|
|
127
127
|
const useProvidingState = (...args) => {
|
|
128
128
|
const state = composable(...args);
|
|
129
129
|
provideLocal(key, state);
|
|
@@ -141,8 +141,8 @@ function createSharedComposable(composable) {
|
|
|
141
141
|
subscribers -= 1;
|
|
142
142
|
if (scope && subscribers <= 0) {
|
|
143
143
|
scope.stop();
|
|
144
|
-
state =
|
|
145
|
-
scope =
|
|
144
|
+
state = void 0;
|
|
145
|
+
scope = void 0;
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
return (...args) => {
|
|
@@ -209,7 +209,7 @@ function makeDestructurable(obj, arr) {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
function reactify(fn, options) {
|
|
212
|
-
const unrefFn = (options == null ?
|
|
212
|
+
const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? vue.unref : vue.toValue;
|
|
213
213
|
return function(...args) {
|
|
214
214
|
return vue.computed(() => fn.apply(this, args.map((i) => unrefFn(i))));
|
|
215
215
|
};
|
|
@@ -305,7 +305,7 @@ const hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);
|
|
|
305
305
|
const isIOS = /* @__PURE__ */ getIsIOS();
|
|
306
306
|
function getIsIOS() {
|
|
307
307
|
var _a, _b;
|
|
308
|
-
return isClient && ((_a = window == null ?
|
|
308
|
+
return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
function createFilterWrapper(filter, fn) {
|
|
@@ -328,12 +328,13 @@ function debounceFilter(ms, options = {}) {
|
|
|
328
328
|
lastRejector();
|
|
329
329
|
lastRejector = noop;
|
|
330
330
|
};
|
|
331
|
+
let lastInvoker;
|
|
331
332
|
const filter = (invoke) => {
|
|
332
333
|
const duration = vue.toValue(ms);
|
|
333
334
|
const maxDuration = vue.toValue(options.maxWait);
|
|
334
335
|
if (timer)
|
|
335
336
|
_clearTimeout(timer);
|
|
336
|
-
if (duration <= 0 || maxDuration !==
|
|
337
|
+
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
337
338
|
if (maxTimer) {
|
|
338
339
|
_clearTimeout(maxTimer);
|
|
339
340
|
maxTimer = null;
|
|
@@ -342,12 +343,13 @@ function debounceFilter(ms, options = {}) {
|
|
|
342
343
|
}
|
|
343
344
|
return new Promise((resolve, reject) => {
|
|
344
345
|
lastRejector = options.rejectOnCancel ? reject : resolve;
|
|
346
|
+
lastInvoker = invoke;
|
|
345
347
|
if (maxDuration && !maxTimer) {
|
|
346
348
|
maxTimer = setTimeout(() => {
|
|
347
349
|
if (timer)
|
|
348
350
|
_clearTimeout(timer);
|
|
349
351
|
maxTimer = null;
|
|
350
|
-
resolve(
|
|
352
|
+
resolve(lastInvoker());
|
|
351
353
|
}, maxDuration);
|
|
352
354
|
}
|
|
353
355
|
timer = setTimeout(() => {
|
|
@@ -377,7 +379,7 @@ function throttleFilter(...args) {
|
|
|
377
379
|
const clear = () => {
|
|
378
380
|
if (timer) {
|
|
379
381
|
clearTimeout(timer);
|
|
380
|
-
timer =
|
|
382
|
+
timer = void 0;
|
|
381
383
|
lastRejector();
|
|
382
384
|
lastRejector = noop;
|
|
383
385
|
}
|
|
@@ -414,8 +416,11 @@ function throttleFilter(...args) {
|
|
|
414
416
|
};
|
|
415
417
|
return filter;
|
|
416
418
|
}
|
|
417
|
-
function pausableFilter(extendFilter = bypassFilter) {
|
|
418
|
-
const
|
|
419
|
+
function pausableFilter(extendFilter = bypassFilter, options = {}) {
|
|
420
|
+
const {
|
|
421
|
+
initialState = "active"
|
|
422
|
+
} = options;
|
|
423
|
+
const isActive = toRef(initialState === "active");
|
|
419
424
|
function pause() {
|
|
420
425
|
isActive.value = false;
|
|
421
426
|
}
|
|
@@ -463,7 +468,7 @@ function createSingletonPromise(fn) {
|
|
|
463
468
|
}
|
|
464
469
|
wrapper.reset = async () => {
|
|
465
470
|
const _prev = _promise;
|
|
466
|
-
_promise =
|
|
471
|
+
_promise = void 0;
|
|
467
472
|
if (_prev)
|
|
468
473
|
await _prev;
|
|
469
474
|
};
|
|
@@ -479,7 +484,7 @@ function increaseWithUnit(target, delta) {
|
|
|
479
484
|
var _a;
|
|
480
485
|
if (typeof target === "number")
|
|
481
486
|
return target + delta;
|
|
482
|
-
const value = ((_a = target.match(/^-?\d+\.?\d*/)) == null ?
|
|
487
|
+
const value = ((_a = target.match(/^-?\d+\.?\d*/)) == null ? void 0 : _a[0]) || "";
|
|
483
488
|
const unit = target.slice(value.length);
|
|
484
489
|
const result = Number.parseFloat(value) + delta;
|
|
485
490
|
if (Number.isNaN(result))
|
|
@@ -492,7 +497,7 @@ function pxValue(px) {
|
|
|
492
497
|
function objectPick(obj, keys, omitUndefined = false) {
|
|
493
498
|
return keys.reduce((n, k) => {
|
|
494
499
|
if (k in obj) {
|
|
495
|
-
if (!omitUndefined || obj[k] !==
|
|
500
|
+
if (!omitUndefined || obj[k] !== void 0)
|
|
496
501
|
n[k] = obj[k];
|
|
497
502
|
}
|
|
498
503
|
return n;
|
|
@@ -500,7 +505,7 @@ function objectPick(obj, keys, omitUndefined = false) {
|
|
|
500
505
|
}
|
|
501
506
|
function objectOmit(obj, keys, omitUndefined = false) {
|
|
502
507
|
return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {
|
|
503
|
-
return (!omitUndefined || value !==
|
|
508
|
+
return (!omitUndefined || value !== void 0) && !keys.includes(key);
|
|
504
509
|
}));
|
|
505
510
|
}
|
|
506
511
|
function objectEntries(obj) {
|
|
@@ -625,10 +630,10 @@ function refWithControl(initial, options = {}) {
|
|
|
625
630
|
if (value === source)
|
|
626
631
|
return;
|
|
627
632
|
const old = source;
|
|
628
|
-
if (((_a = options.onBeforeChange) == null ?
|
|
633
|
+
if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)
|
|
629
634
|
return;
|
|
630
635
|
source = value;
|
|
631
|
-
(_b = options.onChanged) == null ?
|
|
636
|
+
(_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);
|
|
632
637
|
if (triggering)
|
|
633
638
|
trigger();
|
|
634
639
|
}
|
|
@@ -680,9 +685,10 @@ function watchWithFilter(source, cb, options = {}) {
|
|
|
680
685
|
function watchPausable(source, cb, options = {}) {
|
|
681
686
|
const {
|
|
682
687
|
eventFilter: filter,
|
|
688
|
+
initialState = "active",
|
|
683
689
|
...watchOptions
|
|
684
690
|
} = options;
|
|
685
|
-
const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
|
|
691
|
+
const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });
|
|
686
692
|
const stop = watchWithFilter(
|
|
687
693
|
source,
|
|
688
694
|
cb,
|
|
@@ -824,7 +830,7 @@ function createUntil(r, isNot = false) {
|
|
|
824
830
|
if (stop)
|
|
825
831
|
stop();
|
|
826
832
|
else
|
|
827
|
-
vue.nextTick(() => stop == null ?
|
|
833
|
+
vue.nextTick(() => stop == null ? void 0 : stop());
|
|
828
834
|
resolve(v);
|
|
829
835
|
}
|
|
830
836
|
},
|
|
@@ -838,7 +844,7 @@ function createUntil(r, isNot = false) {
|
|
|
838
844
|
const promises = [watcher];
|
|
839
845
|
if (timeout != null) {
|
|
840
846
|
promises.push(
|
|
841
|
-
promiseTimeout(timeout, throwOnTimeout).then(() => vue.toValue(r)).finally(() => stop == null ?
|
|
847
|
+
promiseTimeout(timeout, throwOnTimeout).then(() => vue.toValue(r)).finally(() => stop == null ? void 0 : stop())
|
|
842
848
|
);
|
|
843
849
|
}
|
|
844
850
|
return Promise.race(promises);
|
|
@@ -856,7 +862,7 @@ function createUntil(r, isNot = false) {
|
|
|
856
862
|
if (stop)
|
|
857
863
|
stop();
|
|
858
864
|
else
|
|
859
|
-
vue.nextTick(() => stop == null ?
|
|
865
|
+
vue.nextTick(() => stop == null ? void 0 : stop());
|
|
860
866
|
resolve(v1);
|
|
861
867
|
}
|
|
862
868
|
},
|
|
@@ -871,7 +877,7 @@ function createUntil(r, isNot = false) {
|
|
|
871
877
|
if (timeout != null) {
|
|
872
878
|
promises.push(
|
|
873
879
|
promiseTimeout(timeout, throwOnTimeout).then(() => vue.toValue(r)).finally(() => {
|
|
874
|
-
stop == null ?
|
|
880
|
+
stop == null ? void 0 : stop();
|
|
875
881
|
return vue.toValue(r);
|
|
876
882
|
})
|
|
877
883
|
);
|
|
@@ -885,7 +891,7 @@ function createUntil(r, isNot = false) {
|
|
|
885
891
|
return toBe(null, options);
|
|
886
892
|
}
|
|
887
893
|
function toBeUndefined(options) {
|
|
888
|
-
return toBe(
|
|
894
|
+
return toBe(void 0, options);
|
|
889
895
|
}
|
|
890
896
|
function toBeNaN(options) {
|
|
891
897
|
return toMatch(Number.isNaN, options);
|
|
@@ -986,7 +992,7 @@ function findLast(arr, cb) {
|
|
|
986
992
|
if (cb(arr[index], index, arr))
|
|
987
993
|
return arr[index];
|
|
988
994
|
}
|
|
989
|
-
return
|
|
995
|
+
return void 0;
|
|
990
996
|
}
|
|
991
997
|
function useArrayFindLast(list, fn) {
|
|
992
998
|
return vue.computed(() => vue.toValue(
|
|
@@ -1076,7 +1082,7 @@ function useCounter(initialValue = 0, options = {}) {
|
|
|
1076
1082
|
}
|
|
1077
1083
|
|
|
1078
1084
|
const REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i;
|
|
1079
|
-
const REGEX_FORMAT = /[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
|
|
1085
|
+
const REGEX_FORMAT = /[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;
|
|
1080
1086
|
function defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {
|
|
1081
1087
|
let m = hours < 12 ? "AM" : "PM";
|
|
1082
1088
|
if (hasPeriod)
|
|
@@ -1099,6 +1105,10 @@ function formatDate(date, formatStr, options = {}) {
|
|
|
1099
1105
|
const milliseconds = date.getMilliseconds();
|
|
1100
1106
|
const day = date.getDay();
|
|
1101
1107
|
const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;
|
|
1108
|
+
const stripTimeZone = (dateString) => {
|
|
1109
|
+
var _a2;
|
|
1110
|
+
return (_a2 = dateString.split(" ")[1]) != null ? _a2 : "";
|
|
1111
|
+
};
|
|
1102
1112
|
const matches = {
|
|
1103
1113
|
Yo: () => formatOrdinal(years),
|
|
1104
1114
|
YY: () => String(years).slice(-2),
|
|
@@ -1131,17 +1141,21 @@ function formatDate(date, formatStr, options = {}) {
|
|
|
1131
1141
|
A: () => meridiem(hours, minutes),
|
|
1132
1142
|
AA: () => meridiem(hours, minutes, false, true),
|
|
1133
1143
|
a: () => meridiem(hours, minutes, true),
|
|
1134
|
-
aa: () => meridiem(hours, minutes, true, true)
|
|
1144
|
+
aa: () => meridiem(hours, minutes, true, true),
|
|
1145
|
+
z: () => stripTimeZone(date.toLocaleDateString(vue.toValue(options.locales), { timeZoneName: "shortOffset" })),
|
|
1146
|
+
zz: () => stripTimeZone(date.toLocaleDateString(vue.toValue(options.locales), { timeZoneName: "shortOffset" })),
|
|
1147
|
+
zzz: () => stripTimeZone(date.toLocaleDateString(vue.toValue(options.locales), { timeZoneName: "shortOffset" })),
|
|
1148
|
+
zzzz: () => stripTimeZone(date.toLocaleDateString(vue.toValue(options.locales), { timeZoneName: "longOffset" }))
|
|
1135
1149
|
};
|
|
1136
1150
|
return formatStr.replace(REGEX_FORMAT, (match, $1) => {
|
|
1137
1151
|
var _a2, _b;
|
|
1138
|
-
return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ?
|
|
1152
|
+
return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;
|
|
1139
1153
|
});
|
|
1140
1154
|
}
|
|
1141
1155
|
function normalizeDate(date) {
|
|
1142
1156
|
if (date === null)
|
|
1143
1157
|
return new Date(Number.NaN);
|
|
1144
|
-
if (date ===
|
|
1158
|
+
if (date === void 0)
|
|
1145
1159
|
return /* @__PURE__ */ new Date();
|
|
1146
1160
|
if (date instanceof Date)
|
|
1147
1161
|
return new Date(date);
|
|
@@ -1247,7 +1261,8 @@ function useLastChanged(source, options = {}) {
|
|
|
1247
1261
|
|
|
1248
1262
|
function useTimeoutFn(cb, interval, options = {}) {
|
|
1249
1263
|
const {
|
|
1250
|
-
immediate = true
|
|
1264
|
+
immediate = true,
|
|
1265
|
+
immediateCallback = false
|
|
1251
1266
|
} = options;
|
|
1252
1267
|
const isPending = vue.ref(false);
|
|
1253
1268
|
let timer = null;
|
|
@@ -1262,6 +1277,8 @@ function useTimeoutFn(cb, interval, options = {}) {
|
|
|
1262
1277
|
clear();
|
|
1263
1278
|
}
|
|
1264
1279
|
function start(...args) {
|
|
1280
|
+
if (immediateCallback)
|
|
1281
|
+
cb();
|
|
1265
1282
|
clear();
|
|
1266
1283
|
isPending.value = true;
|
|
1267
1284
|
timer = setTimeout(() => {
|
|
@@ -1350,7 +1367,7 @@ function useToggle(initialValue = false, options = {}) {
|
|
|
1350
1367
|
}
|
|
1351
1368
|
|
|
1352
1369
|
function watchArray(source, cb, options) {
|
|
1353
|
-
let oldList = (options == null ?
|
|
1370
|
+
let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : vue.toValue(source)];
|
|
1354
1371
|
return vue.watch(source, (newList, _, onCleanup) => {
|
|
1355
1372
|
const oldListRemains = Array.from({ length: oldList.length });
|
|
1356
1373
|
const added = [];
|
|
@@ -1394,7 +1411,7 @@ function watchAtMost(source, cb, options) {
|
|
|
1394
1411
|
function watchDebounced(source, cb, options = {}) {
|
|
1395
1412
|
const {
|
|
1396
1413
|
debounce = 0,
|
|
1397
|
-
maxWait =
|
|
1414
|
+
maxWait = void 0,
|
|
1398
1415
|
...watchOptions
|
|
1399
1416
|
} = options;
|
|
1400
1417
|
return watchWithFilter(
|
|
@@ -1531,7 +1548,7 @@ function watchTriggerable(source, cb, options = {}) {
|
|
|
1531
1548
|
if (!cleanupFn)
|
|
1532
1549
|
return;
|
|
1533
1550
|
const fn = cleanupFn;
|
|
1534
|
-
cleanupFn =
|
|
1551
|
+
cleanupFn = void 0;
|
|
1535
1552
|
fn();
|
|
1536
1553
|
}
|
|
1537
1554
|
function onCleanup(callback) {
|
|
@@ -1563,7 +1580,7 @@ function getWatchSources(sources) {
|
|
|
1563
1580
|
return vue.toValue(sources);
|
|
1564
1581
|
}
|
|
1565
1582
|
function getOldValue(source) {
|
|
1566
|
-
return Array.isArray(source) ? source.map(() =>
|
|
1583
|
+
return Array.isArray(source) ? source.map(() => void 0) : void 0;
|
|
1567
1584
|
}
|
|
1568
1585
|
|
|
1569
1586
|
function whenever(source, cb, options) {
|
|
@@ -1571,7 +1588,7 @@ function whenever(source, cb, options) {
|
|
|
1571
1588
|
source,
|
|
1572
1589
|
(v, ov, onInvalidate) => {
|
|
1573
1590
|
if (v) {
|
|
1574
|
-
if (options == null ?
|
|
1591
|
+
if (options == null ? void 0 : options.once)
|
|
1575
1592
|
vue.nextTick(() => stop());
|
|
1576
1593
|
cb(v, ov, onInvalidate);
|
|
1577
1594
|
}
|
package/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { WatchOptionsBase, Ref,
|
|
2
|
+
import { WatchOptionsBase, Ref, WatchSource, ComputedGetter, ComputedRef, WritableComputedOptions, WritableComputedRef, WatchOptions, MaybeRef, MaybeRefOrGetter, InjectionKey, ShallowUnwrapRef as ShallowUnwrapRef$1, inject, provide, UnwrapNestedRefs, UnwrapRef, ToRef, ToRefs, toValue as toValue$1, WatchCallback, WatchStopHandle } from 'vue';
|
|
3
3
|
export { MaybeRef, MaybeRefOrGetter } from 'vue';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -142,12 +142,12 @@ type IsAny<T> = IfAny<T, true, false>;
|
|
|
142
142
|
|
|
143
143
|
type Callback<T> = IsAny<T> extends true ? (...param: any) => void : ([
|
|
144
144
|
T
|
|
145
|
-
] extends [void] ? (...param: unknown[]) => void : (...param: [T, ...unknown[]]) => void);
|
|
145
|
+
] extends [void] ? (...param: unknown[]) => void : [T] extends [any[]] ? (...param: T) => void : (...param: [T, ...unknown[]]) => void);
|
|
146
146
|
type EventHookOn<T = any> = (fn: Callback<T>) => {
|
|
147
147
|
off: () => void;
|
|
148
148
|
};
|
|
149
149
|
type EventHookOff<T = any> = (fn: Callback<T>) => void;
|
|
150
|
-
type EventHookTrigger<T = any> = (...param:
|
|
150
|
+
type EventHookTrigger<T = any> = (...param: Parameters<Callback<T>>) => Promise<unknown[]>;
|
|
151
151
|
interface EventHook<T = any> {
|
|
152
152
|
on: EventHookOn<T>;
|
|
153
153
|
off: EventHookOff<T>;
|
|
@@ -226,13 +226,21 @@ interface ThrottleFilterOptions {
|
|
|
226
226
|
*/
|
|
227
227
|
declare function throttleFilter(ms: MaybeRefOrGetter<number>, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): EventFilter;
|
|
228
228
|
declare function throttleFilter(options: ThrottleFilterOptions): EventFilter;
|
|
229
|
+
interface PausableFilterOptions {
|
|
230
|
+
/**
|
|
231
|
+
* The initial state
|
|
232
|
+
*
|
|
233
|
+
* @default 'active'
|
|
234
|
+
*/
|
|
235
|
+
initialState?: 'active' | 'paused';
|
|
236
|
+
}
|
|
229
237
|
/**
|
|
230
238
|
* EventFilter that gives extra controls to pause and resume the filter
|
|
231
239
|
*
|
|
232
240
|
* @param extendFilter Extra filter to apply when the PausableFilter is active, default to none
|
|
233
|
-
*
|
|
241
|
+
* @param options Options to configure the filter
|
|
234
242
|
*/
|
|
235
|
-
declare function pausableFilter(extendFilter?: EventFilter): Pausable & {
|
|
243
|
+
declare function pausableFilter(extendFilter?: EventFilter, options?: PausableFilterOptions): Pausable & {
|
|
236
244
|
eventFilter: EventFilter;
|
|
237
245
|
};
|
|
238
246
|
|
|
@@ -433,7 +441,7 @@ declare function reactifyObject<T extends object, S extends boolean = true>(obj:
|
|
|
433
441
|
/**
|
|
434
442
|
* Computed reactive object.
|
|
435
443
|
*/
|
|
436
|
-
declare function reactiveComputed<T extends object>(fn:
|
|
444
|
+
declare function reactiveComputed<T extends object>(fn: ComputedGetter<T>): UnwrapNestedRefs<T>;
|
|
437
445
|
|
|
438
446
|
type ReactiveOmitPredicate<T> = (value: T[keyof T], key: keyof T) => boolean;
|
|
439
447
|
declare function reactiveOmit<T extends object, K extends keyof T>(obj: T, ...keys: (K | K[])[]): Omit<T, K>;
|
|
@@ -1051,11 +1059,17 @@ declare function useThrottleFn<T extends FunctionArgs>(fn: T, ms?: MaybeRefOrGet
|
|
|
1051
1059
|
|
|
1052
1060
|
interface UseTimeoutFnOptions {
|
|
1053
1061
|
/**
|
|
1054
|
-
* Start the timer
|
|
1062
|
+
* Start the timer immediately
|
|
1055
1063
|
*
|
|
1056
1064
|
* @default true
|
|
1057
1065
|
*/
|
|
1058
1066
|
immediate?: boolean;
|
|
1067
|
+
/**
|
|
1068
|
+
* Execute the callback immediately after calling `start`
|
|
1069
|
+
*
|
|
1070
|
+
* @default false
|
|
1071
|
+
*/
|
|
1072
|
+
immediateCallback?: boolean;
|
|
1059
1073
|
}
|
|
1060
1074
|
/**
|
|
1061
1075
|
* Wrapper for `setTimeout` with controls.
|
|
@@ -1185,9 +1199,10 @@ declare function watchOnce<T, Immediate extends Readonly<boolean> = false>(sourc
|
|
|
1185
1199
|
interface WatchPausableReturn extends Pausable {
|
|
1186
1200
|
stop: WatchStopHandle;
|
|
1187
1201
|
}
|
|
1188
|
-
|
|
1189
|
-
declare function watchPausable<T
|
|
1190
|
-
declare function watchPausable<T
|
|
1202
|
+
type WatchPausableOptions<Immediate> = WatchWithFilterOptions<Immediate> & PausableFilterOptions;
|
|
1203
|
+
declare function watchPausable<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1204
|
+
declare function watchPausable<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1205
|
+
declare function watchPausable<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1191
1206
|
|
|
1192
1207
|
interface WatchThrottledOptions<Immediate> extends WatchOptions<Immediate> {
|
|
1193
1208
|
throttle?: MaybeRefOrGetter<number>;
|
|
@@ -1225,4 +1240,4 @@ interface WheneverOptions extends WatchOptions {
|
|
|
1225
1240
|
*/
|
|
1226
1241
|
declare function whenever<T>(source: WatchSource<T | false | null | undefined>, cb: WatchCallback<T>, options?: WheneverOptions): vue.WatchHandle;
|
|
1227
1242
|
|
|
1228
|
-
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, type Awaited, type ComputedRefWithControl, type ComputedWithControlRefExtra, type ConfigurableEventFilter, type ConfigurableFlush, type ConfigurableFlushSync, type ControlledRefOptions, type CreateInjectionStateOptions, type DateLike, type DebounceFilterOptions, type DeepMaybeRef, type ElementOf, type EventFilter, type EventHook, type EventHookOff, type EventHookOn, type EventHookTrigger, type ExtendRefOptions, type Fn, type FunctionArgs, type FunctionWrapperOptions, type IfAny, type IgnoredUpdater, type IsAny, type MapOldSources, type MapSources, type MultiWatchSources, type Mutable, type Pausable, type Promisify, type PromisifyFn, type Reactified, type ReactifyNested, type ReactifyObjectOptions, type ReactifyOptions, type ReactiveOmitPredicate, type ReactivePickPredicate, type ReadonlyRefOrGetter, type RemovableRef, type ShallowUnwrapRef, type SingletonPromiseReturn, type Stoppable, type SyncRefOptions, type SyncRefsOptions, type ThrottleFilterOptions, type ToRefsOptions, type UntilArrayInstance, type UntilBaseInstance, type UntilToMatchOptions, type UntilValueInstance, type UseArrayDifferenceOptions, type UseArrayIncludesComparatorFn, type UseArrayIncludesOptions, type UseArrayReducer, type UseCounterOptions, type UseDateFormatOptions, type UseDateFormatReturn, type UseIntervalControls, type UseIntervalFnOptions, type UseIntervalOptions, type UseLastChangedOptions, type UseTimeoutFnOptions, type UseTimeoutOptions, type UseToNumberOptions, type UseToggleOptions, type WatchArrayCallback, type WatchAtMostOptions, type WatchAtMostReturn, type WatchDebouncedOptions, type WatchIgnorableReturn, type WatchPausableReturn, type WatchThrottledOptions, type WatchTriggerableCallback, type WatchTriggerableReturn, type WatchWithFilterOptions, type WheneverOptions, type WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
|
1243
|
+
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, type Awaited, type ComputedRefWithControl, type ComputedWithControlRefExtra, type ConfigurableEventFilter, type ConfigurableFlush, type ConfigurableFlushSync, type ControlledRefOptions, type CreateInjectionStateOptions, type DateLike, type DebounceFilterOptions, type DeepMaybeRef, type ElementOf, type EventFilter, type EventHook, type EventHookOff, type EventHookOn, type EventHookTrigger, type ExtendRefOptions, type Fn, type FunctionArgs, type FunctionWrapperOptions, type IfAny, type IgnoredUpdater, type IsAny, type MapOldSources, type MapSources, type MultiWatchSources, type Mutable, type Pausable, type PausableFilterOptions, type Promisify, type PromisifyFn, type Reactified, type ReactifyNested, type ReactifyObjectOptions, type ReactifyOptions, type ReactiveOmitPredicate, type ReactivePickPredicate, type ReadonlyRefOrGetter, type RemovableRef, type ShallowUnwrapRef, type SingletonPromiseReturn, type Stoppable, type SyncRefOptions, type SyncRefsOptions, type ThrottleFilterOptions, type ToRefsOptions, type UntilArrayInstance, type UntilBaseInstance, type UntilToMatchOptions, type UntilValueInstance, type UseArrayDifferenceOptions, type UseArrayIncludesComparatorFn, type UseArrayIncludesOptions, type UseArrayReducer, type UseCounterOptions, type UseDateFormatOptions, type UseDateFormatReturn, type UseIntervalControls, type UseIntervalFnOptions, type UseIntervalOptions, type UseLastChangedOptions, type UseTimeoutFnOptions, type UseTimeoutOptions, type UseToNumberOptions, type UseToggleOptions, type WatchArrayCallback, type WatchAtMostOptions, type WatchAtMostReturn, type WatchDebouncedOptions, type WatchIgnorableReturn, type WatchPausableOptions, type WatchPausableReturn, type WatchThrottledOptions, type WatchTriggerableCallback, type WatchTriggerableReturn, type WatchWithFilterOptions, type WheneverOptions, type WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
package/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { WatchOptionsBase, Ref,
|
|
2
|
+
import { WatchOptionsBase, Ref, WatchSource, ComputedGetter, ComputedRef, WritableComputedOptions, WritableComputedRef, WatchOptions, MaybeRef, MaybeRefOrGetter, InjectionKey, ShallowUnwrapRef as ShallowUnwrapRef$1, inject, provide, UnwrapNestedRefs, UnwrapRef, ToRef, ToRefs, toValue as toValue$1, WatchCallback, WatchStopHandle } from 'vue';
|
|
3
3
|
export { MaybeRef, MaybeRefOrGetter } from 'vue';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -142,12 +142,12 @@ type IsAny<T> = IfAny<T, true, false>;
|
|
|
142
142
|
|
|
143
143
|
type Callback<T> = IsAny<T> extends true ? (...param: any) => void : ([
|
|
144
144
|
T
|
|
145
|
-
] extends [void] ? (...param: unknown[]) => void : (...param: [T, ...unknown[]]) => void);
|
|
145
|
+
] extends [void] ? (...param: unknown[]) => void : [T] extends [any[]] ? (...param: T) => void : (...param: [T, ...unknown[]]) => void);
|
|
146
146
|
type EventHookOn<T = any> = (fn: Callback<T>) => {
|
|
147
147
|
off: () => void;
|
|
148
148
|
};
|
|
149
149
|
type EventHookOff<T = any> = (fn: Callback<T>) => void;
|
|
150
|
-
type EventHookTrigger<T = any> = (...param:
|
|
150
|
+
type EventHookTrigger<T = any> = (...param: Parameters<Callback<T>>) => Promise<unknown[]>;
|
|
151
151
|
interface EventHook<T = any> {
|
|
152
152
|
on: EventHookOn<T>;
|
|
153
153
|
off: EventHookOff<T>;
|
|
@@ -226,13 +226,21 @@ interface ThrottleFilterOptions {
|
|
|
226
226
|
*/
|
|
227
227
|
declare function throttleFilter(ms: MaybeRefOrGetter<number>, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): EventFilter;
|
|
228
228
|
declare function throttleFilter(options: ThrottleFilterOptions): EventFilter;
|
|
229
|
+
interface PausableFilterOptions {
|
|
230
|
+
/**
|
|
231
|
+
* The initial state
|
|
232
|
+
*
|
|
233
|
+
* @default 'active'
|
|
234
|
+
*/
|
|
235
|
+
initialState?: 'active' | 'paused';
|
|
236
|
+
}
|
|
229
237
|
/**
|
|
230
238
|
* EventFilter that gives extra controls to pause and resume the filter
|
|
231
239
|
*
|
|
232
240
|
* @param extendFilter Extra filter to apply when the PausableFilter is active, default to none
|
|
233
|
-
*
|
|
241
|
+
* @param options Options to configure the filter
|
|
234
242
|
*/
|
|
235
|
-
declare function pausableFilter(extendFilter?: EventFilter): Pausable & {
|
|
243
|
+
declare function pausableFilter(extendFilter?: EventFilter, options?: PausableFilterOptions): Pausable & {
|
|
236
244
|
eventFilter: EventFilter;
|
|
237
245
|
};
|
|
238
246
|
|
|
@@ -433,7 +441,7 @@ declare function reactifyObject<T extends object, S extends boolean = true>(obj:
|
|
|
433
441
|
/**
|
|
434
442
|
* Computed reactive object.
|
|
435
443
|
*/
|
|
436
|
-
declare function reactiveComputed<T extends object>(fn:
|
|
444
|
+
declare function reactiveComputed<T extends object>(fn: ComputedGetter<T>): UnwrapNestedRefs<T>;
|
|
437
445
|
|
|
438
446
|
type ReactiveOmitPredicate<T> = (value: T[keyof T], key: keyof T) => boolean;
|
|
439
447
|
declare function reactiveOmit<T extends object, K extends keyof T>(obj: T, ...keys: (K | K[])[]): Omit<T, K>;
|
|
@@ -1051,11 +1059,17 @@ declare function useThrottleFn<T extends FunctionArgs>(fn: T, ms?: MaybeRefOrGet
|
|
|
1051
1059
|
|
|
1052
1060
|
interface UseTimeoutFnOptions {
|
|
1053
1061
|
/**
|
|
1054
|
-
* Start the timer
|
|
1062
|
+
* Start the timer immediately
|
|
1055
1063
|
*
|
|
1056
1064
|
* @default true
|
|
1057
1065
|
*/
|
|
1058
1066
|
immediate?: boolean;
|
|
1067
|
+
/**
|
|
1068
|
+
* Execute the callback immediately after calling `start`
|
|
1069
|
+
*
|
|
1070
|
+
* @default false
|
|
1071
|
+
*/
|
|
1072
|
+
immediateCallback?: boolean;
|
|
1059
1073
|
}
|
|
1060
1074
|
/**
|
|
1061
1075
|
* Wrapper for `setTimeout` with controls.
|
|
@@ -1185,9 +1199,10 @@ declare function watchOnce<T, Immediate extends Readonly<boolean> = false>(sourc
|
|
|
1185
1199
|
interface WatchPausableReturn extends Pausable {
|
|
1186
1200
|
stop: WatchStopHandle;
|
|
1187
1201
|
}
|
|
1188
|
-
|
|
1189
|
-
declare function watchPausable<T
|
|
1190
|
-
declare function watchPausable<T
|
|
1202
|
+
type WatchPausableOptions<Immediate> = WatchWithFilterOptions<Immediate> & PausableFilterOptions;
|
|
1203
|
+
declare function watchPausable<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1204
|
+
declare function watchPausable<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1205
|
+
declare function watchPausable<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchPausableOptions<Immediate>): WatchPausableReturn;
|
|
1191
1206
|
|
|
1192
1207
|
interface WatchThrottledOptions<Immediate> extends WatchOptions<Immediate> {
|
|
1193
1208
|
throttle?: MaybeRefOrGetter<number>;
|
|
@@ -1225,4 +1240,4 @@ interface WheneverOptions extends WatchOptions {
|
|
|
1225
1240
|
*/
|
|
1226
1241
|
declare function whenever<T>(source: WatchSource<T | false | null | undefined>, cb: WatchCallback<T>, options?: WheneverOptions): vue.WatchHandle;
|
|
1227
1242
|
|
|
1228
|
-
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, type Awaited, type ComputedRefWithControl, type ComputedWithControlRefExtra, type ConfigurableEventFilter, type ConfigurableFlush, type ConfigurableFlushSync, type ControlledRefOptions, type CreateInjectionStateOptions, type DateLike, type DebounceFilterOptions, type DeepMaybeRef, type ElementOf, type EventFilter, type EventHook, type EventHookOff, type EventHookOn, type EventHookTrigger, type ExtendRefOptions, type Fn, type FunctionArgs, type FunctionWrapperOptions, type IfAny, type IgnoredUpdater, type IsAny, type MapOldSources, type MapSources, type MultiWatchSources, type Mutable, type Pausable, type Promisify, type PromisifyFn, type Reactified, type ReactifyNested, type ReactifyObjectOptions, type ReactifyOptions, type ReactiveOmitPredicate, type ReactivePickPredicate, type ReadonlyRefOrGetter, type RemovableRef, type ShallowUnwrapRef, type SingletonPromiseReturn, type Stoppable, type SyncRefOptions, type SyncRefsOptions, type ThrottleFilterOptions, type ToRefsOptions, type UntilArrayInstance, type UntilBaseInstance, type UntilToMatchOptions, type UntilValueInstance, type UseArrayDifferenceOptions, type UseArrayIncludesComparatorFn, type UseArrayIncludesOptions, type UseArrayReducer, type UseCounterOptions, type UseDateFormatOptions, type UseDateFormatReturn, type UseIntervalControls, type UseIntervalFnOptions, type UseIntervalOptions, type UseLastChangedOptions, type UseTimeoutFnOptions, type UseTimeoutOptions, type UseToNumberOptions, type UseToggleOptions, type WatchArrayCallback, type WatchAtMostOptions, type WatchAtMostReturn, type WatchDebouncedOptions, type WatchIgnorableReturn, type WatchPausableReturn, type WatchThrottledOptions, type WatchTriggerableCallback, type WatchTriggerableReturn, type WatchWithFilterOptions, type WheneverOptions, type WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
|
1243
|
+
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, type Awaited, type ComputedRefWithControl, type ComputedWithControlRefExtra, type ConfigurableEventFilter, type ConfigurableFlush, type ConfigurableFlushSync, type ControlledRefOptions, type CreateInjectionStateOptions, type DateLike, type DebounceFilterOptions, type DeepMaybeRef, type ElementOf, type EventFilter, type EventHook, type EventHookOff, type EventHookOn, type EventHookTrigger, type ExtendRefOptions, type Fn, type FunctionArgs, type FunctionWrapperOptions, type IfAny, type IgnoredUpdater, type IsAny, type MapOldSources, type MapSources, type MultiWatchSources, type Mutable, type Pausable, type PausableFilterOptions, type Promisify, type PromisifyFn, type Reactified, type ReactifyNested, type ReactifyObjectOptions, type ReactifyOptions, type ReactiveOmitPredicate, type ReactivePickPredicate, type ReadonlyRefOrGetter, type RemovableRef, type ShallowUnwrapRef, type SingletonPromiseReturn, type Stoppable, type SyncRefOptions, type SyncRefsOptions, type ThrottleFilterOptions, type ToRefsOptions, type UntilArrayInstance, type UntilBaseInstance, type UntilToMatchOptions, type UntilValueInstance, type UseArrayDifferenceOptions, type UseArrayIncludesComparatorFn, type UseArrayIncludesOptions, type UseArrayReducer, type UseCounterOptions, type UseDateFormatOptions, type UseDateFormatReturn, type UseIntervalControls, type UseIntervalFnOptions, type UseIntervalOptions, type UseLastChangedOptions, type UseTimeoutFnOptions, type UseTimeoutOptions, type UseToNumberOptions, type UseToggleOptions, type WatchArrayCallback, type WatchAtMostOptions, type WatchAtMostReturn, type WatchDebouncedOptions, type WatchIgnorableReturn, type WatchPausableOptions, type WatchPausableReturn, type WatchThrottledOptions, type WatchTriggerableCallback, type WatchTriggerableReturn, type WatchWithFilterOptions, type WheneverOptions, type WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|