@vueuse/components
Advanced tools
Comparing version 6.8.0 to 6.9.0
@@ -90,2 +90,12 @@ import * as vue_demi from 'vue-demi'; | ||
declare const UseEyeDropper: vue_demi.DefineComponent<{ | ||
sRGBHex: StringConstructor; | ||
}, () => vue_demi.VNode<vue_demi.RendererNode, vue_demi.RendererElement, { | ||
[key: string]: any; | ||
}>[] | undefined, unknown, {}, {}, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, Record<string, any>, string, vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<{ | ||
sRGBHex?: unknown; | ||
} & {} & { | ||
sRGBHex?: string | undefined; | ||
}>, {}>; | ||
declare const UseFullscreen: vue_demi.DefineComponent<RenderableComponent, {}, {}, {}, {}, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, vue_demi.EmitsOptions, string, vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<RenderableComponent>, {}>; | ||
@@ -174,2 +184,2 @@ | ||
export { OnClickOutside, UseActiveElement, UseBattery, UseBrowserLocation, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseFullscreen, UseGeolocation, UseIdle, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseOnline, UsePageLeave, UsePointer, UsePreferredColorScheme, UsePreferredDark, UsePreferredLanguages, UseTimeAgo, UseTimestamp, UseVirtualList, UseVirtualListProps, UseWindowFocus, UseWindowSize, VOnClickOutside }; | ||
export { OnClickOutside, UseActiveElement, UseBattery, UseBrowserLocation, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseOnline, UsePageLeave, UsePointer, UsePreferredColorScheme, UsePreferredDark, UsePreferredLanguages, UseTimeAgo, UseTimestamp, UseVirtualList, UseVirtualListProps, UseWindowFocus, UseWindowSize, VOnClickOutside }; |
@@ -334,2 +334,16 @@ ;(function (window) { | ||
const UseEyeDropper = vueDemi.defineComponent({ | ||
name: "UseEyeDropper", | ||
props: { | ||
sRGBHex: String | ||
}, | ||
setup(props, { slots }) { | ||
const data = vueDemi.reactive(core.useEyeDropper()); | ||
return () => { | ||
if (slots.default) | ||
return slots.default(data); | ||
}; | ||
} | ||
}); | ||
const UseFullscreen = vueDemi.defineComponent({ | ||
@@ -708,2 +722,3 @@ name: "UseFullscreen", | ||
exports.UseElementVisibility = UseElementVisibility; | ||
exports.UseEyeDropper = UseEyeDropper; | ||
exports.UseFullscreen = UseFullscreen; | ||
@@ -710,0 +725,0 @@ exports.UseGeolocation = UseGeolocation; |
@@ -1,1 +0,1 @@ | ||
(function(s){if(!s.VueDemi){var n={},a=s.Vue;if(a)if(a.version.slice(0,2)==="2."){var u=s.VueCompositionAPI;if(u){for(var c in u)n[c]=u[c];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=a,n.Vue2=a,n.version=a.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.")}else if(a.version.slice(0,2)==="3."){for(var c in a)n[c]=a[c];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=a,n.Vue2=void 0,n.version=a.version,n.set=function(f,l,p){return Array.isArray(f)?(f.length=Math.max(f.length,l),f.splice(l,1,p),p):(f[l]=p,p)},n.del=function(f,l){if(Array.isArray(f)){f.splice(l,1);return}delete f[l]}}else console.error("[vue-demi] Vue version "+a.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");s.VueDemi=n}})(window),function(s,n,a,u){"use strict";const c=n.defineComponent({name:"OnClickOutside",props:["as"],emits:["trigger"],setup(r,{slots:e,emit:t}){const o=n.ref();return a.onClickOutside(o,i=>{t("trigger",i)}),()=>{if(e.default)return n.h(r.as||"div",{ref:o},e.default())}}});function f(r){var e;const t=n.unref(r);return(e=t==null?void 0:t.$el)!=null?e:t}const l=u.isClient?window:void 0;function p(...r){let e,t,o,i;if(u.isString(r[0])?([t,o,i]=r,e=l):[e,t,o,i]=r,!e)return u.noop;let d=u.noop;const P=n.watch(()=>n.unref(e),O=>{d(),!!O&&(O.addEventListener(t,o,i),d=()=>{O.removeEventListener(t,o,i),d=u.noop})},{immediate:!0,flush:"post"}),_=()=>{P(),d()};return u.tryOnScopeDispose(_),_}function I(r,e,t={}){const{window:o=l,event:i="pointerdown"}=t;return o?p(o,i,P=>{const _=f(r);!_||_===P.target||P.composedPath().includes(_)||e(P)},{passive:!0}):void 0}const M=(r,e)=>{I(r,e.value)},N=n.defineComponent({name:"UseActiveElement",setup(r,{slots:e}){const t=n.reactive({element:a.useActiveElement()});return()=>{if(e.default)return e.default(t)}}}),A=n.defineComponent({name:"UseBattery",setup(r,{slots:e}){const t=n.reactive(a.useBattery(r));return()=>{if(e.default)return e.default(t)}}}),T=n.defineComponent({name:"UseBrowserLocation",setup(r,{slots:e}){const t=n.reactive(a.useBrowserLocation());return()=>{if(e.default)return e.default(t)}}}),B=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(r,{slots:e}){const t=a.useDark(r),o=n.reactive({isDark:t,toggleDark:u.useToggle(t)});return()=>{if(e.default)return e.default(o)}}}),F=n.defineComponent({name:"UseDeviceMotion",setup(r,{slots:e}){const t=n.reactive(a.useDeviceMotion());return()=>{if(e.default)return e.default(t)}}}),W=n.defineComponent({name:"UseDeviceOrientation",setup(r,{slots:e}){const t=n.reactive(a.useDeviceOrientation());return()=>{if(e.default)return e.default(t)}}}),z=n.defineComponent({name:"UseDevicePixelRatio",setup(r,{slots:e}){const t=n.reactive({pixelRatio:a.useDevicePixelRatio()});return()=>{if(e.default)return e.default(t)}}}),k=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions"],setup(r,{slots:e}){const t=n.reactive(a.useDevicesList(r));return()=>{if(e.default)return e.default(t)}}}),R=n.defineComponent({name:"UseDocumentVisibility",setup(r,{slots:e}){const t=n.reactive({visibility:a.useDocumentVisibility()});return()=>{if(e.default)return e.default(t)}}});var G=Object.defineProperty,K=Object.defineProperties,H=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,U=(r,e,t)=>e in r?G(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Q=(r,e)=>{for(var t in e||(e={}))q.call(e,t)&&U(r,t,e[t]);if(g)for(var t of g(e))J.call(e,t)&&U(r,t,e[t]);return r},X=(r,e)=>K(r,H(e));const Y=n.defineComponent({name:"UseDraggable",props:["storageKey","initialValue","exact","preventDefault","pointerTypes","as"],setup(r,{slots:e}){const t=n.ref(),o=r.storageKey?a.useStorage(r.storageKey,n.unref(r.initialValue)||{x:0,y:0},a.isClient?r.storageType==="session"?sessionStorage:localStorage:void 0):r.initialValue||{x:0,y:0},i=n.reactive(a.useDraggable(t,X(Q({},r),{initialValue:o})));return()=>{if(e.default)return n.h(r.as||"div",{ref:t,style:`touch-action:none;${i.style}`},e.default(i))}}}),Z=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useElementBounding(t,{box:r.box,window:r.window}));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),x=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useElementSize(t,{width:r.width,height:r.height},{box:r.box}));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),D=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive({isVisible:a.useElementVisibility(t)});return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),ee=n.defineComponent({name:"UseFullscreen",props:["as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useFullscreen(t));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),te=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(r,{slots:e}){const t=n.reactive(a.useGeolocation(r));return()=>{if(e.default)return e.default(t)}}}),re=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(r,{slots:e}){const t=n.reactive(a.useIdle(r.timeout,r));return()=>{if(e.default)return e.default(t)}}}),ne=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(r,{slots:e}){const t=n.reactive(a.useMouse(r));return()=>{if(e.default)return e.default(t)}}}),ae=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useMouseInElement(t,r));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}});var se=Object.defineProperty,oe=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,v=(r,e,t)=>e in r?se(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,le=(r,e)=>{for(var t in e||(e={}))ue.call(e,t)&&v(r,t,e[t]);if(m)for(var t of m(e))fe.call(e,t)&&v(r,t,e[t]);return r},de=(r,e)=>oe(r,ie(e));const ce=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useMousePressed(de(le({},r),{target:t})));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),pe=n.defineComponent({name:"UseNetwork",setup(r,{slots:e}){const t=n.reactive(a.useNetwork());return()=>{if(e.default)return e.default(t)}}});var _e=Object.defineProperty,Pe=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,y=(r,e,t)=>e in r?_e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,me=(r,e)=>{for(var t in e||(e={}))ge.call(e,t)&&y(r,t,e[t]);if(w)for(var t of w(e))Ue.call(e,t)&&y(r,t,e[t]);return r},ve=(r,e)=>Pe(r,Oe(e));const we=n.defineComponent({name:"UseNow",props:["interval"],setup(r,{slots:e}){const t=n.reactive(a.useNow(ve(me({},r),{controls:!0})));return()=>{if(e.default)return e.default(t)}}}),ye=n.defineComponent({name:"UseOnline",setup(r,{slots:e}){const t=n.reactive({isOnline:a.useOnline()});return()=>{if(e.default)return e.default(t)}}}),he=n.defineComponent({name:"UsePageLeave",setup(r,{slots:e}){const t=n.reactive({isLeft:a.usePageLeave()});return()=>{if(e.default)return e.default(t)}}});var be=Object.defineProperty,$e=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,b=(r,e,t)=>e in r?be(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Se=(r,e)=>{for(var t in e||(e={}))Ce.call(e,t)&&b(r,t,e[t]);if(h)for(var t of h(e))Ee.call(e,t)&&b(r,t,e[t]);return r},je=(r,e)=>$e(r,Ve(e));const Le=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(r,{slots:e}){const t=n.ref(null),o=n.reactive(a.usePointer(je(Se({},r),{target:r.target==="self"?t:l})));return()=>{if(e.default)return e.default(o,{ref:t})}}}),Ie=n.defineComponent({name:"UsePreferredColorScheme",setup(r,{slots:e}){const t=n.reactive({colorScheme:a.usePreferredColorScheme()});return()=>{if(e.default)return e.default(t)}}}),Me=n.defineComponent({name:"UsePreferredDark",setup(r,{slots:e}){const t=n.reactive({prefersDark:a.usePreferredDark()});return()=>{if(e.default)return e.default(t)}}}),Ne=n.defineComponent({name:"UsePreferredLanguages",setup(r,{slots:e}){const t=n.reactive({languages:a.usePreferredLanguages()});return()=>{if(e.default)return e.default(t)}}});var Ae=Object.defineProperty,Te=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,V=(r,e,t)=>e in r?Ae(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ze=(r,e)=>{for(var t in e||(e={}))Fe.call(e,t)&&V(r,t,e[t]);if($)for(var t of $(e))We.call(e,t)&&V(r,t,e[t]);return r},ke=(r,e)=>Te(r,Be(e));const Re=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages"],setup(r,{slots:e}){const{time:t}=n.toRefs(r),o=n.reactive(a.useTimeAgo(t,ke(ze({},r),{controls:!0})));return()=>{if(e.default)return e.default(o)}}});var Ge=Object.defineProperty,Ke=Object.defineProperties,He=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,E=(r,e,t)=>e in r?Ge(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Qe=(r,e)=>{for(var t in e||(e={}))qe.call(e,t)&&E(r,t,e[t]);if(C)for(var t of C(e))Je.call(e,t)&&E(r,t,e[t]);return r},Xe=(r,e)=>Ke(r,He(e));const Ye=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(r,{slots:e}){const t=n.reactive(a.useTimestamp(Xe(Qe({},r),{controls:!0})));return()=>{if(e.default)return e.default(t)}}});var Ze=Object.defineProperty,S=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,j=(r,e,t)=>e in r?Ze(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,L=(r,e)=>{for(var t in e||(e={}))xe.call(e,t)&&j(r,t,e[t]);if(S)for(var t of S(e))De.call(e,t)&&j(r,t,e[t]);return r};const et=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(r,{slots:e}){const{list:t,containerProps:o,wrapperProps:i}=a.useVirtualList(r.list,r.options);return o.style.height=r.height||"300px",()=>n.h("div",L({},o),[n.h("div",L({},i.value),t.value.map(d=>n.h("div",{style:{overFlow:"hidden",height:d.height}},e.default?e.default(d):"Please set content!")))])}}),tt=n.defineComponent({name:"UseWindowFocus",setup(r,{slots:e}){const t=n.reactive({focused:a.useWindowFocus()});return()=>{if(e.default)return e.default(t)}}}),rt=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(r,{slots:e}){const t=n.reactive(a.useWindowSize(r));return()=>{if(e.default)return e.default(t)}}});s.OnClickOutside=c,s.UseActiveElement=N,s.UseBattery=A,s.UseBrowserLocation=T,s.UseDark=B,s.UseDeviceMotion=F,s.UseDeviceOrientation=W,s.UseDevicePixelRatio=z,s.UseDevicesList=k,s.UseDocumentVisibility=R,s.UseDraggable=Y,s.UseElementBounding=Z,s.UseElementSize=x,s.UseElementVisibility=D,s.UseFullscreen=ee,s.UseGeolocation=te,s.UseIdle=re,s.UseMouse=ne,s.UseMouseInElement=ae,s.UseMousePressed=ce,s.UseNetwork=pe,s.UseNow=we,s.UseOnline=ye,s.UsePageLeave=he,s.UsePointer=Le,s.UsePreferredColorScheme=Ie,s.UsePreferredDark=Me,s.UsePreferredLanguages=Ne,s.UseTimeAgo=Re,s.UseTimestamp=Ye,s.UseVirtualList=et,s.UseWindowFocus=tt,s.UseWindowSize=rt,s.VOnClickOutside=M,Object.defineProperty(s,"__esModule",{value:!0})}(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse); | ||
(function(s){if(!s.VueDemi){var n={},a=s.Vue;if(a)if(a.version.slice(0,2)==="2."){var u=s.VueCompositionAPI;if(u){for(var p in u)n[p]=u[p];n.isVue2=!0,n.isVue3=!1,n.install=function(){},n.Vue=a,n.Vue2=a,n.version=a.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.")}else if(a.version.slice(0,2)==="3."){for(var p in a)n[p]=a[p];n.isVue2=!1,n.isVue3=!0,n.install=function(){},n.Vue=a,n.Vue2=void 0,n.version=a.version,n.set=function(f,l,c){return Array.isArray(f)?(f.length=Math.max(f.length,l),f.splice(l,1,c),c):(f[l]=c,c)},n.del=function(f,l){if(Array.isArray(f)){f.splice(l,1);return}delete f[l]}}else console.error("[vue-demi] Vue version "+a.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");s.VueDemi=n}})(window),function(s,n,a,u){"use strict";const p=n.defineComponent({name:"OnClickOutside",props:["as"],emits:["trigger"],setup(r,{slots:e,emit:t}){const o=n.ref();return a.onClickOutside(o,i=>{t("trigger",i)}),()=>{if(e.default)return n.h(r.as||"div",{ref:o},e.default())}}});function f(r){var e;const t=n.unref(r);return(e=t==null?void 0:t.$el)!=null?e:t}const l=u.isClient?window:void 0;function c(...r){let e,t,o,i;if(u.isString(r[0])?([t,o,i]=r,e=l):[e,t,o,i]=r,!e)return u.noop;let d=u.noop;const P=n.watch(()=>n.unref(e),g=>{d(),!!g&&(g.addEventListener(t,o,i),d=()=>{g.removeEventListener(t,o,i),d=u.noop})},{immediate:!0,flush:"post"}),_=()=>{P(),d()};return u.tryOnScopeDispose(_),_}function I(r,e,t={}){const{window:o=l,event:i="pointerdown"}=t;return o?c(o,i,P=>{const _=f(r);!_||_===P.target||P.composedPath().includes(_)||e(P)},{passive:!0}):void 0}const M=(r,e)=>{I(r,e.value)},N=n.defineComponent({name:"UseActiveElement",setup(r,{slots:e}){const t=n.reactive({element:a.useActiveElement()});return()=>{if(e.default)return e.default(t)}}}),A=n.defineComponent({name:"UseBattery",setup(r,{slots:e}){const t=n.reactive(a.useBattery(r));return()=>{if(e.default)return e.default(t)}}}),B=n.defineComponent({name:"UseBrowserLocation",setup(r,{slots:e}){const t=n.reactive(a.useBrowserLocation());return()=>{if(e.default)return e.default(t)}}}),T=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(r,{slots:e}){const t=a.useDark(r),o=n.reactive({isDark:t,toggleDark:u.useToggle(t)});return()=>{if(e.default)return e.default(o)}}}),F=n.defineComponent({name:"UseDeviceMotion",setup(r,{slots:e}){const t=n.reactive(a.useDeviceMotion());return()=>{if(e.default)return e.default(t)}}}),W=n.defineComponent({name:"UseDeviceOrientation",setup(r,{slots:e}){const t=n.reactive(a.useDeviceOrientation());return()=>{if(e.default)return e.default(t)}}}),z=n.defineComponent({name:"UseDevicePixelRatio",setup(r,{slots:e}){const t=n.reactive({pixelRatio:a.useDevicePixelRatio()});return()=>{if(e.default)return e.default(t)}}}),R=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions"],setup(r,{slots:e}){const t=n.reactive(a.useDevicesList(r));return()=>{if(e.default)return e.default(t)}}}),k=n.defineComponent({name:"UseDocumentVisibility",setup(r,{slots:e}){const t=n.reactive({visibility:a.useDocumentVisibility()});return()=>{if(e.default)return e.default(t)}}});var G=Object.defineProperty,K=Object.defineProperties,H=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,U=(r,e,t)=>e in r?G(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Q=(r,e)=>{for(var t in e||(e={}))q.call(e,t)&&U(r,t,e[t]);if(O)for(var t of O(e))J.call(e,t)&&U(r,t,e[t]);return r},X=(r,e)=>K(r,H(e));const Y=n.defineComponent({name:"UseDraggable",props:["storageKey","initialValue","exact","preventDefault","pointerTypes","as"],setup(r,{slots:e}){const t=n.ref(),o=r.storageKey?a.useStorage(r.storageKey,n.unref(r.initialValue)||{x:0,y:0},a.isClient?r.storageType==="session"?sessionStorage:localStorage:void 0):r.initialValue||{x:0,y:0},i=n.reactive(a.useDraggable(t,X(Q({},r),{initialValue:o})));return()=>{if(e.default)return n.h(r.as||"div",{ref:t,style:`touch-action:none;${i.style}`},e.default(i))}}}),Z=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useElementBounding(t,{box:r.box,window:r.window}));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),x=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useElementSize(t,{width:r.width,height:r.height},{box:r.box}));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),D=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive({isVisible:a.useElementVisibility(t)});return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),ee=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(r,{slots:e}){const t=n.reactive(a.useEyeDropper());return()=>{if(e.default)return e.default(t)}}}),te=n.defineComponent({name:"UseFullscreen",props:["as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useFullscreen(t));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),re=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(r,{slots:e}){const t=n.reactive(a.useGeolocation(r));return()=>{if(e.default)return e.default(t)}}}),ne=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(r,{slots:e}){const t=n.reactive(a.useIdle(r.timeout,r));return()=>{if(e.default)return e.default(t)}}}),ae=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(r,{slots:e}){const t=n.reactive(a.useMouse(r));return()=>{if(e.default)return e.default(t)}}}),se=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useMouseInElement(t,r));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}});var oe=Object.defineProperty,ie=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,v=(r,e,t)=>e in r?oe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,de=(r,e)=>{for(var t in e||(e={}))fe.call(e,t)&&v(r,t,e[t]);if(m)for(var t of m(e))le.call(e,t)&&v(r,t,e[t]);return r},pe=(r,e)=>ie(r,ue(e));const ce=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(r,{slots:e}){const t=n.ref(),o=n.reactive(a.useMousePressed(pe(de({},r),{target:t})));return()=>{if(e.default)return n.h(r.as||"div",{ref:t},e.default(o))}}}),_e=n.defineComponent({name:"UseNetwork",setup(r,{slots:e}){const t=n.reactive(a.useNetwork());return()=>{if(e.default)return e.default(t)}}});var Pe=Object.defineProperty,ge=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,w=(r,e,t)=>e in r?Pe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ve=(r,e)=>{for(var t in e||(e={}))Ue.call(e,t)&&w(r,t,e[t]);if(y)for(var t of y(e))me.call(e,t)&&w(r,t,e[t]);return r},ye=(r,e)=>ge(r,Oe(e));const we=n.defineComponent({name:"UseNow",props:["interval"],setup(r,{slots:e}){const t=n.reactive(a.useNow(ye(ve({},r),{controls:!0})));return()=>{if(e.default)return e.default(t)}}}),he=n.defineComponent({name:"UseOnline",setup(r,{slots:e}){const t=n.reactive({isOnline:a.useOnline()});return()=>{if(e.default)return e.default(t)}}}),be=n.defineComponent({name:"UsePageLeave",setup(r,{slots:e}){const t=n.reactive({isLeft:a.usePageLeave()});return()=>{if(e.default)return e.default(t)}}});var $e=Object.defineProperty,Ve=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,b=(r,e,t)=>e in r?$e(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,je=(r,e)=>{for(var t in e||(e={}))Ee.call(e,t)&&b(r,t,e[t]);if(h)for(var t of h(e))Se.call(e,t)&&b(r,t,e[t]);return r},Le=(r,e)=>Ve(r,Ce(e));const Ie=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(r,{slots:e}){const t=n.ref(null),o=n.reactive(a.usePointer(Le(je({},r),{target:r.target==="self"?t:l})));return()=>{if(e.default)return e.default(o,{ref:t})}}}),Me=n.defineComponent({name:"UsePreferredColorScheme",setup(r,{slots:e}){const t=n.reactive({colorScheme:a.usePreferredColorScheme()});return()=>{if(e.default)return e.default(t)}}}),Ne=n.defineComponent({name:"UsePreferredDark",setup(r,{slots:e}){const t=n.reactive({prefersDark:a.usePreferredDark()});return()=>{if(e.default)return e.default(t)}}}),Ae=n.defineComponent({name:"UsePreferredLanguages",setup(r,{slots:e}){const t=n.reactive({languages:a.usePreferredLanguages()});return()=>{if(e.default)return e.default(t)}}});var Be=Object.defineProperty,Te=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,V=(r,e,t)=>e in r?Be(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Re=(r,e)=>{for(var t in e||(e={}))We.call(e,t)&&V(r,t,e[t]);if($)for(var t of $(e))ze.call(e,t)&&V(r,t,e[t]);return r},ke=(r,e)=>Te(r,Fe(e));const Ge=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages"],setup(r,{slots:e}){const{time:t}=n.toRefs(r),o=n.reactive(a.useTimeAgo(t,ke(Re({},r),{controls:!0})));return()=>{if(e.default)return e.default(o)}}});var Ke=Object.defineProperty,He=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,E=(r,e,t)=>e in r?Ke(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Xe=(r,e)=>{for(var t in e||(e={}))Je.call(e,t)&&E(r,t,e[t]);if(C)for(var t of C(e))Qe.call(e,t)&&E(r,t,e[t]);return r},Ye=(r,e)=>He(r,qe(e));const Ze=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(r,{slots:e}){const t=n.reactive(a.useTimestamp(Ye(Xe({},r),{controls:!0})));return()=>{if(e.default)return e.default(t)}}});var xe=Object.defineProperty,S=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,j=(r,e,t)=>e in r?xe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,L=(r,e)=>{for(var t in e||(e={}))De.call(e,t)&&j(r,t,e[t]);if(S)for(var t of S(e))et.call(e,t)&&j(r,t,e[t]);return r};const tt=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(r,{slots:e}){const{list:t,containerProps:o,wrapperProps:i}=a.useVirtualList(r.list,r.options);return o.style.height=r.height||"300px",()=>n.h("div",L({},o),[n.h("div",L({},i.value),t.value.map(d=>n.h("div",{style:{overFlow:"hidden",height:d.height}},e.default?e.default(d):"Please set content!")))])}}),rt=n.defineComponent({name:"UseWindowFocus",setup(r,{slots:e}){const t=n.reactive({focused:a.useWindowFocus()});return()=>{if(e.default)return e.default(t)}}}),nt=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(r,{slots:e}){const t=n.reactive(a.useWindowSize(r));return()=>{if(e.default)return e.default(t)}}});s.OnClickOutside=p,s.UseActiveElement=N,s.UseBattery=A,s.UseBrowserLocation=B,s.UseDark=T,s.UseDeviceMotion=F,s.UseDeviceOrientation=W,s.UseDevicePixelRatio=z,s.UseDevicesList=R,s.UseDocumentVisibility=k,s.UseDraggable=Y,s.UseElementBounding=Z,s.UseElementSize=x,s.UseElementVisibility=D,s.UseEyeDropper=ee,s.UseFullscreen=te,s.UseGeolocation=re,s.UseIdle=ne,s.UseMouse=ae,s.UseMouseInElement=se,s.UseMousePressed=ce,s.UseNetwork=_e,s.UseNow=we,s.UseOnline=he,s.UsePageLeave=be,s.UsePointer=Ie,s.UsePreferredColorScheme=Me,s.UsePreferredDark=Ne,s.UsePreferredLanguages=Ae,s.UseTimeAgo=Ge,s.UseTimestamp=Ze,s.UseVirtualList=tt,s.UseWindowFocus=rt,s.UseWindowSize=nt,s.VOnClickOutside=M,Object.defineProperty(s,"__esModule",{value:!0})}(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse); |
{ | ||
"name": "@vueuse/components", | ||
"version": "6.8.0", | ||
"version": "6.9.0", | ||
"description": "Renderless components for VueUse", | ||
@@ -34,6 +34,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@vueuse/core": "6.8.0", | ||
"@vueuse/shared": "6.8.0", | ||
"@vueuse/core": "6.9.0", | ||
"@vueuse/shared": "6.9.0", | ||
"vue-demi": "*" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95481
2168
+ Added@vueuse/core@6.9.0(transitive)
+ Added@vueuse/shared@6.9.0(transitive)
- Removed@vueuse/core@6.8.0(transitive)
- Removed@vueuse/shared@6.8.0(transitive)
Updated@vueuse/core@6.9.0
Updated@vueuse/shared@6.9.0