@classic-homes/notifications 0.1.52 → 0.1.55

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.
@@ -1,5 +1,5 @@
1
- import { d as NotificationListParams, c as NotificationsListResponse, b as Notification, k as ChannelsResponse, N as NotificationType, P as PreferencesResponse, U as UpdatePreferenceData, l as UpdatePreferenceResponse, B as BatchPreferenceUpdate, j as BulkPreferenceResponse, D as DeletePreferenceResponse, T as TestNotificationParams, m as TestNotificationResponse, e as NotificationChannel, g as NotificationPreference, a as NotificationPriority } from '../types-BSztr7EQ.js';
2
- export { C as ChannelType, i as NotificationError, f as NotificationFrequency, h as NotificationPreferenceResult } from '../types-BSztr7EQ.js';
1
+ import { f as NotificationListParams, k as NotificationsListResponse, N as Notification, b as ChannelsResponse, j as NotificationType, P as PreferencesResponse, U as UpdatePreferenceData, m as UpdatePreferenceResponse, B as BatchPreferenceUpdate, a as BulkPreferenceResponse, D as DeletePreferenceResponse, T as TestNotificationParams, l as TestNotificationResponse, c as NotificationChannel, g as NotificationPreference, i as NotificationPriority } from '../types-1JHyPeBO.js';
2
+ export { C as ChannelType, d as NotificationError, e as NotificationFrequency, h as NotificationPreferenceResult } from '../types-1JHyPeBO.js';
3
3
 
4
4
  /**
5
5
  * Notifications API
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { BadgeVariant, NotificationCounts, NotificationFilter, NotificationService, formatFullTimestamp, formatNotificationTime, formatRelativeTime, getNotificationIconColor, getNotificationIconName, getPriorityBadgeVariant, getPriorityLabel, getPrioritySortValue, getTypeBadgeVariant, getTypeLabel, notificationService, notificationsApi } from './core/index.js';
2
- export { B as BatchPreferenceUpdate, j as BulkPreferenceResponse, C as ChannelType, k as ChannelsResponse, D as DeletePreferenceResponse, b as Notification, e as NotificationChannel, i as NotificationError, f as NotificationFrequency, d as NotificationListParams, g as NotificationPreference, h as NotificationPreferenceResult, a as NotificationPriority, N as NotificationType, c as NotificationsListResponse, P as PreferencesResponse, T as TestNotificationParams, m as TestNotificationResponse, U as UpdatePreferenceData, l as UpdatePreferenceResponse } from './types-BSztr7EQ.js';
2
+ export { B as BatchPreferenceUpdate, a as BulkPreferenceResponse, C as ChannelType, b as ChannelsResponse, D as DeletePreferenceResponse, N as Notification, c as NotificationChannel, d as NotificationError, e as NotificationFrequency, f as NotificationListParams, g as NotificationPreference, h as NotificationPreferenceResult, i as NotificationPriority, j as NotificationType, k as NotificationsListResponse, P as PreferencesResponse, T as TestNotificationParams, l as TestNotificationResponse, U as UpdatePreferenceData, m as UpdatePreferenceResponse } from './types-1JHyPeBO.js';
3
3
  export { isLoadingNotifications, notificationStore, notifications, unreadCount } from './svelte/index.js';
package/dist/index.js CHANGED
@@ -408,7 +408,13 @@ var NotificationStore = class {
408
408
  return () => this.subscribers.delete(subscriber);
409
409
  }
410
410
  notify() {
411
- this.subscribers.forEach((sub) => sub(this.state));
411
+ this.subscribers.forEach((sub) => {
412
+ try {
413
+ sub(this.state);
414
+ } catch (e) {
415
+ console.error("Notification store subscriber error:", e);
416
+ }
417
+ });
412
418
  }
413
419
  setState(partial) {
414
420
  this.state = { ...this.state, ...partial };
@@ -1,5 +1,5 @@
1
- import { b as Notification, d as NotificationListParams } from '../types-BSztr7EQ.js';
2
- export { a as NotificationPriority, N as NotificationType } from '../types-BSztr7EQ.js';
1
+ import { N as Notification, f as NotificationListParams } from '../types-1JHyPeBO.js';
2
+ export { i as NotificationPriority, j as NotificationType } from '../types-1JHyPeBO.js';
3
3
 
4
4
  /**
5
5
  * Notifications Store
@@ -180,7 +180,13 @@ var NotificationStore = class {
180
180
  return () => this.subscribers.delete(subscriber);
181
181
  }
182
182
  notify() {
183
- this.subscribers.forEach((sub) => sub(this.state));
183
+ this.subscribers.forEach((sub) => {
184
+ try {
185
+ sub(this.state);
186
+ } catch (e) {
187
+ console.error("Notification store subscriber error:", e);
188
+ }
189
+ });
184
190
  }
185
191
  setState(partial) {
186
192
  this.state = { ...this.state, ...partial };
@@ -138,4 +138,4 @@ interface TestNotificationResponse {
138
138
  };
139
139
  }
140
140
 
141
- export type { BatchPreferenceUpdate as B, ChannelType as C, DeletePreferenceResponse as D, NotificationType as N, PreferencesResponse as P, TestNotificationParams as T, UpdatePreferenceData as U, NotificationPriority as a, Notification as b, NotificationsListResponse as c, NotificationListParams as d, NotificationChannel as e, NotificationFrequency as f, NotificationPreference as g, NotificationPreferenceResult as h, NotificationError as i, BulkPreferenceResponse as j, ChannelsResponse as k, UpdatePreferenceResponse as l, TestNotificationResponse as m };
141
+ export type { BatchPreferenceUpdate as B, ChannelType as C, DeletePreferenceResponse as D, Notification as N, PreferencesResponse as P, TestNotificationParams as T, UpdatePreferenceData as U, BulkPreferenceResponse as a, ChannelsResponse as b, NotificationChannel as c, NotificationError as d, NotificationFrequency as e, NotificationListParams as f, NotificationPreference as g, NotificationPreferenceResult as h, NotificationPriority as i, NotificationType as j, NotificationsListResponse as k, TestNotificationResponse as l, UpdatePreferenceResponse as m };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/notifications",
3
- "version": "0.1.52",
3
+ "version": "0.1.55",
4
4
  "description": "Notification services and Svelte bindings for Classic Theme apps",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "scripts": {
28
28
  "build": "tsup",
29
29
  "dev": "tsup --watch",
30
- "clean": "rm -rf dist",
30
+ "clean": "node ../../scripts/rm.mjs dist",
31
31
  "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "keywords": [