@ttt-productions/notification-core 0.15.8 → 0.15.10

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.
Files changed (55) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/react/components/NotificationHistoryList.d.ts +3 -3
  5. package/dist/react/components/NotificationHistoryList.d.ts.map +1 -1
  6. package/dist/react/components/NotificationHistoryList.js +23 -10
  7. package/dist/react/components/NotificationHistoryList.js.map +1 -1
  8. package/dist/react/components/NotificationList.d.ts +1 -1
  9. package/dist/react/components/NotificationList.d.ts.map +1 -1
  10. package/dist/react/components/NotificationList.js +105 -26
  11. package/dist/react/components/NotificationList.js.map +1 -1
  12. package/dist/react/components/NotificationUnreadBadge.d.ts +1 -1
  13. package/dist/react/components/NotificationUnreadBadge.d.ts.map +1 -1
  14. package/dist/react/components/NotificationUnreadBadge.js +2 -1
  15. package/dist/react/components/NotificationUnreadBadge.js.map +1 -1
  16. package/dist/react/components/notification-type-icon.d.ts +11 -0
  17. package/dist/react/components/notification-type-icon.d.ts.map +1 -0
  18. package/dist/react/components/notification-type-icon.js +12 -0
  19. package/dist/react/components/notification-type-icon.js.map +1 -0
  20. package/dist/react/hooks/useActiveNotifications.d.ts +3 -3
  21. package/dist/react/hooks/useActiveNotifications.d.ts.map +1 -1
  22. package/dist/react/hooks/useActiveNotifications.js +8 -5
  23. package/dist/react/hooks/useActiveNotifications.js.map +1 -1
  24. package/dist/react/hooks/useArchiveAllNotifications.d.ts +1 -1
  25. package/dist/react/hooks/useArchiveAllNotifications.d.ts.map +1 -1
  26. package/dist/react/hooks/useArchiveAllNotifications.js +3 -7
  27. package/dist/react/hooks/useArchiveAllNotifications.js.map +1 -1
  28. package/dist/react/hooks/useArchiveNotification.d.ts +7 -20
  29. package/dist/react/hooks/useArchiveNotification.d.ts.map +1 -1
  30. package/dist/react/hooks/useArchiveNotification.js +9 -26
  31. package/dist/react/hooks/useArchiveNotification.js.map +1 -1
  32. package/dist/react/hooks/useNotificationHistory.d.ts +1 -1
  33. package/dist/react/hooks/useNotificationHistory.d.ts.map +1 -1
  34. package/dist/react/hooks/useNotificationHistory.js +3 -2
  35. package/dist/react/hooks/useNotificationHistory.js.map +1 -1
  36. package/dist/react/hooks/useUnreadCount.d.ts +10 -2
  37. package/dist/react/hooks/useUnreadCount.d.ts.map +1 -1
  38. package/dist/react/hooks/useUnreadCount.js +16 -6
  39. package/dist/react/hooks/useUnreadCount.js.map +1 -1
  40. package/dist/react/query-keys.d.ts +5 -0
  41. package/dist/react/query-keys.d.ts.map +1 -0
  42. package/dist/react/query-keys.js +15 -0
  43. package/dist/react/query-keys.js.map +1 -0
  44. package/dist/server/delivery-ledger.d.ts +34 -5
  45. package/dist/server/delivery-ledger.d.ts.map +1 -1
  46. package/dist/server/delivery-ledger.js +24 -5
  47. package/dist/server/delivery-ledger.js.map +1 -1
  48. package/dist/server/index.d.ts +1 -1
  49. package/dist/server/index.d.ts.map +1 -1
  50. package/dist/server/index.js.map +1 -1
  51. package/dist/types.d.ts +123 -18
  52. package/dist/types.d.ts.map +1 -1
  53. package/dist/types.js.map +1 -1
  54. package/package.json +5 -5
  55. package/src/styles/notifications.css +10 -33
@@ -62,14 +62,16 @@
62
62
  }
63
63
 
64
64
  /* === NOTIFICATION ITEM === */
65
+ /* The row itself is inert — every affordance is a control in its action slot — so it wears no
66
+ * pointer cursor. Its hover tint helps the eye along a long list; it moves on theme-core's motion
67
+ * tokens, so an app's reduced-motion kill switch covers it. */
65
68
  .ntf-item {
66
69
  display: flex;
67
70
  align-items: flex-start;
68
71
  gap: 0.75rem;
69
72
  padding: 0.75rem 1rem;
70
- cursor: pointer;
71
73
  border-bottom: 1px solid hsl(var(--border) / 0.5);
72
- transition: background-color 150ms ease;
74
+ transition: background-color var(--motion-fast) var(--motion-ease);
73
75
  }
74
76
 
75
77
  .ntf-item:hover {
@@ -125,11 +127,13 @@
125
127
  align-self: center;
126
128
  }
127
129
 
128
- /* Sibling action slot next to the archive control — consumer-supplied via
129
- * `renderRowAction`. Purely a layout/isolation wrapper; the consumer's node
130
- * supplies its own visual treatment. */
130
+ /* The consumer's controls from `renderRowAction`. The slot may shrink beside the row's copy, up
131
+ * to half the row, so long control content (a subject link) clips inside it rather than widening
132
+ * the row; the consumer's node supplies its own visual treatment. */
131
133
  .ntf-item-row-action {
132
- flex-shrink: 0;
134
+ flex-shrink: 1;
135
+ min-width: 0;
136
+ max-width: 50%;
133
137
  align-self: center;
134
138
  }
135
139
 
@@ -168,33 +172,6 @@
168
172
  color: hsl(var(--destructive-foreground));
169
173
  }
170
174
 
171
- .ntf-badge--hidden {
172
- display: none;
173
- }
174
-
175
- /* === HISTORY LIST === */
176
- .ntf-history-item {
177
- display: flex;
178
- align-items: flex-start;
179
- gap: 0.75rem;
180
- padding: 0.75rem 1rem;
181
- border-bottom: 1px solid hsl(var(--border) / 0.5);
182
- opacity: 0.7;
183
- }
184
-
185
- .ntf-history-item:last-child {
186
- border-bottom: none;
187
- }
188
-
189
- .ntf-history-item--clickable {
190
- cursor: pointer;
191
- transition: opacity 150ms ease;
192
- }
193
-
194
- .ntf-history-item--clickable:hover {
195
- opacity: 1;
196
- }
197
-
198
175
  /* === LOADING STATE === */
199
176
  .ntf-loading {
200
177
  display: flex;