{"_id":"@bmdu_studio/shnjs","_rev":"2-15391d91d765f22881aef943e8d2b702","name":"@bmdu_studio/shnjs","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@bmdu_studio/shnjs","version":"1.0.0","keywords":["notification","toast","alert","snackbar","shn","ui","browser","typescript"],"author":{"name":"ufauzan"},"license":"MIT","_id":"@bmdu_studio/shnjs@1.0.0","maintainers":[{"name":"bmdu_studio","email":"usahlanbuisness@gmail.com"}],"homepage":"https://github.com/umarfauzan11/shownotification#readme","bugs":{"url":"https://github.com/umarfauzan11/shownotification/issues"},"dist":{"shasum":"898178eaf5f9ee31fa351acabb9841d494b64b99","tarball":"https://registry.npmjs.org/@bmdu_studio/shnjs/-/shnjs-1.0.0.tgz","fileCount":10,"integrity":"sha512-9xeCtWHv969S2sCOeIAXPmKaHN/yoNFgOd5A8BIz4BubPGiN3ode8phjspSEDmXHudiH8V+Hu3+mLBHJfKd0+A==","signatures":[{"sig":"MEUCIF/mBb0odwrUrRDztWDW5uaGPprs2QJD21NuJ1AABi46AiEAkciy6zH7iZxGqnF3+Gbmw+2xV6S/xO5vVuNfqT/3nmQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81178},"main":"./dist/index.cjs","type":"commonjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"0a2c37d6d5e2b04527f97692baa5aa078e0ab392","scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"bmdu_studio","email":"usahlanbuisness@gmail.com"},"repository":{"url":"git+https://github.com/umarfauzan11/shownotification.git","type":"git"},"_npmVersion":"11.6.2","description":"Super lightweight, zero-dependency notification & alert replacement library for modern web apps.","directories":{},"_nodeVersion":"24.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.0"},"_npmOperationalInternal":{"tmp":"tmp/shnjs_1.0.0_1787824507977_0.9284242824813169","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bmdu_studio/shnjs","version":"1.0.1","description":"Super lightweight, zero-dependency notification & alert replacement library for modern web apps.","keywords":["notification","toast","alert","snackbar","shn","ui","browser","typescript"],"homepage":"https://github.com/umarfauzan11/shownotification#readme","bugs":{"url":"https://github.com/umarfauzan11/shownotification/issues"},"repository":{"type":"git","url":"git+https://github.com/umarfauzan11/shownotification.git"},"license":"MIT","author":{"name":"ufauzan"},"type":"commonjs","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"main":"./dist/index.cjs","types":"./dist/index.d.ts","scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.0"},"publishConfig":{"access":"public"},"module":"./dist/index.mjs","gitHead":"37d3ab7208948248cef92fb9c3b1af1189aaeba0","_id":"@bmdu_studio/shnjs@1.0.1","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-QNgJzAYjMhiJxf3XCklII9zsE5vY/8UNSb1PvRDKzvh8xmxu9Z37CkBFvMk9mfZfix30Oueu3gdD0ZSmAAoLtA==","shasum":"da2942d7d9aa1ff6ffaecdcf7a219fb832f446d3","tarball":"https://registry.npmjs.org/@bmdu_studio/shnjs/-/shnjs-1.0.1.tgz","fileCount":10,"unpackedSize":81202,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDHVFq+wvz7sNRDLoEn5G+jmmYlaiAjb4XWY1PvnT2BzgIhAJ1cr6PXz/POn4VxShIyK0Pm+PH1xSHed3z5lZqTbkzk"}]},"_npmUser":{"name":"bmdu_studio","email":"usahlanbuisness@gmail.com"},"directories":{},"maintainers":[{"name":"bmdu_studio","email":"usahlanbuisness@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/shnjs_1.0.1_1788335677169_0.13913770008815907"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-27T09:55:07.842Z","modified":"2026-09-02T07:54:37.444Z","1.0.0":"2026-08-27T09:55:08.125Z","1.0.1":"2026-09-02T07:54:37.289Z"},"bugs":{"url":"https://github.com/umarfauzan11/shownotification/issues"},"author":{"name":"ufauzan"},"license":"MIT","homepage":"https://github.com/umarfauzan11/shownotification#readme","keywords":["notification","toast","alert","snackbar","shn","ui","browser","typescript"],"repository":{"type":"git","url":"git+https://github.com/umarfauzan11/shownotification.git"},"description":"Super lightweight, zero-dependency notification & alert replacement library for modern web apps.","maintainers":[{"name":"bmdu_studio","email":"usahlanbuisness@gmail.com"}],"readme":"# @bmdu_studio/shnjs\r\n\r\n> Super lightweight, zero-dependency, and elegant notification/alert replacement library for modern web applications.\r\n\r\nSay goodbye to jarring `alert()` popups. Replace them effortlessly with `shn()`.\r\n\r\n---\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @bmdu_studio/shnjs\r\n```\r\n\r\nOr using yarn/pnpm/bun:\r\n```bash\r\npnpm add @bmdu_studio/shnjs\r\n# or\r\nbun add @bmdu_studio/shnjs\r\n```\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n### 1. Minimal Usage (Drop-in `alert()` replacement)\r\n\r\n```typescript\r\nimport { shn } from '@bmdu_studio/shnjs';\r\n\r\n// Just like alert(), but beautiful\r\nshn(\"Data saved successfully!\");\r\n```\r\n\r\n### 2. Shorthand Methods with Type-specific Icons & Accents\r\n\r\n```typescript\r\nshn.success(\"Transaction completed!\");\r\nshn.error(\"Failed to connect to server.\");\r\nshn.warning(\"Your session is about to expire.\");\r\nshn.info(\"New update available.\");\r\n```\r\n\r\n---\r\n\r\n## Advanced Usage\r\n\r\n### Custom Options\r\n\r\n```typescript\r\nshn(\"File uploaded!\", {\r\n  type: \"success\",\r\n  duration: 5000,           // Duration in ms (0 = stays until closed)\r\n  position: \"top-right\",    // 'top-center' | 'top-left' | 'top-right' | 'bottom-center' | 'bottom-left' | 'bottom-right'\r\n  closable: true,           // Show close button\r\n  icon: true,               // Show default icon (or pass custom SVG / false)\r\n  onClick: (e) => {\r\n    console.log(\"Notification clicked!\");\r\n  },\r\n  onClose: () => {\r\n    console.log(\"Notification dismissed\");\r\n  }\r\n});\r\n```\r\n\r\n### Manual Dismiss & Dismiss All\r\n\r\n```typescript\r\n// Dismiss specific notification\r\nconst notif = shn(\"Processing your payment...\", { duration: 0 });\r\n// ... later\r\nnotif.dismiss();\r\n\r\n// Dismiss all active notifications\r\nshn.dismissAll();\r\n```\r\n\r\n### Global Configuration\r\n\r\n```typescript\r\nshn.config({\r\n  defaultDuration: 3000,\r\n  defaultPosition: 'top-right',\r\n  stack: true, // true to stack multiple notifications, false to show only one at a time\r\n});\r\n```\r\n\r\n---\r\n\r\n## Browser / Script Tag Usage\r\n\r\nYou can also use it directly via CDN without build tools:\r\n\r\n```html\r\n<script src=\"https://unpkg.com/@bmdu_studio/shnjs/dist/index.global.js\"></script>\r\n<script>\r\n  shn.success(\"Hello from CDN!\");\r\n</script>\r\n```\r\n\r\n---\r\n\r\n## License\r\n\r\nMIT © Uwebly by Bmdu Studio\r\n","readmeFilename":"README.md"}