sit-onyx 1.0.1-dev-20250923054646 → 1.1.0-dev-20250923063132
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.
|
@@ -8,8 +8,9 @@ export type NotificationsProvider = {
|
|
|
8
8
|
notifications: ComputedRef<ProvidedNotification[]>;
|
|
9
9
|
/**
|
|
10
10
|
* Shows a single notification.
|
|
11
|
+
* @returns the id of the newly created notification.
|
|
11
12
|
*/
|
|
12
|
-
show: (notification: ShowNotificationOptions) =>
|
|
13
|
+
show: (notification: ShowNotificationOptions) => number;
|
|
13
14
|
/**
|
|
14
15
|
* Removes the notification with the given `id`.
|
|
15
16
|
*/
|
|
@@ -2961,6 +2961,7 @@ const createNotificationsProvider = () => {
|
|
|
2961
2961
|
id,
|
|
2962
2962
|
onClose: () => remove(id)
|
|
2963
2963
|
});
|
|
2964
|
+
return id;
|
|
2964
2965
|
};
|
|
2965
2966
|
const remove = (id) => {
|
|
2966
2967
|
notifications.value = notifications.value.filter((notification) => notification.id !== id);
|
|
@@ -2982,7 +2983,10 @@ const useNotification = () => {
|
|
|
2982
2983
|
() => {
|
|
2983
2984
|
return {
|
|
2984
2985
|
notifications: computed(() => []),
|
|
2985
|
-
show:
|
|
2986
|
+
show: () => {
|
|
2987
|
+
logWarning();
|
|
2988
|
+
return -1;
|
|
2989
|
+
},
|
|
2986
2990
|
remove: logWarning
|
|
2987
2991
|
};
|
|
2988
2992
|
},
|