{"_id":"@myfrom/notifier","_rev":"2-f3a48458518320d47d00a11fe1938d56","name":"@myfrom/notifier","dist-tags":{"latest":"2.0.1"},"versions":{"2.0.0":{"name":"@myfrom/notifier","version":"2.0.0","description":"A lightweight library to show paper-toast and paper-dialog alerts easily.","main":"notifier.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"No test specified\" && exit 0","build-docs":"npm run cleanup && jsdoc notifier.js -c jsdoc.json && ./node_modules/.bin/webpack","cleanup":"rm -rf ./docs"},"repository":{"type":"git","url":"git+https://github.com/myfrom/Notifier.git"},"keywords":["dialog","toast","alert","confirm","polymer","webcomponents","paper"],"author":{"name":"toast"},"license":"MIT","bugs":{"url":"https://github.com/myfrom/Notifier/issues"},"homepage":"https://github.com/myfrom/Notifier","devDependencies":{"@babel/core":"^7.1.2","@babel/plugin-syntax-dynamic-import":"^7.0.0","@babel/polyfill":"^7.0.0","@babel/preset-env":"^7.1.0","jsdoc":"^3.5.5","webpack":"^4.24.0","webpack-cli":"^3.1.2"},"dependencies":{"@polymer/neon-animation":"3","@polymer/paper-button":"3","@polymer/paper-dialog":"3","@polymer/paper-dialog-scrollable":"3","@polymer/paper-toast":"3","@polymer/polymer":"3","babel-loader":"^8.0.4"},"gitHead":"bee72a33acfc86bf75052e45b81135b903d7562d","_id":"@myfrom/notifier@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.4.1","_npmUser":{"name":"myfrom","email":"myfrom.13th@gmail.com"},"dist":{"integrity":"sha512-HV4qrFiVtyH9JW3dJjzIwrX8gRWY8tNcEqK+yicaIX/vuwRWZvdCnnykboEQohyjv8z/DOmRsULYqGZ6s2oMVw==","shasum":"2f79a53cec9ffa8865e619549d68952dcc7b1094","tarball":"https://registry.npmjs.org/@myfrom/notifier/-/notifier-2.0.0.tgz","fileCount":17,"unpackedSize":345694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4ddUCRA9TVsSAnZWagAANGoP/1XMHM0HnCZCNLmkho48\nq2BE7l/DLKSBX+seXmT5yfUYEFGX9D65TlOVoFd/UUXTpcck22/TULSVt/Ft\nXiHmI9KUFGAxZGEgq/pJVAxxTYlnYtsDjJHAZ7Zaq8T3StFMmWeH1gbHUPte\nvlF8OHkj+UnWNBSQrzd2n2pPyBYsMf3Bnn5wCz2ktt2oo+nLJGV0DQKJNJjJ\nuHSLPcpgSi5MzgpLclarT/a0zxwkJK4kWTEnZqxNmie84CfKNul080bSR/gb\n0ik++JfbEMMdk7z7XP2d9+u+OgW1nhG+HYDjVNUiv0eE6blLuA2Uj9a4SLNE\niF0d96VcbUUyI3zWwMsmcGDbuGoqi5u4tYzKY541KmoBTeFS9lAauYUpOD6k\n8PvRZ740DT+VlvVZTGdnQjlzfg2YZQMhvCh/7wq+lIbCjtwXsmSpZfZASyCB\naN5Te//UT5PI38B/xFl9Hi6IMz7eTOd9qxD59My78rIBzvZHxb0A9Tc03L8k\nea7mbnGHX14JQI42bkGUVZMJ5D9eo5YHEcCrBBS+D7g7TFx9+EjAlrKhoWKA\n52G7oHQNxZoT3H5FzbWtzg8/Shr1vfTk+Kgfx8jzuq5QWqTvrHi5us6se1Ua\n/zy0UiNtXt24ilPcj570PNCkJ2aDbd3dhDXy28UqnEpqvergeSNK9G7Wg0ZD\nd1gv\r\n=tedD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFiCHCWeT7m1T2Vpi7a4XTGFel7jlm/xZKEPbjfuFwG6AiBqvz8lIZIbO35v1X76BqUwrjMK4l10mNmdWbypZDHJ3A=="}]},"maintainers":[{"name":"myfrom","email":"myfrom.13th@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/notifier_2.0.0_1541527379260_0.9266939111189563"},"_hasShrinkwrap":false},"2.0.1":{"name":"@myfrom/notifier","version":"2.0.1","description":"A lightweight library to show paper-toast and paper-dialog alerts easily.","main":"notifier.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"No test specified\" && exit 0","build-docs":"npm run cleanup && jsdoc notifier.js -c jsdoc.json && ./node_modules/.bin/webpack","cleanup":"rm -rf ./docs"},"repository":{"type":"git","url":"git+https://github.com/myfrom/Notifier.git"},"keywords":["dialog","toast","alert","confirm","polymer","webcomponents","paper"],"author":{"name":"toast"},"license":"MIT","bugs":{"url":"https://github.com/myfrom/Notifier/issues"},"homepage":"https://github.com/myfrom/Notifier","devDependencies":{"@babel/core":"^7.1.2","@babel/plugin-syntax-dynamic-import":"^7.0.0","@babel/polyfill":"^7.0.0","@babel/preset-env":"^7.1.0","jsdoc":"^3.5.5","webpack":"^4.24.0","webpack-cli":"^3.1.2"},"dependencies":{"@polymer/neon-animation":"3","@polymer/paper-button":"3","@polymer/paper-dialog":"3","@polymer/paper-dialog-scrollable":"3","@polymer/paper-toast":"3","@polymer/polymer":"3","babel-loader":"^8.0.4"},"gitHead":"8c4470c491671d50b9eb23d82ef04e84bb516afd","_id":"@myfrom/notifier@2.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"myfrom","email":"myfrom.13th@gmail.com"},"dist":{"integrity":"sha512-swfhCrTZCeysBfHMqG/zEUTfKg/18MWOY2Zf3IoX5hnzO3VjPuEkl0zgkY2dwn0X5g3FCGoWqvAkr14yE0v5JA==","shasum":"3a60864bf9d01333d4f2e749338277c84c44d144","tarball":"https://registry.npmjs.org/@myfrom/notifier/-/notifier-2.0.1.tgz","fileCount":17,"unpackedSize":345845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFPCwCRA9TVsSAnZWagAAXAMP/RAnUWKt0QSC6fy7cWtd\nY83kZYoNd0S3h3arnvncKtgcLvjAFJPTa/jb+zbe+UpJCe/WEqYbvb1nzNP6\nZF7+odeQ1arppNl6yHEt8OFJf2E9pbO06g7TSAM5rvpkl/xPux9YDkqdV2ef\nLF+bRGrQJEnBJ7Cu7lZqzVdd1ANquTGaTr1y9x3Qt5kSXt1wH50ErtAnregx\nGoR1EKiKv+MnN9HGFH2qCzQd9iuvWhvSBiOM2/jeOC209/KY0vRtIhF5PTCF\nf5G6/fJXkCIy4LExu9kj9jH5HnF0F0D1jbNzBaD+6GsCvXDl+PrV7x1Co0FC\nyKMzoA+L7vvmoKbqYIrOpKJ2olLMVv+fzNrv/OtP0I803hQazCaYY9lbhUmu\npQjDgXGYZDo2FhRLDDBmNpqljEwrwk/Zewfk1xt8X9zMrBilAcFWSr+/+gPF\nadtPv1CvmDCPFMo5V91hNOLlj8aGqr0Uhbv3PVwyYZjpDOrbYWkG5uUH4N45\n+9eKysgUPzK7vTFD1qg98xsp8UwtEc3qDI+/JDlRsonno6ozFKPnGjKQu7dM\nhC4KPm2DWO4jru3AmdBIh/1ZnpCCLSkMhATz3bnXDRniZHb2FlZMhZNxm0+v\njUIDyLeBUO4NG5YqZQlU1fATJyrMri0eyjBbqlgy5UchVTZu9bQql6lNW4qa\n0NKw\r\n=pN1b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2bpS1rDgnCE6iE5YyLikt/S8+Xj/JeCoJCviOC9UtiwIgQZYdpkwFu6nOCXqOH3F4CzOWa/uxpggkfxlbjOr1Ypk="}]},"maintainers":[{"name":"myfrom","email":"myfrom.13th@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/notifier_2.0.1_1544876207698_0.9568935247676447"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-06T18:02:59.110Z","2.0.0":"2018-11-06T18:02:59.372Z","modified":"2022-04-06T07:05:29.330Z","2.0.1":"2018-12-15T12:16:47.917Z"},"maintainers":[{"name":"myfrom","email":"myfrom.13th@gmail.com"}],"description":"A lightweight library to show paper-toast and paper-dialog alerts easily.","homepage":"https://github.com/myfrom/Notifier","keywords":["dialog","toast","alert","confirm","polymer","webcomponents","paper"],"repository":{"type":"git","url":"git+https://github.com/myfrom/Notifier.git"},"author":{"name":"toast"},"bugs":{"url":"https://github.com/myfrom/Notifier/issues"},"license":"MIT","readme":"[![Travis](https://img.shields.io/travis/myfrom/Notifier.svg?style=flat-square)](https://travis-ci.org/myfrom/Notifier)\n[![Published on webcomponents.org](https://img.shields.io/badge/shared_on-webcomponents.org-blue.svg?style=flat-square)](https://www.webcomponents.org/element/@myfrom/Notifer)\n[![Docs on Github Pages](https://img.shields.io/badge/docs-github%20pages-3F51B5.svg?style=flat-square)](https://myfrom.github.io/Notifier)\n\n\n# Notifier\nA lightweight library to show paper-toast and paper-dialog alerts easily.\n\n![Header image](banner.png)\n\n## Usage\n\nTo use it you have to import [notifier](notifier.js) module.\n```javascript\nimport Notifier from '@myfrom/notifier';\n```\nThe module returns an initialised Notifier class on which you can use methods described in [docs](https://myfrom.github.io/Notifier).\n\nIf you want to use non-module version, you should downgrade to version 1.x.x\n\n\n### Custom options\n\nYou can set custom options before you load Notifier by setting `NotifierOptions` on `window`. Here are the default values:\n\n```json\n{\n  \"elementsImported\": false, // If set to true, Notifier won't attempt to load its dependencies (check 'Loading dependencies' section).\n  \"stylesLoaded\": false, //  Same but it's about helper styles (check 'Helper styles section').\n  \"mobileMediaQuery\": [\"(orientation: landscape) and (max-width: 960px)\",\"(orientation: portrait) and (max-width: 600px)\"] // To distinguish between phones and bigger devices. If changed you should also change it in styles.css\n}\n```\n\n### Loading dependencies\n\nNotifier relies on a few custom elements such as [paper-dialog](https://www.webcomponents.org/element/@Polymer/paper-dialog) and [paper-toast](https://www.webcomponents.org/element/@Polymer/paper-toast).\n\nBy default, they will be loaded using a dynamic import. You can ommit this loading attempt by setting `elementsImported` option to `true` (look above). However, if you do this and not import necessary files, Notifier will throw an error.\n\nHere are all the necessary files for each function:\n\n<details>\n  <summary>`showToast()`</summary>\n  <ul>\n    <li>paper-toast</li>\n    <li>paper-button</li> (if includes a button)\n  </ul>\n</details>\n<details>\n  <summary>`showDialog()`</summary>\n  <ul>\n    <li>paper-dialog</li>\n    <li>paper-dialog-scrollable</li>\n  </ul>\n</details>\n<details>\n  <summary>`askDialog()`</summary>\n  <ul>\n    <li>paper-dialog</li>\n    <li>paper-dialog-scrollable</li>\n    <li>paper-button</li> \n  </ul>\n</details>\n<details>\n  <summary>Animations</summary>\n  <ul>\n    <li>neon-animation/web-animations.html</li>\n    <li>neon-animation/animations/fade-in-animation.html</li>\n    <li>neon-animation/animations/fade-out-animation.html</li>\n    <li>neon-animation/animations/slide-from-bottom-animation.html</li>\n    <li>neon-animation/animations/slide-down-animation.html</li>\n  </ul>\n</details>\n\nThey are also exported as an array from notifier module (`elementsToImport`).\n\n### Helper styles\n\nNotifier relies on a few styles applied to paper-button in paper-toast. Those styles are not mandatory but ensure there are no weird bugs such as text overlapping with button, etc.\n\nThey're automatically loaded but you can skip that by setting `stylesLoaded` option to `true`). In such case you might want to manually add [styles.css](./styles.css) to your document.","readmeFilename":"README.md"}