@vueuse/components 10.0.0 → 10.0.2

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.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import { defineComponent, ref, h, watch, computed, reactive, shallowRef, nextTick, getCurrentInstance, onMounted, watchEffect, toRefs } from 'vue-demi';
2
- import { onClickOutside as onClickOutside$1, useActiveElement, useBattery, useBrowserLocation, useDark, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDocumentVisibility, useStorage as useStorage$1, isClient as isClient$1, useDraggable, useElementBounding, useElementSize as useElementSize$1, useElementVisibility as useElementVisibility$1, useEyeDropper, useFullscreen, useGeolocation, useIdle, useMouse, useMouseInElement, useMousePressed, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, usePointer, usePointerLock, usePreferredColorScheme, usePreferredContrast, usePreferredDark as usePreferredDark$1, usePreferredLanguages, usePreferredReducedMotion, useMutationObserver, useTimeAgo, useTimestamp, useVirtualList, useWindowFocus, useWindowSize } from '@vueuse/core';
2
+ import { onClickOutside as onClickOutside$1, useActiveElement, useBattery, useBrowserLocation, useDark, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDocumentVisibility, useStorage as useStorage$1, isClient as isClient$1, useDraggable, useElementBounding, useElementSize as useElementSize$1, useElementVisibility as useElementVisibility$1, useEyeDropper, useFullscreen, useGeolocation, useIdle, useMouse, useMouseInElement, useMousePressed, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, usePointer, usePointerLock, usePreferredColorScheme, usePreferredContrast, usePreferredDark as usePreferredDark$1, usePreferredLanguages, usePreferredReducedMotion, useTimeAgo, useTimestamp, useVirtualList, useWindowFocus, useWindowSize } from '@vueuse/core';
3
3
  import { toValue, isClient, noop, tryOnScopeDispose, isIOS, directiveHooks, pausableWatch, toRef, tryOnMounted, useToggle, notNullish, promiseTimeout, useDebounceFn, useThrottleFn } from '@vueuse/shared';
4
- import { computed as computed$1 } from '@vue/reactivity';
5
4
 
6
5
  const OnClickOutside = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
7
6
  name: "OnClickOutside",
@@ -187,17 +186,17 @@ function onKeyStroke(...args) {
187
186
  }
188
187
 
189
188
  var __defProp$d = Object.defineProperty;
190
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
191
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
192
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
189
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
190
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
191
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
193
192
  var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
194
193
  var __spreadValues$d = (a, b) => {
195
194
  for (var prop in b || (b = {}))
196
- if (__hasOwnProp$e.call(b, prop))
195
+ if (__hasOwnProp$f.call(b, prop))
197
196
  __defNormalProp$d(a, prop, b[prop]);
198
- if (__getOwnPropSymbols$e)
199
- for (var prop of __getOwnPropSymbols$e(b)) {
200
- if (__propIsEnum$e.call(b, prop))
197
+ if (__getOwnPropSymbols$f)
198
+ for (var prop of __getOwnPropSymbols$f(b)) {
199
+ if (__propIsEnum$f.call(b, prop))
201
200
  __defNormalProp$d(a, prop, b[prop]);
202
201
  }
203
202
  return a;
@@ -334,17 +333,17 @@ function guessSerializerType(rawInit) {
334
333
  }
335
334
 
336
335
  var __defProp$c = Object.defineProperty;
337
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
338
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
339
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
336
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
337
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
338
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
340
339
  var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
341
340
  var __spreadValues$c = (a, b) => {
342
341
  for (var prop in b || (b = {}))
343
- if (__hasOwnProp$d.call(b, prop))
342
+ if (__hasOwnProp$e.call(b, prop))
344
343
  __defNormalProp$c(a, prop, b[prop]);
345
- if (__getOwnPropSymbols$d)
346
- for (var prop of __getOwnPropSymbols$d(b)) {
347
- if (__propIsEnum$d.call(b, prop))
344
+ if (__getOwnPropSymbols$e)
345
+ for (var prop of __getOwnPropSymbols$e(b)) {
346
+ if (__propIsEnum$e.call(b, prop))
348
347
  __defNormalProp$c(a, prop, b[prop]);
349
348
  }
350
349
  return a;
@@ -550,17 +549,17 @@ function usePreferredDark(options) {
550
549
  }
551
550
 
552
551
  var __defProp$b = Object.defineProperty;
553
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
554
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
555
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
552
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
553
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
554
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
556
555
  var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
557
556
  var __spreadValues$b = (a, b) => {
558
557
  for (var prop in b || (b = {}))
559
- if (__hasOwnProp$c.call(b, prop))
558
+ if (__hasOwnProp$d.call(b, prop))
560
559
  __defNormalProp$b(a, prop, b[prop]);
561
- if (__getOwnPropSymbols$c)
562
- for (var prop of __getOwnPropSymbols$c(b)) {
563
- if (__propIsEnum$c.call(b, prop))
560
+ if (__getOwnPropSymbols$d)
561
+ for (var prop of __getOwnPropSymbols$d(b)) {
562
+ if (__propIsEnum$d.call(b, prop))
564
563
  __defNormalProp$b(a, prop, b[prop]);
565
564
  }
566
565
  return a;
@@ -741,17 +740,17 @@ const UseDocumentVisibility = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
741
740
  var __defProp$a = Object.defineProperty;
742
741
  var __defProps$8 = Object.defineProperties;
743
742
  var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
744
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
745
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
746
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
743
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
744
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
745
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
747
746
  var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
748
747
  var __spreadValues$a = (a, b) => {
749
748
  for (var prop in b || (b = {}))
750
- if (__hasOwnProp$b.call(b, prop))
749
+ if (__hasOwnProp$c.call(b, prop))
751
750
  __defNormalProp$a(a, prop, b[prop]);
752
- if (__getOwnPropSymbols$b)
753
- for (var prop of __getOwnPropSymbols$b(b)) {
754
- if (__propIsEnum$b.call(b, prop))
751
+ if (__getOwnPropSymbols$c)
752
+ for (var prop of __getOwnPropSymbols$c(b)) {
753
+ if (__propIsEnum$c.call(b, prop))
755
754
  __defNormalProp$a(a, prop, b[prop]);
756
755
  }
757
756
  return a;
@@ -862,23 +861,23 @@ const UseElementSize = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
862
861
  }
863
862
  });
864
863
 
865
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
866
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
867
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
868
- var __objRest = (source, exclude) => {
864
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
865
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
866
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
867
+ var __objRest$1 = (source, exclude) => {
869
868
  var target = {};
870
869
  for (var prop in source)
871
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
870
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
872
871
  target[prop] = source[prop];
873
- if (source != null && __getOwnPropSymbols$a)
874
- for (var prop of __getOwnPropSymbols$a(source)) {
875
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
872
+ if (source != null && __getOwnPropSymbols$b)
873
+ for (var prop of __getOwnPropSymbols$b(source)) {
874
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
876
875
  target[prop] = source[prop];
877
876
  }
878
877
  return target;
879
878
  };
880
879
  function useResizeObserver(target, callback, options = {}) {
881
- const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest(_a, ["window"]);
880
+ const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$1(_a, ["window"]);
882
881
  let observer;
883
882
  const isSupported = useSupported(() => window && "ResizeObserver" in window);
884
883
  const cleanup = () => {
@@ -992,7 +991,7 @@ function useIntersectionObserver(target, callback, options = {}) {
992
991
  immediate = true
993
992
  } = options;
994
993
  const isSupported = useSupported(() => window && "IntersectionObserver" in window);
995
- const targets = computed$1(() => {
994
+ const targets = computed(() => {
996
995
  const _target = toValue(target);
997
996
  return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);
998
997
  });
@@ -1004,7 +1003,7 @@ function useIntersectionObserver(target, callback, options = {}) {
1004
1003
  cleanup();
1005
1004
  if (!isActive.value)
1006
1005
  return;
1007
- if (targets2.length)
1006
+ if (!targets2.length)
1008
1007
  return;
1009
1008
  const observer = new IntersectionObserver(
1010
1009
  callback,
@@ -1172,17 +1171,17 @@ function useAsyncState(promise, initialState, options) {
1172
1171
  }
1173
1172
 
1174
1173
  var __defProp$9 = Object.defineProperty;
1175
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1176
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1177
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1174
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1175
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1176
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1178
1177
  var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1179
1178
  var __spreadValues$9 = (a, b) => {
1180
1179
  for (var prop in b || (b = {}))
1181
- if (__hasOwnProp$9.call(b, prop))
1180
+ if (__hasOwnProp$a.call(b, prop))
1182
1181
  __defNormalProp$9(a, prop, b[prop]);
1183
- if (__getOwnPropSymbols$9)
1184
- for (var prop of __getOwnPropSymbols$9(b)) {
1185
- if (__propIsEnum$9.call(b, prop))
1182
+ if (__getOwnPropSymbols$a)
1183
+ for (var prop of __getOwnPropSymbols$a(b)) {
1184
+ if (__propIsEnum$a.call(b, prop))
1186
1185
  __defNormalProp$9(a, prop, b[prop]);
1187
1186
  }
1188
1187
  return a;
@@ -1369,17 +1368,17 @@ function useScroll(element, options = {}) {
1369
1368
  var __defProp$8 = Object.defineProperty;
1370
1369
  var __defProps$7 = Object.defineProperties;
1371
1370
  var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
1372
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1373
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1374
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1371
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1372
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1373
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1375
1374
  var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1376
1375
  var __spreadValues$8 = (a, b) => {
1377
1376
  for (var prop in b || (b = {}))
1378
- if (__hasOwnProp$8.call(b, prop))
1377
+ if (__hasOwnProp$9.call(b, prop))
1379
1378
  __defNormalProp$8(a, prop, b[prop]);
1380
- if (__getOwnPropSymbols$8)
1381
- for (var prop of __getOwnPropSymbols$8(b)) {
1382
- if (__propIsEnum$8.call(b, prop))
1379
+ if (__getOwnPropSymbols$9)
1380
+ for (var prop of __getOwnPropSymbols$9(b)) {
1381
+ if (__propIsEnum$9.call(b, prop))
1383
1382
  __defNormalProp$8(a, prop, b[prop]);
1384
1383
  }
1385
1384
  return a;
@@ -1474,17 +1473,17 @@ const UseMouseInElement = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
1474
1473
  var __defProp$7 = Object.defineProperty;
1475
1474
  var __defProps$6 = Object.defineProperties;
1476
1475
  var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
1477
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1478
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1479
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1476
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1477
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1478
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1480
1479
  var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1481
1480
  var __spreadValues$7 = (a, b) => {
1482
1481
  for (var prop in b || (b = {}))
1483
- if (__hasOwnProp$7.call(b, prop))
1482
+ if (__hasOwnProp$8.call(b, prop))
1484
1483
  __defNormalProp$7(a, prop, b[prop]);
1485
- if (__getOwnPropSymbols$7)
1486
- for (var prop of __getOwnPropSymbols$7(b)) {
1487
- if (__propIsEnum$7.call(b, prop))
1484
+ if (__getOwnPropSymbols$8)
1485
+ for (var prop of __getOwnPropSymbols$8(b)) {
1486
+ if (__propIsEnum$8.call(b, prop))
1488
1487
  __defNormalProp$7(a, prop, b[prop]);
1489
1488
  }
1490
1489
  return a;
@@ -1517,17 +1516,17 @@ const UseNetwork = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
1517
1516
  var __defProp$6 = Object.defineProperty;
1518
1517
  var __defProps$5 = Object.defineProperties;
1519
1518
  var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
1520
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1521
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1522
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1519
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1520
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1521
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1523
1522
  var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1524
1523
  var __spreadValues$6 = (a, b) => {
1525
1524
  for (var prop in b || (b = {}))
1526
- if (__hasOwnProp$6.call(b, prop))
1525
+ if (__hasOwnProp$7.call(b, prop))
1527
1526
  __defNormalProp$6(a, prop, b[prop]);
1528
- if (__getOwnPropSymbols$6)
1529
- for (var prop of __getOwnPropSymbols$6(b)) {
1530
- if (__propIsEnum$6.call(b, prop))
1527
+ if (__getOwnPropSymbols$7)
1528
+ for (var prop of __getOwnPropSymbols$7(b)) {
1529
+ if (__propIsEnum$7.call(b, prop))
1531
1530
  __defNormalProp$6(a, prop, b[prop]);
1532
1531
  }
1533
1532
  return a;
@@ -1563,17 +1562,17 @@ const UseObjectUrl = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
1563
1562
  var __defProp$5 = Object.defineProperty;
1564
1563
  var __defProps$4 = Object.defineProperties;
1565
1564
  var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1566
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1567
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1568
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1565
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1566
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1567
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1569
1568
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1570
1569
  var __spreadValues$5 = (a, b) => {
1571
1570
  for (var prop in b || (b = {}))
1572
- if (__hasOwnProp$5.call(b, prop))
1571
+ if (__hasOwnProp$6.call(b, prop))
1573
1572
  __defNormalProp$5(a, prop, b[prop]);
1574
- if (__getOwnPropSymbols$5)
1575
- for (var prop of __getOwnPropSymbols$5(b)) {
1576
- if (__propIsEnum$5.call(b, prop))
1573
+ if (__getOwnPropSymbols$6)
1574
+ for (var prop of __getOwnPropSymbols$6(b)) {
1575
+ if (__propIsEnum$6.call(b, prop))
1577
1576
  __defNormalProp$5(a, prop, b[prop]);
1578
1577
  }
1579
1578
  return a;
@@ -1648,17 +1647,17 @@ const UsePageLeave = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
1648
1647
  var __defProp$4 = Object.defineProperty;
1649
1648
  var __defProps$3 = Object.defineProperties;
1650
1649
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1651
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1652
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1653
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1650
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1651
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1652
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1654
1653
  var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1655
1654
  var __spreadValues$4 = (a, b) => {
1656
1655
  for (var prop in b || (b = {}))
1657
- if (__hasOwnProp$4.call(b, prop))
1656
+ if (__hasOwnProp$5.call(b, prop))
1658
1657
  __defNormalProp$4(a, prop, b[prop]);
1659
- if (__getOwnPropSymbols$4)
1660
- for (var prop of __getOwnPropSymbols$4(b)) {
1661
- if (__propIsEnum$4.call(b, prop))
1658
+ if (__getOwnPropSymbols$5)
1659
+ for (var prop of __getOwnPropSymbols$5(b)) {
1660
+ if (__propIsEnum$5.call(b, prop))
1662
1661
  __defNormalProp$4(a, prop, b[prop]);
1663
1662
  }
1664
1663
  return a;
@@ -1761,6 +1760,53 @@ const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ defineComponen
1761
1760
  }
1762
1761
  });
1763
1762
 
1763
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1764
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1765
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1766
+ var __objRest = (source, exclude) => {
1767
+ var target = {};
1768
+ for (var prop in source)
1769
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1770
+ target[prop] = source[prop];
1771
+ if (source != null && __getOwnPropSymbols$4)
1772
+ for (var prop of __getOwnPropSymbols$4(source)) {
1773
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1774
+ target[prop] = source[prop];
1775
+ }
1776
+ return target;
1777
+ };
1778
+ function useMutationObserver(target, callback, options = {}) {
1779
+ const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest(_a, ["window"]);
1780
+ let observer;
1781
+ const isSupported = useSupported(() => window && "MutationObserver" in window);
1782
+ const cleanup = () => {
1783
+ if (observer) {
1784
+ observer.disconnect();
1785
+ observer = void 0;
1786
+ }
1787
+ };
1788
+ const stopWatch = watch(
1789
+ () => unrefElement(target),
1790
+ (el) => {
1791
+ cleanup();
1792
+ if (isSupported.value && window && el) {
1793
+ observer = new MutationObserver(callback);
1794
+ observer.observe(el, mutationOptions);
1795
+ }
1796
+ },
1797
+ { immediate: true }
1798
+ );
1799
+ const stop = () => {
1800
+ cleanup();
1801
+ stopWatch();
1802
+ };
1803
+ tryOnScopeDispose(stop);
1804
+ return {
1805
+ isSupported,
1806
+ stop
1807
+ };
1808
+ }
1809
+
1764
1810
  function useCssVar(prop, target, options = {}) {
1765
1811
  const { window = defaultWindow, initialValue = "", observe = false } = options;
1766
1812
  const variable = ref(initialValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vueuse/components",
3
- "version": "10.0.0",
3
+ "version": "10.0.2",
4
4
  "description": "Renderless components for VueUse",
5
5
  "author": "Jacob Clevenger<https://github.com/wheatjs>",
6
6
  "license": "MIT",
@@ -33,8 +33,8 @@
33
33
  "jsdelivr": "./index.iife.min.js",
34
34
  "types": "./index.d.ts",
35
35
  "dependencies": {
36
- "@vueuse/core": "10.0.0",
37
- "@vueuse/shared": "10.0.0",
36
+ "@vueuse/core": "10.0.2",
37
+ "@vueuse/shared": "10.0.2",
38
38
  "vue-demi": ">=0.14.0"
39
39
  }
40
40
  }