{"_id":"@astre9/use-browser-notifications","_rev":"1-86b6346688284d7b68c70d6437287345","name":"@astre9/use-browser-notifications","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.1":{"name":"@astre9/use-browser-notifications","license":"MIT","version":"1.0.1","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"build":"tsup index.ts --format cjs,esm --dts","release":"pnpm run build && changeset publish","lint":"tsc"},"devDependencies":{"@changesets/cli":"^2.26.2","tsup":"^7.2.0","typescript":"^5.2.2"},"description":"React friendly utility hook to trigger browser notifications.","dependencies":{"prettier":"^2.8.2"},"repository":{"type":"git","url":"git+https://github.com/alex-streza/use-browser-notifications.git"},"keywords":["notification","utility","react","hook","browser-notification"],"author":{"name":"Alex Streza"},"bugs":{"url":"https://github.com/alex-streza/use-browser-notifications/issues"},"homepage":"https://github.com/alex-streza/use-browser-notifications#readme","_id":"@astre9/use-browser-notifications@1.0.1","gitHead":"77a7a91bfdc7eebd031bd2da2f73ee82ef180823","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-/TEdhHxe0szeR0N8oN/jFCEGT19z9W7Xkx7IY22bKzZ4XKOmVT2q57Z5L3298wow8uGH8sRmPcTV+vexdCnqRw==","shasum":"3e53ecba85d956e4da8cb188d61cdcb83538fee3","tarball":"https://registry.npmjs.org/@astre9/use-browser-notifications/-/use-browser-notifications-1.0.1.tgz","fileCount":9,"unpackedSize":6192,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHzr9wIK66fIVIKIB7coPKPJetZ5c4MXbvVTrYEhkao8CICg8SUhcU7RzKSI8TK5J8VocLqC2otruH+9lPGHMDfLG"}]},"_npmUser":{"name":"astre9","email":"streza.alexandru.george@gmail.com"},"directories":{},"maintainers":[{"name":"astre9","email":"streza.alexandru.george@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-browser-notifications_1.0.1_1697481496279_0.7900010011552925"},"_hasShrinkwrap":false},"1.0.4":{"name":"@astre9/use-browser-notifications","license":"MIT","version":"1.0.4","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@changesets/cli":"^2.26.2","tsup":"^7.2.0","typescript":"^5.2.2"},"description":"React friendly utility hook to trigger browser notifications.","dependencies":{"prettier":"^2.8.2"},"repository":{"type":"git","url":"git+https://github.com/alex-streza/use-browser-notifications.git"},"keywords":["notification","utility","react","hook","browser-notification"],"author":{"name":"Alex Streza"},"bugs":{"url":"https://github.com/alex-streza/use-browser-notifications/issues"},"homepage":"https://github.com/alex-streza/use-browser-notifications#readme","scripts":{"build":"tsup index.ts --format cjs,esm --dts","release":"pnpm run build && changeset publish","lint":"tsc"},"_id":"@astre9/use-browser-notifications@1.0.4","_integrity":"sha512-0ZeFm/330ci7gKnWxS+8f+uOzscJk6bnLUvtL13ChYn+ZNt4nvwRmY8rlwwvWCGzEm4zCXyJWyJ+scW/CFcaXA==","_resolved":"/tmp/b4f406b0714ae446d0d75946d6a03ac8/astre9-use-browser-notifications-1.0.4.tgz","_from":"file:astre9-use-browser-notifications-1.0.4.tgz","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-0ZeFm/330ci7gKnWxS+8f+uOzscJk6bnLUvtL13ChYn+ZNt4nvwRmY8rlwwvWCGzEm4zCXyJWyJ+scW/CFcaXA==","shasum":"c42391ac0771ff2a458dc42563780f6388d7e4a7","tarball":"https://registry.npmjs.org/@astre9/use-browser-notifications/-/use-browser-notifications-1.0.4.tgz","fileCount":13,"unpackedSize":9012,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA0c8ZZZSa3Hr9L5/9XFm7saq4eWvP5S+DLl87N+icfXAiEA34WD5Z+BS7AF78gPR5TgZi5MbS6yFWNijXogzs7TqVo="}]},"_npmUser":{"name":"astre9","email":"streza.alexandru.george@gmail.com"},"directories":{},"maintainers":[{"name":"astre9","email":"streza.alexandru.george@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-browser-notifications_1.0.4_1697485051378_0.5884494327726932"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-16T18:38:16.151Z","1.0.1":"2023-10-16T18:38:16.544Z","modified":"2023-10-16T19:37:31.772Z","1.0.4":"2023-10-16T19:37:31.570Z"},"maintainers":[{"name":"astre9","email":"streza.alexandru.george@gmail.com"}],"description":"React friendly utility hook to trigger browser notifications.","homepage":"https://github.com/alex-streza/use-browser-notifications#readme","keywords":["notification","utility","react","hook","browser-notification"],"repository":{"type":"git","url":"git+https://github.com/alex-streza/use-browser-notifications.git"},"author":{"name":"Alex Streza"},"bugs":{"url":"https://github.com/alex-streza/use-browser-notifications/issues"},"license":"MIT","readme":"![image](https://github.com/alex-streza/use-browser-notifications/assets/72100849/831f3a58-e6bd-4000-bc2b-8512a7fb5450)\r\n# @astre9/use-browser-notifications\r\n\r\nReact friendly utility hook to trigger browser notifications.\r\n\r\n## Installation\r\n\r\npnpm\r\n\r\n`pnpm add @astre9/use-browser-notifications`\r\n\r\nyarn\r\n\r\n`yarn add @astre9/use-browser-notifications`\r\n\r\nnpm\r\n\r\n`npm i @astre9/use-browser-notifications`\r\n\r\n## Usage\r\n\r\nMake sure your notification settings are ON! But if they aren't, expect Dwight to show up at your desk with a disappointed look.\r\n\r\nWindows Users: Navigate to the dark realms of Settings > System > Notifications. Don't get lost!\r\n\r\nmacOS Fans: Seek out the elusive System Preferences > Notifications. You might find a hidden Dundie!\r\n\r\nAfter setting up, here's a sneak peek of how to make the magic happen:\r\n\r\n```js\r\nimport useNotification from \"use-browser-notifications\";\r\n\r\nconst App = () => {\r\n\tconst trigerNotification = useNotification(\"Dundie Award Nominations\", {\r\n\t\tbody: \"Nominate your colleagues for various Dundie Awards categories. Let's celebrate our exceptional team members!\",\r\n\t});\r\n\r\n\treturn (\r\n\t\t<main className=\"App\">\r\n\t\t\t<button onClick={trigerNotification}>Hello</button>\r\n\t\t</main>\r\n\t);\r\n};\r\n```\r\n\r\n## Arguments\r\n\r\n| Argument | Type                | Description                                                                                                                                      | Required |\r\n| -------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |\r\n| title    | string              | This is a string that represents the title or heading of the notification.                                                                       | yes      |\r\n| options  | NotificationOptions | Notification options are configuration settings that customize the appearance and behavior of a notification, such as its body, icon, and sound. | no       |\r\n\r\n**P.S.: This library only works if you turn on the notification settings. We don't want to be like Toby, always ignored!**\r\n\r\nIf you need some help, please write email to me: <alex.streza@snowfox.art>\r\n","readmeFilename":"README.md"}