{"_id":"alerts","_rev":"14-484c59fea968126d3e445207f5d39a59","name":"alerts","description":"Simple and straigtforward notifications for the browser.","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"alerts","version":"0.1.0","description":"Simple and straigtforward notifications for the browser.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/acstll/alerts.git"},"keywords":["alerts","notifications","browser"],"author":{"name":"Arturo Castillo Delgado","email":"19@8302.net"},"license":"MIT","bugs":{"url":"https://github.com/acstll/alerts/issues"},"devDependencies":{"grunt-contrib-concat":"~0.3.0","grunt-amd-wrap":"~1.0.1","grunt-contrib-jshint":"~0.6.4","grunt":"~0.4.1","grunt-contrib-clean":"~0.5.0"},"_id":"alerts@0.1.0","dist":{"shasum":"106f1ea455642a383cca338c1ebdc5261d57ea3b","tarball":"https://registry.npmjs.org/alerts/-/alerts-0.1.0.tgz","integrity":"sha512-rM8igrnh9R+GQxaM3cV2cbBbyz1cHTy0J3g5wI2kUmaZzAgJ4bv4rfT65E6qEXuAsJIGD6MrTWcKiDmssJabUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKVZIsZ1pALz73bWTrm+pr2AY1Yecean+drJQeKsK1RAIhAOMZiXM58gTM7actEWEf0BoYifE8ou9fcv4iVEg3JT1X"}]},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"acstll","email":"19@8302.net"},"maintainers":[{"name":"acstll","email":"19@8302.net"}],"directories":{},"deprecated":"CJS exports broken, fixed in v0.1.1"},"0.1.1":{"name":"alerts","version":"0.1.1","description":"Simple and straigtforward notifications for the browser.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/acstll/alerts.git"},"keywords":["alerts","notifications","browser"],"author":{"name":"Arturo Castillo Delgado","email":"19@8302.net"},"license":"MIT","bugs":{"url":"https://github.com/acstll/alerts/issues"},"devDependencies":{"grunt":"~0.4.1","grunt-amd-wrap":"~1.0.1","grunt-contrib-concat":"~0.3.0","grunt-contrib-jshint":"~0.6.4","grunt-contrib-clean":"~0.5.0"},"_id":"alerts@0.1.1","dist":{"shasum":"bde8730f77fd7792ed37a0267eb19ced1fce2999","tarball":"https://registry.npmjs.org/alerts/-/alerts-0.1.1.tgz","integrity":"sha512-C5yJ+Q9Co7uWnE7YvpUDWm0tTHCi3a5jbmZob2nuCNZUiplC/ThUui+Y7lrX6N4ysvRTu+XPkvHJ/BvbH25F3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSr+3yAdfqIg1zb5iIMwUf5e2wMNreSCFSUQCxTTG8cQIgdgdJwU13c/5cvaN+qecKB90nr7XA0U/0d7SdpeFbtuU="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"acstll","email":"19@8302.net"},"maintainers":[{"name":"acstll","email":"19@8302.net"}],"directories":{}},"0.1.2":{"name":"alerts","version":"0.1.2","description":"Simple and straigtforward notifications for the browser.","main":"index.js","scripts":{"test":"./node_modules/.bin/beefy test.js --open"},"repository":{"type":"git","url":"https://github.com/acstll/alerts.git"},"keywords":["alerts","notifications","browser"],"author":{"name":"Arturo Castillo Delgado","email":"19@8302.net"},"license":"MIT","bugs":{"url":"https://github.com/acstll/alerts/issues"},"devDependencies":{"grunt":"~0.4.1","grunt-amd-wrap":"~1.0.1","grunt-contrib-concat":"~0.3.0","grunt-contrib-jshint":"~0.6.4","grunt-contrib-clean":"~0.5.0","tape":"~1.1.1","beefy":"~0.4.4"},"testling":{"files":"test.js","browsers":["ie/8..latest","firefox/20..latest","firefox/nightly","chrome/25..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"_id":"alerts@0.1.2","dist":{"shasum":"20a1203680d6491f5ea57752afec998a2fa454a7","tarball":"https://registry.npmjs.org/alerts/-/alerts-0.1.2.tgz","integrity":"sha512-I8dSjn7nLc3GcSTe7AGlvwimyy+s27Aavma29yauygrW7oQLvKdD7KrQdTLPHBTZrG0I8/PXinyBehBUnsD3kw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEA9RveL7ftNaEHH7VcMIdoPal0CCk+ufjB7I+WIrAm+AiEAxa/U2N4Bzww1Di7wibX0fQG2JPMWQHt+wHh7y9D+lUE="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"acstll","email":"19@8302.net"},"maintainers":[{"name":"acstll","email":"19@8302.net"}]},"0.1.3":{"name":"alerts","version":"0.1.3","description":"Simple and straigtforward notifications for the browser.","main":"index.js","scripts":{"test":"./node_modules/.bin/beefy test.js --open"},"repository":{"type":"git","url":"https://github.com/acstll/alerts.git"},"keywords":["alerts","notifications","browser"],"author":{"name":"Arturo Castillo Delgado","email":"19@8302.net"},"license":"MIT","bugs":{"url":"https://github.com/acstll/alerts/issues"},"devDependencies":{"grunt":"~0.4.1","grunt-amd-wrap":"~1.0.1","grunt-contrib-concat":"~0.3.0","grunt-contrib-jshint":"~0.6.4","grunt-contrib-clean":"~0.5.0","tape":"~1.1.1","beefy":"~0.4.4","dom-events":"~0.1.1"},"testling":{"files":"test.js","browsers":["ie/8..latest","firefox/20..latest","firefox/nightly","chrome/25..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"homepage":"https://github.com/acstll/alerts","_id":"alerts@0.1.3","dist":{"shasum":"8be700cd4d499c99608016bbc785c482564d049a","tarball":"https://registry.npmjs.org/alerts/-/alerts-0.1.3.tgz","integrity":"sha512-sklS9bxrLVKq4OLO2FP63822X7yhFVFqVPNAa3tLwMpUI1fgIS0ZFYIZkrF74fne/udtwPzud4ZP0ukSemPSLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaFYvxBqPV7mmvxRDO0IJauZpHaN0mS98Dj/3hrZyNkgIgR1rLX0dk4ES0NiDRQ3Fq6kVGrYvHGHMFuyLUpg4uvZU="}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"acstll","email":"19@8302.net"},"maintainers":[{"name":"acstll","email":"19@8302.net"}]}},"readme":"# alerts.js\n\nSimple and **straigtforward** notifications for the browser.\n\nAlerts stack up. You dismiss them with a click (and also get them dismissed by themselves after some time by setting the `timeout` option). \n\nSource is only 2 KB. No dependencies.\n\n![screenshot](http://8302.net/images/alerts-screenshot.png)\n\n## Install\n\nUse with browserify, gluejs, etc.\n\n```bash\nnpm install alerts\n```\n\nAMD supported.\n\nIf used in good old `<script>` tag, it attaches itself to the `window` object as `al`.\n\n## API\n\n### alert(message[, options])\n\n- message `String`\n- options `Object`\n- Returns `Object` an Alert instance\n\n#### options\n\n- timeout `Number` Time in miliseconds after which the alert is dismissed\n- className `String` Custom class name to be added to each alert element\n- onshow `Function` To be called when alert gets shown, with the alert element as context plus the options object as first argument, so anything you pass in is there\n- ondismiss `Function` To be called just before the alert gets dismissed, with the Alert instance (the element is about to be removed from the DOM) as context and options object as first argument\n\n## Usage\n\nPretty straightforward.\n\n```js\nvar alert = require('alert');\n\nalert('Foo');\n```\n\nPassing in some options.\n\n```js\nvar alerted = alert('Some error', {\n  timeout: 4000,\n  className: 'alert-error'\n});\n\n// The HTML element is available at alerted.el\n```\n\n## CSS\n\nThis is the least CSS you need to get it working. (Set `z-index` to something reasonable according to the rest of your stylesheet.)\n\n```css\n.alerts {\n\tposition: fixed;\n\tz-index: 10000;\n}\n```\n\nAnd this is a copy/paste example more like in the screenshot above.\n\n```css\n.alerts {\n\tposition: fixed;\n\tz-index: 10000;\n\twidth: 13.500em;\n\ttop: 1em;\n\tright: 1em;\n}\n\n.alerts > div {\n\tpadding: .8em;\n\tmargin-bottom: .4em;\n\tbackground-color: rgba(200, 200, 200, 0.8);\n\tcursor: default;\n}\n```\n\n### Transitions\n\nIf you want to use CSS transitions to either fade alerts in and out or swap them from right to left and viceversa, you can. Just set the `alert.transitionTime` property to the transition duration in miliseconds.\n\n```js\nalert.transitionTime = 200;\n```\n\nAnd then get creative with your CSS.\n\n```css\n.alerts > div {\n\ttransition: opacity .2s;\n}\n\n.alerts > .alert,\n.alerts > .alert-dismiss {\n\topacity: 0;\n}\n\n.alerts > .alert-show {\n\topacity: 1;\n}\n```\n\n### And more\n\nYou also have the `Alert` constructor plus the `container` element at your disposal.\n\n```js\n// The constructor\nvar alerted = new alert.Alert('Foo');\n\n// The element\nalert.container.style.backgroundColor = 'lime';\n```\n\n## Browser support\n\nThis code should work everywhere.\n\n[![testling badge](https://ci.testling.com/acstll/alerts.png)](https://ci.testling.com/acstll/alerts)\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Arturo Castillo Delgado <19@8302.net>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","maintainers":[{"name":"acstll","email":"19@8302.net"}],"time":{"modified":"2022-06-13T02:36:29.823Z","created":"2013-10-01T21:48:21.222Z","0.1.0":"2013-10-01T21:48:25.980Z","0.1.1":"2013-10-02T08:48:38.541Z","0.1.2":"2013-10-02T15:33:58.954Z","0.1.3":"2014-02-20T12:54:20.168Z"},"author":{"name":"Arturo Castillo Delgado","email":"19@8302.net"},"repository":{"type":"git","url":"https://github.com/acstll/alerts.git"},"readmeFilename":"README.md","homepage":"https://github.com/acstll/alerts","keywords":["alerts","notifications","browser"],"bugs":{"url":"https://github.com/acstll/alerts/issues"},"license":"MIT"}