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.
- package/README.md +86 -72
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -1,72 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
|
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
|
-
"
|
|
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
|
|
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
|
|
49
|
+
"vue-toastflow": "^1.1.9"
|
|
45
50
|
},
|
|
46
51
|
"devDependencies": {
|
|
47
52
|
"tsup": "^8.5.1",
|