vue-toastflow 0.0.7 → 1.0.0
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 +80 -4
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -1,12 +1,88 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/adrianjanocko/toastflow/main/images/banner.png" alt="Toastflow banner" width="900" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
5
|
<h1 align="center">Toastflow</h1>
|
|
4
6
|
<p align="center">
|
|
5
7
|
Framework-agnostic toast engine with a Vue 3 renderer. Typed core, smooth stack animations, CSS-first theming, and full control over layout and behavior.
|
|
6
8
|
</p>
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="#usage-vuejs-3-composition-api">Usage</a> ·
|
|
11
|
+
<a href="#configuration">Configuration</a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://www.npmjs.com/package/vue-toastflow">
|
|
16
|
+
<img src="https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge&logo=npm&logoColor=white" alt="NPM" />
|
|
17
|
+
</a>
|
|
18
|
+
</p>
|
|
7
19
|
|
|
8
20
|
---
|
|
9
21
|
|
|
22
|
+
<details>
|
|
23
|
+
<summary>Table of Contents</summary>
|
|
24
|
+
<ol>
|
|
25
|
+
<li><a href="#about-the-project">About the project</a></li>
|
|
26
|
+
<li><a href="#preview">Preview</a></li>
|
|
27
|
+
<li><a href="#packages">Packages</a></li>
|
|
28
|
+
<li><a href="#built-with">Built with</a></li>
|
|
29
|
+
<li>
|
|
30
|
+
<a href="#usage-vuejs-3-composition-api">Usage</a>
|
|
31
|
+
<ul>
|
|
32
|
+
<li><a href="#quick-start">Quick start</a></li>
|
|
33
|
+
<li><a href="#async-flows">Async flows</a></li>
|
|
34
|
+
<li><a href="#html-content">HTML content</a></li>
|
|
35
|
+
<li><a href="#headless-rendering">Headless rendering</a></li>
|
|
36
|
+
</ul>
|
|
37
|
+
</li>
|
|
38
|
+
<li><a href="#configuration">Configuration</a></li>
|
|
39
|
+
<li><a href="#theming">Theming</a></li>
|
|
40
|
+
<li><a href="#events-and-store-access">Events and store access</a></li>
|
|
41
|
+
<li><a href="#contributing">Contributing</a></li>
|
|
42
|
+
<li><a href="#license">License</a></li>
|
|
43
|
+
</ol>
|
|
44
|
+
</details>
|
|
45
|
+
|
|
46
|
+
## About the project
|
|
47
|
+
|
|
48
|
+
Toastflow is a headless toast engine with a Vue 3 renderer. It keeps toast state in a tiny framework-agnostic store so
|
|
49
|
+
you can render it your way while keeping predictable behaviors.
|
|
50
|
+
|
|
51
|
+
- Deterministic rules for duplicates, timers, pause-on-hover, close-on-click, and clear-all.
|
|
52
|
+
- CSS-first theming: swap the look by editing a handful of variables.
|
|
53
|
+
- Works inside components or in plain TS/JS modules and services.
|
|
54
|
+
- Headless slot to render your own card while reusing the store logic.
|
|
55
|
+
|
|
56
|
+
## Preview
|
|
57
|
+
|
|
58
|
+
<p align="center">
|
|
59
|
+
<img src="https://raw.githubusercontent.com/adrianjanocko/toastflow/main/images/showcase.png" alt="Toastflow showcase" width="850" />
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
## Packages
|
|
63
|
+
|
|
64
|
+
- [toastflow-core](https://www.npmjs.com/package/toastflow-core): typed, framework-agnostic toast store.
|
|
65
|
+
- [vue-toastflow](https://www.npmjs.com/package/vue-toastflow): Vue 3 renderer with `<ToastContainer />`, a
|
|
66
|
+
global `toast` helper, defaults, and icons.
|
|
67
|
+
- [playground-vue](https://github.com/adrianjanocko/toastflow/blob/main/packages/playground/vue): Vite + Vue demo playground for manual testing.
|
|
68
|
+
|
|
69
|
+
## Built with
|
|
70
|
+
|
|
71
|
+

|
|
72
|
+

|
|
73
|
+

|
|
74
|
+

|
|
75
|
+
|
|
76
|
+
## Installation
|
|
77
|
+
|
|
78
|
+
```shell
|
|
79
|
+
pnpm add vue-toastflow
|
|
80
|
+
|
|
81
|
+
# npm i vue-toastflow
|
|
82
|
+
# yarn add vue-toastflow
|
|
83
|
+
# bun i vue-toastflow
|
|
84
|
+
```
|
|
85
|
+
|
|
10
86
|
## Usage (Vue.js 3 Composition API)
|
|
11
87
|
|
|
12
88
|
### Quick start
|
|
@@ -124,7 +200,7 @@ toast.info({
|
|
|
124
200
|
|
|
125
201
|
## Configuration
|
|
126
202
|
|
|
127
|
-
Pass any [types.ts](
|
|
203
|
+
Pass any [types.ts](https://github.com/adrianjanocko/toastflow/blob/main/packages/core/src/types.ts) fields to `createToastflow`; per-toast options override them:
|
|
128
204
|
|
|
129
205
|
- `position`: "top-right" (default), "top-left", "top-center", "bottom-*"
|
|
130
206
|
- `duration`: `5000` ms by default; `Infinity` or `0` disables auto-dismiss (progress bar auto-hides when disabled)
|
|
@@ -141,7 +217,7 @@ Pass any [types.ts](../../packages/core/src/types.ts) fields to `createToastflow
|
|
|
141
217
|
|
|
142
218
|
## Theming
|
|
143
219
|
|
|
144
|
-
- CSS variables live in [styles.css](
|
|
220
|
+
- CSS variables live in [styles.css](https://github.com/adrianjanocko/toastflow/blob/main/packages/vue/src/styles.css) and are auto-imported with the Vue package.
|
|
145
221
|
- Key
|
|
146
222
|
variables: `--tf-toast-bg`, `--tf-toast-color`, `--tf-toast-border-color`, `--tf-toast-radius`, `--tf-toast-padding`, `--tf-toast-icon-size`, `--tf-toast-progress-height`,
|
|
147
223
|
plus per-type colors like `--success-bg` and `--error-text`.
|
|
@@ -166,4 +242,4 @@ Contributions are welcome! Fork the repo, create a branch, and open a PR. For bi
|
|
|
166
242
|
|
|
167
243
|
## License
|
|
168
244
|
|
|
169
|
-
MIT - see [LICENSE](
|
|
245
|
+
MIT - see [LICENSE](https://github.com/adrianjanocko/toastflow/blob/main/LICENSE).
|
package/package.json
CHANGED
|
@@ -14,11 +14,18 @@
|
|
|
14
14
|
"toastify"
|
|
15
15
|
],
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"
|
|
17
|
+
"homepage": "https://toastflow.vercel.app/",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/adrianjanocko/toastflow.git",
|
|
21
|
+
"directory": "packages/vue"
|
|
22
|
+
},
|
|
23
|
+
"version": "1.0.0",
|
|
18
24
|
"main": "src/index.ts",
|
|
19
25
|
"module": "src/index.ts",
|
|
20
26
|
"types": "src/index.ts",
|
|
21
27
|
"scripts": {
|
|
28
|
+
"prepack": "node ../../scripts/sync-readme.js",
|
|
22
29
|
"build": "vite build",
|
|
23
30
|
"test": "vitest"
|
|
24
31
|
},
|
|
@@ -26,7 +33,7 @@
|
|
|
26
33
|
"vue": "^3.4.0"
|
|
27
34
|
},
|
|
28
35
|
"dependencies": {
|
|
29
|
-
"toastflow-core": "^0.0
|
|
36
|
+
"toastflow-core": "^1.0.0"
|
|
30
37
|
},
|
|
31
38
|
"devDependencies": {
|
|
32
39
|
"@vitejs/plugin-vue": "^6.0.2",
|