vue-toastflow 1.0.8 → 1.1.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 +14 -15
- package/dist/toastflow.es.js +427 -415
- package/dist/toastflow.umd.js +1 -1
- package/dist/vue-toastflow.css +1 -1
- package/package.json +2 -2
- package/src/components/Toast.vue +21 -2
package/README.md
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
[](https://deepwiki.com/adrianjanocko/toastflow)
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="https://raw.githubusercontent.com/adrianjanocko/toastflow/main/images/
|
|
4
|
+
<img src="https://raw.githubusercontent.com/adrianjanocko/toastflow/main/images/playground.png" alt="Toastflow banner" width="900" />
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<h1 align="center">Toastflow</h1>
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://javascriptweekly.com/issues/765" target="_blank">
|
|
10
|
+
📰 Featured in JavaScript Weekly
|
|
11
|
+
</a> · <a href="https://www.reddit.com/r/vuejs/comments/1pgfoey/tired_of_vue_toast_libraries_so_i_built_my_own/" target="_blank">
|
|
12
|
+
🔥 Trending on Reddit (/r/vuejs)
|
|
13
|
+
</a>
|
|
14
|
+
</p>
|
|
8
15
|
<p align="center">
|
|
9
16
|
Framework-agnostic toast engine with a Vue 3 renderer. Typed core, smooth stack animations, CSS-first theming, and full control over layout and behavior.
|
|
10
17
|
</p>
|
|
@@ -41,7 +48,6 @@
|
|
|
41
48
|
<li><a href="#configuration">Configuration</a></li>
|
|
42
49
|
<li><a href="#theming">Theming</a></li>
|
|
43
50
|
<li><a href="#events-and-store-access">Events and store access</a></li>
|
|
44
|
-
<li><a href="#contributing">Contributing</a></li>
|
|
45
51
|
<li><a href="#license">License</a></li>
|
|
46
52
|
</ol>
|
|
47
53
|
</details>
|
|
@@ -67,7 +73,8 @@ you can render it your way while keeping predictable behaviors.
|
|
|
67
73
|
- [toastflow-core](https://www.npmjs.com/package/toastflow-core): typed, framework-agnostic toast store.
|
|
68
74
|
- [vue-toastflow](https://www.npmjs.com/package/vue-toastflow): Vue 3 renderer with `<ToastContainer />`, a
|
|
69
75
|
global `toast` helper, defaults, and icons.
|
|
70
|
-
- [playground-vue](https://github.com/adrianjanocko/toastflow/blob/main/packages/playground/vue): Vite + Vue demo
|
|
76
|
+
- [playground-vue](https://github.com/adrianjanocko/toastflow/blob/main/packages/playground/vue): Vite + Vue demo
|
|
77
|
+
playground for manual testing.
|
|
71
78
|
|
|
72
79
|
## Built with
|
|
73
80
|
|
|
@@ -203,7 +210,8 @@ toast.info({
|
|
|
203
210
|
|
|
204
211
|
## Configuration
|
|
205
212
|
|
|
206
|
-
Pass any [types.ts](https://github.com/adrianjanocko/toastflow/blob/main/packages/core/src/types.ts) fields
|
|
213
|
+
Pass any [types.ts](https://github.com/adrianjanocko/toastflow/blob/main/packages/core/src/types.ts) fields
|
|
214
|
+
to `createToastflow`; per-toast options override them:
|
|
207
215
|
|
|
208
216
|
- `position`: "top-right" (default), "top-left", "top-center", "bottom-*"
|
|
209
217
|
- `duration`: `5000` ms by default; `Infinity` or `0` disables auto-dismiss (progress bar auto-hides when disabled)
|
|
@@ -220,7 +228,8 @@ Pass any [types.ts](https://github.com/adrianjanocko/toastflow/blob/main/package
|
|
|
220
228
|
|
|
221
229
|
## Theming
|
|
222
230
|
|
|
223
|
-
- CSS variables live in [styles.css](https://github.com/adrianjanocko/toastflow/blob/main/packages/vue/src/styles.css)
|
|
231
|
+
- CSS variables live in [styles.css](https://github.com/adrianjanocko/toastflow/blob/main/packages/vue/src/styles.css)
|
|
232
|
+
and are auto-imported with the Vue package.
|
|
224
233
|
- Key
|
|
225
234
|
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`,
|
|
226
235
|
plus per-type colors like `--success-bg` and `--error-text`.
|
|
@@ -233,16 +242,6 @@ Pass any [types.ts](https://github.com/adrianjanocko/toastflow/blob/main/package
|
|
|
233
242
|
- `toast.getState()` returns the current snapshot; helper
|
|
234
243
|
methods: `toast.show`, `toast.success`, `toast.error`, `toast.warning`, `toast.info`, `toast.loading`, `toast.update`, `toast.dismiss`, `toast.dismissAll`, `toast.pause`, `toast.resume`, `toast.getConfig`.
|
|
235
244
|
|
|
236
|
-
## Contributing
|
|
237
|
-
|
|
238
|
-
Contributions are welcome! Fork the repo, create a branch, and open a PR. For bigger changes, open an issue first.
|
|
239
|
-
|
|
240
|
-
1. Fork the project
|
|
241
|
-
2. Create your branch
|
|
242
|
-
3. Commit your changes
|
|
243
|
-
4. Push to the branch
|
|
244
|
-
5. Open a Pull Request
|
|
245
|
-
|
|
246
245
|
## License
|
|
247
246
|
|
|
248
247
|
MIT - see [LICENSE](https://github.com/adrianjanocko/toastflow/blob/main/LICENSE).
|