@vueuse/components 12.7.0 → 12.8.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 +57 -56
- package/index.d.cts +4 -4
- package/index.d.mts +4 -4
- package/index.d.ts +4 -4
- package/index.iife.js +57 -56
- package/index.iife.min.js +1 -1
- package/index.mjs +58 -57
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var core = require('@vueuse/core');
|
|
|
4
4
|
var vue = require('vue');
|
|
5
5
|
var shared = require('@vueuse/shared');
|
|
6
6
|
|
|
7
|
-
const OnClickOutside = /* @__PURE__ */
|
|
7
|
+
const OnClickOutside = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
8
8
|
name: "OnClickOutside",
|
|
9
9
|
props: ["as", "options"],
|
|
10
10
|
emits: ["trigger"],
|
|
@@ -333,7 +333,7 @@ function onLongPress(target, handler, options) {
|
|
|
333
333
|
return stop;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
const OnLongPress = /* @__PURE__ */
|
|
336
|
+
const OnLongPress = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
337
337
|
name: "OnLongPress",
|
|
338
338
|
props: ["as", "options"],
|
|
339
339
|
emits: ["trigger"],
|
|
@@ -362,7 +362,7 @@ const vOnLongPress = {
|
|
|
362
362
|
}
|
|
363
363
|
};
|
|
364
364
|
|
|
365
|
-
const UseActiveElement = /* @__PURE__ */
|
|
365
|
+
const UseActiveElement = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
366
366
|
name: "UseActiveElement",
|
|
367
367
|
setup(props, { slots }) {
|
|
368
368
|
const data = vue.reactive({
|
|
@@ -375,7 +375,7 @@ const UseActiveElement = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
375
375
|
}
|
|
376
376
|
});
|
|
377
377
|
|
|
378
|
-
const UseBattery = /* @__PURE__ */
|
|
378
|
+
const UseBattery = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
379
379
|
name: "UseBattery",
|
|
380
380
|
setup(props, { slots }) {
|
|
381
381
|
const data = vue.reactive(core.useBattery(props));
|
|
@@ -386,7 +386,7 @@ const UseBattery = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
386
386
|
}
|
|
387
387
|
});
|
|
388
388
|
|
|
389
|
-
const UseBrowserLocation = /* @__PURE__ */
|
|
389
|
+
const UseBrowserLocation = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
390
390
|
name: "UseBrowserLocation",
|
|
391
391
|
setup(props, { slots }) {
|
|
392
392
|
const data = vue.reactive(core.useBrowserLocation());
|
|
@@ -397,7 +397,7 @@ const UseBrowserLocation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
|
|
400
|
-
const UseClipboard = /* @__PURE__ */
|
|
400
|
+
const UseClipboard = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
401
401
|
name: "UseClipboard",
|
|
402
402
|
props: [
|
|
403
403
|
"source",
|
|
@@ -455,7 +455,7 @@ function useSupported(callback) {
|
|
|
455
455
|
function useMediaQuery(query, options = {}) {
|
|
456
456
|
const { window = defaultWindow, ssrWidth = useSSRWidth() } = options;
|
|
457
457
|
const isSupported = useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
|
|
458
|
-
const ssrSupport = vue.
|
|
458
|
+
const ssrSupport = vue.shallowRef(typeof ssrWidth === "number");
|
|
459
459
|
const mediaQuery = vue.shallowRef();
|
|
460
460
|
const matches = vue.shallowRef(false);
|
|
461
461
|
const handler = (event) => {
|
|
@@ -750,7 +750,7 @@ function useColorMode(options = {}) {
|
|
|
750
750
|
return Object.assign(auto, { store, system, state });
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
-
const UseColorMode = /* @__PURE__ */
|
|
753
|
+
const UseColorMode = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
754
754
|
name: "UseColorMode",
|
|
755
755
|
props: ["selector", "attribute", "modes", "onChanged", "storageKey", "storage", "emitAuto"],
|
|
756
756
|
setup(props, { slots }) {
|
|
@@ -767,7 +767,7 @@ const UseColorMode = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
767
767
|
}
|
|
768
768
|
});
|
|
769
769
|
|
|
770
|
-
const UseDark = /* @__PURE__ */
|
|
770
|
+
const UseDark = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
771
771
|
name: "UseDark",
|
|
772
772
|
props: ["selector", "attribute", "valueDark", "valueLight", "onChanged", "storageKey", "storage"],
|
|
773
773
|
setup(props, { slots }) {
|
|
@@ -783,7 +783,7 @@ const UseDark = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
783
783
|
}
|
|
784
784
|
});
|
|
785
785
|
|
|
786
|
-
const UseDeviceMotion = /* @__PURE__ */
|
|
786
|
+
const UseDeviceMotion = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
787
787
|
name: "UseDeviceMotion",
|
|
788
788
|
setup(props, { slots }) {
|
|
789
789
|
const data = core.useDeviceMotion();
|
|
@@ -794,7 +794,7 @@ const UseDeviceMotion = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
794
794
|
}
|
|
795
795
|
});
|
|
796
796
|
|
|
797
|
-
const UseDeviceOrientation = /* @__PURE__ */
|
|
797
|
+
const UseDeviceOrientation = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
798
798
|
name: "UseDeviceOrientation",
|
|
799
799
|
setup(props, { slots }) {
|
|
800
800
|
const data = vue.reactive(core.useDeviceOrientation());
|
|
@@ -805,7 +805,7 @@ const UseDeviceOrientation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent
|
|
|
805
805
|
}
|
|
806
806
|
});
|
|
807
807
|
|
|
808
|
-
const UseDevicePixelRatio = /* @__PURE__ */
|
|
808
|
+
const UseDevicePixelRatio = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
809
809
|
name: "UseDevicePixelRatio",
|
|
810
810
|
setup(props, { slots }) {
|
|
811
811
|
const data = vue.reactive({
|
|
@@ -818,7 +818,7 @@ const UseDevicePixelRatio = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent(
|
|
|
818
818
|
}
|
|
819
819
|
});
|
|
820
820
|
|
|
821
|
-
const UseDevicesList = /* @__PURE__ */
|
|
821
|
+
const UseDevicesList = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
822
822
|
name: "UseDevicesList",
|
|
823
823
|
props: ["onUpdated", "requestPermissions", "constraints"],
|
|
824
824
|
setup(props, { slots }) {
|
|
@@ -830,7 +830,7 @@ const UseDevicesList = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
830
830
|
}
|
|
831
831
|
});
|
|
832
832
|
|
|
833
|
-
const UseDocumentVisibility = /* @__PURE__ */
|
|
833
|
+
const UseDocumentVisibility = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
834
834
|
name: "UseDocumentVisibility",
|
|
835
835
|
setup(props, { slots }) {
|
|
836
836
|
const data = vue.reactive({
|
|
@@ -843,7 +843,7 @@ const UseDocumentVisibility = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponen
|
|
|
843
843
|
}
|
|
844
844
|
});
|
|
845
845
|
|
|
846
|
-
const UseDraggable = /* @__PURE__ */
|
|
846
|
+
const UseDraggable = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
847
847
|
name: "UseDraggable",
|
|
848
848
|
props: [
|
|
849
849
|
"storageKey",
|
|
@@ -903,7 +903,7 @@ const UseDraggable = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
903
903
|
}
|
|
904
904
|
});
|
|
905
905
|
|
|
906
|
-
const UseElementBounding = /* @__PURE__ */
|
|
906
|
+
const UseElementBounding = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
907
907
|
name: "UseElementBounding",
|
|
908
908
|
props: ["box", "as"],
|
|
909
909
|
setup(props, { slots }) {
|
|
@@ -1174,7 +1174,7 @@ const vElementHover = {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
};
|
|
1176
1176
|
|
|
1177
|
-
const UseElementSize = /* @__PURE__ */
|
|
1177
|
+
const UseElementSize = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1178
1178
|
name: "UseElementSize",
|
|
1179
1179
|
props: ["width", "height", "box", "as"],
|
|
1180
1180
|
setup(props, { slots }) {
|
|
@@ -1193,8 +1193,8 @@ function useElementSize(target, initialSize = { width: 0, height: 0 }, options =
|
|
|
1193
1193
|
var _a, _b;
|
|
1194
1194
|
return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
|
|
1195
1195
|
});
|
|
1196
|
-
const width = vue.
|
|
1197
|
-
const height = vue.
|
|
1196
|
+
const width = vue.shallowRef(initialSize.width);
|
|
1197
|
+
const height = vue.shallowRef(initialSize.height);
|
|
1198
1198
|
const { stop: stop1 } = useResizeObserver(
|
|
1199
1199
|
target,
|
|
1200
1200
|
([entry]) => {
|
|
@@ -1254,7 +1254,7 @@ const vElementSize = {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
};
|
|
1256
1256
|
|
|
1257
|
-
const UseElementVisibility = /* @__PURE__ */
|
|
1257
|
+
const UseElementVisibility = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1258
1258
|
name: "UseElementVisibility",
|
|
1259
1259
|
props: ["as"],
|
|
1260
1260
|
setup(props, { slots }) {
|
|
@@ -1283,7 +1283,7 @@ function useIntersectionObserver(target, callback, options = {}) {
|
|
|
1283
1283
|
return shared.toArray(_target).map(unrefElement).filter(shared.notNullish);
|
|
1284
1284
|
});
|
|
1285
1285
|
let cleanup = shared.noop;
|
|
1286
|
-
const isActive = vue.
|
|
1286
|
+
const isActive = vue.shallowRef(immediate);
|
|
1287
1287
|
const stopWatch = isSupported.value ? vue.watch(
|
|
1288
1288
|
() => [targets.value, unrefElement(root), isActive.value],
|
|
1289
1289
|
([targets2, root2]) => {
|
|
@@ -1379,7 +1379,7 @@ const vElementVisibility = {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
};
|
|
1381
1381
|
|
|
1382
|
-
const UseEyeDropper = /* @__PURE__ */
|
|
1382
|
+
const UseEyeDropper = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1383
1383
|
name: "UseEyeDropper",
|
|
1384
1384
|
props: {
|
|
1385
1385
|
sRGBHex: String
|
|
@@ -1393,7 +1393,7 @@ const UseEyeDropper = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
1393
1393
|
}
|
|
1394
1394
|
});
|
|
1395
1395
|
|
|
1396
|
-
const UseFullscreen = /* @__PURE__ */
|
|
1396
|
+
const UseFullscreen = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1397
1397
|
name: "UseFullscreen",
|
|
1398
1398
|
props: ["as"],
|
|
1399
1399
|
setup(props, { slots }) {
|
|
@@ -1406,7 +1406,7 @@ const UseFullscreen = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
1406
1406
|
}
|
|
1407
1407
|
});
|
|
1408
1408
|
|
|
1409
|
-
const UseGeolocation = /* @__PURE__ */
|
|
1409
|
+
const UseGeolocation = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1410
1410
|
name: "UseGeolocation",
|
|
1411
1411
|
props: ["enableHighAccuracy", "maximumAge", "timeout", "navigator"],
|
|
1412
1412
|
setup(props, { slots }) {
|
|
@@ -1418,7 +1418,7 @@ const UseGeolocation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
1418
1418
|
}
|
|
1419
1419
|
});
|
|
1420
1420
|
|
|
1421
|
-
const UseIdle = /* @__PURE__ */
|
|
1421
|
+
const UseIdle = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1422
1422
|
name: "UseIdle",
|
|
1423
1423
|
props: ["timeout", "events", "listenForVisibilityChange", "initialState"],
|
|
1424
1424
|
setup(props, { slots }) {
|
|
@@ -1541,7 +1541,7 @@ function useImage(options, asyncStateOptions = {}) {
|
|
|
1541
1541
|
return state;
|
|
1542
1542
|
}
|
|
1543
1543
|
|
|
1544
|
-
const UseImage = /* @__PURE__ */
|
|
1544
|
+
const UseImage = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1545
1545
|
name: "UseImage",
|
|
1546
1546
|
props: [
|
|
1547
1547
|
"src",
|
|
@@ -1675,8 +1675,8 @@ function useScroll(element, options = {}) {
|
|
|
1675
1675
|
const scrollLeft = el.scrollLeft;
|
|
1676
1676
|
directions.left = scrollLeft < internalX.value;
|
|
1677
1677
|
directions.right = scrollLeft > internalX.value;
|
|
1678
|
-
const left = scrollLeft * directionMultipler <= (offset.left || 0);
|
|
1679
|
-
const right = scrollLeft * directionMultipler + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
|
|
1678
|
+
const left = Math.abs(scrollLeft * directionMultipler) <= (offset.left || 0);
|
|
1679
|
+
const right = Math.abs(scrollLeft * directionMultipler) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
|
|
1680
1680
|
if (display === "flex" && flexDirection === "row-reverse") {
|
|
1681
1681
|
arrivedState.left = right;
|
|
1682
1682
|
arrivedState.right = left;
|
|
@@ -1690,8 +1690,8 @@ function useScroll(element, options = {}) {
|
|
|
1690
1690
|
scrollTop = window.document.body.scrollTop;
|
|
1691
1691
|
directions.top = scrollTop < internalY.value;
|
|
1692
1692
|
directions.bottom = scrollTop > internalY.value;
|
|
1693
|
-
const top = scrollTop <= (offset.top || 0);
|
|
1694
|
-
const bottom = scrollTop + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
|
|
1693
|
+
const top = Math.abs(scrollTop) <= (offset.top || 0);
|
|
1694
|
+
const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
|
|
1695
1695
|
if (display === "flex" && flexDirection === "column-reverse") {
|
|
1696
1696
|
arrivedState.top = bottom;
|
|
1697
1697
|
arrivedState.bottom = top;
|
|
@@ -1820,7 +1820,7 @@ const vIntersectionObserver = {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
};
|
|
1822
1822
|
|
|
1823
|
-
const UseMouse = /* @__PURE__ */
|
|
1823
|
+
const UseMouse = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1824
1824
|
name: "UseMouse",
|
|
1825
1825
|
props: ["touch", "resetOnTouchEnds", "initialValue"],
|
|
1826
1826
|
setup(props, { slots }) {
|
|
@@ -1832,7 +1832,7 @@ const UseMouse = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
1832
1832
|
}
|
|
1833
1833
|
});
|
|
1834
1834
|
|
|
1835
|
-
const UseMouseInElement = /* @__PURE__ */
|
|
1835
|
+
const UseMouseInElement = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
1836
1836
|
name: "UseMouseElement",
|
|
1837
1837
|
props: ["handleOutside", "as"],
|
|
1838
1838
|
setup(props, { slots }) {
|
|
@@ -1931,7 +1931,7 @@ function useMouseInElement(target, options = {}) {
|
|
|
1931
1931
|
} = options;
|
|
1932
1932
|
const type = options.type || "page";
|
|
1933
1933
|
const { x, y, sourceType } = useMouse(options);
|
|
1934
|
-
const targetRef = vue.
|
|
1934
|
+
const targetRef = vue.shallowRef(target != null ? target : window == null ? void 0 : window.document.body);
|
|
1935
1935
|
const elementX = vue.shallowRef(0);
|
|
1936
1936
|
const elementY = vue.shallowRef(0);
|
|
1937
1937
|
const elementPositionX = vue.shallowRef(0);
|
|
@@ -1998,7 +1998,7 @@ const vMouseInElement = {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
};
|
|
2000
2000
|
|
|
2001
|
-
const UseMousePressed = /* @__PURE__ */
|
|
2001
|
+
const UseMousePressed = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2002
2002
|
name: "UseMousePressed",
|
|
2003
2003
|
props: ["touch", "initialValue", "as"],
|
|
2004
2004
|
setup(props, { slots }) {
|
|
@@ -2011,7 +2011,7 @@ const UseMousePressed = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2011
2011
|
}
|
|
2012
2012
|
});
|
|
2013
2013
|
|
|
2014
|
-
const UseNetwork = /* @__PURE__ */
|
|
2014
|
+
const UseNetwork = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2015
2015
|
name: "UseNetwork",
|
|
2016
2016
|
setup(props, { slots }) {
|
|
2017
2017
|
const data = vue.reactive(core.useNetwork());
|
|
@@ -2022,7 +2022,7 @@ const UseNetwork = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2022
2022
|
}
|
|
2023
2023
|
});
|
|
2024
2024
|
|
|
2025
|
-
const UseNow = /* @__PURE__ */
|
|
2025
|
+
const UseNow = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2026
2026
|
name: "UseNow",
|
|
2027
2027
|
props: ["interval"],
|
|
2028
2028
|
setup(props, { slots }) {
|
|
@@ -2034,7 +2034,7 @@ const UseNow = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2034
2034
|
}
|
|
2035
2035
|
});
|
|
2036
2036
|
|
|
2037
|
-
const UseObjectUrl = /* @__PURE__ */
|
|
2037
|
+
const UseObjectUrl = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2038
2038
|
name: "UseObjectUrl",
|
|
2039
2039
|
props: [
|
|
2040
2040
|
"object"
|
|
@@ -2049,7 +2049,7 @@ const UseObjectUrl = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2049
2049
|
}
|
|
2050
2050
|
});
|
|
2051
2051
|
|
|
2052
|
-
const UseOffsetPagination = /* @__PURE__ */
|
|
2052
|
+
const UseOffsetPagination = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2053
2053
|
name: "UseOffsetPagination",
|
|
2054
2054
|
props: [
|
|
2055
2055
|
"total",
|
|
@@ -2090,7 +2090,7 @@ const UseOffsetPagination = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent(
|
|
|
2090
2090
|
}
|
|
2091
2091
|
});
|
|
2092
2092
|
|
|
2093
|
-
const UseOnline = /* @__PURE__ */
|
|
2093
|
+
const UseOnline = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2094
2094
|
name: "UseOnline",
|
|
2095
2095
|
setup(props, { slots }) {
|
|
2096
2096
|
const data = vue.reactive({
|
|
@@ -2103,7 +2103,7 @@ const UseOnline = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2103
2103
|
}
|
|
2104
2104
|
});
|
|
2105
2105
|
|
|
2106
|
-
const UsePageLeave = /* @__PURE__ */
|
|
2106
|
+
const UsePageLeave = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2107
2107
|
name: "UsePageLeave",
|
|
2108
2108
|
setup(props, { slots }) {
|
|
2109
2109
|
const data = vue.reactive({
|
|
@@ -2116,7 +2116,7 @@ const UsePageLeave = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2116
2116
|
}
|
|
2117
2117
|
});
|
|
2118
2118
|
|
|
2119
|
-
const UsePointer = /* @__PURE__ */
|
|
2119
|
+
const UsePointer = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2120
2120
|
name: "UsePointer",
|
|
2121
2121
|
props: [
|
|
2122
2122
|
"pointerTypes",
|
|
@@ -2136,7 +2136,7 @@ const UsePointer = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2136
2136
|
}
|
|
2137
2137
|
});
|
|
2138
2138
|
|
|
2139
|
-
const UsePointerLock =
|
|
2139
|
+
const UsePointerLock = /*@__PURE__*/ vue.defineComponent({
|
|
2140
2140
|
name: "UsePointerLock",
|
|
2141
2141
|
props: ["as"],
|
|
2142
2142
|
setup(props, { slots }) {
|
|
@@ -2149,7 +2149,7 @@ const UsePointerLock = /* #__PURE__ */ vue.defineComponent({
|
|
|
2149
2149
|
}
|
|
2150
2150
|
});
|
|
2151
2151
|
|
|
2152
|
-
const UsePreferredColorScheme = /* @__PURE__ */
|
|
2152
|
+
const UsePreferredColorScheme = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2153
2153
|
name: "UsePreferredColorScheme",
|
|
2154
2154
|
setup(props, { slots }) {
|
|
2155
2155
|
const data = vue.reactive({
|
|
@@ -2162,7 +2162,7 @@ const UsePreferredColorScheme = /* @__PURE__ */ /* #__PURE__ */ vue.defineCompon
|
|
|
2162
2162
|
}
|
|
2163
2163
|
});
|
|
2164
2164
|
|
|
2165
|
-
const UsePreferredContrast = /* @__PURE__ */
|
|
2165
|
+
const UsePreferredContrast = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2166
2166
|
name: "UsePreferredContrast",
|
|
2167
2167
|
setup(props, { slots }) {
|
|
2168
2168
|
const data = vue.reactive({
|
|
@@ -2175,7 +2175,7 @@ const UsePreferredContrast = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent
|
|
|
2175
2175
|
}
|
|
2176
2176
|
});
|
|
2177
2177
|
|
|
2178
|
-
const UsePreferredDark = /* @__PURE__ */
|
|
2178
|
+
const UsePreferredDark = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2179
2179
|
name: "UsePreferredDark",
|
|
2180
2180
|
setup(props, { slots }) {
|
|
2181
2181
|
const data = vue.reactive({
|
|
@@ -2188,7 +2188,7 @@ const UsePreferredDark = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2188
2188
|
}
|
|
2189
2189
|
});
|
|
2190
2190
|
|
|
2191
|
-
const UsePreferredLanguages = /* @__PURE__ */
|
|
2191
|
+
const UsePreferredLanguages = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2192
2192
|
name: "UsePreferredLanguages",
|
|
2193
2193
|
setup(props, { slots }) {
|
|
2194
2194
|
const data = vue.reactive({
|
|
@@ -2201,7 +2201,7 @@ const UsePreferredLanguages = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponen
|
|
|
2201
2201
|
}
|
|
2202
2202
|
});
|
|
2203
2203
|
|
|
2204
|
-
const UsePreferredReducedMotion = /* @__PURE__ */
|
|
2204
|
+
const UsePreferredReducedMotion = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2205
2205
|
name: "UsePreferredReducedMotion",
|
|
2206
2206
|
setup(props, { slots }) {
|
|
2207
2207
|
const data = vue.reactive({
|
|
@@ -2214,7 +2214,7 @@ const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ vue.defineComp
|
|
|
2214
2214
|
}
|
|
2215
2215
|
});
|
|
2216
2216
|
|
|
2217
|
-
const UsePreferredReducedTransparency = /* @__PURE__ */
|
|
2217
|
+
const UsePreferredReducedTransparency = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2218
2218
|
name: "UsePreferredReducedTransparency",
|
|
2219
2219
|
setup(props, { slots }) {
|
|
2220
2220
|
const data = vue.reactive({
|
|
@@ -2264,7 +2264,8 @@ function useCssVar(prop, target, options = {}) {
|
|
|
2264
2264
|
if (old[0] && old[1])
|
|
2265
2265
|
old[0].style.removeProperty(old[1]);
|
|
2266
2266
|
updateCssVar();
|
|
2267
|
-
}
|
|
2267
|
+
},
|
|
2268
|
+
{ immediate: true }
|
|
2268
2269
|
);
|
|
2269
2270
|
vue.watch(
|
|
2270
2271
|
[variable, elRef],
|
|
@@ -2321,7 +2322,7 @@ function getValue(position) {
|
|
|
2321
2322
|
return getComputedStyle(document.documentElement).getPropertyValue(position);
|
|
2322
2323
|
}
|
|
2323
2324
|
|
|
2324
|
-
const UseScreenSafeArea = /* @__PURE__ */
|
|
2325
|
+
const UseScreenSafeArea = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2325
2326
|
name: "UseScreenSafeArea",
|
|
2326
2327
|
props: {
|
|
2327
2328
|
top: Boolean,
|
|
@@ -2410,7 +2411,7 @@ function preventDefault(rawEvent) {
|
|
|
2410
2411
|
}
|
|
2411
2412
|
const elInitialOverflow = /* @__PURE__ */ new WeakMap();
|
|
2412
2413
|
function useScrollLock(element, initialState = false) {
|
|
2413
|
-
const isLocked = vue.
|
|
2414
|
+
const isLocked = vue.shallowRef(initialState);
|
|
2414
2415
|
let stopTouchMoveListener = null;
|
|
2415
2416
|
let initialOverflow = "";
|
|
2416
2417
|
vue.watch(shared.toRef(element), (el) => {
|
|
@@ -2483,7 +2484,7 @@ function onScrollLock() {
|
|
|
2483
2484
|
}
|
|
2484
2485
|
const vScrollLock = onScrollLock();
|
|
2485
2486
|
|
|
2486
|
-
const UseTimeAgo = /* @__PURE__ */
|
|
2487
|
+
const UseTimeAgo = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2487
2488
|
name: "UseTimeAgo",
|
|
2488
2489
|
props: ["time", "updateInterval", "max", "fullDateFormatter", "messages", "showSecond"],
|
|
2489
2490
|
setup(props, { slots }) {
|
|
@@ -2495,7 +2496,7 @@ const UseTimeAgo = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2495
2496
|
}
|
|
2496
2497
|
});
|
|
2497
2498
|
|
|
2498
|
-
const UseTimestamp = /* @__PURE__ */
|
|
2499
|
+
const UseTimestamp = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2499
2500
|
name: "UseTimestamp",
|
|
2500
2501
|
props: ["immediate", "interval", "offset"],
|
|
2501
2502
|
setup(props, { slots }) {
|
|
@@ -2507,7 +2508,7 @@ const UseTimestamp = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2507
2508
|
}
|
|
2508
2509
|
});
|
|
2509
2510
|
|
|
2510
|
-
const UseVirtualList = /* @__PURE__ */
|
|
2511
|
+
const UseVirtualList = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2511
2512
|
name: "UseVirtualList",
|
|
2512
2513
|
props: [
|
|
2513
2514
|
"list",
|
|
@@ -2526,7 +2527,7 @@ const UseVirtualList = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2526
2527
|
}
|
|
2527
2528
|
});
|
|
2528
2529
|
|
|
2529
|
-
const UseWindowFocus = /* @__PURE__ */
|
|
2530
|
+
const UseWindowFocus = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2530
2531
|
name: "UseWindowFocus",
|
|
2531
2532
|
setup(props, { slots }) {
|
|
2532
2533
|
const data = vue.reactive({
|
|
@@ -2539,7 +2540,7 @@ const UseWindowFocus = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
|
|
|
2539
2540
|
}
|
|
2540
2541
|
});
|
|
2541
2542
|
|
|
2542
|
-
const UseWindowSize = /* @__PURE__ */
|
|
2543
|
+
const UseWindowSize = /* @__PURE__ */ /*@__PURE__*/ vue.defineComponent({
|
|
2543
2544
|
name: "UseWindowSize",
|
|
2544
2545
|
props: ["initialWidth", "initialHeight"],
|
|
2545
2546
|
setup(props, { slots }) {
|
package/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { ComponentPublicInstance, ObjectDirective, Ref, UnwrapNestedRefs, Reactive, ComputedRef, FunctionDirective } from 'vue';
|
|
3
|
-
import { MaybeRef, MaybeRefOrGetter, ConfigurableEventFilter, ConfigurableFlush, Awaitable } from '@vueuse/shared';
|
|
2
|
+
import { ComponentPublicInstance, MaybeRef, MaybeRefOrGetter, ObjectDirective, Ref, UnwrapNestedRefs, Reactive, ComputedRef, FunctionDirective } from 'vue';
|
|
4
3
|
import { UseClipboardOptions, UseDarkOptions, UseDevicesListOptions, UseDraggableOptions, ElementSize as ElementSize$1, UseGeolocationOptions, UseIdleOptions, UseMouseOptions as UseMouseOptions$1, MouseInElementOptions as MouseInElementOptions$1, MousePressedOptions, UseNowOptions, UsePointerOptions, UseTimeAgoOptions, UseTimestampOptions, UseVirtualListOptions, UseWindowSizeOptions } from '@vueuse/core';
|
|
4
|
+
import { ConfigurableEventFilter, ConfigurableFlush, Awaitable } from '@vueuse/shared';
|
|
5
5
|
|
|
6
6
|
interface ConfigurableWindow {
|
|
7
7
|
window?: Window;
|
|
@@ -416,8 +416,8 @@ interface ElementSize {
|
|
|
416
416
|
* @see https://vueuse.org/useElementSize
|
|
417
417
|
*/
|
|
418
418
|
declare function useElementSize(target: MaybeComputedElementRef, initialSize?: ElementSize, options?: UseResizeObserverOptions): {
|
|
419
|
-
width: vue.
|
|
420
|
-
height: vue.
|
|
419
|
+
width: vue.ShallowRef<number, number>;
|
|
420
|
+
height: vue.ShallowRef<number, number>;
|
|
421
421
|
stop: () => void;
|
|
422
422
|
};
|
|
423
423
|
|
package/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { ComponentPublicInstance, ObjectDirective, Ref, UnwrapNestedRefs, Reactive, ComputedRef, FunctionDirective } from 'vue';
|
|
3
|
-
import { MaybeRef, MaybeRefOrGetter, ConfigurableEventFilter, ConfigurableFlush, Awaitable } from '@vueuse/shared';
|
|
2
|
+
import { ComponentPublicInstance, MaybeRef, MaybeRefOrGetter, ObjectDirective, Ref, UnwrapNestedRefs, Reactive, ComputedRef, FunctionDirective } from 'vue';
|
|
4
3
|
import { UseClipboardOptions, UseDarkOptions, UseDevicesListOptions, UseDraggableOptions, ElementSize as ElementSize$1, UseGeolocationOptions, UseIdleOptions, UseMouseOptions as UseMouseOptions$1, MouseInElementOptions as MouseInElementOptions$1, MousePressedOptions, UseNowOptions, UsePointerOptions, UseTimeAgoOptions, UseTimestampOptions, UseVirtualListOptions, UseWindowSizeOptions } from '@vueuse/core';
|
|
4
|
+
import { ConfigurableEventFilter, ConfigurableFlush, Awaitable } from '@vueuse/shared';
|
|
5
5
|
|
|
6
6
|
interface ConfigurableWindow {
|
|
7
7
|
window?: Window;
|
|
@@ -416,8 +416,8 @@ interface ElementSize {
|
|
|
416
416
|
* @see https://vueuse.org/useElementSize
|
|
417
417
|
*/
|
|
418
418
|
declare function useElementSize(target: MaybeComputedElementRef, initialSize?: ElementSize, options?: UseResizeObserverOptions): {
|
|
419
|
-
width: vue.
|
|
420
|
-
height: vue.
|
|
419
|
+
width: vue.ShallowRef<number, number>;
|
|
420
|
+
height: vue.ShallowRef<number, number>;
|
|
421
421
|
stop: () => void;
|
|
422
422
|
};
|
|
423
423
|
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { ComponentPublicInstance, ObjectDirective, Ref, UnwrapNestedRefs, Reactive, ComputedRef, FunctionDirective } from 'vue';
|
|
3
|
-
import { MaybeRef, MaybeRefOrGetter, ConfigurableEventFilter, ConfigurableFlush, Awaitable } from '@vueuse/shared';
|
|
2
|
+
import { ComponentPublicInstance, MaybeRef, MaybeRefOrGetter, ObjectDirective, Ref, UnwrapNestedRefs, Reactive, ComputedRef, FunctionDirective } from 'vue';
|
|
4
3
|
import { UseClipboardOptions, UseDarkOptions, UseDevicesListOptions, UseDraggableOptions, ElementSize as ElementSize$1, UseGeolocationOptions, UseIdleOptions, UseMouseOptions as UseMouseOptions$1, MouseInElementOptions as MouseInElementOptions$1, MousePressedOptions, UseNowOptions, UsePointerOptions, UseTimeAgoOptions, UseTimestampOptions, UseVirtualListOptions, UseWindowSizeOptions } from '@vueuse/core';
|
|
4
|
+
import { ConfigurableEventFilter, ConfigurableFlush, Awaitable } from '@vueuse/shared';
|
|
5
5
|
|
|
6
6
|
interface ConfigurableWindow {
|
|
7
7
|
window?: Window;
|
|
@@ -416,8 +416,8 @@ interface ElementSize {
|
|
|
416
416
|
* @see https://vueuse.org/useElementSize
|
|
417
417
|
*/
|
|
418
418
|
declare function useElementSize(target: MaybeComputedElementRef, initialSize?: ElementSize, options?: UseResizeObserverOptions): {
|
|
419
|
-
width: vue.
|
|
420
|
-
height: vue.
|
|
419
|
+
width: vue.ShallowRef<number, number>;
|
|
420
|
+
height: vue.ShallowRef<number, number>;
|
|
421
421
|
stop: () => void;
|
|
422
422
|
};
|
|
423
423
|
|