@vueuse/shared 9.13.0 → 10.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -2,31 +2,31 @@
2
2
 
3
3
  var vueDemi = require('vue-demi');
4
4
 
5
- var __defProp$9 = Object.defineProperty;
6
- var __defProps$6 = Object.defineProperties;
7
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
8
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
9
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
10
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues$9 = (a, b) => {
5
+ var __defProp$b = Object.defineProperty;
6
+ var __defProps$8 = Object.defineProperties;
7
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues$b = (a, b) => {
13
13
  for (var prop in b || (b = {}))
14
- if (__hasOwnProp$b.call(b, prop))
15
- __defNormalProp$9(a, prop, b[prop]);
16
- if (__getOwnPropSymbols$b)
17
- for (var prop of __getOwnPropSymbols$b(b)) {
18
- if (__propIsEnum$b.call(b, prop))
19
- __defNormalProp$9(a, prop, b[prop]);
14
+ if (__hasOwnProp$d.call(b, prop))
15
+ __defNormalProp$b(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols$d)
17
+ for (var prop of __getOwnPropSymbols$d(b)) {
18
+ if (__propIsEnum$d.call(b, prop))
19
+ __defNormalProp$b(a, prop, b[prop]);
20
20
  }
21
21
  return a;
22
22
  };
23
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
23
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
24
24
  function computedEager(fn, options) {
25
25
  var _a;
26
26
  const result = vueDemi.shallowRef();
27
27
  vueDemi.watchEffect(() => {
28
28
  result.value = fn();
29
- }, __spreadProps$6(__spreadValues$9({}, options), {
29
+ }, __spreadProps$8(__spreadValues$b({}, options), {
30
30
  flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
31
31
  }));
32
32
  return vueDemi.readonly(result);
@@ -244,6 +244,9 @@ function objectPick(obj, keys, omitUndefined = false) {
244
244
  return n;
245
245
  }, {});
246
246
  }
247
+ function objectEntries(obj) {
248
+ return Object.entries(obj);
249
+ }
247
250
 
248
251
  function computedWithControl(source, fn) {
249
252
  let v = void 0;
@@ -288,14 +291,12 @@ function tryOnScopeDispose(fn) {
288
291
  }
289
292
 
290
293
  function createEventHook() {
291
- const fns = [];
294
+ const fns = new Set();
292
295
  const off = (fn) => {
293
- const index = fns.indexOf(fn);
294
- if (index !== -1)
295
- fns.splice(index, 1);
296
+ fns.delete(fn);
296
297
  };
297
298
  const on = (fn) => {
298
- fns.push(fn);
299
+ fns.add(fn);
299
300
  const offFn = () => off(fn);
300
301
  tryOnScopeDispose(offFn);
301
302
  return {
@@ -303,7 +304,7 @@ function createEventHook() {
303
304
  };
304
305
  };
305
306
  const trigger = (param) => {
306
- fns.forEach((fn) => fn(param));
307
+ return Promise.all(Array.from(fns).map((fn) => fn(param)));
307
308
  };
308
309
  return {
309
310
  on,
@@ -316,9 +317,9 @@ function createGlobalState(stateFactory) {
316
317
  let initialized = false;
317
318
  let state;
318
319
  const scope = vueDemi.effectScope(true);
319
- return () => {
320
+ return (...args) => {
320
321
  if (!initialized) {
321
- state = scope.run(stateFactory);
322
+ state = scope.run(() => stateFactory(...args));
322
323
  initialized = true;
323
324
  }
324
325
  return state;
@@ -391,25 +392,25 @@ function isDefined(v) {
391
392
  return vueDemi.unref(v) != null;
392
393
  }
393
394
 
394
- var __defProp$8 = Object.defineProperty;
395
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
396
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
397
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
398
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
399
- var __spreadValues$8 = (a, b) => {
395
+ var __defProp$a = Object.defineProperty;
396
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
397
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
398
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
399
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
400
+ var __spreadValues$a = (a, b) => {
400
401
  for (var prop in b || (b = {}))
401
- if (__hasOwnProp$a.call(b, prop))
402
- __defNormalProp$8(a, prop, b[prop]);
403
- if (__getOwnPropSymbols$a)
404
- for (var prop of __getOwnPropSymbols$a(b)) {
405
- if (__propIsEnum$a.call(b, prop))
406
- __defNormalProp$8(a, prop, b[prop]);
402
+ if (__hasOwnProp$c.call(b, prop))
403
+ __defNormalProp$a(a, prop, b[prop]);
404
+ if (__getOwnPropSymbols$c)
405
+ for (var prop of __getOwnPropSymbols$c(b)) {
406
+ if (__propIsEnum$c.call(b, prop))
407
+ __defNormalProp$a(a, prop, b[prop]);
407
408
  }
408
409
  return a;
409
410
  };
410
411
  function makeDestructurable(obj, arr) {
411
412
  if (typeof Symbol !== "undefined") {
412
- const clone = __spreadValues$8({}, obj);
413
+ const clone = __spreadValues$a({}, obj);
413
414
  Object.defineProperty(clone, Symbol.iterator, {
414
415
  enumerable: false,
415
416
  value() {
@@ -672,25 +673,25 @@ function syncRefs(source, targets, options = {}) {
672
673
  return vueDemi.watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });
673
674
  }
674
675
 
675
- var __defProp$7 = Object.defineProperty;
676
- var __defProps$5 = Object.defineProperties;
677
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
678
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
679
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
680
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
681
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
682
- var __spreadValues$7 = (a, b) => {
676
+ var __defProp$9 = Object.defineProperty;
677
+ var __defProps$7 = Object.defineProperties;
678
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
679
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
680
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
681
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
682
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
683
+ var __spreadValues$9 = (a, b) => {
683
684
  for (var prop in b || (b = {}))
684
- if (__hasOwnProp$9.call(b, prop))
685
- __defNormalProp$7(a, prop, b[prop]);
686
- if (__getOwnPropSymbols$9)
687
- for (var prop of __getOwnPropSymbols$9(b)) {
688
- if (__propIsEnum$9.call(b, prop))
689
- __defNormalProp$7(a, prop, b[prop]);
685
+ if (__hasOwnProp$b.call(b, prop))
686
+ __defNormalProp$9(a, prop, b[prop]);
687
+ if (__getOwnPropSymbols$b)
688
+ for (var prop of __getOwnPropSymbols$b(b)) {
689
+ if (__propIsEnum$b.call(b, prop))
690
+ __defNormalProp$9(a, prop, b[prop]);
690
691
  }
691
692
  return a;
692
693
  };
693
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
694
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
694
695
  function toRefs(objectRef) {
695
696
  if (!vueDemi.isRef(objectRef))
696
697
  return vueDemi.toRefs(objectRef);
@@ -706,7 +707,7 @@ function toRefs(objectRef) {
706
707
  copy[key] = v;
707
708
  objectRef.value = copy;
708
709
  } else {
709
- const newObject = __spreadProps$5(__spreadValues$7({}, objectRef.value), { [key]: v });
710
+ const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });
710
711
  Object.setPrototypeOf(newObject, objectRef.value);
711
712
  objectRef.value = newObject;
712
713
  }
@@ -851,6 +852,19 @@ function until(r) {
851
852
  return createUntil(r);
852
853
  }
853
854
 
855
+ const defaultComparator = (value, othVal) => value === othVal;
856
+ function useArrayDifference(...args) {
857
+ var _a;
858
+ const list = args[0];
859
+ const values = args[1];
860
+ let compareFn = (_a = args[2]) != null ? _a : defaultComparator;
861
+ if (isString(compareFn)) {
862
+ const key = compareFn;
863
+ compareFn = (value, othVal) => value[key] === othVal[key];
864
+ }
865
+ return vueDemi.computed(() => resolveUnref(list).filter((x) => resolveUnref(values).findIndex((y) => compareFn(x, y)) === -1));
866
+ }
867
+
854
868
  function useArrayEvery(list, fn) {
855
869
  return vueDemi.computed(() => resolveUnref(list).every((element, index, array) => fn(resolveUnref(element), index, array)));
856
870
  }
@@ -879,6 +893,27 @@ function useArrayFindLast(list, fn) {
879
893
  return vueDemi.computed(() => resolveUnref(!Array.prototype.findLast ? findLast(resolveUnref(list), (element, index, array) => fn(resolveUnref(element), index, array)) : resolveUnref(list).findLast((element, index, array) => fn(resolveUnref(element), index, array))));
880
894
  }
881
895
 
896
+ function isArrayIncludesOptions(obj) {
897
+ return isObject(obj) && containsProp(obj, "formIndex", "comparator");
898
+ }
899
+ function useArrayIncludes(...args) {
900
+ var _a;
901
+ const list = args[0];
902
+ const value = args[1];
903
+ let comparator = args[2];
904
+ let formIndex = 0;
905
+ if (isArrayIncludesOptions(comparator)) {
906
+ formIndex = (_a = comparator.fromIndex) != null ? _a : 0;
907
+ comparator = comparator.comparator;
908
+ }
909
+ if (typeof comparator === "string") {
910
+ const key = comparator;
911
+ comparator = (element, value2) => element[key] === resolveUnref(value2);
912
+ }
913
+ comparator = comparator != null ? comparator : (element, value2) => element === resolveUnref(value2);
914
+ return vueDemi.computed(() => resolveUnref(list).slice(formIndex).some((element, index, array) => comparator(resolveUnref(element), resolveUnref(value), index, resolveUnref(array))));
915
+ }
916
+
882
917
  function useArrayJoin(list, separator) {
883
918
  return vueDemi.computed(() => resolveUnref(list).map((i) => resolveUnref(i)).join(resolveUnref(separator)));
884
919
  }
@@ -1033,19 +1068,19 @@ function useIntervalFn(cb, interval = 1e3, options = {}) {
1033
1068
  };
1034
1069
  }
1035
1070
 
1036
- var __defProp$6 = Object.defineProperty;
1037
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1038
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1039
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1040
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1041
- var __spreadValues$6 = (a, b) => {
1071
+ var __defProp$8 = Object.defineProperty;
1072
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1073
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1074
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1075
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1076
+ var __spreadValues$8 = (a, b) => {
1042
1077
  for (var prop in b || (b = {}))
1043
- if (__hasOwnProp$8.call(b, prop))
1044
- __defNormalProp$6(a, prop, b[prop]);
1045
- if (__getOwnPropSymbols$8)
1046
- for (var prop of __getOwnPropSymbols$8(b)) {
1047
- if (__propIsEnum$8.call(b, prop))
1048
- __defNormalProp$6(a, prop, b[prop]);
1078
+ if (__hasOwnProp$a.call(b, prop))
1079
+ __defNormalProp$8(a, prop, b[prop]);
1080
+ if (__getOwnPropSymbols$a)
1081
+ for (var prop of __getOwnPropSymbols$a(b)) {
1082
+ if (__propIsEnum$a.call(b, prop))
1083
+ __defNormalProp$8(a, prop, b[prop]);
1049
1084
  }
1050
1085
  return a;
1051
1086
  };
@@ -1065,7 +1100,7 @@ function useInterval(interval = 1e3, options = {}) {
1065
1100
  callback(counter.value);
1066
1101
  } : update, interval, { immediate });
1067
1102
  if (exposeControls) {
1068
- return __spreadValues$6({
1103
+ return __spreadValues$8({
1069
1104
  counter,
1070
1105
  reset
1071
1106
  }, controls);
@@ -1119,19 +1154,19 @@ function useTimeoutFn(cb, interval, options = {}) {
1119
1154
  };
1120
1155
  }
1121
1156
 
1122
- var __defProp$5 = Object.defineProperty;
1123
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1124
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1125
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1126
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1127
- var __spreadValues$5 = (a, b) => {
1157
+ var __defProp$7 = Object.defineProperty;
1158
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1159
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1160
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1161
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1162
+ var __spreadValues$7 = (a, b) => {
1128
1163
  for (var prop in b || (b = {}))
1129
- if (__hasOwnProp$7.call(b, prop))
1130
- __defNormalProp$5(a, prop, b[prop]);
1131
- if (__getOwnPropSymbols$7)
1132
- for (var prop of __getOwnPropSymbols$7(b)) {
1133
- if (__propIsEnum$7.call(b, prop))
1134
- __defNormalProp$5(a, prop, b[prop]);
1164
+ if (__hasOwnProp$9.call(b, prop))
1165
+ __defNormalProp$7(a, prop, b[prop]);
1166
+ if (__getOwnPropSymbols$9)
1167
+ for (var prop of __getOwnPropSymbols$9(b)) {
1168
+ if (__propIsEnum$9.call(b, prop))
1169
+ __defNormalProp$7(a, prop, b[prop]);
1135
1170
  }
1136
1171
  return a;
1137
1172
  };
@@ -1143,7 +1178,7 @@ function useTimeout(interval = 1e3, options = {}) {
1143
1178
  const controls = useTimeoutFn(callback != null ? callback : noop, interval, options);
1144
1179
  const ready = vueDemi.computed(() => !controls.isPending.value);
1145
1180
  if (exposeControls) {
1146
- return __spreadValues$5({
1181
+ return __spreadValues$7({
1147
1182
  ready
1148
1183
  }, controls);
1149
1184
  } else {
@@ -1219,17 +1254,17 @@ function watchArray(source, cb, options) {
1219
1254
  }, options);
1220
1255
  }
1221
1256
 
1222
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1223
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1224
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1257
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1258
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1259
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1225
1260
  var __objRest$5 = (source, exclude) => {
1226
1261
  var target = {};
1227
1262
  for (var prop in source)
1228
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1263
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
1229
1264
  target[prop] = source[prop];
1230
- if (source != null && __getOwnPropSymbols$6)
1231
- for (var prop of __getOwnPropSymbols$6(source)) {
1232
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1265
+ if (source != null && __getOwnPropSymbols$8)
1266
+ for (var prop of __getOwnPropSymbols$8(source)) {
1267
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
1233
1268
  target[prop] = source[prop];
1234
1269
  }
1235
1270
  return target;
@@ -1243,17 +1278,17 @@ function watchWithFilter(source, cb, options = {}) {
1243
1278
  return vueDemi.watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
1244
1279
  }
1245
1280
 
1246
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1247
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1248
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1281
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1282
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1283
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1249
1284
  var __objRest$4 = (source, exclude) => {
1250
1285
  var target = {};
1251
1286
  for (var prop in source)
1252
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
1287
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
1253
1288
  target[prop] = source[prop];
1254
- if (source != null && __getOwnPropSymbols$5)
1255
- for (var prop of __getOwnPropSymbols$5(source)) {
1256
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
1289
+ if (source != null && __getOwnPropSymbols$7)
1290
+ for (var prop of __getOwnPropSymbols$7(source)) {
1291
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
1257
1292
  target[prop] = source[prop];
1258
1293
  }
1259
1294
  return target;
@@ -1274,33 +1309,33 @@ function watchAtMost(source, cb, options) {
1274
1309
  return { count: current, stop };
1275
1310
  }
1276
1311
 
1277
- var __defProp$4 = Object.defineProperty;
1278
- var __defProps$4 = Object.defineProperties;
1279
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1280
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1281
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1282
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1283
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1284
- var __spreadValues$4 = (a, b) => {
1312
+ var __defProp$6 = Object.defineProperty;
1313
+ var __defProps$6 = Object.defineProperties;
1314
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
1315
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1316
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1317
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1318
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1319
+ var __spreadValues$6 = (a, b) => {
1285
1320
  for (var prop in b || (b = {}))
1286
- if (__hasOwnProp$4.call(b, prop))
1287
- __defNormalProp$4(a, prop, b[prop]);
1288
- if (__getOwnPropSymbols$4)
1289
- for (var prop of __getOwnPropSymbols$4(b)) {
1290
- if (__propIsEnum$4.call(b, prop))
1291
- __defNormalProp$4(a, prop, b[prop]);
1321
+ if (__hasOwnProp$6.call(b, prop))
1322
+ __defNormalProp$6(a, prop, b[prop]);
1323
+ if (__getOwnPropSymbols$6)
1324
+ for (var prop of __getOwnPropSymbols$6(b)) {
1325
+ if (__propIsEnum$6.call(b, prop))
1326
+ __defNormalProp$6(a, prop, b[prop]);
1292
1327
  }
1293
1328
  return a;
1294
1329
  };
1295
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1330
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
1296
1331
  var __objRest$3 = (source, exclude) => {
1297
1332
  var target = {};
1298
1333
  for (var prop in source)
1299
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1334
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1300
1335
  target[prop] = source[prop];
1301
- if (source != null && __getOwnPropSymbols$4)
1302
- for (var prop of __getOwnPropSymbols$4(source)) {
1303
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1336
+ if (source != null && __getOwnPropSymbols$6)
1337
+ for (var prop of __getOwnPropSymbols$6(source)) {
1338
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1304
1339
  target[prop] = source[prop];
1305
1340
  }
1306
1341
  return target;
@@ -1313,38 +1348,66 @@ function watchDebounced(source, cb, options = {}) {
1313
1348
  "debounce",
1314
1349
  "maxWait"
1315
1350
  ]);
1316
- return watchWithFilter(source, cb, __spreadProps$4(__spreadValues$4({}, watchOptions), {
1351
+ return watchWithFilter(source, cb, __spreadProps$6(__spreadValues$6({}, watchOptions), {
1317
1352
  eventFilter: debounceFilter(debounce, { maxWait })
1318
1353
  }));
1319
1354
  }
1320
1355
 
1321
- var __defProp$3 = Object.defineProperty;
1322
- var __defProps$3 = Object.defineProperties;
1323
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1324
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1325
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1326
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1327
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1328
- var __spreadValues$3 = (a, b) => {
1356
+ var __defProp$5 = Object.defineProperty;
1357
+ var __defProps$5 = Object.defineProperties;
1358
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
1359
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1360
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1361
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1362
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1363
+ var __spreadValues$5 = (a, b) => {
1329
1364
  for (var prop in b || (b = {}))
1330
- if (__hasOwnProp$3.call(b, prop))
1331
- __defNormalProp$3(a, prop, b[prop]);
1332
- if (__getOwnPropSymbols$3)
1333
- for (var prop of __getOwnPropSymbols$3(b)) {
1334
- if (__propIsEnum$3.call(b, prop))
1335
- __defNormalProp$3(a, prop, b[prop]);
1365
+ if (__hasOwnProp$5.call(b, prop))
1366
+ __defNormalProp$5(a, prop, b[prop]);
1367
+ if (__getOwnPropSymbols$5)
1368
+ for (var prop of __getOwnPropSymbols$5(b)) {
1369
+ if (__propIsEnum$5.call(b, prop))
1370
+ __defNormalProp$5(a, prop, b[prop]);
1336
1371
  }
1337
1372
  return a;
1338
1373
  };
1339
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1374
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
1375
+ function watchDeep(source, cb, options) {
1376
+ return vueDemi.watch(source, (v, ov, onInvalidate) => {
1377
+ if (v)
1378
+ cb(v, ov, onInvalidate);
1379
+ }, __spreadProps$5(__spreadValues$5({}, options), {
1380
+ deep: true
1381
+ }));
1382
+ }
1383
+
1384
+ var __defProp$4 = Object.defineProperty;
1385
+ var __defProps$4 = Object.defineProperties;
1386
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1387
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1388
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1389
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1390
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1391
+ var __spreadValues$4 = (a, b) => {
1392
+ for (var prop in b || (b = {}))
1393
+ if (__hasOwnProp$4.call(b, prop))
1394
+ __defNormalProp$4(a, prop, b[prop]);
1395
+ if (__getOwnPropSymbols$4)
1396
+ for (var prop of __getOwnPropSymbols$4(b)) {
1397
+ if (__propIsEnum$4.call(b, prop))
1398
+ __defNormalProp$4(a, prop, b[prop]);
1399
+ }
1400
+ return a;
1401
+ };
1402
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1340
1403
  var __objRest$2 = (source, exclude) => {
1341
1404
  var target = {};
1342
1405
  for (var prop in source)
1343
- if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
1406
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1344
1407
  target[prop] = source[prop];
1345
- if (source != null && __getOwnPropSymbols$3)
1346
- for (var prop of __getOwnPropSymbols$3(source)) {
1347
- if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
1408
+ if (source != null && __getOwnPropSymbols$4)
1409
+ for (var prop of __getOwnPropSymbols$4(source)) {
1410
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1348
1411
  target[prop] = source[prop];
1349
1412
  }
1350
1413
  return target;
@@ -1381,7 +1444,7 @@ function watchIgnorable(source, cb, options = {}) {
1381
1444
  };
1382
1445
  disposables.push(vueDemi.watch(source, () => {
1383
1446
  syncCounter.value++;
1384
- }, __spreadProps$3(__spreadValues$3({}, watchOptions), { flush: "sync" })));
1447
+ }, __spreadProps$4(__spreadValues$4({}, watchOptions), { flush: "sync" })));
1385
1448
  ignoreUpdates = (updater) => {
1386
1449
  const syncCounterPrev = syncCounter.value;
1387
1450
  updater();
@@ -1402,6 +1465,34 @@ function watchIgnorable(source, cb, options = {}) {
1402
1465
  return { stop, ignoreUpdates, ignorePrevAsyncUpdates };
1403
1466
  }
1404
1467
 
1468
+ var __defProp$3 = Object.defineProperty;
1469
+ var __defProps$3 = Object.defineProperties;
1470
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1471
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1472
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1473
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1474
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1475
+ var __spreadValues$3 = (a, b) => {
1476
+ for (var prop in b || (b = {}))
1477
+ if (__hasOwnProp$3.call(b, prop))
1478
+ __defNormalProp$3(a, prop, b[prop]);
1479
+ if (__getOwnPropSymbols$3)
1480
+ for (var prop of __getOwnPropSymbols$3(b)) {
1481
+ if (__propIsEnum$3.call(b, prop))
1482
+ __defNormalProp$3(a, prop, b[prop]);
1483
+ }
1484
+ return a;
1485
+ };
1486
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1487
+ function watchImmediate(source, cb, options) {
1488
+ return vueDemi.watch(source, (v, ov, onInvalidate) => {
1489
+ if (v)
1490
+ cb(v, ov, onInvalidate);
1491
+ }, __spreadProps$3(__spreadValues$3({}, options), {
1492
+ immediate: true
1493
+ }));
1494
+ }
1495
+
1405
1496
  function watchOnce(source, cb, options) {
1406
1497
  const stop = vueDemi.watch(source, (...args) => {
1407
1498
  vueDemi.nextTick(() => stop());
@@ -1613,6 +1704,7 @@ exports.makeDestructurable = makeDestructurable;
1613
1704
  exports.noop = noop;
1614
1705
  exports.normalizeDate = normalizeDate;
1615
1706
  exports.now = now;
1707
+ exports.objectEntries = objectEntries;
1616
1708
  exports.objectPick = objectPick;
1617
1709
  exports.pausableFilter = pausableFilter;
1618
1710
  exports.pausableWatch = watchPausable;
@@ -1645,11 +1737,13 @@ exports.tryOnMounted = tryOnMounted;
1645
1737
  exports.tryOnScopeDispose = tryOnScopeDispose;
1646
1738
  exports.tryOnUnmounted = tryOnUnmounted;
1647
1739
  exports.until = until;
1740
+ exports.useArrayDifference = useArrayDifference;
1648
1741
  exports.useArrayEvery = useArrayEvery;
1649
1742
  exports.useArrayFilter = useArrayFilter;
1650
1743
  exports.useArrayFind = useArrayFind;
1651
1744
  exports.useArrayFindIndex = useArrayFindIndex;
1652
1745
  exports.useArrayFindLast = useArrayFindLast;
1746
+ exports.useArrayIncludes = useArrayIncludes;
1653
1747
  exports.useArrayJoin = useArrayJoin;
1654
1748
  exports.useArrayMap = useArrayMap;
1655
1749
  exports.useArrayReduce = useArrayReduce;
@@ -1672,7 +1766,9 @@ exports.useToggle = useToggle;
1672
1766
  exports.watchArray = watchArray;
1673
1767
  exports.watchAtMost = watchAtMost;
1674
1768
  exports.watchDebounced = watchDebounced;
1769
+ exports.watchDeep = watchDeep;
1675
1770
  exports.watchIgnorable = watchIgnorable;
1771
+ exports.watchImmediate = watchImmediate;
1676
1772
  exports.watchOnce = watchOnce;
1677
1773
  exports.watchPausable = watchPausable;
1678
1774
  exports.watchThrottled = watchThrottled;