File tree Expand file tree Collapse file tree 11 files changed +13
-20
lines changed
storage/framework/core/components Expand file tree Collapse file tree 11 files changed +13
-20
lines changed Original file line number Diff line number Diff line change 36
36
"dependencies" : {
37
37
"@stacksjs/ui" : " workspace:*" ,
38
38
"highlight.js" : " ^11.10.0" ,
39
- "vue" : " ^3.4.38" ,
40
- "vue-sonner" : " ^1.1.4"
39
+ "vue" : " ^3.4.38"
41
40
},
42
41
"devDependencies" : {
43
42
"@microsoft/api-extractor" : " ^7.47.7" ,
Original file line number Diff line number Diff line change 36
36
"dependencies" : {
37
37
"@stacksjs/ui" : " workspace:*" ,
38
38
"highlight.js" : " ^11.10.0" ,
39
- "vue" : " ^3.4.38" ,
40
- "vue-sonner" : " ^1.1.4"
39
+ "vue" : " ^3.4.38"
41
40
},
42
41
"devDependencies" : {
43
42
"@microsoft/api-extractor" : " ^7.47.7" ,
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ const pointerStartRef = ref<{ x: number; y: number } | null>(null)
59
59
const coords = computed (() => props .position .split (' -' ))
60
60
const y = computed (() => coords .value [0 ])
61
61
const x = computed (() => coords .value [1 ])
62
- const isStringOfTitle = typeof props .toast .title !== ' string'
63
- const isStringOfDescription = typeof props .toast .description !== ' string'
62
+ const isStringOfTitle = computed (() => typeof props .toast .title !== ' string' )
63
+ const isStringOfDescription = computed (() => typeof props .toast .description !== ' string' )
64
64
65
65
const toastsHeightBefore = computed (() => {
66
66
return props .heights .reduce ((prev , curr , reducerIndex ) => {
@@ -110,8 +110,6 @@ function deleteToast() {
110
110
// Save the offset for the exit swipe animation
111
111
removed .value = true
112
112
offsetBeforeRemove .value = offset .value
113
- const newHeights = props .heights .filter ((height ) => height .toastId !== props .toast .id )
114
- emit (' update:heights' , newHeights )
115
113
116
114
setTimeout (() => {
117
115
emit (' removeToast' , props .toast )
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ const isFocusWithinRef = ref(false)
90
90
const hotkeyLabel = props .hotkey .join (' +' ).replace (/ Key/ g , ' ' ).replace (/ Digit/ g , ' ' )
91
91
92
92
function removeToast(toast : ToastT ) {
93
+ heights .value = heights .value .filter (({ toastId }) => toastId !== toast .id )
93
94
toasts .value = toasts .value .filter (({ id }) => id !== toast .id )
94
95
}
95
96
Original file line number Diff line number Diff line change 36
36
"dependencies" : {
37
37
"@stacksjs/ui" : " workspace:*" ,
38
38
"highlight.js" : " ^11.10.0" ,
39
- "vue" : " ^3.4.38" ,
40
- "vue-sonner" : " ^1.1.4"
39
+ "vue" : " ^3.4.38"
41
40
},
42
41
"devDependencies" : {
43
42
"@microsoft/api-extractor" : " ^7.47.7" ,
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ const pointerStartRef = ref<{ x: number; y: number } | null>(null)
59
59
const coords = computed (() => props .position .split (' -' ))
60
60
const y = computed (() => coords .value [0 ])
61
61
const x = computed (() => coords .value [1 ])
62
- const isStringOfTitle = typeof props .toast .title !== ' string'
63
- const isStringOfDescription = typeof props .toast .description !== ' string'
62
+ const isStringOfTitle = computed (() => typeof props .toast .title !== ' string' )
63
+ const isStringOfDescription = computed (() => typeof props .toast .description !== ' string' )
64
64
65
65
const toastsHeightBefore = computed (() => {
66
66
return props .heights .reduce ((prev , curr , reducerIndex ) => {
@@ -110,8 +110,6 @@ function deleteToast() {
110
110
// Save the offset for the exit swipe animation
111
111
removed .value = true
112
112
offsetBeforeRemove .value = offset .value
113
- const newHeights = props .heights .filter ((height ) => height .toastId !== props .toast .id )
114
- emit (' update:heights' , newHeights )
115
113
116
114
setTimeout (() => {
117
115
emit (' removeToast' , props .toast )
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ const isFocusWithinRef = ref(false)
90
90
const hotkeyLabel = props .hotkey .join (' +' ).replace (/ Key/ g , ' ' ).replace (/ Digit/ g , ' ' )
91
91
92
92
function removeToast(toast : ToastT ) {
93
+ heights .value = heights .value .filter (({ toastId }) => toastId !== toast .id )
93
94
toasts .value = toasts .value .filter (({ id }) => id !== toast .id )
94
95
}
95
96
Original file line number Diff line number Diff line change 36
36
"dependencies" : {
37
37
"@stacksjs/ui" : " workspace:*" ,
38
38
"highlight.js" : " ^11.10.0" ,
39
- "vue" : " ^3.4.38" ,
40
- "vue-sonner" : " ^1.1.4"
39
+ "vue" : " ^3.4.38"
41
40
},
42
41
"devDependencies" : {
43
42
"@microsoft/api-extractor" : " ^7.47.7" ,
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ const pointerStartRef = ref<{ x: number; y: number } | null>(null)
59
59
const coords = computed (() => props .position .split (' -' ))
60
60
const y = computed (() => coords .value [0 ])
61
61
const x = computed (() => coords .value [1 ])
62
- const isStringOfTitle = typeof props .toast .title !== ' string'
63
- const isStringOfDescription = typeof props .toast .description !== ' string'
62
+ const isStringOfTitle = computed (() => typeof props .toast .title !== ' string' )
63
+ const isStringOfDescription = computed (() => typeof props .toast .description !== ' string' )
64
64
65
65
const toastsHeightBefore = computed (() => {
66
66
return props .heights .reduce ((prev , curr , reducerIndex ) => {
@@ -112,8 +112,6 @@ function deleteToast() {
112
112
// Save the offset for the exit swipe animation
113
113
removed .value = true
114
114
offsetBeforeRemove .value = offset .value
115
- const newHeights = props .heights .filter ((height ) => height .toastId !== props .toast .id )
116
- emit (' update:heights' , newHeights )
117
115
118
116
setTimeout (() => {
119
117
emit (' removeToast' , props .toast )
You can’t perform that action at this time.
0 commit comments