{"_id":"@andboh/vue-screen","_rev":"2-bf9c249f7694a18da667e392647a0385","name":"@andboh/vue-screen","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@andboh/vue-screen","version":"1.0.0","description":"Reactive wrapper for window size and scroll position for Vue 2.","main":"index.js","keywords":["vue","reactive","screen","touch detect","window size","scroll position "],"repository":{"type":"git","url":"git+https://github.com/AndBoh/vue-screen.git"},"bugs":{"url":"https://github.com/AndBoh/vue-screen/issues"},"homepage":"https://github.com/AndBoh/vue-screen#readme","author":{"name":"Andrey Bokhan"},"license":"MIT","gitHead":"39ceb5b3c794048822ec2bae313e972569df6360","_id":"@andboh/vue-screen@1.0.0","_nodeVersion":"14.16.0","_npmVersion":"7.24.2","dist":{"integrity":"sha512-q/Jv797SrHDaIUEG3PT3pEocsLiMaCDSJCbvsm8tMt42Y/+h514EMIPNueCX34h5dxhDn+oU/wH06ut3QqRpCA==","shasum":"c5f60cbf4e798f81999ff07101167c9669bfbaf2","tarball":"https://registry.npmjs.org/@andboh/vue-screen/-/vue-screen-1.0.0.tgz","fileCount":7,"unpackedSize":5587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOL1MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrfbg/+LonVwpAZvBJKVRnK2yLPFnTd2ddlJcoF/7dHIuyW2y+mRrRy\r\nmvqj5vUEHH+gpyYRLPu4qSjUJTc5l3UBXej7bmOBtPH4GH6vPDi0OcRvXiFv\r\nibN+WRrKJvqef5auRcHSi3AiSPvTe1SUeo6Qyw9zlyq8W9Cqc0VpjGIJSpRC\r\nXoBwFGEIy9TVSOcSzxhxRBQCh09Fnq5ykiSvDzTe+ndKnA6i8Z5AikirD/Lm\r\ncdwIEFnWn1X4VzuGkEOWvyCNCwXAevPq9Eyh8Iom/Esi7j7MKfUXIBSf5AEW\r\n6Q/3EazGwfGA00QlnlPGOZzVMRkdrNMUpUy+chWIywSp9snKaHkvc/N2nOMK\r\nwphNgBTVCMfPJ+CEFMGgviXSJOFe3hALrALrnZ5l/8IgWojoV1v+uvUToIQz\r\nxqJRKsNtTI7wvwxHgqtWS1z2/cZCAJksudFqe7IA2MKg5sipQRyNzggvMO5X\r\nsDTpBfehdmQkvmBOxAx89OT4+wZshb1qupuv7Un+KhkdCgE5qv4JJagY1I5V\r\nKYzQcxwtSYqof/Mb/6XMma6zxAKQMDQfXlZU7ZqqIYJn7Y6Ze35Ndi8KoD02\r\nCgieU4EVxhgq4PES6otDs786XHregDjidlDJ8CIKjm3rmzrmqPnwGKww0ihh\r\ned+EZ6lMvaui0i7vukTEjFiUEk5lclojEwM=\r\n=xURI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMgvncMxhsqn612ALv7/wCCEmu47aL/j7VtfqmpiEgLQIgC1A3DFJ7WoaEVfPTxFJlbuY5yMA0aBAgXXI++ItUDPc="}]},"_npmUser":{"name":"andboh","email":"andrbokhan@gmail.com"},"directories":{},"maintainers":[{"name":"andboh","email":"andrbokhan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-screen_1.0.0_1647885644630_0.5100101751518504"},"_hasShrinkwrap":false},"1.0.1":{"name":"@andboh/vue-screen","version":"1.0.1","description":"Reactive wrapper for window size and scroll position for Vue 2.","main":"index.js","keywords":["vue","reactive","screen","touch detect","window size","scroll position "],"repository":{"type":"git","url":"git+https://github.com/AndBoh/vue-screen.git"},"bugs":{"url":"https://github.com/AndBoh/vue-screen/issues"},"homepage":"https://github.com/AndBoh/vue-screen#readme","author":{"name":"Andrey Bokhan"},"license":"MIT","gitHead":"0f87511da9670a09b624cd75cfe6abf87e81999f","_id":"@andboh/vue-screen@1.0.1","_nodeVersion":"14.16.0","_npmVersion":"7.24.2","dist":{"integrity":"sha512-nYADJL92L2IuI1BmtbRhMT67ic0pQMBhGl/hlzecpklpWYl/Gd+nWRTBMGboCW6seRPwFs490yns5yvPdwxzeg==","shasum":"3b9df5064683d03e3ac7fe3469ca6b656ae3774e","tarball":"https://registry.npmjs.org/@andboh/vue-screen/-/vue-screen-1.0.1.tgz","fileCount":7,"unpackedSize":5703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOMFzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpG3A//cJVOtJKXTZhdBxOvpRcwacuZbwmuugY5n4MRWKkAZnsVjZTF\r\nv+MQjqKl8OKaSFXAc7cHFyx42RJoMz0zmZMFPzNRBnh9zShdt3R4/1lDzkE3\r\nbx1PeGIgaK8A3Fy/K2Z9SpMpa9opm2Gpko8nWkbejnVYIpbv+nMTOmSAvlah\r\nC4lDb/VAhW2iVfsGvdea2IgrFG3NASrrJdMMC8Cvy0LhF8s+86hB56cnYV42\r\nMtQfmh5aILpk0AM0oxbuqmrSlZdbO+VvloMpLlx1awyPnPgWxu34XvLMOyte\r\nbMZ5mhhf5GKgWdV9yabU6cNSNq7LVQfUFDoi+HXkmWkayzmo23jp6P+YskKD\r\n0jNcBvy4TlP0gFWR8+En6TpoNS3xqfqSsYXZa6/wTG+8QkTJt0ocSeRAmDW9\r\n+Dl01949oBfqdln2Sw/q6xxLc1Q7D82GThwTrHt5WINdEmP3rVlp+shK5HQE\r\nxoeFC/xi3MCDEixWIuxXy9TP21xjDqED0Ui6XADKHR8pKhsSiKwgt1ckUoRz\r\nI6irIq5wWcXcU8X88MpVou8InQJ91vqeDLDkem4bWBeeLI1hAx2aMhIZzVZ4\r\nBA6HsvfbAJEDoQb9kUm3tmh8Z8NXQi2+WwX2L/8kmv0n8cZGLy8M/IOjez0b\r\nSB8GZF3L+4qfRzVaO/7PFUAPOMxsKZVRI3o=\r\n=MK5m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHU18Ua1yIqoPA1J1rKYPhwDRlc5jlb1x8ggkS8MVjFNAiEApPKYvBK8v9a9Pa5l93R7uxI+ho/jvvYVX72kSVRaRec="}]},"_npmUser":{"name":"andboh","email":"andrbokhan@gmail.com"},"directories":{},"maintainers":[{"name":"andboh","email":"andrbokhan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-screen_1.0.1_1647886707516_0.8338429901625422"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-21T18:00:44.570Z","1.0.0":"2022-03-21T18:00:44.812Z","modified":"2022-04-04T13:57:31.582Z","1.0.1":"2022-03-21T18:18:27.680Z"},"maintainers":[{"name":"andboh","email":"andrbokhan@gmail.com"}],"description":"Reactive wrapper for window size and scroll position for Vue 2.","homepage":"https://github.com/AndBoh/vue-screen#readme","keywords":["vue","reactive","screen","touch detect","window size","scroll position "],"repository":{"type":"git","url":"git+https://github.com/AndBoh/vue-screen.git"},"author":{"name":"Andrey Bokhan"},"bugs":{"url":"https://github.com/AndBoh/vue-screen/issues"},"license":"MIT","readme":"# @AndBoh/vue-screen\n[![npm version](https://badge.fury.io/js/@andboh%2Fvue-screen.svg)](https://badge.fury.io/js/@andboh%2Fvue-screen)\n\nReactive wrapper for window size and scroll position for Vue 2.\n\n## Motivation\nSometimes you need to watch the size of the window inside the javascript application code,\nbut the window object is not reactive. This plugin for Vue 2 provides a reactive object with current\nwindow size, scroll position and touch feature.\n\n## Installation\n#### 1. Install plugin\n\n\n    npm i -S @andboh/vue-screen\n\n### #2. Use in your app\n\n        import VueScreen from '@andboh/vue-screen';\n\n        Vue.use(VueScreen, { options });\n\n## Plugin options fields\n*number* **debounce** - Debounce time in ms to avoid recalculating values too often. Defaults to 150.\n\n*number* **defaultWidth**, *number* **defaultHeight** - Standard window size if the window object\nis undefined (for example, with SSR). Defaults to 1920 and 1080.\n\n## Usage\nYou can get value in any component accessing `this.$screen` option \n\n        console.log(this.$screen);\n\n---\nResult:\n\n        {\n              window: {\n                   height: 969, // window client height\n                   width: 1920, // window client width\n              },\n              scroll: {\n                  x: 0, // scroll x position\n                  y: 0, // scroll y position\n              },\n              hasTouch: false // is it touch device\n        }\n\nAlso, you can set a deep watcher for the whole object\n\n        watch: {\n            $store: {\n                handler(newVal) {\n                    ...\n                },\n                deep: true,\n            }\n        }\n\nor any field of it\n\n        watch: {\n            '$store.window.width'(newVal) {\n                ...\n            }\n        }\n\n## License\n[MIT](https://github.com/AndBoh/vue-screen/blob/main/LICENSE)\n","readmeFilename":"README.md"}