@vueuse/shared 14.2.1 → 14.3.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/dist/index.d.ts +105 -88
- package/dist/index.iife.js +414 -490
- package/dist/index.iife.min.js +1 -1
- package/dist/index.js +94 -147
- package/package.json +4 -4
package/dist/index.iife.js
CHANGED
|
@@ -1,32 +1,7 @@
|
|
|
1
1
|
(function(exports, vue) {
|
|
2
|
-
|
|
3
|
-
//#region
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
21
|
-
value: mod,
|
|
22
|
-
enumerable: true
|
|
23
|
-
}) : target, mod));
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
vue = __toESM(vue);
|
|
27
|
-
|
|
28
|
-
//#region computedEager/index.ts
|
|
29
|
-
/**
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
//#region computedEager/index.ts
|
|
4
|
+
/**
|
|
30
5
|
*
|
|
31
6
|
* @deprecated This function will be removed in future version.
|
|
32
7
|
*
|
|
@@ -52,10 +27,9 @@ vue = __toESM(vue);
|
|
|
52
27
|
}
|
|
53
28
|
/** @deprecated use `computedEager` instead */
|
|
54
29
|
const eagerComputed = computedEager;
|
|
55
|
-
|
|
56
|
-
//#
|
|
57
|
-
|
|
58
|
-
/**
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region computedWithControl/index.ts
|
|
32
|
+
/**
|
|
59
33
|
* Explicitly define the deps of computed.
|
|
60
34
|
*
|
|
61
35
|
* @param source
|
|
@@ -74,22 +48,22 @@ vue = __toESM(vue);
|
|
|
74
48
|
flush: "sync",
|
|
75
49
|
...options
|
|
76
50
|
});
|
|
77
|
-
const get
|
|
78
|
-
const set
|
|
51
|
+
const get = typeof fn === "function" ? fn : fn.get;
|
|
52
|
+
const set = typeof fn === "function" ? void 0 : fn.set;
|
|
79
53
|
const result = (0, vue.customRef)((_track, _trigger) => {
|
|
80
54
|
track = _track;
|
|
81
55
|
trigger = _trigger;
|
|
82
56
|
return {
|
|
83
57
|
get() {
|
|
84
58
|
if (dirty) {
|
|
85
|
-
v = get
|
|
59
|
+
v = get(v);
|
|
86
60
|
dirty = false;
|
|
87
61
|
}
|
|
88
62
|
track();
|
|
89
63
|
return v;
|
|
90
64
|
},
|
|
91
|
-
set(v
|
|
92
|
-
set
|
|
65
|
+
set(v) {
|
|
66
|
+
set === null || set === void 0 || set(v);
|
|
93
67
|
}
|
|
94
68
|
};
|
|
95
69
|
});
|
|
@@ -98,10 +72,47 @@ vue = __toESM(vue);
|
|
|
98
72
|
}
|
|
99
73
|
/** @deprecated use `computedWithControl` instead */
|
|
100
74
|
const controlledComputed = computedWithControl;
|
|
101
|
-
|
|
102
|
-
//#
|
|
103
|
-
|
|
104
|
-
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region createDisposableDirective/index.ts
|
|
77
|
+
/**
|
|
78
|
+
* Utility for authoring disposable directives. Reactive effects created within `mounted` directive hook will be tracked and automatically disposed when directive is unmounted.
|
|
79
|
+
*
|
|
80
|
+
* @see https://vueuse.org/createDisposableDirective
|
|
81
|
+
*
|
|
82
|
+
* @__NO_SIDE_EFFECTS__
|
|
83
|
+
*/
|
|
84
|
+
function createDisposableDirective(origin = {}) {
|
|
85
|
+
function isFunc(fn) {
|
|
86
|
+
return typeof fn === "function";
|
|
87
|
+
}
|
|
88
|
+
const normalisedOrigin = isFunc(origin) ? {
|
|
89
|
+
mounted: origin,
|
|
90
|
+
updated: origin
|
|
91
|
+
} : origin;
|
|
92
|
+
const { mounted, unmounted } = normalisedOrigin;
|
|
93
|
+
if (!isFunc(mounted)) return origin;
|
|
94
|
+
const scopeWeakMap = /* @__PURE__ */ new WeakMap();
|
|
95
|
+
return {
|
|
96
|
+
...normalisedOrigin,
|
|
97
|
+
mounted(el, binding, vNode, prevNode) {
|
|
98
|
+
var _scopeWeakMap$get;
|
|
99
|
+
const scope = (_scopeWeakMap$get = scopeWeakMap.get(el)) !== null && _scopeWeakMap$get !== void 0 ? _scopeWeakMap$get : (0, vue.effectScope)();
|
|
100
|
+
scopeWeakMap.set(el, scope);
|
|
101
|
+
scope.run(() => {
|
|
102
|
+
mounted === null || mounted === void 0 || mounted(el, binding, vNode, prevNode);
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
unmounted(el, binding, vNode, prevNode) {
|
|
106
|
+
var _scopeWeakMap$get2;
|
|
107
|
+
(_scopeWeakMap$get2 = scopeWeakMap.get(el)) === null || _scopeWeakMap$get2 === void 0 || _scopeWeakMap$get2.stop();
|
|
108
|
+
scopeWeakMap.delete(el);
|
|
109
|
+
if (isFunc(unmounted)) unmounted(el, binding, vNode, prevNode);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region tryOnScopeDispose/index.ts
|
|
115
|
+
/**
|
|
105
116
|
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
|
|
106
117
|
*
|
|
107
118
|
* @param fn
|
|
@@ -113,10 +124,9 @@ vue = __toESM(vue);
|
|
|
113
124
|
}
|
|
114
125
|
return false;
|
|
115
126
|
}
|
|
116
|
-
|
|
117
|
-
//#
|
|
118
|
-
|
|
119
|
-
/**
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region createEventHook/index.ts
|
|
129
|
+
/**
|
|
120
130
|
* Utility for creating event hooks
|
|
121
131
|
*
|
|
122
132
|
* @see https://vueuse.org/createEventHook
|
|
@@ -147,10 +157,9 @@ vue = __toESM(vue);
|
|
|
147
157
|
clear
|
|
148
158
|
};
|
|
149
159
|
}
|
|
150
|
-
|
|
151
|
-
//#
|
|
152
|
-
|
|
153
|
-
/**
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region createGlobalState/index.ts
|
|
162
|
+
/**
|
|
154
163
|
* Keep states in the global scope to be reusable across Vue instances.
|
|
155
164
|
*
|
|
156
165
|
* @see https://vueuse.org/createGlobalState
|
|
@@ -170,14 +179,12 @@ vue = __toESM(vue);
|
|
|
170
179
|
return state;
|
|
171
180
|
});
|
|
172
181
|
}
|
|
173
|
-
|
|
174
|
-
//#
|
|
175
|
-
//#region provideLocal/map.ts
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region provideLocal/map.ts
|
|
176
184
|
const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
177
|
-
|
|
178
|
-
//#
|
|
179
|
-
|
|
180
|
-
/**
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region injectLocal/index.ts
|
|
187
|
+
/**
|
|
181
188
|
* On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
|
|
182
189
|
*
|
|
183
190
|
* @example
|
|
@@ -197,10 +204,9 @@ vue = __toESM(vue);
|
|
|
197
204
|
if (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];
|
|
198
205
|
return (0, vue.inject)(...args);
|
|
199
206
|
};
|
|
200
|
-
|
|
201
|
-
//#
|
|
202
|
-
|
|
203
|
-
/**
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region provideLocal/index.ts
|
|
209
|
+
/**
|
|
204
210
|
* On the basis of `provide`, it is allowed to directly call inject to obtain the value after call provide in the same component.
|
|
205
211
|
*
|
|
206
212
|
* @example
|
|
@@ -219,16 +225,8 @@ vue = __toESM(vue);
|
|
|
219
225
|
localProvidedState[key] = value;
|
|
220
226
|
return (0, vue.provide)(key, value);
|
|
221
227
|
}
|
|
222
|
-
|
|
223
|
-
//#
|
|
224
|
-
//#region createInjectionState/index.ts
|
|
225
|
-
/**
|
|
226
|
-
* Create global state that can be injected into components.
|
|
227
|
-
*
|
|
228
|
-
* @see https://vueuse.org/createInjectionState
|
|
229
|
-
*
|
|
230
|
-
* @__NO_SIDE_EFFECTS__
|
|
231
|
-
*/
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region createInjectionState/index.ts
|
|
232
230
|
function createInjectionState(composable, options) {
|
|
233
231
|
const key = (options === null || options === void 0 ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState");
|
|
234
232
|
const defaultValue = options === null || options === void 0 ? void 0 : options.defaultValue;
|
|
@@ -240,10 +238,9 @@ vue = __toESM(vue);
|
|
|
240
238
|
const useInjectedState = () => injectLocal(key, defaultValue);
|
|
241
239
|
return [useProvidingState, useInjectedState];
|
|
242
240
|
}
|
|
243
|
-
|
|
244
|
-
//#
|
|
245
|
-
|
|
246
|
-
/**
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region createRef/index.ts
|
|
243
|
+
/**
|
|
247
244
|
* Returns a `deepRef` or `shallowRef` depending on the `deep` param.
|
|
248
245
|
*
|
|
249
246
|
* @example createRef(1) // ShallowRef<number>
|
|
@@ -262,9 +259,8 @@ vue = __toESM(vue);
|
|
|
262
259
|
if (deep === true) return (0, vue.ref)(value);
|
|
263
260
|
else return (0, vue.shallowRef)(value);
|
|
264
261
|
}
|
|
265
|
-
|
|
266
|
-
//#
|
|
267
|
-
//#region utils/is.ts
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region utils/is.ts
|
|
268
264
|
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
269
265
|
const isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
270
266
|
const isDef = (val) => typeof val !== "undefined";
|
|
@@ -283,15 +279,14 @@ vue = __toESM(vue);
|
|
|
283
279
|
max = Math.floor(max);
|
|
284
280
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
285
281
|
};
|
|
286
|
-
const hasOwn = (val, key) => Object.
|
|
282
|
+
const hasOwn = (val, key) => Object.hasOwn(val, key);
|
|
287
283
|
const isIOS = /* @__PURE__ */ getIsIOS();
|
|
288
284
|
function getIsIOS() {
|
|
289
285
|
var _window, _window2, _window3;
|
|
290
286
|
return isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));
|
|
291
287
|
}
|
|
292
|
-
|
|
293
|
-
//#
|
|
294
|
-
//#region toRef/index.ts
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region toRef/index.ts
|
|
295
290
|
function toRef(...args) {
|
|
296
291
|
if (args.length !== 1) return (0, vue.toRef)(...args);
|
|
297
292
|
const r = args[0];
|
|
@@ -300,10 +295,9 @@ vue = __toESM(vue);
|
|
|
300
295
|
set: noop
|
|
301
296
|
}))) : (0, vue.ref)(r);
|
|
302
297
|
}
|
|
303
|
-
|
|
304
|
-
//#
|
|
305
|
-
|
|
306
|
-
/**
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region utils/filters.ts
|
|
300
|
+
/**
|
|
307
301
|
* @internal
|
|
308
302
|
*/
|
|
309
303
|
function createFilterWrapper(filter, fn) {
|
|
@@ -318,8 +312,8 @@ vue = __toESM(vue);
|
|
|
318
312
|
}
|
|
319
313
|
return wrapper;
|
|
320
314
|
}
|
|
321
|
-
const bypassFilter = (invoke
|
|
322
|
-
return invoke
|
|
315
|
+
const bypassFilter = (invoke) => {
|
|
316
|
+
return invoke();
|
|
323
317
|
};
|
|
324
318
|
/**
|
|
325
319
|
* Create an EventFilter that debounce the events
|
|
@@ -328,13 +322,13 @@ vue = __toESM(vue);
|
|
|
328
322
|
let timer;
|
|
329
323
|
let maxTimer;
|
|
330
324
|
let lastRejector = noop;
|
|
331
|
-
const _clearTimeout = (timer
|
|
332
|
-
clearTimeout(timer
|
|
325
|
+
const _clearTimeout = (timer) => {
|
|
326
|
+
clearTimeout(timer);
|
|
333
327
|
lastRejector();
|
|
334
328
|
lastRejector = noop;
|
|
335
329
|
};
|
|
336
330
|
let lastInvoker;
|
|
337
|
-
const filter = (invoke
|
|
331
|
+
const filter = (invoke) => {
|
|
338
332
|
const duration = (0, vue.toValue)(ms);
|
|
339
333
|
const maxDuration = (0, vue.toValue)(options.maxWait);
|
|
340
334
|
if (timer) _clearTimeout(timer);
|
|
@@ -343,11 +337,11 @@ vue = __toESM(vue);
|
|
|
343
337
|
_clearTimeout(maxTimer);
|
|
344
338
|
maxTimer = void 0;
|
|
345
339
|
}
|
|
346
|
-
return Promise.resolve(invoke
|
|
340
|
+
return Promise.resolve(invoke());
|
|
347
341
|
}
|
|
348
342
|
return new Promise((resolve, reject) => {
|
|
349
343
|
lastRejector = options.rejectOnCancel ? reject : resolve;
|
|
350
|
-
lastInvoker = invoke
|
|
344
|
+
lastInvoker = invoke;
|
|
351
345
|
if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
|
|
352
346
|
if (timer) _clearTimeout(timer);
|
|
353
347
|
maxTimer = void 0;
|
|
@@ -356,7 +350,7 @@ vue = __toESM(vue);
|
|
|
356
350
|
timer = setTimeout(() => {
|
|
357
351
|
if (maxTimer) _clearTimeout(maxTimer);
|
|
358
352
|
maxTimer = void 0;
|
|
359
|
-
resolve(invoke
|
|
353
|
+
resolve(invoke());
|
|
360
354
|
}, duration);
|
|
361
355
|
});
|
|
362
356
|
};
|
|
@@ -385,23 +379,23 @@ vue = __toESM(vue);
|
|
|
385
379
|
const filter = (_invoke) => {
|
|
386
380
|
const duration = (0, vue.toValue)(ms);
|
|
387
381
|
const elapsed = Date.now() - lastExec;
|
|
388
|
-
const invoke
|
|
382
|
+
const invoke = () => {
|
|
389
383
|
return lastValue = _invoke();
|
|
390
384
|
};
|
|
391
385
|
clear();
|
|
392
386
|
if (duration <= 0) {
|
|
393
387
|
lastExec = Date.now();
|
|
394
|
-
return invoke
|
|
388
|
+
return invoke();
|
|
395
389
|
}
|
|
396
390
|
if (elapsed > duration) {
|
|
397
391
|
lastExec = Date.now();
|
|
398
|
-
if (leading || !isLeading) invoke
|
|
392
|
+
if (leading || !isLeading) invoke();
|
|
399
393
|
} else if (trailing) lastValue = new Promise((resolve, reject) => {
|
|
400
394
|
lastRejector = rejectOnCancel ? reject : resolve;
|
|
401
395
|
timer = setTimeout(() => {
|
|
402
396
|
lastExec = Date.now();
|
|
403
397
|
isLeading = true;
|
|
404
|
-
resolve(invoke
|
|
398
|
+
resolve(invoke());
|
|
405
399
|
clear();
|
|
406
400
|
}, Math.max(0, duration - elapsed));
|
|
407
401
|
});
|
|
@@ -430,18 +424,17 @@ vue = __toESM(vue);
|
|
|
430
424
|
if (isActive.value) extendFilter(...args);
|
|
431
425
|
};
|
|
432
426
|
return {
|
|
433
|
-
isActive: (0, vue.
|
|
427
|
+
isActive: (0, vue.shallowReadonly)(isActive),
|
|
434
428
|
pause,
|
|
435
429
|
resume,
|
|
436
430
|
eventFilter
|
|
437
431
|
};
|
|
438
432
|
}
|
|
439
|
-
|
|
440
|
-
//#
|
|
441
|
-
//#region utils/general.ts
|
|
433
|
+
//#endregion
|
|
434
|
+
//#region utils/general.ts
|
|
442
435
|
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
|
|
443
436
|
return new Promise((resolve, reject) => {
|
|
444
|
-
if (throwOnTimeout) setTimeout(
|
|
437
|
+
if (throwOnTimeout) setTimeout(reject, ms, reason);
|
|
445
438
|
else setTimeout(resolve, ms);
|
|
446
439
|
});
|
|
447
440
|
}
|
|
@@ -519,9 +512,8 @@ vue = __toESM(vue);
|
|
|
519
512
|
function toArray(value) {
|
|
520
513
|
return Array.isArray(value) ? value : [value];
|
|
521
514
|
}
|
|
522
|
-
|
|
523
|
-
//#
|
|
524
|
-
//#region utils/port.ts
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region utils/port.ts
|
|
525
517
|
function cacheStringFunction(fn) {
|
|
526
518
|
const cache = Object.create(null);
|
|
527
519
|
return ((str) => {
|
|
@@ -534,16 +526,14 @@ vue = __toESM(vue);
|
|
|
534
526
|
const camelize = cacheStringFunction((str) => {
|
|
535
527
|
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
536
528
|
});
|
|
537
|
-
|
|
538
|
-
//#
|
|
539
|
-
//#region utils/vue.ts
|
|
529
|
+
//#endregion
|
|
530
|
+
//#region utils/vue.ts
|
|
540
531
|
function getLifeCycleTarget(target) {
|
|
541
532
|
return target || (0, vue.getCurrentInstance)();
|
|
542
533
|
}
|
|
543
|
-
|
|
544
|
-
//#
|
|
545
|
-
|
|
546
|
-
/**
|
|
534
|
+
//#endregion
|
|
535
|
+
//#region createSharedComposable/index.ts
|
|
536
|
+
/**
|
|
547
537
|
* Make a composable function usable with multiple Vue instances.
|
|
548
538
|
*
|
|
549
539
|
* @see https://vueuse.org/createSharedComposable
|
|
@@ -573,9 +563,8 @@ vue = __toESM(vue);
|
|
|
573
563
|
return state;
|
|
574
564
|
});
|
|
575
565
|
}
|
|
576
|
-
|
|
577
|
-
//#
|
|
578
|
-
//#region extendRef/index.ts
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region extendRef/index.ts
|
|
579
568
|
function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
|
|
580
569
|
for (const [key, value] of Object.entries(extend)) {
|
|
581
570
|
if (key === "value") continue;
|
|
@@ -595,22 +584,19 @@ vue = __toESM(vue);
|
|
|
595
584
|
}
|
|
596
585
|
return ref;
|
|
597
586
|
}
|
|
598
|
-
|
|
599
|
-
//#
|
|
600
|
-
//#region get/index.ts
|
|
587
|
+
//#endregion
|
|
588
|
+
//#region get/index.ts
|
|
601
589
|
function get(obj, key) {
|
|
602
590
|
if (key == null) return (0, vue.unref)(obj);
|
|
603
591
|
return (0, vue.unref)(obj)[key];
|
|
604
592
|
}
|
|
605
|
-
|
|
606
|
-
//#
|
|
607
|
-
//#region isDefined/index.ts
|
|
593
|
+
//#endregion
|
|
594
|
+
//#region isDefined/index.ts
|
|
608
595
|
function isDefined(v) {
|
|
609
596
|
return (0, vue.unref)(v) != null;
|
|
610
597
|
}
|
|
611
|
-
|
|
612
|
-
//#
|
|
613
|
-
//#region makeDestructurable/index.ts
|
|
598
|
+
//#endregion
|
|
599
|
+
//#region makeDestructurable/index.ts
|
|
614
600
|
/* @__NO_SIDE_EFFECTS__ */
|
|
615
601
|
function makeDestructurable(obj, arr) {
|
|
616
602
|
if (typeof Symbol !== "undefined") {
|
|
@@ -628,10 +614,9 @@ vue = __toESM(vue);
|
|
|
628
614
|
return clone;
|
|
629
615
|
} else return Object.assign([...arr], obj);
|
|
630
616
|
}
|
|
631
|
-
|
|
632
|
-
//#
|
|
633
|
-
|
|
634
|
-
/**
|
|
617
|
+
//#endregion
|
|
618
|
+
//#region reactify/index.ts
|
|
619
|
+
/**
|
|
635
620
|
* Converts plain function into a reactive function.
|
|
636
621
|
* The converted function accepts refs as it's arguments
|
|
637
622
|
* and returns a ComputedRef, with proper typing.
|
|
@@ -649,10 +634,9 @@ vue = __toESM(vue);
|
|
|
649
634
|
}
|
|
650
635
|
/** @deprecated use `reactify` instead */
|
|
651
636
|
const createReactiveFn = reactify;
|
|
652
|
-
|
|
653
|
-
//#
|
|
654
|
-
|
|
655
|
-
/**
|
|
637
|
+
//#endregion
|
|
638
|
+
//#region reactifyObject/index.ts
|
|
639
|
+
/**
|
|
656
640
|
* Apply `reactify` to an object
|
|
657
641
|
*
|
|
658
642
|
* @__NO_SIDE_EFFECTS__
|
|
@@ -672,10 +656,9 @@ vue = __toESM(vue);
|
|
|
672
656
|
return [key, typeof value === "function" ? reactify(value.bind(obj), options) : value];
|
|
673
657
|
}));
|
|
674
658
|
}
|
|
675
|
-
|
|
676
|
-
//#
|
|
677
|
-
|
|
678
|
-
/**
|
|
659
|
+
//#endregion
|
|
660
|
+
//#region toReactive/index.ts
|
|
661
|
+
/**
|
|
679
662
|
* Converts ref to reactive.
|
|
680
663
|
*
|
|
681
664
|
* @see https://vueuse.org/toReactive
|
|
@@ -709,19 +692,17 @@ vue = __toESM(vue);
|
|
|
709
692
|
}
|
|
710
693
|
}));
|
|
711
694
|
}
|
|
712
|
-
|
|
713
|
-
//#
|
|
714
|
-
|
|
715
|
-
/**
|
|
695
|
+
//#endregion
|
|
696
|
+
//#region reactiveComputed/index.ts
|
|
697
|
+
/**
|
|
716
698
|
* Computed reactive object.
|
|
717
699
|
*/
|
|
718
700
|
function reactiveComputed(fn) {
|
|
719
701
|
return toReactive((0, vue.computed)(fn));
|
|
720
702
|
}
|
|
721
|
-
|
|
722
|
-
//#
|
|
723
|
-
|
|
724
|
-
/**
|
|
703
|
+
//#endregion
|
|
704
|
+
//#region reactiveOmit/index.ts
|
|
705
|
+
/**
|
|
725
706
|
* Reactively omit fields from a reactive object
|
|
726
707
|
*
|
|
727
708
|
* @see https://vueuse.org/reactiveOmit
|
|
@@ -731,10 +712,9 @@ vue = __toESM(vue);
|
|
|
731
712
|
const predicate = flatKeys[0];
|
|
732
713
|
return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries((0, vue.toRefs)(obj)).filter(([k, v]) => !predicate((0, vue.toValue)(v), k))) : Object.fromEntries(Object.entries((0, vue.toRefs)(obj)).filter((e) => !flatKeys.includes(e[0]))));
|
|
733
714
|
}
|
|
734
|
-
|
|
735
|
-
//#
|
|
736
|
-
|
|
737
|
-
/**
|
|
715
|
+
//#endregion
|
|
716
|
+
//#region reactivePick/index.ts
|
|
717
|
+
/**
|
|
738
718
|
* Reactively pick fields from a reactive object
|
|
739
719
|
*
|
|
740
720
|
* @see https://vueuse.org/reactivePick
|
|
@@ -744,10 +724,9 @@ vue = __toESM(vue);
|
|
|
744
724
|
const predicate = flatKeys[0];
|
|
745
725
|
return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries((0, vue.toRefs)(obj)).filter(([k, v]) => predicate((0, vue.toValue)(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));
|
|
746
726
|
}
|
|
747
|
-
|
|
748
|
-
//#
|
|
749
|
-
|
|
750
|
-
/**
|
|
727
|
+
//#endregion
|
|
728
|
+
//#region refAutoReset/index.ts
|
|
729
|
+
/**
|
|
751
730
|
* Create a ref which will be reset to the default value after some time.
|
|
752
731
|
*
|
|
753
732
|
* @see https://vueuse.org/refAutoReset
|
|
@@ -781,10 +760,9 @@ vue = __toESM(vue);
|
|
|
781
760
|
}
|
|
782
761
|
/** @deprecated use `refAutoReset` instead */
|
|
783
762
|
const autoResetRef = refAutoReset;
|
|
784
|
-
|
|
785
|
-
//#
|
|
786
|
-
|
|
787
|
-
/**
|
|
763
|
+
//#endregion
|
|
764
|
+
//#region useDebounceFn/index.ts
|
|
765
|
+
/**
|
|
788
766
|
* Debounce execution of a function.
|
|
789
767
|
*
|
|
790
768
|
* @see https://vueuse.org/useDebounceFn
|
|
@@ -799,10 +777,9 @@ vue = __toESM(vue);
|
|
|
799
777
|
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
800
778
|
return createFilterWrapper(debounceFilter(ms, options), fn);
|
|
801
779
|
}
|
|
802
|
-
|
|
803
|
-
//#
|
|
804
|
-
|
|
805
|
-
/**
|
|
780
|
+
//#endregion
|
|
781
|
+
//#region refDebounced/index.ts
|
|
782
|
+
/**
|
|
806
783
|
* Debounce updates of a ref.
|
|
807
784
|
*
|
|
808
785
|
* @return A new debounced ref.
|
|
@@ -819,10 +796,9 @@ vue = __toESM(vue);
|
|
|
819
796
|
const debouncedRef = refDebounced;
|
|
820
797
|
/** @deprecated use `refDebounced` instead */
|
|
821
798
|
const useDebounce = refDebounced;
|
|
822
|
-
|
|
823
|
-
//#
|
|
824
|
-
|
|
825
|
-
/**
|
|
799
|
+
//#endregion
|
|
800
|
+
//#region refDefault/index.ts
|
|
801
|
+
/**
|
|
826
802
|
* Apply default value to a ref.
|
|
827
803
|
*
|
|
828
804
|
* @__NO_SIDE_EFFECTS__
|
|
@@ -838,10 +814,9 @@ vue = __toESM(vue);
|
|
|
838
814
|
}
|
|
839
815
|
});
|
|
840
816
|
}
|
|
841
|
-
|
|
842
|
-
//#
|
|
843
|
-
|
|
844
|
-
/**
|
|
817
|
+
//#endregion
|
|
818
|
+
//#region refManualReset/index.ts
|
|
819
|
+
/**
|
|
845
820
|
* Create a ref with manual reset functionality.
|
|
846
821
|
*
|
|
847
822
|
* @see https://vueuse.org/refManualReset
|
|
@@ -870,10 +845,9 @@ vue = __toESM(vue);
|
|
|
870
845
|
refValue.reset = reset;
|
|
871
846
|
return refValue;
|
|
872
847
|
}
|
|
873
|
-
|
|
874
|
-
//#
|
|
875
|
-
|
|
876
|
-
/**
|
|
848
|
+
//#endregion
|
|
849
|
+
//#region useThrottleFn/index.ts
|
|
850
|
+
/**
|
|
877
851
|
* Throttle execution of a function. Especially useful for rate limiting
|
|
878
852
|
* execution of handlers on events like resize and scroll.
|
|
879
853
|
*
|
|
@@ -895,10 +869,9 @@ vue = __toESM(vue);
|
|
|
895
869
|
function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
|
|
896
870
|
return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
|
|
897
871
|
}
|
|
898
|
-
|
|
899
|
-
//#
|
|
900
|
-
|
|
901
|
-
/**
|
|
872
|
+
//#endregion
|
|
873
|
+
//#region refThrottled/index.ts
|
|
874
|
+
/**
|
|
902
875
|
* Throttle execution of a function. Especially useful for rate limiting
|
|
903
876
|
* execution of handlers on events like resize and scroll.
|
|
904
877
|
*
|
|
@@ -920,10 +893,9 @@ vue = __toESM(vue);
|
|
|
920
893
|
const throttledRef = refThrottled;
|
|
921
894
|
/** @deprecated use `refThrottled` instead */
|
|
922
895
|
const useThrottle = refThrottled;
|
|
923
|
-
|
|
924
|
-
//#
|
|
925
|
-
|
|
926
|
-
/**
|
|
896
|
+
//#endregion
|
|
897
|
+
//#region refWithControl/index.ts
|
|
898
|
+
/**
|
|
927
899
|
* Fine-grained controls over ref and its reactivity.
|
|
928
900
|
*
|
|
929
901
|
* @__NO_SIDE_EFFECTS__
|
|
@@ -937,18 +909,18 @@ vue = __toESM(vue);
|
|
|
937
909
|
trigger = _trigger;
|
|
938
910
|
return {
|
|
939
911
|
get() {
|
|
940
|
-
return get
|
|
912
|
+
return get();
|
|
941
913
|
},
|
|
942
914
|
set(v) {
|
|
943
|
-
set
|
|
915
|
+
set(v);
|
|
944
916
|
}
|
|
945
917
|
};
|
|
946
918
|
});
|
|
947
|
-
function get
|
|
919
|
+
function get(tracking = true) {
|
|
948
920
|
if (tracking) track();
|
|
949
921
|
return source;
|
|
950
922
|
}
|
|
951
|
-
function set
|
|
923
|
+
function set(value, triggering = true) {
|
|
952
924
|
var _options$onBeforeChan, _options$onChanged;
|
|
953
925
|
if (value === source) return;
|
|
954
926
|
const old = source;
|
|
@@ -960,26 +932,26 @@ vue = __toESM(vue);
|
|
|
960
932
|
/**
|
|
961
933
|
* Get the value without tracked in the reactivity system
|
|
962
934
|
*/
|
|
963
|
-
const untrackedGet = () => get
|
|
935
|
+
const untrackedGet = () => get(false);
|
|
964
936
|
/**
|
|
965
937
|
* Set the value without triggering the reactivity system
|
|
966
938
|
*/
|
|
967
|
-
const silentSet = (v) => set
|
|
939
|
+
const silentSet = (v) => set(v, false);
|
|
968
940
|
/**
|
|
969
941
|
* Get the value without tracked in the reactivity system.
|
|
970
942
|
*
|
|
971
943
|
* Alias for `untrackedGet()`
|
|
972
944
|
*/
|
|
973
|
-
const peek = () => get
|
|
945
|
+
const peek = () => get(false);
|
|
974
946
|
/**
|
|
975
947
|
* Set the value without triggering the reactivity system
|
|
976
948
|
*
|
|
977
949
|
* Alias for `silentSet(v)`
|
|
978
950
|
*/
|
|
979
|
-
const lay = (v) => set
|
|
951
|
+
const lay = (v) => set(v, false);
|
|
980
952
|
return extendRef(ref, {
|
|
981
|
-
get
|
|
982
|
-
set
|
|
953
|
+
get,
|
|
954
|
+
set,
|
|
983
955
|
untrackedGet,
|
|
984
956
|
silentSet,
|
|
985
957
|
peek,
|
|
@@ -988,10 +960,9 @@ vue = __toESM(vue);
|
|
|
988
960
|
}
|
|
989
961
|
/** @deprecated use `refWithControl` instead */
|
|
990
962
|
const controlledRef = refWithControl;
|
|
991
|
-
|
|
992
|
-
//#
|
|
993
|
-
|
|
994
|
-
/**
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region set/index.ts
|
|
965
|
+
/**
|
|
995
966
|
* Shorthand for `ref.value = x`
|
|
996
967
|
*/
|
|
997
968
|
function set(...args) {
|
|
@@ -1004,19 +975,17 @@ vue = __toESM(vue);
|
|
|
1004
975
|
target[key] = value;
|
|
1005
976
|
}
|
|
1006
977
|
}
|
|
1007
|
-
|
|
1008
|
-
//#
|
|
1009
|
-
//#region watchWithFilter/index.ts
|
|
978
|
+
//#endregion
|
|
979
|
+
//#region watchWithFilter/index.ts
|
|
1010
980
|
function watchWithFilter(source, cb, options = {}) {
|
|
1011
|
-
const { eventFilter = bypassFilter
|
|
981
|
+
const { eventFilter = bypassFilter, ...watchOptions } = options;
|
|
1012
982
|
return (0, vue.watch)(source, createFilterWrapper(eventFilter, cb), watchOptions);
|
|
1013
983
|
}
|
|
1014
|
-
|
|
1015
|
-
//#
|
|
1016
|
-
|
|
1017
|
-
/** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */
|
|
984
|
+
//#endregion
|
|
985
|
+
//#region watchPausable/index.ts
|
|
986
|
+
/** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */
|
|
1018
987
|
function watchPausable(source, cb, options = {}) {
|
|
1019
|
-
const { eventFilter: filter, initialState = "active"
|
|
988
|
+
const { eventFilter: filter, initialState = "active", ...watchOptions } = options;
|
|
1020
989
|
const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });
|
|
1021
990
|
return {
|
|
1022
991
|
stop: watchWithFilter(source, cb, {
|
|
@@ -1030,10 +999,9 @@ vue = __toESM(vue);
|
|
|
1030
999
|
}
|
|
1031
1000
|
/** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */
|
|
1032
1001
|
const pausableWatch = watchPausable;
|
|
1033
|
-
|
|
1034
|
-
//#
|
|
1035
|
-
|
|
1036
|
-
/**
|
|
1002
|
+
//#endregion
|
|
1003
|
+
//#region syncRef/index.ts
|
|
1004
|
+
/**
|
|
1037
1005
|
* Two-way refs synchronization.
|
|
1038
1006
|
* From the set theory perspective to restrict the option's type
|
|
1039
1007
|
* Check in the following order:
|
|
@@ -1070,10 +1038,9 @@ vue = __toESM(vue);
|
|
|
1070
1038
|
};
|
|
1071
1039
|
return stop;
|
|
1072
1040
|
}
|
|
1073
|
-
|
|
1074
|
-
//#
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1041
|
+
//#endregion
|
|
1042
|
+
//#region syncRefs/index.ts
|
|
1043
|
+
/**
|
|
1077
1044
|
* Keep target ref(s) in sync with the source ref
|
|
1078
1045
|
*
|
|
1079
1046
|
* @param source source ref
|
|
@@ -1088,10 +1055,9 @@ vue = __toESM(vue);
|
|
|
1088
1055
|
immediate
|
|
1089
1056
|
});
|
|
1090
1057
|
}
|
|
1091
|
-
|
|
1092
|
-
//#
|
|
1093
|
-
|
|
1094
|
-
/**
|
|
1058
|
+
//#endregion
|
|
1059
|
+
//#region toRefs/index.ts
|
|
1060
|
+
/**
|
|
1095
1061
|
* Extended `toRefs` that also accepts refs of an object.
|
|
1096
1062
|
*
|
|
1097
1063
|
* @see https://vueuse.org/toRefs
|
|
@@ -1124,10 +1090,9 @@ vue = __toESM(vue);
|
|
|
1124
1090
|
}));
|
|
1125
1091
|
return result;
|
|
1126
1092
|
}
|
|
1127
|
-
|
|
1128
|
-
//#
|
|
1129
|
-
|
|
1130
|
-
/**
|
|
1093
|
+
//#endregion
|
|
1094
|
+
//#region tryOnBeforeMount/index.ts
|
|
1095
|
+
/**
|
|
1131
1096
|
* Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function
|
|
1132
1097
|
*
|
|
1133
1098
|
* @param fn
|
|
@@ -1139,10 +1104,9 @@ vue = __toESM(vue);
|
|
|
1139
1104
|
else if (sync) fn();
|
|
1140
1105
|
else (0, vue.nextTick)(fn);
|
|
1141
1106
|
}
|
|
1142
|
-
|
|
1143
|
-
//#
|
|
1144
|
-
|
|
1145
|
-
/**
|
|
1107
|
+
//#endregion
|
|
1108
|
+
//#region tryOnBeforeUnmount/index.ts
|
|
1109
|
+
/**
|
|
1146
1110
|
* Call onBeforeUnmount() if it's inside a component lifecycle, if not, do nothing
|
|
1147
1111
|
*
|
|
1148
1112
|
* @param fn
|
|
@@ -1151,10 +1115,9 @@ vue = __toESM(vue);
|
|
|
1151
1115
|
function tryOnBeforeUnmount(fn, target) {
|
|
1152
1116
|
if (getLifeCycleTarget(target)) (0, vue.onBeforeUnmount)(fn, target);
|
|
1153
1117
|
}
|
|
1154
|
-
|
|
1155
|
-
//#
|
|
1156
|
-
|
|
1157
|
-
/**
|
|
1118
|
+
//#endregion
|
|
1119
|
+
//#region tryOnMounted/index.ts
|
|
1120
|
+
/**
|
|
1158
1121
|
* Call onMounted() if it's inside a component lifecycle, if not, just call the function
|
|
1159
1122
|
*
|
|
1160
1123
|
* @param fn
|
|
@@ -1166,10 +1129,9 @@ vue = __toESM(vue);
|
|
|
1166
1129
|
else if (sync) fn();
|
|
1167
1130
|
else (0, vue.nextTick)(fn);
|
|
1168
1131
|
}
|
|
1169
|
-
|
|
1170
|
-
//#
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1132
|
+
//#endregion
|
|
1133
|
+
//#region tryOnUnmounted/index.ts
|
|
1134
|
+
/**
|
|
1173
1135
|
* Call onUnmounted() if it's inside a component lifecycle, if not, do nothing
|
|
1174
1136
|
*
|
|
1175
1137
|
* @param fn
|
|
@@ -1178,9 +1140,8 @@ vue = __toESM(vue);
|
|
|
1178
1140
|
function tryOnUnmounted(fn, target) {
|
|
1179
1141
|
if (getLifeCycleTarget(target)) (0, vue.onUnmounted)(fn, target);
|
|
1180
1142
|
}
|
|
1181
|
-
|
|
1182
|
-
//#
|
|
1183
|
-
//#region until/index.ts
|
|
1143
|
+
//#endregion
|
|
1144
|
+
//#region until/index.ts
|
|
1184
1145
|
function createUntil(r, isNot = false) {
|
|
1185
1146
|
function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
|
|
1186
1147
|
let stop = null;
|
|
@@ -1277,9 +1238,8 @@ vue = __toESM(vue);
|
|
|
1277
1238
|
function until(r) {
|
|
1278
1239
|
return createUntil(r);
|
|
1279
1240
|
}
|
|
1280
|
-
|
|
1281
|
-
//#
|
|
1282
|
-
//#region useArrayDifference/index.ts
|
|
1241
|
+
//#endregion
|
|
1242
|
+
//#region useArrayDifference/index.ts
|
|
1283
1243
|
function defaultComparator(value, othVal) {
|
|
1284
1244
|
return value === othVal;
|
|
1285
1245
|
}
|
|
@@ -1307,10 +1267,9 @@ vue = __toESM(vue);
|
|
|
1307
1267
|
return (0, vue.computed)(() => symmetric ? [...(0, vue.toValue)(diff1), ...(0, vue.toValue)(diff2)] : (0, vue.toValue)(diff1));
|
|
1308
1268
|
} else return diff1;
|
|
1309
1269
|
}
|
|
1310
|
-
|
|
1311
|
-
//#
|
|
1312
|
-
|
|
1313
|
-
/**
|
|
1270
|
+
//#endregion
|
|
1271
|
+
//#region useArrayEvery/index.ts
|
|
1272
|
+
/**
|
|
1314
1273
|
* Reactive `Array.every`
|
|
1315
1274
|
*
|
|
1316
1275
|
* @see https://vueuse.org/useArrayEvery
|
|
@@ -1324,10 +1283,9 @@ vue = __toESM(vue);
|
|
|
1324
1283
|
function useArrayEvery(list, fn) {
|
|
1325
1284
|
return (0, vue.computed)(() => (0, vue.toValue)(list).every((element, index, array) => fn((0, vue.toValue)(element), index, array)));
|
|
1326
1285
|
}
|
|
1327
|
-
|
|
1328
|
-
//#
|
|
1329
|
-
|
|
1330
|
-
/**
|
|
1286
|
+
//#endregion
|
|
1287
|
+
//#region useArrayFilter/index.ts
|
|
1288
|
+
/**
|
|
1331
1289
|
* Reactive `Array.filter`
|
|
1332
1290
|
*
|
|
1333
1291
|
* @see https://vueuse.org/useArrayFilter
|
|
@@ -1341,10 +1299,9 @@ vue = __toESM(vue);
|
|
|
1341
1299
|
function useArrayFilter(list, fn) {
|
|
1342
1300
|
return (0, vue.computed)(() => (0, vue.toValue)(list).map((i) => (0, vue.toValue)(i)).filter(fn));
|
|
1343
1301
|
}
|
|
1344
|
-
|
|
1345
|
-
//#
|
|
1346
|
-
|
|
1347
|
-
/**
|
|
1302
|
+
//#endregion
|
|
1303
|
+
//#region useArrayFind/index.ts
|
|
1304
|
+
/**
|
|
1348
1305
|
* Reactive `Array.find`
|
|
1349
1306
|
*
|
|
1350
1307
|
* @see https://vueuse.org/useArrayFind
|
|
@@ -1358,10 +1315,9 @@ vue = __toESM(vue);
|
|
|
1358
1315
|
function useArrayFind(list, fn) {
|
|
1359
1316
|
return (0, vue.computed)(() => (0, vue.toValue)((0, vue.toValue)(list).find((element, index, array) => fn((0, vue.toValue)(element), index, array))));
|
|
1360
1317
|
}
|
|
1361
|
-
|
|
1362
|
-
//#
|
|
1363
|
-
|
|
1364
|
-
/**
|
|
1318
|
+
//#endregion
|
|
1319
|
+
//#region useArrayFindIndex/index.ts
|
|
1320
|
+
/**
|
|
1365
1321
|
* Reactive `Array.findIndex`
|
|
1366
1322
|
*
|
|
1367
1323
|
* @see https://vueuse.org/useArrayFindIndex
|
|
@@ -1375,9 +1331,8 @@ vue = __toESM(vue);
|
|
|
1375
1331
|
function useArrayFindIndex(list, fn) {
|
|
1376
1332
|
return (0, vue.computed)(() => (0, vue.toValue)(list).findIndex((element, index, array) => fn((0, vue.toValue)(element), index, array)));
|
|
1377
1333
|
}
|
|
1378
|
-
|
|
1379
|
-
//#
|
|
1380
|
-
//#region useArrayFindLast/index.ts
|
|
1334
|
+
//#endregion
|
|
1335
|
+
//#region useArrayFindLast/index.ts
|
|
1381
1336
|
function findLast(arr, cb) {
|
|
1382
1337
|
let index = arr.length;
|
|
1383
1338
|
while (index-- > 0) if (cb(arr[index], index, arr)) return arr[index];
|
|
@@ -1396,9 +1351,8 @@ vue = __toESM(vue);
|
|
|
1396
1351
|
function useArrayFindLast(list, fn) {
|
|
1397
1352
|
return (0, vue.computed)(() => (0, vue.toValue)(!Array.prototype.findLast ? findLast((0, vue.toValue)(list), (element, index, array) => fn((0, vue.toValue)(element), index, array)) : (0, vue.toValue)(list).findLast((element, index, array) => fn((0, vue.toValue)(element), index, array))));
|
|
1398
1353
|
}
|
|
1399
|
-
|
|
1400
|
-
//#
|
|
1401
|
-
//#region useArrayIncludes/index.ts
|
|
1354
|
+
//#endregion
|
|
1355
|
+
//#region useArrayIncludes/index.ts
|
|
1402
1356
|
function isArrayIncludesOptions(obj) {
|
|
1403
1357
|
return isObject(obj) && containsProp(obj, "formIndex", "comparator");
|
|
1404
1358
|
}
|
|
@@ -1424,15 +1378,14 @@ vue = __toESM(vue);
|
|
|
1424
1378
|
}
|
|
1425
1379
|
if (typeof comparator === "string") {
|
|
1426
1380
|
const key = comparator;
|
|
1427
|
-
comparator = (element, value
|
|
1381
|
+
comparator = (element, value) => element[key] === (0, vue.toValue)(value);
|
|
1428
1382
|
}
|
|
1429
|
-
comparator = (_comparator = comparator) !== null && _comparator !== void 0 ? _comparator : ((element, value
|
|
1383
|
+
comparator = (_comparator = comparator) !== null && _comparator !== void 0 ? _comparator : ((element, value) => element === (0, vue.toValue)(value));
|
|
1430
1384
|
return (0, vue.computed)(() => (0, vue.toValue)(list).slice(formIndex).some((element, index, array) => comparator((0, vue.toValue)(element), (0, vue.toValue)(value), index, (0, vue.toValue)(array))));
|
|
1431
1385
|
}
|
|
1432
|
-
|
|
1433
|
-
//#
|
|
1434
|
-
|
|
1435
|
-
/**
|
|
1386
|
+
//#endregion
|
|
1387
|
+
//#region useArrayJoin/index.ts
|
|
1388
|
+
/**
|
|
1436
1389
|
* Reactive `Array.join`
|
|
1437
1390
|
*
|
|
1438
1391
|
* @see https://vueuse.org/useArrayJoin
|
|
@@ -1446,10 +1399,9 @@ vue = __toESM(vue);
|
|
|
1446
1399
|
function useArrayJoin(list, separator) {
|
|
1447
1400
|
return (0, vue.computed)(() => (0, vue.toValue)(list).map((i) => (0, vue.toValue)(i)).join((0, vue.toValue)(separator)));
|
|
1448
1401
|
}
|
|
1449
|
-
|
|
1450
|
-
//#
|
|
1451
|
-
|
|
1452
|
-
/**
|
|
1402
|
+
//#endregion
|
|
1403
|
+
//#region useArrayMap/index.ts
|
|
1404
|
+
/**
|
|
1453
1405
|
* Reactive `Array.map`
|
|
1454
1406
|
*
|
|
1455
1407
|
* @see https://vueuse.org/useArrayMap
|
|
@@ -1463,10 +1415,9 @@ vue = __toESM(vue);
|
|
|
1463
1415
|
function useArrayMap(list, fn) {
|
|
1464
1416
|
return (0, vue.computed)(() => (0, vue.toValue)(list).map((i) => (0, vue.toValue)(i)).map(fn));
|
|
1465
1417
|
}
|
|
1466
|
-
|
|
1467
|
-
//#
|
|
1468
|
-
|
|
1469
|
-
/**
|
|
1418
|
+
//#endregion
|
|
1419
|
+
//#region useArrayReduce/index.ts
|
|
1420
|
+
/**
|
|
1470
1421
|
* Reactive `Array.reduce`
|
|
1471
1422
|
*
|
|
1472
1423
|
* @see https://vueuse.org/useArrayReduce
|
|
@@ -1485,10 +1436,9 @@ vue = __toESM(vue);
|
|
|
1485
1436
|
return args.length ? resolved.reduce(reduceCallback, typeof args[0] === "function" ? (0, vue.toValue)(args[0]()) : (0, vue.toValue)(args[0])) : resolved.reduce(reduceCallback);
|
|
1486
1437
|
});
|
|
1487
1438
|
}
|
|
1488
|
-
|
|
1489
|
-
//#
|
|
1490
|
-
|
|
1491
|
-
/**
|
|
1439
|
+
//#endregion
|
|
1440
|
+
//#region useArraySome/index.ts
|
|
1441
|
+
/**
|
|
1492
1442
|
* Reactive `Array.some`
|
|
1493
1443
|
*
|
|
1494
1444
|
* @see https://vueuse.org/useArraySome
|
|
@@ -1502,9 +1452,8 @@ vue = __toESM(vue);
|
|
|
1502
1452
|
function useArraySome(list, fn) {
|
|
1503
1453
|
return (0, vue.computed)(() => (0, vue.toValue)(list).some((element, index, array) => fn((0, vue.toValue)(element), index, array)));
|
|
1504
1454
|
}
|
|
1505
|
-
|
|
1506
|
-
//#
|
|
1507
|
-
//#region useArrayUnique/index.ts
|
|
1455
|
+
//#endregion
|
|
1456
|
+
//#region useArrayUnique/index.ts
|
|
1508
1457
|
function uniq(array) {
|
|
1509
1458
|
return Array.from(new Set(array));
|
|
1510
1459
|
}
|
|
@@ -1529,10 +1478,9 @@ vue = __toESM(vue);
|
|
|
1529
1478
|
return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);
|
|
1530
1479
|
});
|
|
1531
1480
|
}
|
|
1532
|
-
|
|
1533
|
-
//#
|
|
1534
|
-
|
|
1535
|
-
/**
|
|
1481
|
+
//#endregion
|
|
1482
|
+
//#region useCounter/index.ts
|
|
1483
|
+
/**
|
|
1536
1484
|
* Basic counter with utility functions.
|
|
1537
1485
|
*
|
|
1538
1486
|
* @see https://vueuse.org/useCounter
|
|
@@ -1545,24 +1493,23 @@ vue = __toESM(vue);
|
|
|
1545
1493
|
const { max = Number.POSITIVE_INFINITY, min = Number.NEGATIVE_INFINITY } = options;
|
|
1546
1494
|
const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);
|
|
1547
1495
|
const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);
|
|
1548
|
-
const get
|
|
1549
|
-
const set
|
|
1496
|
+
const get = () => count.value;
|
|
1497
|
+
const set = (val) => count.value = Math.max(min, Math.min(max, val));
|
|
1550
1498
|
const reset = (val = _initialValue) => {
|
|
1551
1499
|
_initialValue = val;
|
|
1552
|
-
return set
|
|
1500
|
+
return set(val);
|
|
1553
1501
|
};
|
|
1554
1502
|
return {
|
|
1555
1503
|
count: (0, vue.shallowReadonly)(count),
|
|
1556
1504
|
inc,
|
|
1557
1505
|
dec,
|
|
1558
|
-
get
|
|
1559
|
-
set
|
|
1506
|
+
get,
|
|
1507
|
+
set,
|
|
1560
1508
|
reset
|
|
1561
1509
|
};
|
|
1562
1510
|
}
|
|
1563
|
-
|
|
1564
|
-
//#
|
|
1565
|
-
//#region useDateFormat/index.ts
|
|
1511
|
+
//#endregion
|
|
1512
|
+
//#region useDateFormat/index.ts
|
|
1566
1513
|
const REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i;
|
|
1567
1514
|
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;
|
|
1568
1515
|
function defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {
|
|
@@ -1665,10 +1612,9 @@ vue = __toESM(vue);
|
|
|
1665
1612
|
function useDateFormat(date, formatStr = "HH:mm:ss", options = {}) {
|
|
1666
1613
|
return (0, vue.computed)(() => formatDate(normalizeDate((0, vue.toValue)(date)), (0, vue.toValue)(formatStr), options));
|
|
1667
1614
|
}
|
|
1668
|
-
|
|
1669
|
-
//#
|
|
1670
|
-
|
|
1671
|
-
/**
|
|
1615
|
+
//#endregion
|
|
1616
|
+
//#region useIntervalFn/index.ts
|
|
1617
|
+
/**
|
|
1672
1618
|
* Wrapper for `setInterval` with controls
|
|
1673
1619
|
*
|
|
1674
1620
|
* @see https://vueuse.org/useIntervalFn
|
|
@@ -1709,9 +1655,8 @@ vue = __toESM(vue);
|
|
|
1709
1655
|
resume
|
|
1710
1656
|
};
|
|
1711
1657
|
}
|
|
1712
|
-
|
|
1713
|
-
//#
|
|
1714
|
-
//#region useInterval/index.ts
|
|
1658
|
+
//#endregion
|
|
1659
|
+
//#region useInterval/index.ts
|
|
1715
1660
|
function useInterval(interval = 1e3, options = {}) {
|
|
1716
1661
|
const { controls: exposeControls = false, immediate = true, callback } = options;
|
|
1717
1662
|
const counter = (0, vue.shallowRef)(0);
|
|
@@ -1730,19 +1675,17 @@ vue = __toESM(vue);
|
|
|
1730
1675
|
};
|
|
1731
1676
|
else return (0, vue.shallowReadonly)(counter);
|
|
1732
1677
|
}
|
|
1733
|
-
|
|
1734
|
-
//#
|
|
1735
|
-
//#region useLastChanged/index.ts
|
|
1678
|
+
//#endregion
|
|
1679
|
+
//#region useLastChanged/index.ts
|
|
1736
1680
|
function useLastChanged(source, options = {}) {
|
|
1737
1681
|
var _options$initialValue;
|
|
1738
1682
|
const ms = (0, vue.shallowRef)((_options$initialValue = options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : null);
|
|
1739
1683
|
(0, vue.watch)(source, () => ms.value = timestamp(), options);
|
|
1740
1684
|
return (0, vue.shallowReadonly)(ms);
|
|
1741
1685
|
}
|
|
1742
|
-
|
|
1743
|
-
//#
|
|
1744
|
-
|
|
1745
|
-
/**
|
|
1686
|
+
//#endregion
|
|
1687
|
+
//#region useTimeoutFn/index.ts
|
|
1688
|
+
/**
|
|
1746
1689
|
* Wrapper for `setTimeout` with controls.
|
|
1747
1690
|
*
|
|
1748
1691
|
* @param cb
|
|
@@ -1784,9 +1727,8 @@ vue = __toESM(vue);
|
|
|
1784
1727
|
stop
|
|
1785
1728
|
};
|
|
1786
1729
|
}
|
|
1787
|
-
|
|
1788
|
-
//#
|
|
1789
|
-
//#region useTimeout/index.ts
|
|
1730
|
+
//#endregion
|
|
1731
|
+
//#region useTimeout/index.ts
|
|
1790
1732
|
function useTimeout(interval = 1e3, options = {}) {
|
|
1791
1733
|
const { controls: exposeControls = false, callback } = options;
|
|
1792
1734
|
const controls = useTimeoutFn(callback !== null && callback !== void 0 ? callback : noop, interval, options);
|
|
@@ -1797,10 +1739,9 @@ vue = __toESM(vue);
|
|
|
1797
1739
|
};
|
|
1798
1740
|
else return ready;
|
|
1799
1741
|
}
|
|
1800
|
-
|
|
1801
|
-
//#
|
|
1802
|
-
|
|
1803
|
-
/**
|
|
1742
|
+
//#endregion
|
|
1743
|
+
//#region useToNumber/index.ts
|
|
1744
|
+
/**
|
|
1804
1745
|
* Reactively convert a string ref to number.
|
|
1805
1746
|
*
|
|
1806
1747
|
* @__NO_SIDE_EFFECTS__
|
|
@@ -1815,10 +1756,9 @@ vue = __toESM(vue);
|
|
|
1815
1756
|
return resolved;
|
|
1816
1757
|
});
|
|
1817
1758
|
}
|
|
1818
|
-
|
|
1819
|
-
//#
|
|
1820
|
-
|
|
1821
|
-
/**
|
|
1759
|
+
//#endregion
|
|
1760
|
+
//#region useToString/index.ts
|
|
1761
|
+
/**
|
|
1822
1762
|
* Reactively convert a ref to string.
|
|
1823
1763
|
*
|
|
1824
1764
|
* @see https://vueuse.org/useToString
|
|
@@ -1828,10 +1768,9 @@ vue = __toESM(vue);
|
|
|
1828
1768
|
function useToString(value) {
|
|
1829
1769
|
return (0, vue.computed)(() => `${(0, vue.toValue)(value)}`);
|
|
1830
1770
|
}
|
|
1831
|
-
|
|
1832
|
-
//#
|
|
1833
|
-
|
|
1834
|
-
/**
|
|
1771
|
+
//#endregion
|
|
1772
|
+
//#region useToggle/index.ts
|
|
1773
|
+
/**
|
|
1835
1774
|
* A boolean ref with a toggler
|
|
1836
1775
|
*
|
|
1837
1776
|
* @see https://vueuse.org/useToggle
|
|
@@ -1857,10 +1796,9 @@ vue = __toESM(vue);
|
|
|
1857
1796
|
if (valueIsRef) return toggle;
|
|
1858
1797
|
else return [_value, toggle];
|
|
1859
1798
|
}
|
|
1860
|
-
|
|
1861
|
-
//#
|
|
1862
|
-
|
|
1863
|
-
/**
|
|
1799
|
+
//#endregion
|
|
1800
|
+
//#region watchArray/index.ts
|
|
1801
|
+
/**
|
|
1864
1802
|
* Watch for an array with additions and removals.
|
|
1865
1803
|
*
|
|
1866
1804
|
* @see https://vueuse.org/watchArray
|
|
@@ -1879,16 +1817,15 @@ vue = __toESM(vue);
|
|
|
1879
1817
|
}
|
|
1880
1818
|
if (!found) added.push(obj);
|
|
1881
1819
|
}
|
|
1882
|
-
const removed = oldList.filter((_
|
|
1820
|
+
const removed = oldList.filter((_, i) => !oldListRemains[i]);
|
|
1883
1821
|
cb(newList, oldList, added, removed, onCleanup);
|
|
1884
1822
|
oldList = [...newList];
|
|
1885
1823
|
}, options);
|
|
1886
1824
|
}
|
|
1887
|
-
|
|
1888
|
-
//#
|
|
1889
|
-
//#region watchAtMost/index.ts
|
|
1825
|
+
//#endregion
|
|
1826
|
+
//#region watchAtMost/index.ts
|
|
1890
1827
|
function watchAtMost(source, cb, options) {
|
|
1891
|
-
const { count
|
|
1828
|
+
const { count, ...watchOptions } = options;
|
|
1892
1829
|
const current = (0, vue.shallowRef)(0);
|
|
1893
1830
|
const { stop, resume, pause } = watchWithFilter(source, (...args) => {
|
|
1894
1831
|
current.value += 1;
|
|
@@ -1902,11 +1839,10 @@ vue = __toESM(vue);
|
|
|
1902
1839
|
pause
|
|
1903
1840
|
};
|
|
1904
1841
|
}
|
|
1905
|
-
|
|
1906
|
-
//#
|
|
1907
|
-
//#region watchDebounced/index.ts
|
|
1842
|
+
//#endregion
|
|
1843
|
+
//#region watchDebounced/index.ts
|
|
1908
1844
|
function watchDebounced(source, cb, options = {}) {
|
|
1909
|
-
const { debounce = 0, maxWait = void 0
|
|
1845
|
+
const { debounce = 0, maxWait = void 0, ...watchOptions } = options;
|
|
1910
1846
|
return watchWithFilter(source, cb, {
|
|
1911
1847
|
...watchOptions,
|
|
1912
1848
|
eventFilter: debounceFilter(debounce, { maxWait })
|
|
@@ -1914,10 +1850,9 @@ vue = __toESM(vue);
|
|
|
1914
1850
|
}
|
|
1915
1851
|
/** @deprecated use `watchDebounced` instead */
|
|
1916
1852
|
const debouncedWatch = watchDebounced;
|
|
1917
|
-
|
|
1918
|
-
//#
|
|
1919
|
-
|
|
1920
|
-
/**
|
|
1853
|
+
//#endregion
|
|
1854
|
+
//#region watchDeep/index.ts
|
|
1855
|
+
/**
|
|
1921
1856
|
* Shorthand for watching value with {deep: true}
|
|
1922
1857
|
*
|
|
1923
1858
|
* @see https://vueuse.org/watchDeep
|
|
@@ -1928,11 +1863,10 @@ vue = __toESM(vue);
|
|
|
1928
1863
|
deep: true
|
|
1929
1864
|
});
|
|
1930
1865
|
}
|
|
1931
|
-
|
|
1932
|
-
//#
|
|
1933
|
-
//#region watchIgnorable/index.ts
|
|
1866
|
+
//#endregion
|
|
1867
|
+
//#region watchIgnorable/index.ts
|
|
1934
1868
|
function watchIgnorable(source, cb, options = {}) {
|
|
1935
|
-
const { eventFilter = bypassFilter
|
|
1869
|
+
const { eventFilter = bypassFilter, ...watchOptions } = options;
|
|
1936
1870
|
const filteredCb = createFilterWrapper(eventFilter, cb);
|
|
1937
1871
|
let ignoreUpdates;
|
|
1938
1872
|
let ignorePrevAsyncUpdates;
|
|
@@ -1985,10 +1919,9 @@ vue = __toESM(vue);
|
|
|
1985
1919
|
}
|
|
1986
1920
|
/** @deprecated use `watchIgnorable` instead */
|
|
1987
1921
|
const ignorableWatch = watchIgnorable;
|
|
1988
|
-
|
|
1989
|
-
//#
|
|
1990
|
-
|
|
1991
|
-
/**
|
|
1922
|
+
//#endregion
|
|
1923
|
+
//#region watchImmediate/index.ts
|
|
1924
|
+
/**
|
|
1992
1925
|
* Shorthand for watching value with {immediate: true}
|
|
1993
1926
|
*
|
|
1994
1927
|
* @see https://vueuse.org/watchImmediate
|
|
@@ -1999,10 +1932,9 @@ vue = __toESM(vue);
|
|
|
1999
1932
|
immediate: true
|
|
2000
1933
|
});
|
|
2001
1934
|
}
|
|
2002
|
-
|
|
2003
|
-
//#
|
|
2004
|
-
|
|
2005
|
-
/**
|
|
1935
|
+
//#endregion
|
|
1936
|
+
//#region watchOnce/index.ts
|
|
1937
|
+
/**
|
|
2006
1938
|
* Shorthand for watching value with { once: true }
|
|
2007
1939
|
*
|
|
2008
1940
|
* @see https://vueuse.org/watchOnce
|
|
@@ -2013,11 +1945,10 @@ vue = __toESM(vue);
|
|
|
2013
1945
|
once: true
|
|
2014
1946
|
});
|
|
2015
1947
|
}
|
|
2016
|
-
|
|
2017
|
-
//#
|
|
2018
|
-
//#region watchThrottled/index.ts
|
|
1948
|
+
//#endregion
|
|
1949
|
+
//#region watchThrottled/index.ts
|
|
2019
1950
|
function watchThrottled(source, cb, options = {}) {
|
|
2020
|
-
const { throttle = 0, trailing = true, leading = true
|
|
1951
|
+
const { throttle = 0, trailing = true, leading = true, ...watchOptions } = options;
|
|
2021
1952
|
return watchWithFilter(source, cb, {
|
|
2022
1953
|
...watchOptions,
|
|
2023
1954
|
eventFilter: throttleFilter(throttle, trailing, leading)
|
|
@@ -2025,9 +1956,8 @@ vue = __toESM(vue);
|
|
|
2025
1956
|
}
|
|
2026
1957
|
/** @deprecated use `watchThrottled` instead */
|
|
2027
1958
|
const throttledWatch = watchThrottled;
|
|
2028
|
-
|
|
2029
|
-
//#
|
|
2030
|
-
//#region watchTriggerable/index.ts
|
|
1959
|
+
//#endregion
|
|
1960
|
+
//#region watchTriggerable/index.ts
|
|
2031
1961
|
function watchTriggerable(source, cb, options = {}) {
|
|
2032
1962
|
let cleanupFn;
|
|
2033
1963
|
function onEffect() {
|
|
@@ -2047,11 +1977,11 @@ vue = __toESM(vue);
|
|
|
2047
1977
|
const res = watchIgnorable(source, _cb, options);
|
|
2048
1978
|
const { ignoreUpdates } = res;
|
|
2049
1979
|
const trigger = () => {
|
|
2050
|
-
let res
|
|
1980
|
+
let res;
|
|
2051
1981
|
ignoreUpdates(() => {
|
|
2052
|
-
res
|
|
1982
|
+
res = _cb(getWatchSources(source), getOldValue(source));
|
|
2053
1983
|
});
|
|
2054
|
-
return res
|
|
1984
|
+
return res;
|
|
2055
1985
|
};
|
|
2056
1986
|
return {
|
|
2057
1987
|
...res,
|
|
@@ -2066,14 +1996,8 @@ vue = __toESM(vue);
|
|
|
2066
1996
|
function getOldValue(source) {
|
|
2067
1997
|
return Array.isArray(source) ? source.map(() => void 0) : void 0;
|
|
2068
1998
|
}
|
|
2069
|
-
|
|
2070
|
-
//#
|
|
2071
|
-
//#region whenever/index.ts
|
|
2072
|
-
/**
|
|
2073
|
-
* Shorthand for watching value to be truthy
|
|
2074
|
-
*
|
|
2075
|
-
* @see https://vueuse.org/whenever
|
|
2076
|
-
*/
|
|
1999
|
+
//#endregion
|
|
2000
|
+
//#region whenever/index.ts
|
|
2077
2001
|
function whenever(source, cb, options) {
|
|
2078
2002
|
const stop = (0, vue.watch)(source, (v, ov, onInvalidate) => {
|
|
2079
2003
|
if (v) {
|
|
@@ -2086,125 +2010,125 @@ vue = __toESM(vue);
|
|
|
2086
2010
|
});
|
|
2087
2011
|
return stop;
|
|
2088
2012
|
}
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
exports.
|
|
2092
|
-
exports.
|
|
2093
|
-
exports.
|
|
2094
|
-
exports.
|
|
2095
|
-
exports.
|
|
2096
|
-
exports.
|
|
2097
|
-
exports.
|
|
2098
|
-
exports.
|
|
2099
|
-
exports.
|
|
2100
|
-
exports.
|
|
2101
|
-
exports.createEventHook = createEventHook;
|
|
2102
|
-
exports.createFilterWrapper = createFilterWrapper;
|
|
2103
|
-
exports.createGlobalState = createGlobalState;
|
|
2104
|
-
exports.createInjectionState = createInjectionState;
|
|
2105
|
-
exports.createReactiveFn = createReactiveFn;
|
|
2106
|
-
exports.createRef = createRef;
|
|
2107
|
-
exports.createSharedComposable = createSharedComposable;
|
|
2108
|
-
exports.createSingletonPromise = createSingletonPromise;
|
|
2109
|
-
exports.debounceFilter = debounceFilter;
|
|
2110
|
-
exports.debouncedRef = debouncedRef;
|
|
2111
|
-
exports.debouncedWatch = debouncedWatch;
|
|
2112
|
-
exports.eagerComputed = eagerComputed;
|
|
2113
|
-
exports.extendRef = extendRef;
|
|
2114
|
-
exports.formatDate = formatDate;
|
|
2115
|
-
exports.get = get;
|
|
2116
|
-
exports.getLifeCycleTarget = getLifeCycleTarget;
|
|
2117
|
-
exports.hasOwn = hasOwn;
|
|
2118
|
-
exports.hyphenate = hyphenate;
|
|
2119
|
-
exports.identity = identity;
|
|
2120
|
-
exports.ignorableWatch = ignorableWatch;
|
|
2121
|
-
exports.increaseWithUnit = increaseWithUnit;
|
|
2122
|
-
exports.injectLocal = injectLocal;
|
|
2123
|
-
exports.invoke = invoke;
|
|
2124
|
-
exports.isClient = isClient;
|
|
2125
|
-
exports.isDef = isDef;
|
|
2126
|
-
exports.isDefined = isDefined;
|
|
2127
|
-
exports.isIOS = isIOS;
|
|
2128
|
-
exports.isObject = isObject;
|
|
2129
|
-
exports.isWorker = isWorker;
|
|
2130
|
-
exports.makeDestructurable = makeDestructurable;
|
|
2131
|
-
exports.noop = noop;
|
|
2132
|
-
exports.normalizeDate = normalizeDate;
|
|
2133
|
-
exports.notNullish = notNullish;
|
|
2134
|
-
exports.now = now;
|
|
2135
|
-
exports.objectEntries = objectEntries;
|
|
2136
|
-
exports.objectOmit = objectOmit;
|
|
2137
|
-
exports.objectPick = objectPick;
|
|
2138
|
-
exports.pausableFilter = pausableFilter;
|
|
2139
|
-
exports.pausableWatch = pausableWatch;
|
|
2140
|
-
exports.promiseTimeout = promiseTimeout;
|
|
2141
|
-
exports.provideLocal = provideLocal;
|
|
2142
|
-
exports.pxValue = pxValue;
|
|
2143
|
-
exports.rand = rand;
|
|
2144
|
-
exports.reactify = reactify;
|
|
2145
|
-
exports.reactifyObject = reactifyObject;
|
|
2146
|
-
exports.reactiveComputed = reactiveComputed;
|
|
2147
|
-
exports.reactiveOmit = reactiveOmit;
|
|
2148
|
-
exports.reactivePick = reactivePick;
|
|
2149
|
-
exports.refAutoReset = refAutoReset;
|
|
2150
|
-
exports.refDebounced = refDebounced;
|
|
2151
|
-
exports.refDefault = refDefault;
|
|
2152
|
-
exports.refManualReset = refManualReset;
|
|
2153
|
-
exports.refThrottled = refThrottled;
|
|
2154
|
-
exports.refWithControl = refWithControl;
|
|
2155
|
-
exports.set = set;
|
|
2156
|
-
exports.syncRef = syncRef;
|
|
2157
|
-
exports.syncRefs = syncRefs;
|
|
2158
|
-
exports.throttleFilter = throttleFilter;
|
|
2159
|
-
exports.throttledRef = throttledRef;
|
|
2160
|
-
exports.throttledWatch = throttledWatch;
|
|
2161
|
-
exports.timestamp = timestamp;
|
|
2162
|
-
exports.toArray = toArray;
|
|
2163
|
-
exports.toReactive = toReactive;
|
|
2164
|
-
exports.toRef = toRef;
|
|
2165
|
-
exports.toRefs = toRefs;
|
|
2166
|
-
exports.tryOnBeforeMount = tryOnBeforeMount;
|
|
2167
|
-
exports.tryOnBeforeUnmount = tryOnBeforeUnmount;
|
|
2168
|
-
exports.tryOnMounted = tryOnMounted;
|
|
2169
|
-
exports.tryOnScopeDispose = tryOnScopeDispose;
|
|
2170
|
-
exports.tryOnUnmounted = tryOnUnmounted;
|
|
2171
|
-
exports.until = until;
|
|
2172
|
-
exports.useArrayDifference = useArrayDifference;
|
|
2173
|
-
exports.useArrayEvery = useArrayEvery;
|
|
2174
|
-
exports.useArrayFilter = useArrayFilter;
|
|
2175
|
-
exports.useArrayFind = useArrayFind;
|
|
2176
|
-
exports.useArrayFindIndex = useArrayFindIndex;
|
|
2177
|
-
exports.useArrayFindLast = useArrayFindLast;
|
|
2178
|
-
exports.useArrayIncludes = useArrayIncludes;
|
|
2179
|
-
exports.useArrayJoin = useArrayJoin;
|
|
2180
|
-
exports.useArrayMap = useArrayMap;
|
|
2181
|
-
exports.useArrayReduce = useArrayReduce;
|
|
2182
|
-
exports.useArraySome = useArraySome;
|
|
2183
|
-
exports.useArrayUnique = useArrayUnique;
|
|
2184
|
-
exports.useCounter = useCounter;
|
|
2185
|
-
exports.useDateFormat = useDateFormat;
|
|
2186
|
-
exports.useDebounce = useDebounce;
|
|
2187
|
-
exports.useDebounceFn = useDebounceFn;
|
|
2188
|
-
exports.useInterval = useInterval;
|
|
2189
|
-
exports.useIntervalFn = useIntervalFn;
|
|
2190
|
-
exports.useLastChanged = useLastChanged;
|
|
2191
|
-
exports.useThrottle = useThrottle;
|
|
2192
|
-
exports.useThrottleFn = useThrottleFn;
|
|
2193
|
-
exports.useTimeout = useTimeout;
|
|
2194
|
-
exports.useTimeoutFn = useTimeoutFn;
|
|
2195
|
-
exports.useToNumber = useToNumber;
|
|
2196
|
-
exports.useToString = useToString;
|
|
2197
|
-
exports.useToggle = useToggle;
|
|
2198
|
-
exports.watchArray = watchArray;
|
|
2199
|
-
exports.watchAtMost = watchAtMost;
|
|
2200
|
-
exports.watchDebounced = watchDebounced;
|
|
2201
|
-
exports.watchDeep = watchDeep;
|
|
2202
|
-
exports.watchIgnorable = watchIgnorable;
|
|
2203
|
-
exports.watchImmediate = watchImmediate;
|
|
2204
|
-
exports.watchOnce = watchOnce;
|
|
2205
|
-
exports.watchPausable = watchPausable;
|
|
2206
|
-
exports.watchThrottled = watchThrottled;
|
|
2207
|
-
exports.watchTriggerable = watchTriggerable;
|
|
2208
|
-
exports.watchWithFilter = watchWithFilter;
|
|
2209
|
-
exports.whenever = whenever;
|
|
2210
|
-
})(this.VueUse = this.VueUse || {}, Vue);
|
|
2013
|
+
//#endregion
|
|
2014
|
+
exports.assert = assert;
|
|
2015
|
+
exports.autoResetRef = autoResetRef;
|
|
2016
|
+
exports.bypassFilter = bypassFilter;
|
|
2017
|
+
exports.camelize = camelize;
|
|
2018
|
+
exports.clamp = clamp;
|
|
2019
|
+
exports.computedEager = computedEager;
|
|
2020
|
+
exports.computedWithControl = computedWithControl;
|
|
2021
|
+
exports.containsProp = containsProp;
|
|
2022
|
+
exports.controlledComputed = controlledComputed;
|
|
2023
|
+
exports.controlledRef = controlledRef;
|
|
2024
|
+
exports.createDisposableDirective = createDisposableDirective;
|
|
2025
|
+
exports.createEventHook = createEventHook;
|
|
2026
|
+
exports.createFilterWrapper = createFilterWrapper;
|
|
2027
|
+
exports.createGlobalState = createGlobalState;
|
|
2028
|
+
exports.createInjectionState = createInjectionState;
|
|
2029
|
+
exports.createReactiveFn = createReactiveFn;
|
|
2030
|
+
exports.createRef = createRef;
|
|
2031
|
+
exports.createSharedComposable = createSharedComposable;
|
|
2032
|
+
exports.createSingletonPromise = createSingletonPromise;
|
|
2033
|
+
exports.debounceFilter = debounceFilter;
|
|
2034
|
+
exports.debouncedRef = debouncedRef;
|
|
2035
|
+
exports.debouncedWatch = debouncedWatch;
|
|
2036
|
+
exports.eagerComputed = eagerComputed;
|
|
2037
|
+
exports.extendRef = extendRef;
|
|
2038
|
+
exports.formatDate = formatDate;
|
|
2039
|
+
exports.get = get;
|
|
2040
|
+
exports.getLifeCycleTarget = getLifeCycleTarget;
|
|
2041
|
+
exports.hasOwn = hasOwn;
|
|
2042
|
+
exports.hyphenate = hyphenate;
|
|
2043
|
+
exports.identity = identity;
|
|
2044
|
+
exports.ignorableWatch = ignorableWatch;
|
|
2045
|
+
exports.increaseWithUnit = increaseWithUnit;
|
|
2046
|
+
exports.injectLocal = injectLocal;
|
|
2047
|
+
exports.invoke = invoke;
|
|
2048
|
+
exports.isClient = isClient;
|
|
2049
|
+
exports.isDef = isDef;
|
|
2050
|
+
exports.isDefined = isDefined;
|
|
2051
|
+
exports.isIOS = isIOS;
|
|
2052
|
+
exports.isObject = isObject;
|
|
2053
|
+
exports.isWorker = isWorker;
|
|
2054
|
+
exports.makeDestructurable = makeDestructurable;
|
|
2055
|
+
exports.noop = noop;
|
|
2056
|
+
exports.normalizeDate = normalizeDate;
|
|
2057
|
+
exports.notNullish = notNullish;
|
|
2058
|
+
exports.now = now;
|
|
2059
|
+
exports.objectEntries = objectEntries;
|
|
2060
|
+
exports.objectOmit = objectOmit;
|
|
2061
|
+
exports.objectPick = objectPick;
|
|
2062
|
+
exports.pausableFilter = pausableFilter;
|
|
2063
|
+
exports.pausableWatch = pausableWatch;
|
|
2064
|
+
exports.promiseTimeout = promiseTimeout;
|
|
2065
|
+
exports.provideLocal = provideLocal;
|
|
2066
|
+
exports.pxValue = pxValue;
|
|
2067
|
+
exports.rand = rand;
|
|
2068
|
+
exports.reactify = reactify;
|
|
2069
|
+
exports.reactifyObject = reactifyObject;
|
|
2070
|
+
exports.reactiveComputed = reactiveComputed;
|
|
2071
|
+
exports.reactiveOmit = reactiveOmit;
|
|
2072
|
+
exports.reactivePick = reactivePick;
|
|
2073
|
+
exports.refAutoReset = refAutoReset;
|
|
2074
|
+
exports.refDebounced = refDebounced;
|
|
2075
|
+
exports.refDefault = refDefault;
|
|
2076
|
+
exports.refManualReset = refManualReset;
|
|
2077
|
+
exports.refThrottled = refThrottled;
|
|
2078
|
+
exports.refWithControl = refWithControl;
|
|
2079
|
+
exports.set = set;
|
|
2080
|
+
exports.syncRef = syncRef;
|
|
2081
|
+
exports.syncRefs = syncRefs;
|
|
2082
|
+
exports.throttleFilter = throttleFilter;
|
|
2083
|
+
exports.throttledRef = throttledRef;
|
|
2084
|
+
exports.throttledWatch = throttledWatch;
|
|
2085
|
+
exports.timestamp = timestamp;
|
|
2086
|
+
exports.toArray = toArray;
|
|
2087
|
+
exports.toReactive = toReactive;
|
|
2088
|
+
exports.toRef = toRef;
|
|
2089
|
+
exports.toRefs = toRefs;
|
|
2090
|
+
exports.tryOnBeforeMount = tryOnBeforeMount;
|
|
2091
|
+
exports.tryOnBeforeUnmount = tryOnBeforeUnmount;
|
|
2092
|
+
exports.tryOnMounted = tryOnMounted;
|
|
2093
|
+
exports.tryOnScopeDispose = tryOnScopeDispose;
|
|
2094
|
+
exports.tryOnUnmounted = tryOnUnmounted;
|
|
2095
|
+
exports.until = until;
|
|
2096
|
+
exports.useArrayDifference = useArrayDifference;
|
|
2097
|
+
exports.useArrayEvery = useArrayEvery;
|
|
2098
|
+
exports.useArrayFilter = useArrayFilter;
|
|
2099
|
+
exports.useArrayFind = useArrayFind;
|
|
2100
|
+
exports.useArrayFindIndex = useArrayFindIndex;
|
|
2101
|
+
exports.useArrayFindLast = useArrayFindLast;
|
|
2102
|
+
exports.useArrayIncludes = useArrayIncludes;
|
|
2103
|
+
exports.useArrayJoin = useArrayJoin;
|
|
2104
|
+
exports.useArrayMap = useArrayMap;
|
|
2105
|
+
exports.useArrayReduce = useArrayReduce;
|
|
2106
|
+
exports.useArraySome = useArraySome;
|
|
2107
|
+
exports.useArrayUnique = useArrayUnique;
|
|
2108
|
+
exports.useCounter = useCounter;
|
|
2109
|
+
exports.useDateFormat = useDateFormat;
|
|
2110
|
+
exports.useDebounce = useDebounce;
|
|
2111
|
+
exports.useDebounceFn = useDebounceFn;
|
|
2112
|
+
exports.useInterval = useInterval;
|
|
2113
|
+
exports.useIntervalFn = useIntervalFn;
|
|
2114
|
+
exports.useLastChanged = useLastChanged;
|
|
2115
|
+
exports.useThrottle = useThrottle;
|
|
2116
|
+
exports.useThrottleFn = useThrottleFn;
|
|
2117
|
+
exports.useTimeout = useTimeout;
|
|
2118
|
+
exports.useTimeoutFn = useTimeoutFn;
|
|
2119
|
+
exports.useToNumber = useToNumber;
|
|
2120
|
+
exports.useToString = useToString;
|
|
2121
|
+
exports.useToggle = useToggle;
|
|
2122
|
+
exports.watchArray = watchArray;
|
|
2123
|
+
exports.watchAtMost = watchAtMost;
|
|
2124
|
+
exports.watchDebounced = watchDebounced;
|
|
2125
|
+
exports.watchDeep = watchDeep;
|
|
2126
|
+
exports.watchIgnorable = watchIgnorable;
|
|
2127
|
+
exports.watchImmediate = watchImmediate;
|
|
2128
|
+
exports.watchOnce = watchOnce;
|
|
2129
|
+
exports.watchPausable = watchPausable;
|
|
2130
|
+
exports.watchThrottled = watchThrottled;
|
|
2131
|
+
exports.watchTriggerable = watchTriggerable;
|
|
2132
|
+
exports.watchWithFilter = watchWithFilter;
|
|
2133
|
+
exports.whenever = whenever;
|
|
2134
|
+
})(this.VueUse = this.VueUse || {}, Vue);
|