@saasmakers/ui 2.0.45 → 2.0.46

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.
@@ -74,6 +74,7 @@ export default function useToast() {
74
74
  }
75
75
 
76
76
  toasts.value.push(toast)
77
+
77
78
  scheduleDismiss(toast.id, {
78
79
  durationMs: params.durationMs,
79
80
  hasAction: !!params.action,
@@ -106,6 +107,17 @@ function closeToast(toastId: string) {
106
107
  toasts.value = toasts.value.filter(item => item.id !== toastId)
107
108
  }
108
109
 
110
+ function getDismissDuration(params: {
111
+ durationMs?: number
112
+ hasAction: boolean
113
+ }): number {
114
+ if (params.durationMs !== undefined) {
115
+ return params.durationMs
116
+ }
117
+
118
+ return (params.hasAction ? 8 : 5) * 1000
119
+ }
120
+
109
121
  function getFingerprint(params: {
110
122
  actionLabel?: BaseTextText
111
123
  emoji?: string
@@ -130,17 +142,6 @@ function getFingerprint(params: {
130
142
  return parts.join(':')
131
143
  }
132
144
 
133
- function getDismissDuration(params: {
134
- durationMs?: number
135
- hasAction: boolean
136
- }): number {
137
- if (params.durationMs !== undefined) {
138
- return params.durationMs
139
- }
140
-
141
- return (params.hasAction ? 8 : 5) * 1000
142
- }
143
-
144
145
  function scheduleDismiss(toastId: string, params: {
145
146
  durationMs?: number
146
147
  hasAction: boolean
package/nuxt.config.ts CHANGED
@@ -140,13 +140,6 @@ export default defineNuxtConfig({
140
140
  },
141
141
 
142
142
  unocss: {
143
- content: {
144
- // Force consumers to scan layer classes even when resolved from node_modules,
145
- // otherwise transition utilities used only here are purged during their prod build.
146
- filesystem: [
147
- path.join(currentDir, 'app/**/*.{vue,ts}'),
148
- ],
149
- },
150
143
  nuxtLayers: true,
151
144
  presets: uno.presets,
152
145
  rules: uno.rules,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.45",
3
+ "version": "2.0.46",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",