vue-toastflow 0.0.7 → 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 +81 -4
  2. package/package.json +9 -2
package/README.md CHANGED
@@ -1,12 +1,89 @@
1
- https://github.com/adrianjanocko/toastflow
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="https://toastflow.adrianjanocko.sk/" target="_blank">Playground</a> &middot;
11
+ <a href="#usage-vuejs-3-composition-api">Usage</a> &middot;
12
+ <a href="#configuration">Configuration</a>
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://www.npmjs.com/package/vue-toastflow">
17
+ <img src="https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge&logo=npm&logoColor=white" alt="NPM" />
18
+ </a>
19
+ </p>
7
20
 
8
21
  ---
9
22
 
23
+ <details>
24
+ <summary>Table of Contents</summary>
25
+ <ol>
26
+ <li><a href="#about-the-project">About the project</a></li>
27
+ <li><a href="#preview">Preview</a></li>
28
+ <li><a href="#packages">Packages</a></li>
29
+ <li><a href="#built-with">Built with</a></li>
30
+ <li>
31
+ <a href="#usage-vuejs-3-composition-api">Usage</a>
32
+ <ul>
33
+ <li><a href="#quick-start">Quick start</a></li>
34
+ <li><a href="#async-flows">Async flows</a></li>
35
+ <li><a href="#html-content">HTML content</a></li>
36
+ <li><a href="#headless-rendering">Headless rendering</a></li>
37
+ </ul>
38
+ </li>
39
+ <li><a href="#configuration">Configuration</a></li>
40
+ <li><a href="#theming">Theming</a></li>
41
+ <li><a href="#events-and-store-access">Events and store access</a></li>
42
+ <li><a href="#contributing">Contributing</a></li>
43
+ <li><a href="#license">License</a></li>
44
+ </ol>
45
+ </details>
46
+
47
+ ## About the project
48
+
49
+ Toastflow is a headless toast engine with a Vue 3 renderer. It keeps toast state in a tiny framework-agnostic store so
50
+ you can render it your way while keeping predictable behaviors.
51
+
52
+ - Deterministic rules for duplicates, timers, pause-on-hover, close-on-click, and clear-all.
53
+ - CSS-first theming: swap the look by editing a handful of variables.
54
+ - Works inside components or in plain TS/JS modules and services.
55
+ - Headless slot to render your own card while reusing the store logic.
56
+
57
+ ## Preview
58
+
59
+ <p align="center">
60
+ <img src="https://raw.githubusercontent.com/adrianjanocko/toastflow/main/images/showcase.png" alt="Toastflow showcase" width="850" />
61
+ </p>
62
+
63
+ ## Packages
64
+
65
+ - [toastflow-core](https://www.npmjs.com/package/toastflow-core): typed, framework-agnostic toast store.
66
+ - [vue-toastflow](https://www.npmjs.com/package/vue-toastflow): Vue 3 renderer with `<ToastContainer />`, a
67
+ global `toast` helper, defaults, and icons.
68
+ - [playground-vue](https://github.com/adrianjanocko/toastflow/blob/main/packages/playground/vue): Vite + Vue demo playground for manual testing.
69
+
70
+ ## Built with
71
+
72
+ ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
73
+ ![Vue.js](https://img.shields.io/badge/vuejs-%2335495e.svg?style=for-the-badge&logo=vuedotjs&logoColor=%234FC08D)
74
+ ![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=for-the-badge&logo=vite&logoColor=white)
75
+ ![PNPM](https://img.shields.io/badge/pnpm-%234a4a4a.svg?style=for-the-badge&logo=pnpm&logoColor=f69220)
76
+
77
+ ## Installation
78
+
79
+ ```shell
80
+ pnpm add vue-toastflow
81
+
82
+ # npm i vue-toastflow
83
+ # yarn add vue-toastflow
84
+ # bun i vue-toastflow
85
+ ```
86
+
10
87
  ## Usage (Vue.js 3 Composition API)
11
88
 
12
89
  ### Quick start
@@ -124,7 +201,7 @@ toast.info({
124
201
 
125
202
  ## Configuration
126
203
 
127
- Pass any [types.ts](../../packages/core/src/types.ts) fields to `createToastflow`; per-toast options override them:
204
+ 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
205
 
129
206
  - `position`: "top-right" (default), "top-left", "top-center", "bottom-*"
130
207
  - `duration`: `5000` ms by default; `Infinity` or `0` disables auto-dismiss (progress bar auto-hides when disabled)
@@ -141,7 +218,7 @@ Pass any [types.ts](../../packages/core/src/types.ts) fields to `createToastflow
141
218
 
142
219
  ## Theming
143
220
 
144
- - CSS variables live in [styles.css](../../packages/vue/src/styles.css) and are auto-imported with the Vue package.
221
+ - 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
222
  - Key
146
223
  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
224
  plus per-type colors like `--success-bg` and `--error-text`.
@@ -166,4 +243,4 @@ Contributions are welcome! Fork the repo, create a branch, and open a PR. For bi
166
243
 
167
244
  ## License
168
245
 
169
- MIT - see [LICENSE](../../LICENSE).
246
+ 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
- "version": "0.0.7",
17
+ "homepage": "https://toastflow.adrianjanocko.sk",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/adrianjanocko/toastflow.git",
21
+ "directory": "packages/vue"
22
+ },
23
+ "version": "1.0.1",
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.4"
36
+ "toastflow-core": "workspace:^"
30
37
  },
31
38
  "devDependencies": {
32
39
  "@vitejs/plugin-vue": "^6.0.2",