File tree Expand file tree Collapse file tree 3 files changed +15
-16
lines changed Expand file tree Collapse file tree 3 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ export {}
7
7
/* prettier-ignore */
8
8
declare module 'vue' {
9
9
export interface GlobalComponents {
10
- 'Carbon:cafe' : typeof import ( '~icons/carbon/cafe' ) [ 'default' ]
11
- 'Carbon:logoTwitter' : typeof import ( '~icons/carbon/logo-twitter' ) [ 'default' ]
12
10
CheckIcon : typeof import ( './src/components/icons/CheckIcon.vue' ) [ 'default' ]
13
11
CopyIcon : typeof import ( './src/components/icons/CopyIcon.vue' ) [ 'default' ]
14
12
Expand : typeof import ( './src/components/Expand.vue' ) [ 'default' ]
@@ -17,7 +15,6 @@ declare module 'vue' {
17
15
HeadlessToastWithProps : typeof import ( './src/components/HeadlessToastWithProps.vue' ) [ 'default' ]
18
16
Hero : typeof import ( './src/components/Hero.vue' ) [ 'default' ]
19
17
Installation : typeof import ( './src/components/Installation.vue' ) [ 'default' ]
20
- 'Mdi:heart' : typeof import ( '~icons/mdi/heart' ) [ 'default' ]
21
18
Others : typeof import ( './src/components/Others.vue' ) [ 'default' ]
22
19
Position : typeof import ( './src/components/Position.vue' ) [ 'default' ]
23
20
Styling : typeof import ( './src/components/Styling.vue' ) [ 'default' ]
Original file line number Diff line number Diff line change 1
- import { ref , watchEffect } from 'vue'
1
+ import { ref , watchEffect , type Ref } from 'vue'
2
2
import type { ToastT } from './types'
3
3
import { ToastState } from './state'
4
4
@@ -18,7 +18,9 @@ export function useIsDocumentHidden() {
18
18
}
19
19
}
20
20
21
- export function useVueSonner ( ) {
21
+ export function useVueSonner ( ) : {
22
+ activeToasts : Ref < ToastT [ ] >
23
+ } {
22
24
const activeToasts = ref < ToastT [ ] > ( [ ] )
23
25
24
26
watchEffect ( ( onInvalidate ) => {
Original file line number Diff line number Diff line change @@ -47,14 +47,14 @@ export default defineConfig(({ command, mode }) => {
47
47
output : [
48
48
{
49
49
format : 'cjs' ,
50
- entryFileNames : `vue-sonner.cjs` ,
50
+ entryFileNames : `vue-sonner.cjs`
51
51
} ,
52
52
{
53
53
format : 'es' ,
54
54
entryFileNames : `vue-sonner.js` ,
55
55
preserveModules : false
56
- } ,
57
- ] ,
56
+ }
57
+ ]
58
58
}
59
59
}
60
60
userConfig . plugins = [
@@ -63,18 +63,18 @@ export default defineConfig(({ command, mode }) => {
63
63
name : 'inline-css' ,
64
64
transform ( code , id ) {
65
65
const isCSS = ( path : string ) => / \. c s s $ / . test ( path )
66
- if ( ! isCSS ( id ) ) return
66
+ if ( ! isCSS ( id ) ) return
67
67
68
68
const cssCode = minify ( code )
69
69
cssCodeStr = cssCode
70
70
return {
71
71
code : '' ,
72
- map : { mappings : '' } ,
72
+ map : { mappings : '' }
73
73
}
74
74
} ,
75
75
renderChunk ( code , { isEntry } ) {
76
- if ( ! isEntry ) return
77
-
76
+ if ( ! isEntry ) return
77
+
78
78
return {
79
79
code : `\
80
80
function __insertCSSVueSonner(code) {
@@ -87,18 +87,18 @@ export default defineConfig(({ command, mode }) => {
87
87
}\n
88
88
__insertCSSVueSonner(${ JSON . stringify ( cssCodeStr ) } )
89
89
\n ${ code } ` ,
90
- map : { mappings : '' } ,
90
+ map : { mappings : '' }
91
91
}
92
- } ,
93
- } ,
92
+ }
93
+ }
94
94
]
95
95
}
96
96
97
97
return {
98
98
resolve : {
99
99
alias : {
100
100
'@' : fileURLToPath ( new URL ( './packages' , import . meta. url ) ) ,
101
- '~' : fileURLToPath ( new URL ( './src' , import . meta. url ) ) ,
101
+ '~' : fileURLToPath ( new URL ( './src' , import . meta. url ) )
102
102
}
103
103
} ,
104
104
plugins : [ ...commonPlugins ] ,
You can’t perform that action at this time.
0 commit comments