nuxt-toastflow 1.0.1-beta.0 โ†’ 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +86 -72
  2. package/package.json +9 -4
package/README.md CHANGED
@@ -1,72 +1,86 @@
1
- ![Toastflow showcase](../../images/banner.png)
2
-
3
- # nuxt-toastflow
4
-
5
- Nuxt module wrapper for `vue-toastflow` so Toastflow works out of the box in Nuxt
6
-
7
- ## ๐Ÿ“š Documentation
8
-
9
- - Docs: https://docs.toastflow.top/
10
- - Comparisons (Vue ecosystem toasts): https://docs.toastflow.top/comparisons/overview
11
- - Playground: https://toastflow.top/
12
- - npm: https://www.npmjs.com/package/nuxt-toastflow
13
-
14
- ## ๐Ÿš€ Quick Start
15
-
16
- ```bash
17
- pnpm add nuxt-toastflow
18
- ```
19
-
20
- ```ts
21
- // nuxt.config.ts
22
- export default defineNuxtConfig({
23
- modules: ["nuxt-toastflow"],
24
- toastflow: {
25
- config: {
26
- position: "top-right",
27
- duration: 5000,
28
- },
29
- },
30
- });
31
- ```
32
-
33
- ```vue
34
- <!-- app.vue -->
35
- <script setup lang="ts">
36
- // Optional:
37
- // const toast = useToast();
38
-
39
- toast.success({
40
- title: "Saved",
41
- description: "Your changes are live.",
42
- });
43
- </script>
44
-
45
- <template>
46
- <ToastContainer />
47
- <NuxtPage />
48
- </template>
49
- ```
50
-
51
- ## Options
52
-
53
- ```ts
54
- type NuxtToastflowOptions = {
55
- config: Partial<ToastConfig>;
56
- css: boolean;
57
- componentName: string | false;
58
- };
59
- ```
60
-
61
- Defaults:
62
-
63
- - `config: {}`
64
- - `css: true`
65
- - `componentName: "ToastContainer"`
66
-
67
- `ToastContainer` is auto-registered as a client-only component by the module.
68
- You can use either auto-imported `toast` (Vue-like API) or `useToast()`.
69
-
70
- ## License
71
-
72
- MIT
1
+ <p align="center">
2
+ <img src="../../assets/banner.png" alt="Toastflow" width="100%" />
3
+ </p>
4
+
5
+ <h1 align="center">๐Ÿ’š nuxt-toastflow</h1>
6
+
7
+ <p align="center">
8
+ <strong>Nuxt module for Toastflow</strong> โ€” auto-imports, SSR support, and zero-config setup.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/nuxt-toastflow"><img src="https://img.shields.io/npm/v/nuxt-toastflow?color=00dc82&style=flat-square" alt="npm version" /></a>
13
+ <a href="https://www.npmjs.com/package/nuxt-toastflow"><img src="https://img.shields.io/npm/dm/nuxt-toastflow?style=flat-square" alt="npm downloads" /></a>
14
+ <a href="../../LICENSE"><img src="https://img.shields.io/github/license/adrianjanocko/toastflow?style=flat-square" alt="License" /></a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="https://docs.toastflow.top/">๐Ÿ“– Docs</a> ยท <a href="https://toastflow.top/">๐ŸŽฎ Playground</a> ยท <a href="https://docs.toastflow.top/comparisons/overview">โš”๏ธ Comparisons</a>
19
+ </p>
20
+
21
+ ---
22
+
23
+ ## ๐Ÿš€ Quick Start
24
+
25
+ **1. Install**
26
+
27
+ ```bash
28
+ pnpm add nuxt-toastflow
29
+ ```
30
+
31
+ **2. Add the module**
32
+
33
+ ```ts
34
+ // nuxt.config.ts
35
+ export default defineNuxtConfig({
36
+ modules: ["nuxt-toastflow"],
37
+ toastflow: {
38
+ config: {
39
+ position: "top-right",
40
+ duration: 5000,
41
+ },
42
+ },
43
+ });
44
+ ```
45
+
46
+ **3. Toast away ๐ŸŽ‰**
47
+
48
+ ```vue
49
+ <!-- app.vue -->
50
+ <script setup lang="ts">
51
+ toast.success({
52
+ title: "Saved",
53
+ description: "Your changes are live.",
54
+ });
55
+ </script>
56
+
57
+ <template>
58
+ <ToastContainer />
59
+ <NuxtPage />
60
+ </template>
61
+ ```
62
+
63
+ > ๐Ÿ’ก Both `toast` and `useToast()` are auto-imported โ€” no manual imports needed!
64
+
65
+ ## โš™๏ธ Module Options
66
+
67
+ | Option | Type | Default | Description |
68
+ | :----------------- | :--------------------- | :----------------: | :----------------------------------------- |
69
+ | ๐Ÿ› ๏ธ `config` | `Partial<ToastConfig>` | `{}` | Toast configuration passed to the plugin |
70
+ | ๐ŸŽจ `css` | `boolean` | `true` | Include default styles |
71
+ | ๐Ÿงฑ `componentName` | `string \| false` | `"ToastContainer"` | Auto-registered client-only component name |
72
+
73
+ <details>
74
+ <summary>๐Ÿ’ก <strong>How does it work under the hood?</strong></summary>
75
+
76
+ <br />
77
+
78
+ - `ToastContainer` is auto-registered as a **client-only** component
79
+ - `toast` and `useToast()` are **auto-imported** โ€” use either one
80
+ - Styles are injected automatically unless `css: false`
81
+
82
+ </details>
83
+
84
+ ## ๐Ÿ“„ License
85
+
86
+ [MIT](../../LICENSE) โ€” made with โค๏ธ by [@adrianjanocko](https://github.com/adrianjanocko)
package/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "nuxt-toastflow",
3
3
  "author": "adrianjanocko",
4
- "description": "Nuxt wrapper module for vue-toastflow.",
4
+ "description": "Nuxt module for Toastflow โ€” accessible, customizable toast notifications with auto-imports, SSR support, and CSS-first theming.",
5
5
  "keywords": [
6
6
  "nuxt",
7
+ "nuxt-module",
7
8
  "toast",
8
9
  "toastflow",
10
+ "notifications",
9
11
  "notification",
10
- "vue"
12
+ "toast-notifications",
13
+ "toaster",
14
+ "vue",
15
+ "typescript"
11
16
  ],
12
17
  "license": "MIT",
13
18
  "homepage": "https://toastflow.top/",
@@ -16,7 +21,7 @@
16
21
  "url": "https://github.com/adrianjanocko/toastflow.git",
17
22
  "directory": "packages/nuxt"
18
23
  },
19
- "version": "1.0.1-beta.0",
24
+ "version": "1.0.1",
20
25
  "main": "./dist/module.js",
21
26
  "module": "./dist/module.mjs",
22
27
  "types": "./dist/module.d.ts",
@@ -41,7 +46,7 @@
41
46
  },
42
47
  "dependencies": {
43
48
  "@nuxt/kit": "^3.17.5",
44
- "vue-toastflow": "^1.1.9-beta.0"
49
+ "vue-toastflow": "^1.1.9"
45
50
  },
46
51
  "devDependencies": {
47
52
  "tsup": "^8.5.1",