{"_id":"@codexsavage6s/my_alert","name":"@codexsavage6s/my_alert","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@codexsavage6s/my_alert","version":"1.0.0","type":"module","description":"Customizable TypeScript alert and toast library with animations","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","dev":"tsc -w","start":"node dist/index.js"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^6.0.3"},"dependencies":{"lottie-web":"^5.13.0"},"repository":{"type":"git","url":"git+https://github.com/CodeXSavage6s/MyAlert.git"},"keywords":["alert","toast","modal","typescript","notification","popup","ui"],"author":{"name":"codexsavage6s"},"license":"MIT","bugs":{"url":"https://github.com/CodeXSavage6s/MyAlert/issues"},"homepage":"https://github.com/CodeXSavage6s/MyAlert#readme","_id":"@codexsavage6s/my_alert@1.0.0","_nodeVersion":"24.14.1","_npmVersion":"11.12.1","dist":{"integrity":"sha512-k4GxOQ1GJBdvvnLrmNtPXRAxIEkyEcBcXE4b+t8oNwmKkPI4bd/CLWOXMa6LGjIfUfq7TAt/seovsc1HkkSLRw==","shasum":"8edf6ba72b5b51d9d019f73df59d4cb3f3075756","tarball":"https://registry.npmjs.org/@codexsavage6s/my_alert/-/my_alert-1.0.0.tgz","fileCount":21,"unpackedSize":474749,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEObbjISc6Lg5/FDon9bsHFG1r8cXqHTVE2mLv8tvH8cAiEAjTtc/0QfsmF468eg8/RM2SDszPzLdDn4I/qUZoS7aD4="}]},"_npmUser":{"name":"codexsavage6s","email":"codexsavage6s@gmail.com"},"directories":{},"maintainers":[{"name":"codexsavage6s","email":"codexsavage6s@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/my_alert_1.0.0_1779452669187_0.013288313762484849"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-22T12:24:29.031Z","1.0.0":"2026-05-22T12:24:29.391Z","modified":"2026-05-22T12:24:29.576Z"},"maintainers":[{"name":"codexsavage6s","email":"codexsavage6s@gmail.com"}],"description":"Customizable TypeScript alert and toast library with animations","homepage":"https://github.com/CodeXSavage6s/MyAlert#readme","keywords":["alert","toast","modal","typescript","notification","popup","ui"],"repository":{"type":"git","url":"git+https://github.com/CodeXSavage6s/MyAlert.git"},"author":{"name":"codexsavage6s"},"bugs":{"url":"https://github.com/CodeXSavage6s/MyAlert/issues"},"license":"MIT","readme":"# MyAlert\n\n> ⚠️ **Project Status: Work in Progress** — This library is under active development. Core features are functional but the API may change.\n\nA lightweight, customizable **alert and toast notification library** built with **TypeScript**. MyAlert provides promise-based confirmation dialogs and toast notifications with smooth animations, flexible styling, and full type safety.\n\n## ___Built to give you full control___\n\n---\n\n## Features\n\n- 🎯 **Promise-Based API** — Async/await friendly `Alert` with `boolean` resolution\n- 🍞 **Toast Notifications** — Lightweight toasts with 5 position options\n- 🎨 **Fully Customizable** — Control colors, buttons, text, and animations\n- ✨ **Built-in Animations** — `fade-in`, `pop-up`, `slide-in`, and `slide-in2`\n- 🌙 **Dark Theme Default** — Sleek modern styling ready to use\n- 📦 **Type Safe** — Full TypeScript support with exported interfaces\n\n---\n\n## Installation\n\n### NPM\n```bash\nnpm install my-alert\n```\n\n### CDN\n```html\n<!-- CDN link coming soon -->\n\n```\n\n### Clone\n```bash\ngit clone https://github.com/CodeXSavage6s/MyAlert.git\ncd MyAlert\nnpm install\n```\n\n---\n\n## Usage\n\n### Alert\n\n`Alert` is promise-based — it resolves `true` if the user confirms and `false` if they cancel.\n\n```ts\nimport { Alert } from 'my-alert';\n\nconst confirmed = await Alert({\n  icon: 'success',         // 'success' | 'error' | 'warning'  (required)\n  title: 'Are you sure?',\n  body: 'This action cannot be undone.',\n  showCancelButton: true,\n  confirmButtonText: 'Yes',\n  cancelButtonText: 'No',\n  animate: 'pop-up'        // 'default' | 'fade-in' | 'pop-up' | 'slide-in'\n});\n\nif (confirmed) {\n  console.log('User confirmed');\n}\n```\n\n#### Alert Options\n\n| Option | Type | Default | Description |\n|---|---|---|---|\n| `icon` | `'success' \\| 'error' \\| 'warning'` | — | **Required.** Icon shown in the dialog |\n| `title` | `string` | — | Dialog heading |\n| `body` | `string` | — | Dialog body text |\n| `background` | `string` | `'#2a223d'` | Dialog background color |\n| `color` | `string` | `'white'` | Dialog text color |\n| `showCancelButton` | `boolean` | `false` | Show a cancel button |\n| `confirmButtonText` | `string` | `'OK'` | Confirm button label |\n| `cancelButtonText` | `string` | `'Cancel'` | Cancel button label |\n| `confirmButtonBackground` | `string` | — | Confirm button background |\n| `confirmButtonColor` | `string` | — | Confirm button text color |\n| `cancelButtonBackground` | `string` | — | Cancel button background |\n| `cancelButtonColor` | `string` | — | Cancel button text color |\n| `writeOut` | `boolean` | `false` | Typewriter effect on body text |\n| `animate` | `Animations` | `'default'` | Entry animation |\n\n---\n\n### Toast\n\n`Toast` displays a non-blocking notification that disappears automatically.\n\n```ts\nimport { Toast } from 'my-alert';\n\nToast({\n  text: 'Saved successfully!',   // required\n  position: 'bottom-right',      // 'bottom-right' | 'top-right' | 'top-left' | 'bottom-left' | 'center'\n  animate: 'slide-in2',          // 'default' | 'fade-in' | 'pop-up' | 'slide-in' | 'slide-in2'\n  timer: 3000,                   // ms before auto-dismiss\n  background: '#2a223d',\n  color: 'white'\n});\n```\n\n#### Toast Options\n\n| Option | Type | Default | Description |\n|---|---|---|---|\n| `text` | `string` | — | **Required.** Message to display |\n| `position` | `Positions` | `'bottom-right'` | Where the toast appears on screen |\n| `animate` | `Animations` | `'slide-in'` | Entry animation |\n| `timer` | `number` | `2000` | Duration in ms before dismissing |\n| `background` | `string` | `'#2a223d'` | Toast background color |\n| `color` | `string` | `'white'` | Toast text color |\n\n---\n\n## License\n\nMIT\n\n---\n\n> 📌 _Coming soon: CDN support and npm publish_\n","readmeFilename":"README.md","_rev":"1-62088b68ecbfa55f9f8e7eebbcfc64c5"}