{"_id":"point","_rev":"2909002","name":"point","description":"Unified, Observable Touch and Mouse Events","dist-tags":{"latest":"1.3.0"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"time":{"modified":"2023-01-19T08:36:50.000Z","created":"2013-04-26T11:48:11.844Z","1.3.0":"2016-01-13T02:23:22.476Z","1.2.0":"2015-03-18T01:12:18.585Z","1.1.0":"2015-02-10T00:40:41.541Z","1.0.0":"2014-12-09T23:37:42.518Z","0.3.1":"2014-03-12T02:43:04.317Z","0.3.0":"2014-02-06T01:34:12.055Z","0.2.1":"2013-10-08T22:07:42.440Z","0.2.0":"2013-10-02T00:53:38.053Z","0.1.1":"2013-05-03T00:32:55.419Z","0.1.0":"2013-05-02T23:39:12.526Z","0.0.1":"2013-04-26T11:48:11.844Z"},"users":{},"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/DamonOehlman/point.git"},"versions":{"1.3.0":{"name":"point","description":"Unified, Observable Touch and Mouse Events","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"1.3.0","dependencies":{"feature":"^1.0.0","observ":"^0.2.0"},"devDependencies":{"eve":"^0.5.0","pull-observable":"~0.1","pull-stream":"^2"},"repository":{"type":"git","url":"git+https://github.com/DamonOehlman/point.git"},"bugs":{"url":"https://github.com/DamonOehlman/point/issues"},"scripts":{"gendocs":"gendocs > README.md"},"main":"index.js","directories":{"example":"examples"},"keywords":["mouse","touch","observable"],"license":"MIT","homepage":"https://github.com/DamonOehlman/point","gitHead":"c466f385ab4652f99ff0905edad26332abc58c97","_id":"point@1.3.0","_shasum":"2f0108d80f5479ff3323441b4e2f6979a9b35c32","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"dist":{"shasum":"2f0108d80f5479ff3323441b4e2f6979a9b35c32","size":3342,"noattachment":false,"key":"/point/-/point-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-1.3.0.tgz"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"_cnpmcore_publish_time":"2021-12-23T15:47:36.309Z","publish_time":1452651802476,"_cnpm_publish_time":1452651802476},"1.2.0":{"name":"point","description":"Unified, Observable Touch and Mouse Events","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"1.2.0","dependencies":{"feature":"^1.0.0","observ":"^0.2.0"},"devDependencies":{"eve":"^0.5.0","pull-observable":"~0.1","pull-stream":"^2"},"repository":{"type":"git","url":"https://github.com/DamonOehlman/point.git"},"bugs":{"url":"https://github.com/DamonOehlman/point/issues"},"scripts":{"gendocs":"gendocs > README.md"},"main":"index.js","directories":{"example":"examples"},"keywords":["mouse","touch","observable"],"license":"MIT","homepage":"https://github.com/DamonOehlman/point","gitHead":"48703eccb287f1f9fd1b4e89fcff7a2509c0fd9a","_id":"point@1.2.0","_shasum":"02bdb88e5a3aab28336f03bcee63d2082afa793b","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"dist":{"shasum":"02bdb88e5a3aab28336f03bcee63d2082afa793b","size":3287,"noattachment":false,"key":"/point/-/point-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-1.2.0.tgz"},"_cnpmcore_publish_time":"2021-12-23T15:47:35.379Z","publish_time":1426641138585,"_cnpm_publish_time":1426641138585},"1.1.0":{"name":"point","description":"Unified, Observable Touch and Mouse Events","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"1.1.0","dependencies":{"feature":"^1.0.0","observ":"^0.2.0"},"devDependencies":{"eve":"^0.5.0","pull-observable":"~0.1","pull-stream":"^2"},"repository":{"type":"git","url":"https://github.com/DamonOehlman/point.git"},"bugs":{"url":"https://github.com/DamonOehlman/point/issues"},"scripts":{"gendocs":"gendocs > README.md"},"main":"index.js","directories":{"example":"examples"},"keywords":["mouse","touch","observable"],"license":"MIT","homepage":"https://github.com/DamonOehlman/point","gitHead":"7bb754d1c2a4d1e34bed9939c16536b619a5b77d","_id":"point@1.1.0","_shasum":"c3c333786cdcff1cc86085286887b197a63bbf41","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"dist":{"shasum":"c3c333786cdcff1cc86085286887b197a63bbf41","size":3258,"noattachment":false,"key":"/point/-/point-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-1.1.0.tgz"},"_cnpmcore_publish_time":"2021-12-23T15:47:34.488Z","publish_time":1423528841541,"_cnpm_publish_time":1423528841541},"1.0.0":{"name":"point","description":"Unified, Observable Touch and Mouse Events","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"1.0.0","dependencies":{"feature":"^1.0.0","observ":"^0.2.0"},"devDependencies":{"eve":"^0.5.0","pull-observable":"~0.1","pull-stream":"^2"},"repository":{"type":"git","url":"https://github.com/DamonOehlman/point.git"},"bugs":{"url":"https://github.com/DamonOehlman/point/issues"},"scripts":{"gendocs":"gendocs > README.md"},"main":"index.js","directories":{"example":"examples"},"keywords":["mouse","touch","observable"],"license":"MIT","homepage":"https://github.com/DamonOehlman/point","gitHead":"236234e2457b11bd0f1a9b787debdd59ac93e466","_id":"point@1.0.0","_shasum":"0938bb420d1bd286b46a8244a6b93adcb8fe3946","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"dist":{"shasum":"0938bb420d1bd286b46a8244a6b93adcb8fe3946","size":2958,"noattachment":false,"key":"/point/-/point-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-1.0.0.tgz"},"_cnpmcore_publish_time":"2021-12-23T15:47:31.090Z","publish_time":1418168262518,"_cnpm_publish_time":1418168262518},"0.3.1":{"name":"point","description":"Unified, Observable Touch and Mouse Events","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"0.3.1","dependencies":{"feature":"~0.1.2","observable":"~2.1.2"},"devDependencies":{},"repository":{"type":"git","url":"https://github.com/DamonOehlman/point.git"},"bugs":{"url":"https://github.com/DamonOehlman/point/issues"},"scripts":{"gendocs":"gendocs > README.md"},"main":"index.js","directories":{"example":"examples"},"keywords":["mouse","touch","observable"],"license":"MIT","homepage":"https://github.com/DamonOehlman/point","_id":"point@0.3.1","dist":{"shasum":"71c416f7c781db400f64d7d1fb74069cf480e96f","size":2429,"noattachment":false,"key":"/point/-/point-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-0.3.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"_cnpmcore_publish_time":"2021-12-23T15:47:30.218Z","publish_time":1394592184317,"_cnpm_publish_time":1394592184317},"0.3.0":{"name":"point","description":"Unified, Observable Touch and Mouse Events","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"0.3.0","dependencies":{"feature":"~0.1.2","observable":"~2.1.2"},"devDependencies":{},"repository":{"type":"git","url":"https://github.com/DamonOehlman/point.git"},"bugs":{"url":"https://github.com/DamonOehlman/point/issues"},"scripts":{"gendocs":"gendocs > README.md"},"main":"index.js","directories":{"example":"examples"},"keywords":["mouse","touch","observable"],"license":"MIT","homepage":"https://github.com/DamonOehlman/point","_id":"point@0.3.0","dist":{"shasum":"ca484091a361b2c798342d99cec16bf6d2d07563","size":2360,"noattachment":false,"key":"/point/-/point-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.26","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"_cnpmcore_publish_time":"2021-12-23T15:47:29.137Z","publish_time":1391650452055,"_cnpm_publish_time":1391650452055},"0.2.1":{"name":"point","description":"Unified, Observable Touch and Mouse Events","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"0.2.1","dependencies":{"feature":"~0.1.2","observable":"~2.1.2"},"devDependencies":{},"repository":{"type":"git","url":"https://bitbucket.org/DamonOehlman/point.git"},"bugs":{"url":"https://bitbucket.org/DamonOehlman/point/issues"},"scripts":{"gendocs":"gendocs > README.md"},"main":"index.js","directories":{"example":"examples"},"keywords":["mouse","touch","observable"],"license":"MIT","_id":"point@0.2.1","dist":{"shasum":"f0729ff8dbc607c077d4750adb348c3355d51c79","size":2274,"noattachment":false,"key":"/point/-/point-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"_cnpmcore_publish_time":"2021-12-23T15:47:28.240Z","publish_time":1381270062440,"_cnpm_publish_time":1381270062440},"0.2.0":{"name":"point","description":"Unified, Observable Touch and Mouse Events","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"version":"0.2.0","dependencies":{"feature":"~0.1.2","observable":"~2.1.2"},"devDependencies":{},"repository":{"type":"git","url":"git://github.com/DamonOehlman/point.git"},"bugs":{"url":"http://github.com/DamonOehlman/point/issues"},"scripts":{"gendocs":"gendocs > README.md"},"main":"index.js","directories":{"example":"examples"},"keywords":["mouse","touch","observable"],"license":"MIT","_id":"point@0.2.0","dist":{"shasum":"389a1e18aa440dd2f16f4c510850617db496c019","size":1627,"noattachment":false,"key":"/point/-/point-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"_cnpmcore_publish_time":"2021-12-23T15:47:24.412Z","publish_time":1380675218053,"_cnpm_publish_time":1380675218053},"0.1.1":{"name":"point","description":"Capture Touch and Mouse events and emit data as a stream","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"tags":["browser","mouse","touch","stream"],"version":"0.1.1","dependencies":{"feature":"0.0.x"},"devDependencies":{},"repository":{"type":"git","url":"git://github.com/DamonOehlman/point.git"},"bugs":{"url":"http://github.com/DamonOehlman/point/issues"},"scripts":{"test":"./node_modules/.bin/tape test/*.js"},"contributors":[],"_id":"point@0.1.1","dist":{"shasum":"117f2397b2ebe31674284e28f1a1b988c5ec627a","size":1777,"noattachment":false,"key":"/point/-/point-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-0.1.1.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"directories":{},"_cnpmcore_publish_time":"2021-12-23T15:47:23.541Z","publish_time":1367541175419,"_cnpm_publish_time":1367541175419},"0.1.0":{"name":"point","description":"Capture Touch and Mouse events and emit data as a stream","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"tags":["browser","mouse","touch","stream"],"version":"0.1.0","dependencies":{"feature":"0.0.x"},"devDependencies":{},"repository":{"type":"git","url":"git://github.com/DamonOehlman/point.git"},"bugs":{"url":"http://github.com/DamonOehlman/point/issues"},"scripts":{"test":"./node_modules/.bin/tape test/*.js"},"contributors":[],"_id":"point@0.1.0","dist":{"shasum":"218d3f1c52f17a8196c9c7fcc0c2f59781565b7c","size":1501,"noattachment":false,"key":"/point/-/point-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-0.1.0.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"directories":{},"_cnpmcore_publish_time":"2021-12-23T15:47:22.679Z","publish_time":1367537952526,"_cnpm_publish_time":1367537952526},"0.0.1":{"name":"point","description":"Capture Touch and Mouse events and emit data as a stream","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"tags":["browser","mouse","touch","stream"],"version":"0.0.1","dependencies":{"feature":"0.0.x"},"devDependencies":{},"repository":{"type":"git","url":"git://github.com/DamonOehlman/point.git"},"bugs":{"url":"http://github.com/DamonOehlman/point/issues"},"scripts":{"test":"./node_modules/.bin/tape test/*.js"},"contributors":[],"_id":"point@0.0.1","dist":{"shasum":"da30f0675f90ed775088149ca1679e4148a20a02","size":1310,"noattachment":false,"key":"/point/-/point-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/point/download/point-0.0.1.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"directories":{},"_cnpmcore_publish_time":"2021-12-23T15:47:21.803Z","publish_time":1366976891844,"_cnpm_publish_time":1366976891844}},"readme":"# point\n\nUse [observable](https://github.com/dominictarr/observable) (well, actually\n[Observ](https://github.com/Raynos/observ) now) to monitor mouse and touch\nevents.\n\n\n[![NPM](https://nodei.co/npm/point.png)](https://nodei.co/npm/point/)\n\n[![unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)](https://github.com/dominictarr/stability#unstable) \n\n## Usage\n\nFirst bind to the element you wish to capture data for.  In this case\nlet's capture data at the document level:\n\n```js\nvar point = require('point')(document);\n```\n\nNow to receive the pointer events simply pass point a function that will\nprocess the data:\n\n```js\npoint(function(args) {\n  console.log(args);\n});\n```\n\nThe event data is passed to the function as a 4 element array:\n\n```js\n[ pageX, pageY, data, originalEvent ]\n```\n\nAt this stage, the data object `args[2]` simply tells you the type of the\npointer event:\n\n```js\n{ type: 'start' }\n```\n\nPossible values:\n\n- start\n- move\n- end\n- dblclick (when `doubleClick` is passed)\n\n## Advanced Example: Replacing Interact\n\nUsing this module in conjunction with a\n[pull-stream](https://github.com/dominictarr/pull-stream) and\n[pull-observable](https://github.com/DamonOehlman/pull-observable) it is\npossible to replicate the function of a library that I wrote a few years\nago called [interact](https://github.com/DamonOehlman/interact).  Interact\nwas designed to capture bound events and send them to a message bus Using\n[eve](https://github.com/adobewebplatform/eve):\n\n```js\nvar pull = require('pull-stream');\nvar observe = require('pull-observable');\nvar point = require('point');\nvar eve = require('eve');\n\neve.on('pointer.*', function(x, y) {\n  console.log('captured: ' + eve.nt() + ' @ ', x, y);\n});\n\npull(\n  observe(point(document)),\n  pull.drain(function(args) {\n    var type = (args[2] || {}).type;\n\n    eve.apply(null, ['pointer.' + type, args[3]].concat(args.slice(0, 2)));\n  })\n);\n\n\n```\n\n## Reference\n\n### `point(target, opts?) => Observ`\n\nCreate a new [Observable](https://github.com/Raynos/observ) that will be\nupdated in response to pointer movement on the specified `target`.\n\nThe following options can be provided to tweak behaviour:\n\n- `over` - capture mouse over events in addition to mouse move events\n- `preventDefault` - whether the default event behaviour should be\n  prevented in the browser event listeners.\n- `doubleClick` - capture double click events in addition to other events\n\n## License(s)\n\n### MIT\n\nCopyright (c) 2016 Damon Oehlman <damon.oehlman@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/DamonOehlman/point","bugs":{"url":"https://github.com/DamonOehlman/point/issues"},"license":"MIT"}