@classic-homes/notifications 1.22.2 → 1.27.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/dist/index.js +5 -0
- package/dist/svelte/index.js +5 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -668,6 +668,11 @@ var NotificationStore = class {
|
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
670
|
var notificationStore = new NotificationStore();
|
|
671
|
+
if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
|
|
672
|
+
for (const event of ["auth:logout", "auth:session-expired"]) {
|
|
673
|
+
window.addEventListener(event, () => notificationStore.reset());
|
|
674
|
+
}
|
|
675
|
+
}
|
|
671
676
|
var unreadCount = {
|
|
672
677
|
subscribe: (subscriber) => {
|
|
673
678
|
return notificationStore.subscribe((state) => subscriber(state.unreadCount));
|
package/dist/svelte/index.js
CHANGED
|
@@ -440,6 +440,11 @@ var NotificationStore = class {
|
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
442
|
var notificationStore = new NotificationStore();
|
|
443
|
+
if (typeof window !== "undefined" && typeof window.addEventListener === "function") {
|
|
444
|
+
for (const event of ["auth:logout", "auth:session-expired"]) {
|
|
445
|
+
window.addEventListener(event, () => notificationStore.reset());
|
|
446
|
+
}
|
|
447
|
+
}
|
|
443
448
|
var unreadCount = {
|
|
444
449
|
subscribe: (subscriber) => {
|
|
445
450
|
return notificationStore.subscribe((state) => subscriber(state.unreadCount));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classic-homes/notifications",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "Notification services and Svelte bindings for Classic Theme apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@classic-homes/auth": "^1.
|
|
50
|
+
"@classic-homes/auth": "^1.27.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"svelte": "^5.0.0"
|