nuxt-toastflow 1.0.1-beta.0 โ†’ 1.0.2-beta.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 CHANGED
@@ -1,22 +1,35 @@
1
- ![Toastflow showcase](../../images/banner.png)
1
+ <p align="center">
2
+ <img src="../../assets/banner.png" alt="Toastflow" width="100%" />
3
+ </p>
2
4
 
3
- # nuxt-toastflow
5
+ <h1 align="center">๐Ÿ’š nuxt-toastflow</h1>
4
6
 
5
- Nuxt module wrapper for `vue-toastflow` so Toastflow works out of the box in Nuxt
7
+ <p align="center">
8
+ <strong>Nuxt module for Toastflow</strong> โ€” auto-imports, SSR support, and zero-config setup.
9
+ </p>
6
10
 
7
- ## ๐Ÿ“š Documentation
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>
8
16
 
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
17
+ <p align="center">
18
+ <a href="https://www.toastflow.top/docs">๐Ÿ“– Docs</a> ยท <a href="https://www.toastflow.top/">๐ŸŽฎ Playground</a> ยท <a href="https://www.toastflow.top/docs/more/comparisons">โš”๏ธ Comparisons</a>
19
+ </p>
20
+
21
+ ---
13
22
 
14
23
  ## ๐Ÿš€ Quick Start
15
24
 
25
+ **1. Install**
26
+
16
27
  ```bash
17
28
  pnpm add nuxt-toastflow
18
29
  ```
19
30
 
31
+ **2. Add the module**
32
+
20
33
  ```ts
21
34
  // nuxt.config.ts
22
35
  export default defineNuxtConfig({
@@ -30,16 +43,15 @@ export default defineNuxtConfig({
30
43
  });
31
44
  ```
32
45
 
46
+ **3. Toast away ๐ŸŽ‰**
47
+
33
48
  ```vue
34
49
  <!-- app.vue -->
35
50
  <script setup lang="ts">
36
- // Optional:
37
- // const toast = useToast();
38
-
39
- toast.success({
40
- title: "Saved",
41
- description: "Your changes are live.",
42
- });
51
+ toast.success({
52
+ title: "Saved",
53
+ description: "Your changes are live.",
54
+ });
43
55
  </script>
44
56
 
45
57
  <template>
@@ -48,25 +60,41 @@ export default defineNuxtConfig({
48
60
  </template>
49
61
  ```
50
62
 
51
- ## Options
63
+ > ๐Ÿ’ก Both `toast` and `useToast()` are auto-imported โ€” no manual imports needed!
64
+
65
+ If you need the lower-level Vue runtime pieces directly, import them from `nuxt-toastflow/runtime`:
52
66
 
53
67
  ```ts
54
- type NuxtToastflowOptions = {
55
- config: Partial<ToastConfig>;
56
- css: boolean;
57
- componentName: string | false;
58
- };
68
+ import {
69
+ Toast,
70
+ ToastProgress,
71
+ ToastContainer,
72
+ toast,
73
+ } from "nuxt-toastflow/runtime";
59
74
  ```
60
75
 
61
- Defaults:
76
+ ## โš™๏ธ Module Options
77
+
78
+ | Option | Type | Default | Description |
79
+ | :----------------- | :--------------------- | :----------------: | :----------------------------------------- |
80
+ | ๐Ÿ› ๏ธ `config` | `Partial<ToastConfig>` | `{}` | Toast configuration passed to the plugin |
81
+ | ๐ŸŽจ `css` | `boolean` | `true` | Include default styles |
82
+ | ๐Ÿงฑ `componentName` | `string \| false` | `"ToastContainer"` | Auto-registered client-only component name |
83
+
84
+ <details>
85
+ <summary>๐Ÿ’ก <strong>How does it work under the hood?</strong></summary>
86
+
87
+ <br />
62
88
 
63
- - `config: {}`
64
- - `css: true`
65
- - `componentName: "ToastContainer"`
89
+ - `ToastContainer` is auto-registered as a **client-only** component
90
+ - `toast` and `useToast()` are **auto-imported** โ€” use either one
91
+ - `vue-toastflow` is added to the transpile list so internal components resolve correctly
92
+ - Styles are injected automatically unless `css: false`
93
+ - The module forwards `css` to `createToastflow(..., { css })`, so it uses the same CSS toggle as `vue-toastflow`
94
+ - When you disable CSS and still want the shipped stylesheet manually, import `nuxt-toastflow/styles.css`
66
95
 
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()`.
96
+ </details>
69
97
 
70
- ## License
98
+ ## ๐Ÿ“„ License
71
99
 
72
- MIT
100
+ [MIT](../../LICENSE) โ€” made with โค๏ธ by [@adrianjanocko](https://github.com/adrianjanocko)
package/dist/module.d.mts CHANGED
@@ -1,7 +1,5 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- import { ToastConfig } from 'vue-toastflow';
3
-
4
- interface NuxtToastflowOptions {
1
+ import type { ToastConfig } from "./runtime";
2
+ export interface NuxtToastflowOptions {
5
3
  /**
6
4
  * Global Toastflow config passed to createToastflow.
7
5
  */
@@ -15,6 +13,5 @@ interface NuxtToastflowOptions {
15
13
  */
16
14
  componentName: string | false;
17
15
  }
18
- declare const _default: _nuxt_schema.NuxtModule<NuxtToastflowOptions, NuxtToastflowOptions, false>;
19
-
20
- export { type NuxtToastflowOptions, _default as default };
16
+ declare const _default: import("@nuxt/schema").NuxtModule<NuxtToastflowOptions, NuxtToastflowOptions, false>;
17
+ export default _default;
package/dist/module.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- import { ToastConfig } from 'vue-toastflow';
3
-
4
- interface NuxtToastflowOptions {
1
+ import type { ToastConfig } from "./runtime";
2
+ export interface NuxtToastflowOptions {
5
3
  /**
6
4
  * Global Toastflow config passed to createToastflow.
7
5
  */
@@ -15,6 +13,5 @@ interface NuxtToastflowOptions {
15
13
  */
16
14
  componentName: string | false;
17
15
  }
18
- declare const _default: _nuxt_schema.NuxtModule<NuxtToastflowOptions, NuxtToastflowOptions, false>;
19
-
20
- export { type NuxtToastflowOptions, _default as default };
16
+ declare const _default: import("@nuxt/schema").NuxtModule<NuxtToastflowOptions, NuxtToastflowOptions, false>;
17
+ export default _default;
package/dist/module.js CHANGED
@@ -58,7 +58,10 @@ var module_default = (0, import_kit.defineNuxtModule)({
58
58
  css: true,
59
59
  componentName: "ToastContainer"
60
60
  },
61
- setup(options, nuxt) {
61
+ setup(options) {
62
+ const nuxt = (0, import_kit.useNuxt)();
63
+ const runtimeEntry = "nuxt-toastflow/runtime";
64
+ nuxt.options.build.transpile.push("vue-toastflow");
62
65
  if (containsFunction(options.config)) {
63
66
  console.warn(
64
67
  "[nuxt-toastflow] Functions in `toastflow.config` are not serializable in nuxt.config and will be omitted."
@@ -77,10 +80,10 @@ var module_default = (0, import_kit.defineNuxtModule)({
77
80
  mode: "client",
78
81
  getContents: function() {
79
82
  return [
80
- 'import { createToastflow, toast } from "vue-toastflow";',
83
+ `import { createToastflow, toast } from "${runtimeEntry}";`,
81
84
  "",
82
85
  "export default defineNuxtPlugin((nuxtApp) => {",
83
- ` nuxtApp.vueApp.use(createToastflow(${serializedConfig}));`,
86
+ ` nuxtApp.vueApp.use(createToastflow(${serializedConfig}, { css: ${options.css ? "true" : "false"} }));`,
84
87
  "",
85
88
  " return {",
86
89
  " provide: {",
@@ -98,7 +101,7 @@ var module_default = (0, import_kit.defineNuxtModule)({
98
101
  return [
99
102
  'import { useNuxtApp } from "#app";',
100
103
  "",
101
- 'type ToastApi = typeof import("vue-toastflow")["toast"];',
104
+ `type ToastApi = typeof import("${runtimeEntry}")["toast"];`,
102
105
  "",
103
106
  "export function useToast(): ToastApi {",
104
107
  " return useNuxtApp().$toast;",
@@ -130,7 +133,7 @@ var module_default = (0, import_kit.defineNuxtModule)({
130
133
  filename: "types/nuxt-toastflow.d.ts",
131
134
  getContents: function() {
132
135
  return [
133
- 'type ToastApi = typeof import("vue-toastflow")["toast"];',
136
+ `type ToastApi = typeof import("${runtimeEntry}")["toast"];`,
134
137
  "",
135
138
  'declare module "#app" {',
136
139
  " interface NuxtApp {",
@@ -153,24 +156,9 @@ var module_default = (0, import_kit.defineNuxtModule)({
153
156
  (0, import_kit.addComponent)({
154
157
  name: options.componentName,
155
158
  export: "ToastContainer",
156
- filePath: "vue-toastflow",
159
+ filePath: runtimeEntry,
157
160
  mode: "client"
158
161
  });
159
162
  }
160
- if (options.css) {
161
- const cssEntry = "vue-toastflow/styles.css";
162
- const hasCssEntry = nuxt.options.css.some(function(entry) {
163
- if (typeof entry === "string") {
164
- return entry === cssEntry;
165
- }
166
- if (Array.isArray(entry) && typeof entry[0] === "string") {
167
- return entry[0] === cssEntry;
168
- }
169
- return false;
170
- });
171
- if (!hasCssEntry) {
172
- nuxt.options.css.push(cssEntry);
173
- }
174
- }
175
163
  }
176
164
  });
package/dist/module.mjs CHANGED
@@ -5,7 +5,8 @@ import {
5
5
  addPluginTemplate,
6
6
  addTemplate,
7
7
  addTypeTemplate,
8
- defineNuxtModule
8
+ defineNuxtModule,
9
+ useNuxt
9
10
  } from "@nuxt/kit";
10
11
  function containsFunction(value, visited = /* @__PURE__ */ new Set()) {
11
12
  if (typeof value === "function") {
@@ -41,7 +42,10 @@ var module_default = defineNuxtModule({
41
42
  css: true,
42
43
  componentName: "ToastContainer"
43
44
  },
44
- setup(options, nuxt) {
45
+ setup(options) {
46
+ const nuxt = useNuxt();
47
+ const runtimeEntry = "nuxt-toastflow/runtime";
48
+ nuxt.options.build.transpile.push("vue-toastflow");
45
49
  if (containsFunction(options.config)) {
46
50
  console.warn(
47
51
  "[nuxt-toastflow] Functions in `toastflow.config` are not serializable in nuxt.config and will be omitted."
@@ -60,10 +64,10 @@ var module_default = defineNuxtModule({
60
64
  mode: "client",
61
65
  getContents: function() {
62
66
  return [
63
- 'import { createToastflow, toast } from "vue-toastflow";',
67
+ `import { createToastflow, toast } from "${runtimeEntry}";`,
64
68
  "",
65
69
  "export default defineNuxtPlugin((nuxtApp) => {",
66
- ` nuxtApp.vueApp.use(createToastflow(${serializedConfig}));`,
70
+ ` nuxtApp.vueApp.use(createToastflow(${serializedConfig}, { css: ${options.css ? "true" : "false"} }));`,
67
71
  "",
68
72
  " return {",
69
73
  " provide: {",
@@ -81,7 +85,7 @@ var module_default = defineNuxtModule({
81
85
  return [
82
86
  'import { useNuxtApp } from "#app";',
83
87
  "",
84
- 'type ToastApi = typeof import("vue-toastflow")["toast"];',
88
+ `type ToastApi = typeof import("${runtimeEntry}")["toast"];`,
85
89
  "",
86
90
  "export function useToast(): ToastApi {",
87
91
  " return useNuxtApp().$toast;",
@@ -113,7 +117,7 @@ var module_default = defineNuxtModule({
113
117
  filename: "types/nuxt-toastflow.d.ts",
114
118
  getContents: function() {
115
119
  return [
116
- 'type ToastApi = typeof import("vue-toastflow")["toast"];',
120
+ `type ToastApi = typeof import("${runtimeEntry}")["toast"];`,
117
121
  "",
118
122
  'declare module "#app" {',
119
123
  " interface NuxtApp {",
@@ -136,25 +140,10 @@ var module_default = defineNuxtModule({
136
140
  addComponent({
137
141
  name: options.componentName,
138
142
  export: "ToastContainer",
139
- filePath: "vue-toastflow",
143
+ filePath: runtimeEntry,
140
144
  mode: "client"
141
145
  });
142
146
  }
143
- if (options.css) {
144
- const cssEntry = "vue-toastflow/styles.css";
145
- const hasCssEntry = nuxt.options.css.some(function(entry) {
146
- if (typeof entry === "string") {
147
- return entry === cssEntry;
148
- }
149
- if (Array.isArray(entry) && typeof entry[0] === "string") {
150
- return entry[0] === cssEntry;
151
- }
152
- return false;
153
- });
154
- if (!hasCssEntry) {
155
- nuxt.options.css.push(cssEntry);
156
- }
157
- }
158
147
  }
159
148
  });
160
149
  export {
@@ -0,0 +1 @@
1
+ export * from "vue-toastflow";
@@ -0,0 +1 @@
1
+ export * from "vue-toastflow";
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/runtime/index.ts
18
+ var runtime_exports = {};
19
+ module.exports = __toCommonJS(runtime_exports);
20
+ __reExport(runtime_exports, require("vue-toastflow"), module.exports);
21
+ // Annotate the CommonJS export names for ESM import in node:
22
+ 0 && (module.exports = {
23
+ ...require("vue-toastflow")
24
+ });
@@ -0,0 +1,2 @@
1
+ // src/runtime/index.ts
2
+ export * from "vue-toastflow";
@@ -0,0 +1,900 @@
1
+ @layer tf-defaults {
2
+ :root {
3
+ /* base look */
4
+ --tf-toast-font-family:
5
+ inherit, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
6
+ sans-serif;
7
+ --tf-toast-border-radius: 12px;
8
+ --tf-toast-border-width: 1px;
9
+ --tf-toast-padding: 16px;
10
+
11
+ /* layout inside toast */
12
+ --tf-toast-gap: 10px;
13
+ --tf-toast-buttons-gap: calc(var(--tf-toast-gap) / 2);
14
+ --tf-toast-buttons-content-gap: calc(var(--tf-toast-gap) / 2);
15
+
16
+ /* stack padding (used for scrollable stack) */
17
+ --tf-toast-stack-padding-top: 8px;
18
+ --tf-toast-stack-padding-right: 8px;
19
+ --tf-toast-stack-padding-bottom: 18px;
20
+ --tf-toast-stack-padding-left: 0;
21
+
22
+ /* title */
23
+ --tf-toast-title-font-size: 14px;
24
+ --tf-toast-title-font-weight: 600;
25
+ --tf-toast-title-line-height: 1.25;
26
+
27
+ /* description */
28
+ --tf-toast-description-font-size: 13px;
29
+ --tf-toast-description-line-height: 1.4;
30
+
31
+ /* created at and close floating bar */
32
+ --tf-toast-float-x: 0.4;
33
+ --tf-toast-float-y: -0.4;
34
+
35
+ /* created at badge */
36
+ --tf-toast-created-at-font-size: 11px;
37
+ --tf-toast-created-at-offset: 0;
38
+ --tf-toast-created-at-padding-x: 8px;
39
+ --tf-toast-created-at-border-radius: 999px;
40
+
41
+ /* close button */
42
+ --tf-toast-close-size: 18px;
43
+ --tf-toast-close-icon-size: 12px;
44
+ --tf-toast-close-border-width: var(--tf-toast-border-width);
45
+ --tf-toast-close-border-radius: var(--tf-toast-border-radius);
46
+ --tf-toast-close-font-size: 11px;
47
+
48
+ /* buttons */
49
+ --tf-toast-button-font-size: 12px;
50
+ --tf-toast-button-line-height: 1;
51
+ --tf-toast-button-padding-y: 7px;
52
+ --tf-toast-button-padding-x: 9px;
53
+ --tf-toast-button-border-radius: 10px;
54
+ --tf-toast-button-border-width: var(--tf-toast-border-width);
55
+
56
+ /* icon */
57
+ --tf-toast-icon-size: 24px;
58
+ --tf-toast-icon-loading: var(--tf-toast-loading-text-default);
59
+ --tf-toast-icon-default: var(--tf-toast-normal-text-default);
60
+ --tf-toast-icon-success: var(--tf-toast-success-text-default);
61
+ --tf-toast-icon-error: var(--tf-toast-error-text-default);
62
+ --tf-toast-icon-warning: var(--tf-toast-warning-text-default);
63
+ --tf-toast-icon-info: var(--tf-toast-info-text-default);
64
+ --tf-toast-icon-custom: var(--tf-toast-normal-text-default);
65
+
66
+ /* progress bar */
67
+ --tf-toast-progress-height: 4px;
68
+ --tf-toast-progress-border-radius: var(--tf-toast-border-radius);
69
+ --tf-toast-progress-duration: 5000ms;
70
+
71
+ /* accent presets */
72
+ --tf-toast-normal-bg-default: #fff;
73
+ --tf-toast-normal-border-default: #e6e8eb;
74
+ --tf-toast-normal-text-default: #11181c;
75
+ --tf-toast-normal-progress-bar-bg-default: var(
76
+ --tf-toast-normal-text-default
77
+ );
78
+ --tf-toast-normal-progress-bg-default: color-mix(
79
+ in srgb,
80
+ var(--tf-toast-normal-text-default) 20%,
81
+ transparent
82
+ );
83
+ --tf-toast-normal-color-default: var(--tf-toast-normal-text-default);
84
+ --tf-toast-normal-title-color-default: var(--tf-toast-normal-text-default);
85
+ --tf-toast-normal-description-color-default: var(
86
+ --tf-toast-normal-text-default
87
+ );
88
+
89
+ --tf-toast-loading-bg-default: hsl(48, 100%, 96%);
90
+ --tf-toast-loading-border-default: hsl(46, 100%, 88%);
91
+ --tf-toast-loading-text-default: hsl(40, 100%, 32%);
92
+ --tf-toast-loading-progress-bar-bg-default: var(
93
+ --tf-toast-loading-text-default
94
+ );
95
+ --tf-toast-loading-progress-bg-default: color-mix(
96
+ in srgb,
97
+ var(--tf-toast-loading-text-default) 20%,
98
+ transparent
99
+ );
100
+ --tf-toast-loading-color-default: var(--tf-toast-loading-text-default);
101
+ --tf-toast-loading-title-color-default: var(
102
+ --tf-toast-loading-text-default
103
+ );
104
+ --tf-toast-loading-description-color-default: var(
105
+ --tf-toast-loading-text-default
106
+ );
107
+
108
+ --tf-toast-success-bg-default: hsl(143, 85%, 96%);
109
+ --tf-toast-success-border-default: hsl(145, 92%, 87%);
110
+ --tf-toast-success-text-default: hsl(140, 100%, 27%);
111
+ --tf-toast-success-progress-bar-bg-default: var(
112
+ --tf-toast-success-text-default
113
+ );
114
+ --tf-toast-success-progress-bg-default: color-mix(
115
+ in srgb,
116
+ var(--tf-toast-success-text-default) 20%,
117
+ transparent
118
+ );
119
+ --tf-toast-success-color-default: var(--tf-toast-success-text-default);
120
+ --tf-toast-success-title-color-default: var(
121
+ --tf-toast-success-text-default
122
+ );
123
+ --tf-toast-success-description-color-default: var(
124
+ --tf-toast-success-text-default
125
+ );
126
+
127
+ --tf-toast-info-bg-default: hsl(208, 100%, 97%);
128
+ --tf-toast-info-border-default: hsl(221, 91%, 93%);
129
+ --tf-toast-info-text-default: hsl(210, 92%, 45%);
130
+ --tf-toast-info-progress-bar-bg-default: var(--tf-toast-info-text-default);
131
+ --tf-toast-info-progress-bg-default: color-mix(
132
+ in srgb,
133
+ var(--tf-toast-info-text-default) 20%,
134
+ transparent
135
+ );
136
+ --tf-toast-info-color-default: var(--tf-toast-info-text-default);
137
+ --tf-toast-info-title-color-default: var(--tf-toast-info-text-default);
138
+ --tf-toast-info-description-color-default: var(
139
+ --tf-toast-info-text-default
140
+ );
141
+
142
+ --tf-toast-warning-bg-default: hsl(49, 100%, 97%);
143
+ --tf-toast-warning-border-default: hsl(49, 91%, 84%);
144
+ --tf-toast-warning-text-default: hsl(31, 92%, 45%);
145
+ --tf-toast-warning-progress-bar-bg-default: var(
146
+ --tf-toast-warning-text-default
147
+ );
148
+ --tf-toast-warning-progress-bg-default: color-mix(
149
+ in srgb,
150
+ var(--tf-toast-warning-text-default) 20%,
151
+ transparent
152
+ );
153
+ --tf-toast-warning-color-default: var(--tf-toast-warning-text-default);
154
+ --tf-toast-warning-title-color-default: var(
155
+ --tf-toast-warning-text-default
156
+ );
157
+ --tf-toast-warning-description-color-default: var(
158
+ --tf-toast-warning-text-default
159
+ );
160
+
161
+ --tf-toast-error-bg-default: hsl(359, 100%, 97%);
162
+ --tf-toast-error-border-default: hsl(359, 100%, 94%);
163
+ --tf-toast-error-text-default: hsl(360, 100%, 45%);
164
+ --tf-toast-error-progress-bar-bg-default: var(
165
+ --tf-toast-error-text-default
166
+ );
167
+ --tf-toast-error-progress-bg-default: color-mix(
168
+ in srgb,
169
+ var(--tf-toast-error-text-default) 20%,
170
+ transparent
171
+ );
172
+ --tf-toast-error-color-default: var(--tf-toast-error-text-default);
173
+ --tf-toast-error-title-color-default: var(--tf-toast-error-text-default);
174
+ --tf-toast-error-description-color-default: var(
175
+ --tf-toast-error-text-default
176
+ );
177
+
178
+ /* animations */
179
+ --tf-toast-motion-offset: 10px;
180
+ --tf-toast-animation-in-duration: 260ms;
181
+ --tf-toast-animation-out-duration: 220ms;
182
+ }
183
+ }
184
+
185
+ .tf-toast--paused .tf-toast-progress-bar {
186
+ animation-play-state: paused;
187
+ }
188
+
189
+ .tf-toast-progress-wrapper {
190
+ position: absolute;
191
+ left: 0;
192
+ right: 0;
193
+ bottom: 0;
194
+ margin: 0;
195
+ }
196
+
197
+ .tf-toast-progress {
198
+ height: var(--tf-toast-progress-height);
199
+ width: 100%;
200
+ border-radius: 0 0 var(--tf-toast-progress-border-radius)
201
+ var(--tf-toast-progress-border-radius);
202
+ background: var(--_tf-resolved-progress-bg);
203
+ }
204
+
205
+ .tf-toast-progress-bar {
206
+ height: 100%;
207
+ width: 100%;
208
+ background: var(--_tf-resolved-progress-bar-bg);
209
+ transform-origin: left;
210
+ animation-name: tf-toast-progress-rtl;
211
+ animation-duration: var(--tf-toast-progress-duration, 5000ms);
212
+ animation-timing-function: linear;
213
+ animation-fill-mode: forwards;
214
+ will-change: transform;
215
+ }
216
+
217
+ .tf-toast-progress[data-align="left-to-right"] .tf-toast-progress-bar {
218
+ transform-origin: right;
219
+ animation-name: tf-toast-progress-ltr;
220
+ }
221
+
222
+ @keyframes tf-toast-progress-rtl {
223
+ from {
224
+ transform: scaleX(1);
225
+ }
226
+ to {
227
+ transform: scaleX(0);
228
+ }
229
+ }
230
+
231
+ @keyframes tf-toast-progress-ltr {
232
+ from {
233
+ transform: scaleX(0);
234
+ }
235
+ to {
236
+ transform: scaleX(1);
237
+ }
238
+ }
239
+
240
+ .tf-toast-item[data-position^="top-"] {
241
+ --tf-toast-motion-offset: -10px;
242
+ }
243
+
244
+ .tf-toast-item[data-position^="bottom-"] {
245
+ --tf-toast-motion-offset: 10px;
246
+ }
247
+
248
+ .tf-toast-motion {
249
+ width: 100%;
250
+ transform-origin: center;
251
+ }
252
+
253
+ /* MOVE */
254
+ .Toastflow__animation-move {
255
+ transition: transform var(--tf-toast-animation-in-duration)
256
+ cubic-bezier(0.5, 1, 0.25, 1);
257
+ will-change: transform;
258
+ }
259
+
260
+ /* ENTER */
261
+ .Toastflow__animation-enter-from > .tf-toast-motion,
262
+ .Toastflow__animation-appear-from > .tf-toast-motion {
263
+ opacity: 0;
264
+ transform: translate3d(0, var(--tf-toast-motion-offset), 0) scale(0.96);
265
+ }
266
+
267
+ .Toastflow__animation-enter-active > .tf-toast-motion,
268
+ .Toastflow__animation-appear-active > .tf-toast-motion {
269
+ transition:
270
+ opacity var(--tf-toast-animation-in-duration) cubic-bezier(0.5, 1, 0.25, 1),
271
+ transform var(--tf-toast-animation-in-duration)
272
+ cubic-bezier(0.5, 1, 0.25, 1);
273
+ }
274
+
275
+ .Toastflow__animation-enter-to > .tf-toast-motion,
276
+ .Toastflow__animation-appear-to > .tf-toast-motion {
277
+ opacity: 1;
278
+ transform: translate3d(0, 0, 0) scale(1);
279
+ }
280
+
281
+ /* LEAVE */
282
+ .Toastflow__animation-leave-from > .tf-toast-motion {
283
+ opacity: 1;
284
+ transform: translate3d(0, 0, 0) scale(1);
285
+ }
286
+
287
+ .Toastflow__animation-leave-active > .tf-toast-motion {
288
+ transition:
289
+ opacity var(--tf-toast-animation-out-duration) ease,
290
+ transform var(--tf-toast-animation-out-duration) ease;
291
+ }
292
+
293
+ .Toastflow__animation-leave-to > .tf-toast-motion {
294
+ opacity: 0;
295
+ transform: translate3d(0, var(--tf-toast-motion-offset), 0) scale(0.96);
296
+ }
297
+
298
+ /* CLEAR ALL */
299
+ .Toastflow__animation-clearAll .tf-toast-motion {
300
+ animation: Toastflow__clearAll-kf var(--tf-toast-animation-in-duration)
301
+ cubic-bezier(0.22, 1, 0.36, 1) both;
302
+ }
303
+
304
+ /* BUMP & UPDATE */
305
+ .Toastflow__animation-bump {
306
+ animation: Toastflow__bump-kf var(--tf-toast-animation-in-duration) ease-out;
307
+ }
308
+
309
+ .Toastflow__animation-update {
310
+ animation: Toastflow__bump-kf var(--tf-toast-animation-in-duration)
311
+ cubic-bezier(0.33, 1, 0.68, 1);
312
+ }
313
+
314
+ @keyframes Toastflow__clearAll-kf {
315
+ 0% {
316
+ opacity: 1;
317
+ }
318
+ 100% {
319
+ opacity: 0;
320
+ }
321
+ }
322
+
323
+ @keyframes Toastflow__bump-kf {
324
+ 0% {
325
+ transform: scale(1);
326
+ }
327
+ 40% {
328
+ transform: scale(1.01);
329
+ }
330
+ 100% {
331
+ transform: scale(1);
332
+ }
333
+ }
334
+
335
+ @media (prefers-reduced-motion: reduce) {
336
+ .Toastflow__animation-move {
337
+ transition: none;
338
+ }
339
+
340
+ .Toastflow__animation-enter-active .tf-toast-motion,
341
+ .Toastflow__animation-leave-active .tf-toast-motion {
342
+ transition: none;
343
+ }
344
+
345
+ .Toastflow__animation-clearAll .tf-toast-motion {
346
+ animation: none;
347
+ }
348
+ }
349
+
350
+ /* Toast container */
351
+ .tf-toast-root {
352
+ pointer-events: none;
353
+ position: fixed;
354
+ inset: 0;
355
+ }
356
+
357
+ .tf-toast-stack {
358
+ position: absolute;
359
+ height: 100%;
360
+ display: flex;
361
+ align-items: flex-start;
362
+ }
363
+
364
+ .tf-toast-stack-inner {
365
+ display: flex;
366
+ flex-direction: column;
367
+ position: relative;
368
+ width: 100%;
369
+ box-sizing: border-box;
370
+ }
371
+
372
+ .tf-toast-stack-inner--scroll {
373
+ max-height: 100%;
374
+ overflow-y: auto;
375
+ overflow-x: hidden;
376
+ overscroll-behavior: contain;
377
+ padding-top: var(--tf-toast-stack-padding-top);
378
+ padding-right: var(--tf-toast-stack-padding-right);
379
+ padding-bottom: var(--tf-toast-stack-padding-bottom);
380
+ padding-left: var(--tf-toast-stack-padding-left);
381
+ scroll-padding: var(--tf-toast-stack-padding-top)
382
+ var(--tf-toast-stack-padding-right) var(--tf-toast-stack-padding-bottom)
383
+ var(--tf-toast-stack-padding-left);
384
+ }
385
+
386
+ .tf-toast-stack-inner--bottom {
387
+ min-height: 100%;
388
+ justify-content: flex-end;
389
+ }
390
+
391
+ .tf-toast-stack--left {
392
+ justify-content: flex-start;
393
+ }
394
+
395
+ .tf-toast-stack--center {
396
+ justify-content: center;
397
+ }
398
+
399
+ .tf-toast-stack--right {
400
+ justify-content: flex-end;
401
+ }
402
+
403
+ .tf-toast-item {
404
+ pointer-events: auto;
405
+ width: 100%;
406
+ position: relative;
407
+ z-index: 1;
408
+ }
409
+
410
+ /* Toast component */
411
+ .tf-toast-wrapper {
412
+ pointer-events: auto;
413
+ width: 100%;
414
+ }
415
+
416
+ .tf-toast {
417
+ cursor: pointer;
418
+ position: relative;
419
+ width: 100%;
420
+ --_tf-resolved-bg: var(
421
+ --tf-toast-bg,
422
+ var(--_tf-bg, var(--tf-toast-normal-bg-default))
423
+ );
424
+ --_tf-resolved-color: var(
425
+ --tf-toast-color,
426
+ var(
427
+ --tf-toast-accent-color,
428
+ var(--_tf-color, var(--tf-toast-normal-text-default))
429
+ )
430
+ );
431
+ --_tf-resolved-border: var(
432
+ --tf-toast-border-color,
433
+ var(--_tf-border-color, var(--tf-toast-normal-border-default))
434
+ );
435
+ --_tf-resolved-title-color: var(
436
+ --tf-toast-title-color,
437
+ var(
438
+ --tf-toast-color,
439
+ var(
440
+ --tf-toast-accent-color,
441
+ var(--_tf-title-color, var(--_tf-resolved-color))
442
+ )
443
+ )
444
+ );
445
+ --_tf-resolved-desc-color: var(
446
+ --tf-toast-description-color,
447
+ var(
448
+ --tf-toast-color,
449
+ var(
450
+ --tf-toast-accent-color,
451
+ var(--_tf-desc-color, var(--_tf-resolved-color))
452
+ )
453
+ )
454
+ );
455
+ --_tf-resolved-progress-bg: var(
456
+ --tf-toast-progress-bg,
457
+ var(
458
+ --_tf-progress-bg,
459
+ color-mix(in srgb, var(--_tf-resolved-color) 20%, transparent)
460
+ )
461
+ );
462
+ --_tf-resolved-progress-bar-bg: var(
463
+ --tf-toast-progress-bar-bg,
464
+ var(
465
+ --tf-toast-accent-color,
466
+ var(--_tf-progress-bar-bg, var(--_tf-resolved-color))
467
+ )
468
+ );
469
+ --tf-toast-button-color: var(--_tf-resolved-color);
470
+ --tf-toast-button-border-color: var(--_tf-resolved-border);
471
+ --tf-toast-button-border-width: var(--tf-toast-border-width);
472
+ --tf-toast-button-bg: var(--_tf-resolved-bg);
473
+ --tf-toast-close-color: var(--_tf-resolved-color);
474
+ --tf-toast-close-border-color: var(--_tf-resolved-border);
475
+ --tf-toast-close-bg: var(--_tf-resolved-bg);
476
+ --tf-toast-close-ring-color: var(--tf-toast-close-border-color);
477
+ --tf-toast-created-at-color: var(--_tf-resolved-desc-color);
478
+ --tf-toast-created-at-border-color: var(--_tf-resolved-border);
479
+ --tf-toast-created-at-bg: var(--_tf-resolved-bg);
480
+ }
481
+
482
+ .tf-toast--swipe-enabled {
483
+ touch-action: pan-y;
484
+ -webkit-user-select: none;
485
+ user-select: none;
486
+ cursor: grab;
487
+ }
488
+
489
+ .tf-toast--swipe-enabled:active {
490
+ cursor: grabbing;
491
+ }
492
+
493
+ .tf-toast[data-align="right"] .tf-toast-main-content {
494
+ flex-direction: row-reverse;
495
+ }
496
+
497
+ .tf-toast[data-align="right"] .tf-toast-text {
498
+ text-align: right;
499
+ }
500
+
501
+ .tf-toast-accent--default {
502
+ --_tf-bg: var(--tf-toast-normal-bg-default);
503
+ --_tf-color: var(--tf-toast-normal-color-default);
504
+ --_tf-border-color: var(--tf-toast-normal-border-default);
505
+ --_tf-title-color: var(--tf-toast-normal-title-color-default);
506
+ --_tf-desc-color: var(--tf-toast-normal-description-color-default);
507
+ --_tf-progress-bg: var(--tf-toast-normal-progress-bg-default);
508
+ --_tf-progress-bar-bg: var(--tf-toast-normal-progress-bar-bg-default);
509
+ }
510
+
511
+ .tf-toast-accent--loading {
512
+ --_tf-bg: var(--tf-toast-loading-bg-default);
513
+ --_tf-color: var(--tf-toast-loading-color-default);
514
+ --_tf-border-color: var(--tf-toast-loading-border-default);
515
+ --_tf-title-color: var(--tf-toast-loading-title-color-default);
516
+ --_tf-desc-color: var(--tf-toast-loading-description-color-default);
517
+ --_tf-progress-bg: var(--tf-toast-loading-progress-bg-default);
518
+ --_tf-progress-bar-bg: var(--tf-toast-loading-progress-bar-bg-default);
519
+ }
520
+
521
+ .tf-toast-accent--success {
522
+ --_tf-bg: var(--tf-toast-success-bg-default);
523
+ --_tf-color: var(--tf-toast-success-color-default);
524
+ --_tf-border-color: var(--tf-toast-success-border-default);
525
+ --_tf-title-color: var(--tf-toast-success-title-color-default);
526
+ --_tf-desc-color: var(--tf-toast-success-description-color-default);
527
+ --_tf-progress-bg: var(--tf-toast-success-progress-bg-default);
528
+ --_tf-progress-bar-bg: var(--tf-toast-success-progress-bar-bg-default);
529
+ }
530
+
531
+ .tf-toast-accent--error {
532
+ --_tf-bg: var(--tf-toast-error-bg-default);
533
+ --_tf-color: var(--tf-toast-error-color-default);
534
+ --_tf-border-color: var(--tf-toast-error-border-default);
535
+ --_tf-title-color: var(--tf-toast-error-title-color-default);
536
+ --_tf-desc-color: var(--tf-toast-error-description-color-default);
537
+ --_tf-progress-bg: var(--tf-toast-error-progress-bg-default);
538
+ --_tf-progress-bar-bg: var(--tf-toast-error-progress-bar-bg-default);
539
+ }
540
+
541
+ .tf-toast-accent--warning {
542
+ --_tf-bg: var(--tf-toast-warning-bg-default);
543
+ --_tf-color: var(--tf-toast-warning-color-default);
544
+ --_tf-border-color: var(--tf-toast-warning-border-default);
545
+ --_tf-title-color: var(--tf-toast-warning-title-color-default);
546
+ --_tf-desc-color: var(--tf-toast-warning-description-color-default);
547
+ --_tf-progress-bg: var(--tf-toast-warning-progress-bg-default);
548
+ --_tf-progress-bar-bg: var(--tf-toast-warning-progress-bar-bg-default);
549
+ }
550
+
551
+ .tf-toast-accent--info {
552
+ --_tf-bg: var(--tf-toast-info-bg-default);
553
+ --_tf-color: var(--tf-toast-info-color-default);
554
+ --_tf-border-color: var(--tf-toast-info-border-default);
555
+ --_tf-title-color: var(--tf-toast-info-title-color-default);
556
+ --_tf-desc-color: var(--tf-toast-info-description-color-default);
557
+ --_tf-progress-bg: var(--tf-toast-info-progress-bg-default);
558
+ --_tf-progress-bar-bg: var(--tf-toast-info-progress-bar-bg-default);
559
+ }
560
+
561
+ .tf-toast-accent--custom {
562
+ --_tf-bg: var(
563
+ --tf-toast-custom-bg-default,
564
+ var(--tf-toast-normal-bg-default)
565
+ );
566
+ --_tf-color: var(
567
+ --tf-toast-custom-color-default,
568
+ var(--tf-toast-normal-color-default)
569
+ );
570
+ --_tf-border-color: var(
571
+ --tf-toast-custom-border-default,
572
+ var(--tf-toast-normal-border-default)
573
+ );
574
+ --_tf-title-color: var(
575
+ --tf-toast-custom-title-color-default,
576
+ var(--tf-toast-normal-title-color-default)
577
+ );
578
+ --_tf-desc-color: var(
579
+ --tf-toast-custom-description-color-default,
580
+ var(--tf-toast-normal-description-color-default)
581
+ );
582
+ --_tf-progress-bg: var(
583
+ --tf-toast-custom-progress-bg-default,
584
+ var(--tf-toast-normal-progress-bg-default)
585
+ );
586
+ --_tf-progress-bar-bg: var(
587
+ --tf-toast-custom-progress-bar-bg-default,
588
+ var(--tf-toast-normal-progress-bar-bg-default)
589
+ );
590
+ }
591
+
592
+ .tf-toast-surface {
593
+ position: relative;
594
+ display: block;
595
+ min-width: 0;
596
+ padding: var(--tf-toast-padding);
597
+ border-radius: var(--tf-toast-border-radius);
598
+ background-color: var(--_tf-resolved-bg);
599
+ color: var(--_tf-resolved-color);
600
+ border: var(--tf-toast-border-width) solid var(--_tf-resolved-border);
601
+ font-family: var(--tf-toast-font-family), sans-serif;
602
+ overflow: hidden;
603
+ }
604
+
605
+ .tf-toast-main {
606
+ display: flex;
607
+ align-items: stretch;
608
+ gap: var(--tf-toast-buttons-content-gap);
609
+ width: 100%;
610
+ }
611
+
612
+ .tf-toast-main--full > .tf-toast-main-content {
613
+ width: 100%;
614
+ min-width: 0;
615
+ flex: 1 1 100%;
616
+ }
617
+
618
+ .tf-toast-main--content-end > .tf-toast-main-content {
619
+ margin-left: auto;
620
+ max-width: 100%;
621
+ flex: 0 1 auto;
622
+ }
623
+
624
+ .tf-toast-main--content-end > .tf-toast-main-content > .tf-toast-body {
625
+ flex: 0 1 auto;
626
+ min-width: 0;
627
+ }
628
+
629
+ .tf-toast-main-content {
630
+ display: flex;
631
+ align-items: center;
632
+ gap: var(--tf-toast-gap);
633
+ min-width: 0;
634
+ flex: 1 1 auto;
635
+ }
636
+
637
+ .tf-toast-meta {
638
+ display: flex;
639
+ flex-direction: column;
640
+ gap: calc(var(--tf-toast-gap) / 2);
641
+ min-width: 0;
642
+ flex-shrink: 0;
643
+ }
644
+
645
+ .tf-toast-meta--left {
646
+ align-items: flex-start;
647
+ }
648
+
649
+ .tf-toast-meta--right {
650
+ align-items: flex-end;
651
+ }
652
+
653
+ .tf-toast-meta-row {
654
+ display: flex;
655
+ min-width: 0;
656
+ }
657
+
658
+ .tf-toast-meta-row--top {
659
+ margin-bottom: var(--tf-toast-buttons-content-gap);
660
+ }
661
+
662
+ .tf-toast-meta-row--bottom {
663
+ margin-top: var(--tf-toast-buttons-content-gap);
664
+ }
665
+
666
+ .tf-toast-meta-row .tf-toast-actions--start {
667
+ margin-right: auto;
668
+ }
669
+
670
+ .tf-toast-meta-row .tf-toast-actions--end {
671
+ margin-left: auto;
672
+ }
673
+
674
+ .tf-toast-actions {
675
+ display: flex;
676
+ flex-direction: row;
677
+ flex-wrap: wrap;
678
+ gap: var(--tf-toast-buttons-gap);
679
+ }
680
+
681
+ .tf-toast-buttons--center {
682
+ margin-top: auto;
683
+ margin-bottom: auto;
684
+ }
685
+
686
+ .tf-toast-buttons--bottom {
687
+ margin-top: auto;
688
+ }
689
+
690
+ .tf-toast-actions--start {
691
+ justify-content: flex-start;
692
+ }
693
+
694
+ .tf-toast-actions--end {
695
+ justify-content: flex-end;
696
+ }
697
+
698
+ .tf-toast-button {
699
+ appearance: none;
700
+ border: var(--tf-toast-button-border-width) solid
701
+ var(--tf-toast-button-border-color);
702
+ background: var(--tf-toast-button-bg);
703
+ color: var(--tf-toast-button-color);
704
+ border-radius: var(--tf-toast-button-border-radius);
705
+ font-size: var(--tf-toast-button-font-size);
706
+ line-height: var(--tf-toast-button-line-height);
707
+ padding: var(--tf-toast-button-padding-y) var(--tf-toast-button-padding-x);
708
+ cursor: pointer;
709
+ user-select: none;
710
+ font-family: inherit;
711
+ }
712
+
713
+ .tf-toast-icon-spin {
714
+ display: inline-block;
715
+ animation: tf-toast-spin 0.8s linear infinite;
716
+ transform-origin: center;
717
+ }
718
+
719
+ @keyframes tf-toast-spin {
720
+ from {
721
+ transform: rotate(0deg);
722
+ }
723
+ to {
724
+ transform: rotate(360deg);
725
+ }
726
+ }
727
+
728
+ .tf-toast-icon-svg {
729
+ width: var(--tf-toast-icon-size);
730
+ height: var(--tf-toast-icon-size);
731
+ }
732
+
733
+ .tf-toast-icon--loading .tf-toast-icon-svg {
734
+ color: var(--tf-toast-icon-color, var(--tf-toast-icon-loading));
735
+ }
736
+
737
+ .tf-toast-icon--default .tf-toast-icon-svg {
738
+ color: var(--tf-toast-icon-color, var(--tf-toast-icon-default));
739
+ }
740
+
741
+ .tf-toast-icon--success .tf-toast-icon-svg {
742
+ color: var(--tf-toast-icon-color, var(--tf-toast-icon-success));
743
+ }
744
+
745
+ .tf-toast-icon--error .tf-toast-icon-svg {
746
+ color: var(--tf-toast-icon-color, var(--tf-toast-icon-error));
747
+ }
748
+
749
+ .tf-toast-icon--warning .tf-toast-icon-svg {
750
+ color: var(--tf-toast-icon-color, var(--tf-toast-icon-warning));
751
+ }
752
+
753
+ .tf-toast-icon--info .tf-toast-icon-svg {
754
+ color: var(--tf-toast-icon-color, var(--tf-toast-icon-info));
755
+ }
756
+
757
+ .tf-toast-icon--custom .tf-toast-icon-svg {
758
+ color: var(
759
+ --tf-toast-icon-color,
760
+ var(--tf-toast-icon-custom, var(--tf-toast-icon-default))
761
+ );
762
+ }
763
+
764
+ .tf-toast-body {
765
+ position: relative;
766
+ z-index: 1;
767
+ min-width: 0;
768
+ flex: 1 1 auto;
769
+ display: flex;
770
+ flex-direction: column;
771
+ }
772
+
773
+ .tf-toast-body--has-created-at {
774
+ display: grid;
775
+ grid-template-columns: minmax(0, 1fr) auto;
776
+ column-gap: calc(var(--tf-toast-gap) / 2);
777
+ grid-auto-flow: row;
778
+ }
779
+
780
+ .tf-toast-body--has-created-at > :not(.tf-toast-created-at) {
781
+ grid-column: 1;
782
+ }
783
+
784
+ .tf-toast-text {
785
+ min-width: 0;
786
+ }
787
+
788
+ .tf-toast-created-at {
789
+ color: var(--tf-toast-created-at-color);
790
+ font-size: var(--tf-toast-created-at-font-size);
791
+ font-style: italic;
792
+ white-space: nowrap;
793
+ align-self: end;
794
+ justify-self: end;
795
+ grid-column: 2;
796
+ grid-row: 1;
797
+ }
798
+
799
+ .tf-toast[data-align="right"] .tf-toast-created-at {
800
+ text-align: right;
801
+ width: 100%;
802
+ display: flex;
803
+ justify-content: flex-end;
804
+ }
805
+
806
+ .tf-toast[data-align="right"] .tf-toast-body--has-created-at {
807
+ grid-template-columns: auto minmax(0, 1fr);
808
+ }
809
+
810
+ .tf-toast[data-align="right"]
811
+ .tf-toast-body--has-created-at
812
+ > .tf-toast-created-at {
813
+ grid-column: 1;
814
+ justify-self: start;
815
+ }
816
+
817
+ .tf-toast[data-align="right"]
818
+ .tf-toast-body--has-created-at
819
+ > :not(.tf-toast-created-at) {
820
+ grid-column: 2;
821
+ }
822
+
823
+ .tf-toast-floating-bar {
824
+ position: absolute;
825
+ top: 0;
826
+ right: 0;
827
+ transform: translate(
828
+ calc(var(--tf-toast-close-size) * var(--tf-toast-float-x)),
829
+ calc(var(--tf-toast-close-size) * var(--tf-toast-float-y))
830
+ );
831
+ display: inline-flex;
832
+ align-items: center;
833
+ gap: var(--tf-toast-created-at-offset);
834
+ height: var(--tf-toast-close-size);
835
+ pointer-events: auto;
836
+ z-index: 2;
837
+ }
838
+
839
+ .tf-toast-created-at-float {
840
+ display: inline-flex;
841
+ align-items: center;
842
+ height: var(--tf-toast-close-size);
843
+ padding: 0 var(--tf-toast-created-at-padding-x);
844
+ border-radius: var(--tf-toast-created-at-border-radius);
845
+ border: var(--tf-toast-close-border-width) solid
846
+ var(--tf-toast-created-at-border-color);
847
+ background: var(--tf-toast-created-at-bg);
848
+ color: var(--tf-toast-created-at-color);
849
+ font-size: var(--tf-toast-created-at-font-size);
850
+ font-style: italic;
851
+ white-space: nowrap;
852
+ pointer-events: none;
853
+ }
854
+
855
+ .tf-toast-title {
856
+ margin: 0;
857
+ font-size: var(--tf-toast-title-font-size);
858
+ font-weight: var(--tf-toast-title-font-weight);
859
+ line-height: var(--tf-toast-title-line-height);
860
+ color: var(--_tf-resolved-title-color);
861
+ word-wrap: break-word;
862
+ }
863
+
864
+ .tf-toast-description {
865
+ margin: 0;
866
+ font-size: var(--tf-toast-description-font-size);
867
+ line-height: var(--tf-toast-description-line-height);
868
+ color: var(--_tf-resolved-desc-color);
869
+ word-wrap: break-word;
870
+ }
871
+
872
+ .tf-toast-close {
873
+ position: relative;
874
+ height: var(--tf-toast-close-size);
875
+ width: var(--tf-toast-close-size);
876
+ border-radius: var(--tf-toast-close-border-radius);
877
+ border: var(--tf-toast-close-border-width) solid
878
+ var(--tf-toast-close-border-color);
879
+ background: var(--tf-toast-close-bg);
880
+ color: var(--tf-toast-close-color);
881
+ font-size: var(--tf-toast-close-font-size);
882
+ display: inline-flex;
883
+ align-items: center;
884
+ justify-content: center;
885
+ padding: 0;
886
+ cursor: pointer;
887
+ flex-shrink: 0;
888
+ pointer-events: auto;
889
+ z-index: 2;
890
+ }
891
+
892
+ .tf-toast-close-icon {
893
+ width: var(--tf-toast-close-icon-size);
894
+ height: var(--tf-toast-close-icon-size);
895
+ }
896
+
897
+ .tf-toast-close:focus-visible {
898
+ outline: 2px solid var(--tf-toast-close-ring-color);
899
+ outline-offset: 2px;
900
+ }
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.2-beta.0",
20
25
  "main": "./dist/module.js",
21
26
  "module": "./dist/module.mjs",
22
27
  "types": "./dist/module.d.ts",
@@ -30,7 +35,18 @@
30
35
  "types": "./dist/module.d.ts",
31
36
  "default": "./dist/module.js"
32
37
  }
33
- }
38
+ },
39
+ "./runtime": {
40
+ "import": {
41
+ "types": "./dist/runtime/index.d.mts",
42
+ "default": "./dist/runtime/index.mjs"
43
+ },
44
+ "require": {
45
+ "types": "./dist/runtime/index.d.ts",
46
+ "default": "./dist/runtime/index.js"
47
+ }
48
+ },
49
+ "./styles.css": "./dist/styles.css"
34
50
  },
35
51
  "files": [
36
52
  "dist",
@@ -40,14 +56,14 @@
40
56
  "nuxt": "^3.0.0 || ^4.0.0"
41
57
  },
42
58
  "dependencies": {
43
- "@nuxt/kit": "^3.17.5",
44
- "vue-toastflow": "^1.1.9-beta.0"
59
+ "@nuxt/kit": "^4.4.2",
60
+ "vue-toastflow": "^1.2.0-beta.3"
45
61
  },
46
62
  "devDependencies": {
47
63
  "tsup": "^8.5.1",
48
- "typescript": "^5.9.3"
64
+ "typescript": "^6.0.3"
49
65
  },
50
66
  "scripts": {
51
- "build": "tsup src/module.ts --format cjs,esm --dts"
67
+ "build": "tsup src/module.ts src/runtime/index.ts --clean --format cjs,esm && tsc --emitDeclarationOnly && node ./scripts/post-build.cjs"
52
68
  }
53
69
  }
package/dist/module.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "name": "nuxt-toastflow",
3
- "configKey": "toastflow",
4
- "compatibility": {
5
- "nuxt": "^3.0.0 || ^4.0.0"
6
- },
7
- "version": "1.0.0",
8
- "builder": {
9
- "@nuxt/module-builder": "1.0.2",
10
- "unbuild": "unknown"
11
- }
12
- }
@@ -1,4 +0,0 @@
1
- type ToastApi = typeof import("vue-toastflow")["toast"];
2
- export declare function useToast(): ToastApi;
3
- export declare const toast: ToastApi;
4
- export {};
@@ -1,14 +0,0 @@
1
- import { useNuxtApp } from "#app";
2
- export function useToast() {
3
- return useNuxtApp().$toast;
4
- }
5
- export const toast = new Proxy({}, {
6
- get(_target, key) {
7
- const currentToast = useNuxtApp().$toast;
8
- const value = currentToast[key];
9
- if (typeof value === "function") {
10
- return value.bind(currentToast);
11
- }
12
- return value;
13
- }
14
- });
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,11 +0,0 @@
1
- import { createToastflow, toast } from "vue-toastflow";
2
- export default defineNuxtPlugin((nuxtApp) => {
3
- const runtimeConfig = useRuntimeConfig();
4
- const toastflowConfig = runtimeConfig.public.__nuxtToastflow ?? {};
5
- nuxtApp.vueApp.use(createToastflow(toastflowConfig));
6
- return {
7
- provide: {
8
- toast
9
- }
10
- };
11
- });
package/dist/types.d.mts DELETED
@@ -1,9 +0,0 @@
1
- import type { ModulePublicRuntimeConfig } from './module.mjs'
2
-
3
- declare module '@nuxt/schema' {
4
- interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
5
- }
6
-
7
- export { default } from './module.mjs'
8
-
9
- export { type ModuleOptions, type ModulePublicRuntimeConfig, type NuxtToastflowOptions } from './module.mjs'