@vueuse/components 8.4.2 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent, ref, h, unref, watch, computed, reactive, shallowRef, toRef, toRefs } from 'vue-demi';
1
+ import { defineComponent, ref, h, unref, watch, computed, reactive, shallowRef, nextTick, toRef, toRefs } from 'vue-demi';
2
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, useOffsetPagination, useOnline, usePageLeave, usePointer, usePreferredColorScheme, usePreferredDark as usePreferredDark$1, usePreferredLanguages, useTimeAgo, useTimestamp, useVirtualList, useWindowFocus, useWindowSize } from '@vueuse/core';
3
- import { isClient, isString, noop, tryOnScopeDispose, directiveHooks, pausableWatch, tryOnBeforeMount, tryOnMounted, useToggle, useDebounceFn, useThrottleFn } from '@vueuse/shared';
3
+ import { isClient, isString, noop, tryOnScopeDispose, directiveHooks, pausableWatch, tryOnBeforeMount, tryOnMounted, useToggle, promiseTimeout, useDebounceFn, useThrottleFn, isIOS } from '@vueuse/shared';
4
4
 
5
5
  const OnClickOutside = defineComponent({
6
6
  name: "OnClickOutside",
@@ -19,9 +19,8 @@ const OnClickOutside = defineComponent({
19
19
  });
20
20
 
21
21
  function unrefElement(elRef) {
22
- var _a;
23
22
  const plain = unref(elRef);
24
- return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
23
+ return plain != null && "$el" in plain ? plain.$el : plain;
25
24
  }
26
25
 
27
26
  const defaultWindow = isClient ? window : void 0;
@@ -86,7 +85,11 @@ function onClickOutside(target, handler, options = {}) {
86
85
  shouldListen.value = !!el && !e.composedPath().includes(el);
87
86
  }, { passive: true }),
88
87
  useEventListener(window, "pointerup", (e) => {
89
- fallback = window.setTimeout(() => listener(e), 50);
88
+ if (e.button === 0) {
89
+ const path = e.composedPath();
90
+ e.composedPath = () => path;
91
+ fallback = window.setTimeout(() => listener(e), 50);
92
+ }
90
93
  }, { passive: true })
91
94
  ];
92
95
  const stop = () => cleanup.forEach((fn) => fn());
@@ -128,19 +131,19 @@ function onKeyStroke(key, handler, options = {}) {
128
131
  return useEventListener(target, eventName, listener, passive);
129
132
  }
130
133
 
131
- var __defProp$b = Object.defineProperty;
132
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
133
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
134
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
135
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
136
- var __spreadValues$b = (a, b) => {
134
+ var __defProp$c = Object.defineProperty;
135
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
136
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
137
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
138
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
139
+ var __spreadValues$c = (a, b) => {
137
140
  for (var prop in b || (b = {}))
138
- if (__hasOwnProp$c.call(b, prop))
139
- __defNormalProp$b(a, prop, b[prop]);
140
- if (__getOwnPropSymbols$c)
141
- for (var prop of __getOwnPropSymbols$c(b)) {
142
- if (__propIsEnum$c.call(b, prop))
143
- __defNormalProp$b(a, prop, b[prop]);
141
+ if (__hasOwnProp$d.call(b, prop))
142
+ __defNormalProp$c(a, prop, b[prop]);
143
+ if (__getOwnPropSymbols$d)
144
+ for (var prop of __getOwnPropSymbols$d(b)) {
145
+ if (__propIsEnum$d.call(b, prop))
146
+ __defNormalProp$c(a, prop, b[prop]);
144
147
  }
145
148
  return a;
146
149
  };
@@ -154,7 +157,7 @@ const vOnKeyStroke = {
154
157
  });
155
158
  } else {
156
159
  const [handler, options] = binding.value;
157
- onKeyStroke(keys, handler, __spreadValues$b({
160
+ onKeyStroke(keys, handler, __spreadValues$c({
158
161
  target: el
159
162
  }, options));
160
163
  }
@@ -362,10 +365,11 @@ function useStorage(key, initialValue, storage, options = {}) {
362
365
 
363
366
  function useMediaQuery(query, options = {}) {
364
367
  const { window = defaultWindow } = options;
368
+ const isSupported = Boolean(window && "matchMedia" in window);
365
369
  let mediaQuery;
366
370
  const matches = ref(false);
367
371
  const update = () => {
368
- if (!window)
372
+ if (!isSupported)
369
373
  return;
370
374
  if (!mediaQuery)
371
375
  mediaQuery = window.matchMedia(query);
@@ -393,19 +397,19 @@ function usePreferredDark(options) {
393
397
  return useMediaQuery("(prefers-color-scheme: dark)", options);
394
398
  }
395
399
 
396
- var __defProp$a = Object.defineProperty;
397
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
398
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
399
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
400
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
401
- var __spreadValues$a = (a, b) => {
400
+ var __defProp$b = Object.defineProperty;
401
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
402
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
403
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
404
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
405
+ var __spreadValues$b = (a, b) => {
402
406
  for (var prop in b || (b = {}))
403
- if (__hasOwnProp$b.call(b, prop))
404
- __defNormalProp$a(a, prop, b[prop]);
405
- if (__getOwnPropSymbols$b)
406
- for (var prop of __getOwnPropSymbols$b(b)) {
407
- if (__propIsEnum$b.call(b, prop))
408
- __defNormalProp$a(a, prop, b[prop]);
407
+ if (__hasOwnProp$c.call(b, prop))
408
+ __defNormalProp$b(a, prop, b[prop]);
409
+ if (__getOwnPropSymbols$c)
410
+ for (var prop of __getOwnPropSymbols$c(b)) {
411
+ if (__propIsEnum$c.call(b, prop))
412
+ __defNormalProp$b(a, prop, b[prop]);
409
413
  }
410
414
  return a;
411
415
  };
@@ -419,7 +423,7 @@ function useColorMode(options = {}) {
419
423
  listenToStorageChanges = true,
420
424
  storageRef
421
425
  } = options;
422
- const modes = __spreadValues$a({
426
+ const modes = __spreadValues$b({
423
427
  auto: "",
424
428
  light: "light",
425
429
  dark: "dark"
@@ -557,21 +561,21 @@ const UseDocumentVisibility = defineComponent({
557
561
  }
558
562
  });
559
563
 
560
- var __defProp$9 = Object.defineProperty;
564
+ var __defProp$a = Object.defineProperty;
561
565
  var __defProps$8 = Object.defineProperties;
562
566
  var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
563
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
564
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
565
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
566
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
567
- var __spreadValues$9 = (a, b) => {
567
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
568
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
569
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
570
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
571
+ var __spreadValues$a = (a, b) => {
568
572
  for (var prop in b || (b = {}))
569
- if (__hasOwnProp$a.call(b, prop))
570
- __defNormalProp$9(a, prop, b[prop]);
571
- if (__getOwnPropSymbols$a)
572
- for (var prop of __getOwnPropSymbols$a(b)) {
573
- if (__propIsEnum$a.call(b, prop))
574
- __defNormalProp$9(a, prop, b[prop]);
573
+ if (__hasOwnProp$b.call(b, prop))
574
+ __defNormalProp$a(a, prop, b[prop]);
575
+ if (__getOwnPropSymbols$b)
576
+ for (var prop of __getOwnPropSymbols$b(b)) {
577
+ if (__propIsEnum$b.call(b, prop))
578
+ __defNormalProp$a(a, prop, b[prop]);
575
579
  }
576
580
  return a;
577
581
  };
@@ -584,13 +588,14 @@ const UseDraggable = defineComponent({
584
588
  "initialValue",
585
589
  "exact",
586
590
  "preventDefault",
591
+ "stopPropagation",
587
592
  "pointerTypes",
588
593
  "as"
589
594
  ],
590
595
  setup(props, { slots }) {
591
596
  const target = ref();
592
597
  const initialValue = props.storageKey ? useStorage$1(props.storageKey, unref(props.initialValue) || { x: 0, y: 0 }, isClient$1 ? props.storageType === "session" ? sessionStorage : localStorage : void 0) : props.initialValue || { x: 0, y: 0 };
593
- const data = reactive(useDraggable(target, __spreadProps$8(__spreadValues$9({}, props), {
598
+ const data = reactive(useDraggable(target, __spreadProps$8(__spreadValues$a({}, props), {
594
599
  initialValue
595
600
  })));
596
601
  return () => {
@@ -642,17 +647,17 @@ const UseElementSize = defineComponent({
642
647
  }
643
648
  });
644
649
 
645
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
646
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
647
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
650
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
651
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
652
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
648
653
  var __objRest = (source, exclude) => {
649
654
  var target = {};
650
655
  for (var prop in source)
651
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
656
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
652
657
  target[prop] = source[prop];
653
- if (source != null && __getOwnPropSymbols$9)
654
- for (var prop of __getOwnPropSymbols$9(source)) {
655
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
658
+ if (source != null && __getOwnPropSymbols$a)
659
+ for (var prop of __getOwnPropSymbols$a(source)) {
660
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
656
661
  target[prop] = source[prop];
657
662
  }
658
663
  return target;
@@ -811,6 +816,109 @@ const UseIdle = defineComponent({
811
816
  }
812
817
  });
813
818
 
819
+ function useAsyncState(promise, initialState, options) {
820
+ const {
821
+ immediate = true,
822
+ delay = 0,
823
+ onError = noop,
824
+ resetOnExecute = true,
825
+ shallow = true
826
+ } = options != null ? options : {};
827
+ const state = shallow ? shallowRef(initialState) : ref(initialState);
828
+ const isReady = ref(false);
829
+ const isLoading = ref(false);
830
+ const error = ref(void 0);
831
+ async function execute(delay2 = 0, ...args) {
832
+ if (resetOnExecute)
833
+ state.value = initialState;
834
+ error.value = void 0;
835
+ isReady.value = false;
836
+ isLoading.value = true;
837
+ if (delay2 > 0)
838
+ await promiseTimeout(delay2);
839
+ const _promise = typeof promise === "function" ? promise(...args) : promise;
840
+ try {
841
+ const data = await _promise;
842
+ state.value = data;
843
+ isReady.value = true;
844
+ } catch (e) {
845
+ error.value = e;
846
+ onError(e);
847
+ } finally {
848
+ isLoading.value = false;
849
+ }
850
+ return state.value;
851
+ }
852
+ if (immediate)
853
+ execute(delay);
854
+ return {
855
+ state,
856
+ isReady,
857
+ isLoading,
858
+ error,
859
+ execute
860
+ };
861
+ }
862
+
863
+ var __defProp$9 = Object.defineProperty;
864
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
865
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
866
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
867
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
868
+ var __spreadValues$9 = (a, b) => {
869
+ for (var prop in b || (b = {}))
870
+ if (__hasOwnProp$9.call(b, prop))
871
+ __defNormalProp$9(a, prop, b[prop]);
872
+ if (__getOwnPropSymbols$9)
873
+ for (var prop of __getOwnPropSymbols$9(b)) {
874
+ if (__propIsEnum$9.call(b, prop))
875
+ __defNormalProp$9(a, prop, b[prop]);
876
+ }
877
+ return a;
878
+ };
879
+ async function loadImage(options) {
880
+ return new Promise((resolve, reject) => {
881
+ const img = new Image();
882
+ const { src, srcset, sizes } = options;
883
+ img.src = src;
884
+ if (srcset)
885
+ img.srcset = srcset;
886
+ if (sizes)
887
+ img.sizes = sizes;
888
+ img.onload = () => resolve(img);
889
+ img.onerror = reject;
890
+ });
891
+ }
892
+ const useImage = (options, asyncStateOptions = {}) => {
893
+ const state = useAsyncState(() => loadImage(unref(options)), void 0, __spreadValues$9({
894
+ resetOnExecute: true
895
+ }, asyncStateOptions));
896
+ watch(() => unref(options), () => state.execute(asyncStateOptions.delay), { deep: true });
897
+ return state;
898
+ };
899
+
900
+ const UseImage = defineComponent({
901
+ name: "UseImage",
902
+ props: [
903
+ "src",
904
+ "srcset",
905
+ "sizes",
906
+ "as"
907
+ ],
908
+ setup(props, { slots }) {
909
+ const data = reactive(useImage(props));
910
+ return () => {
911
+ if (data.isLoading && slots.loading)
912
+ return slots.loading(data);
913
+ else if (data.error && slots.error)
914
+ return slots.error(data.error);
915
+ if (slots.default)
916
+ return slots.default(data);
917
+ return h(props.as || "img", props);
918
+ };
919
+ }
920
+ });
921
+
814
922
  function useScroll(element, options = {}) {
815
923
  const {
816
924
  throttle = 0,
@@ -860,7 +968,9 @@ function useScroll(element, options = {}) {
860
968
  arrivedState.left = scrollLeft <= 0 + (offset.left || 0);
861
969
  arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0);
862
970
  x.value = scrollLeft;
863
- const scrollTop = eventTarget.scrollTop;
971
+ let scrollTop = eventTarget.scrollTop;
972
+ if (e.target === document && !scrollTop)
973
+ scrollTop = document.body.scrollTop;
864
974
  directions.top = scrollTop < y.value;
865
975
  directions.bottom = scrollTop > y.value;
866
976
  arrivedState.top = scrollTop <= 0 + (offset.top || 0);
@@ -901,15 +1011,31 @@ var __spreadValues$8 = (a, b) => {
901
1011
  };
902
1012
  var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
903
1013
  function useInfiniteScroll(element, onLoadMore, options = {}) {
904
- var _a;
1014
+ var _a, _b;
1015
+ const direction = (_a = options.direction) != null ? _a : "bottom";
905
1016
  const state = reactive(useScroll(element, __spreadProps$7(__spreadValues$8({}, options), {
906
1017
  offset: __spreadValues$8({
907
- bottom: (_a = options.distance) != null ? _a : 0
1018
+ [direction]: (_b = options.distance) != null ? _b : 0
908
1019
  }, options.offset)
909
1020
  })));
910
- watch(() => state.arrivedState.bottom, (v) => {
911
- if (v)
912
- onLoadMore(state);
1021
+ watch(() => state.arrivedState[direction], async (v) => {
1022
+ var _a2, _b2;
1023
+ if (v) {
1024
+ const elem = unref(element);
1025
+ const previous = {
1026
+ height: (_a2 = elem == null ? void 0 : elem.scrollHeight) != null ? _a2 : 0,
1027
+ width: (_b2 = elem == null ? void 0 : elem.scrollWidth) != null ? _b2 : 0
1028
+ };
1029
+ await onLoadMore(state);
1030
+ if (options.preserveScrollPosition && elem) {
1031
+ nextTick(() => {
1032
+ elem.scrollTo({
1033
+ top: elem.scrollHeight - previous.height,
1034
+ left: elem.scrollWidth - previous.width
1035
+ });
1036
+ });
1037
+ }
1038
+ }
913
1039
  });
914
1040
  }
915
1041
 
@@ -1230,15 +1356,17 @@ const UsePreferredLanguages = defineComponent({
1230
1356
  }
1231
1357
  });
1232
1358
 
1233
- function useCssVar(prop, target, { window = defaultWindow } = {}) {
1234
- const variable = ref("");
1359
+ function useCssVar(prop, target, { window = defaultWindow, initialValue = "" } = {}) {
1360
+ const variable = ref(initialValue);
1235
1361
  const elRef = computed(() => {
1236
1362
  var _a;
1237
1363
  return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
1238
1364
  });
1239
1365
  watch([elRef, () => unref(prop)], ([el, prop2]) => {
1240
- if (el && window)
1241
- variable.value = window.getComputedStyle(el).getPropertyValue(prop2);
1366
+ if (el && window) {
1367
+ const value = window.getComputedStyle(el).getPropertyValue(prop2);
1368
+ variable.value = value || initialValue;
1369
+ }
1242
1370
  }, { immediate: true });
1243
1371
  watch(variable, (val) => {
1244
1372
  var _a;
@@ -1370,7 +1498,6 @@ const vScroll = {
1370
1498
  }
1371
1499
  };
1372
1500
 
1373
- var _a, _b;
1374
1501
  function preventDefault(rawEvent) {
1375
1502
  const e = rawEvent || window.event;
1376
1503
  if (e.touches.length > 1)
@@ -1379,7 +1506,6 @@ function preventDefault(rawEvent) {
1379
1506
  e.preventDefault();
1380
1507
  return false;
1381
1508
  }
1382
- const isIOS = isClient && (window == null ? void 0 : window.navigator) && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.platform) && /iP(ad|hone|od)/.test((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.platform);
1383
1509
  function useScrollLock(element, initialState = false) {
1384
1510
  const isLocked = ref(initialState);
1385
1511
  let stopTouchMoveListener = null;
@@ -1561,4 +1687,4 @@ const UseWindowSize = defineComponent({
1561
1687
  }
1562
1688
  });
1563
1689
 
1564
- export { OnClickOutside, OnLongPress, UseActiveElement, UseBattery, UseBrowserLocation, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePreferredColorScheme, UsePreferredDark, UsePreferredLanguages, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vScroll, vScrollLock };
1690
+ export { OnClickOutside, OnLongPress, UseActiveElement, UseBattery, UseBrowserLocation, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePreferredColorScheme, UsePreferredDark, UsePreferredLanguages, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vScroll, vScrollLock };
package/package.json CHANGED
@@ -1,40 +1,40 @@
1
1
  {
2
2
  "name": "@vueuse/components",
3
- "version": "8.4.2",
3
+ "version": "8.7.0",
4
4
  "description": "Renderless components for VueUse",
5
- "keywords": [
6
- "vue",
7
- "vue-use",
8
- "utils"
9
- ],
10
- "license": "MIT",
11
5
  "author": "Jacob Clevenger<https://github.com/wheatjs>",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/vueuse/vueuse/tree/main/packages/components#readme",
12
8
  "repository": {
13
9
  "type": "git",
14
10
  "url": "git+https://github.com/vueuse/vueuse.git",
15
11
  "directory": "packages/components"
16
12
  },
17
- "main": "./index.cjs",
18
- "module": "./index.mjs",
19
- "types": "./index.d.ts",
20
- "unpkg": "./index.iife.min.js",
21
- "jsdelivr": "./index.iife.min.js",
13
+ "bugs": {
14
+ "url": "https://github.com/vueuse/vueuse/issues"
15
+ },
16
+ "keywords": [
17
+ "vue",
18
+ "vue-use",
19
+ "utils"
20
+ ],
21
+ "sideEffects": false,
22
22
  "exports": {
23
23
  ".": {
24
- "import": "./index.mjs",
24
+ "types": "./index.d.ts",
25
25
  "require": "./index.cjs",
26
- "types": "./index.d.ts"
26
+ "import": "./index.mjs"
27
27
  },
28
28
  "./*": "./*"
29
29
  },
30
- "sideEffects": false,
31
- "bugs": {
32
- "url": "https://github.com/vueuse/vueuse/issues"
33
- },
34
- "homepage": "https://github.com/vueuse/vueuse/tree/main/packages/components#readme",
30
+ "main": "./index.cjs",
31
+ "module": "./index.mjs",
32
+ "unpkg": "./index.iife.min.js",
33
+ "jsdelivr": "./index.iife.min.js",
34
+ "types": "./index.d.ts",
35
35
  "dependencies": {
36
- "@vueuse/core": "8.4.2",
37
- "@vueuse/shared": "8.4.2",
36
+ "@vueuse/core": "8.7.0",
37
+ "@vueuse/shared": "8.7.0",
38
38
  "vue-demi": "*"
39
39
  }
40
40
  }