@vokril/ui-solid 0.27.1 → 0.29.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.
Files changed (206) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +36 -1
  3. package/dist/{AttributeGrid-XTVaiwLe.js → AttributeGrid-CASILa4u.js} +3 -3
  4. package/dist/{AttributeGrid-Qzt5LYnu.cjs → AttributeGrid-eND8YDby.cjs} +1 -1
  5. package/dist/{Button-U95Tz8F5.cjs → Button-Bb68ymNP.cjs} +1 -1
  6. package/dist/{Button-qtxB2SYf.js → Button-D-T0tyGF.js} +1 -1
  7. package/dist/CommandPalette-5FQRgPG9.cjs +2 -0
  8. package/dist/CommandPalette-Cj618AOz.js +4017 -0
  9. package/dist/{CopyButton-CsM8UeX5.cjs → CopyButton-B5gS2ft3.cjs} +1 -1
  10. package/dist/{CopyButton-NfxWzVHT.js → CopyButton-g-WSiBDZ.js} +1 -1
  11. package/dist/{DateRangePicker-C8IVJRT2.js → DateRangePicker-CJD9ADgB.js} +3 -3
  12. package/dist/{DateRangePicker-BKHxyHL4.cjs → DateRangePicker-Frc0HVxp.cjs} +1 -1
  13. package/dist/{GuidedTour-B61cbsdy.cjs → GuidedTour-B6q7lYhn.cjs} +1 -1
  14. package/dist/{GuidedTour-Dj41FCdE.js → GuidedTour-CFCvRJN4.js} +3 -3
  15. package/dist/{IconPicker-BZCQG8SO.cjs → IconPicker-CIbJb1ei.cjs} +1 -1
  16. package/dist/{IconPicker-DC9E35Ou.js → IconPicker-DYqNi5ud.js} +3 -3
  17. package/dist/{Modal-CaurOG_K.cjs → Modal-CY6ePolt.cjs} +1 -1
  18. package/dist/{Modal-DJpQqqTJ.js → Modal-NzZzHSwb.js} +2 -2
  19. package/dist/{PageSkeleton-DICmahMs.cjs → PageSkeleton-BPbb28-H.cjs} +1 -1
  20. package/dist/{PageSkeleton-C0eVQO20.js → PageSkeleton-CLnJO6uD.js} +3 -3
  21. package/dist/{SearchableSelect-DayP1Qs6.js → SearchableSelect-BvCm4enQ.js} +2 -2
  22. package/dist/{SearchableSelect-ClrAX2hK.cjs → SearchableSelect-CVqdVMOC.cjs} +1 -1
  23. package/dist/{StatusBarNotificationBell-BRnCKU72.js → StatusBarNotificationBell-7Izs_msz.js} +4936 -4585
  24. package/dist/StatusBarNotificationBell-BJiORN4s.cjs +50 -0
  25. package/dist/{Stepper-DTuchuOX.cjs → Stepper-Ci5JpLbS.cjs} +1 -1
  26. package/dist/{Stepper-aiuAdbkl.js → Stepper-D9i1Xclm.js} +1 -1
  27. package/dist/{TimeSeriesChart-SHx_cp8y.js → TimeSeriesChart-DOwi2lJs.js} +1 -1
  28. package/dist/{TimeSeriesChart-CvU0lxar.cjs → TimeSeriesChart-huvheefm.cjs} +1 -1
  29. package/dist/{ToggleButton-BcHNAGPy.cjs → ToggleButton-BFWh1_o5.cjs} +1 -1
  30. package/dist/{ToggleButton-BhP17bvW.js → ToggleButton-CFM8P3JY.js} +4 -4
  31. package/dist/_internal/contract/browser/workspace.d.cts +4 -0
  32. package/dist/_internal/contract/browser/workspace.d.ts +4 -0
  33. package/dist/_internal/contract/notification.d.cts +64 -4
  34. package/dist/_internal/contract/notification.d.ts +64 -4
  35. package/dist/_internal/contract/notificationCatalog.d.cts +7 -1
  36. package/dist/_internal/contract/notificationCatalog.d.ts +7 -1
  37. package/dist/charts/index.cjs +1 -1
  38. package/dist/charts/index.js +1 -1
  39. package/dist/{createDialogShellFocus-Vv3hhW-I.js → createDialogShellFocus-B4piXDU4.js} +1 -1
  40. package/dist/{createDialogShellFocus-CsrZ2GDZ.cjs → createDialogShellFocus-CJaw9-B9.cjs} +1 -1
  41. package/dist/{createResizableSidebar-DnHgvr7P.js → createResizableSidebar-BDUlX9-G.js} +3 -3
  42. package/dist/{createResizableSidebar-CeksJQ9Q.cjs → createResizableSidebar-BVJBU2kP.cjs} +1 -1
  43. package/dist/de-BqFZ0Ac8.cjs +1 -0
  44. package/dist/{server/de-CEltsqV5.js → de-q3NXnC0J.js} +27 -25
  45. package/dist/desktop/index.cjs +1 -1
  46. package/dist/desktop/index.js +1 -1
  47. package/dist/feedback/index.cjs +1 -1
  48. package/dist/feedback/index.js +2 -2
  49. package/dist/forms/index.cjs +1 -1
  50. package/dist/forms/index.js +7 -7
  51. package/dist/grid/index.cjs +1 -1
  52. package/dist/grid/index.js +1 -1
  53. package/dist/host/index.cjs +1 -1
  54. package/dist/host/index.js +1 -1
  55. package/dist/i18n/index.cjs +1 -1
  56. package/dist/i18n/index.js +1 -1
  57. package/dist/i18n/messageKeys.d.cts +1 -1
  58. package/dist/i18n/messageKeys.d.ts +1 -1
  59. package/dist/{i18n-DW9kcu0G.js → i18n-CBlUGOyu.js} +2 -2
  60. package/dist/{server/i18n-DZ0JlZal.cjs → i18n-D3s-a2a0.cjs} +1 -1
  61. package/dist/index.cjs +1 -1
  62. package/dist/index.js +250 -246
  63. package/dist/layout/index.cjs +1 -1
  64. package/dist/layout/index.js +2 -2
  65. package/dist/navigation/index.cjs +1 -1
  66. package/dist/navigation/index.js +1 -1
  67. package/dist/notifications/NotificationItem.d.cts +15 -1
  68. package/dist/notifications/NotificationItem.d.ts +15 -1
  69. package/dist/notifications/RunningProgressCards.d.cts +20 -0
  70. package/dist/notifications/RunningProgressCards.d.ts +20 -0
  71. package/dist/notifications/StatusBarNotificationBell.d.cts +29 -5
  72. package/dist/notifications/StatusBarNotificationBell.d.ts +29 -5
  73. package/dist/notifications/createNotificationPreviewRuntime.d.cts +2 -2
  74. package/dist/notifications/createNotificationPreviewRuntime.d.ts +2 -2
  75. package/dist/notifications/dismissableToastIds.d.cts +5 -1
  76. package/dist/notifications/dismissableToastIds.d.ts +5 -1
  77. package/dist/notifications/fireNotification.d.cts +33 -1
  78. package/dist/notifications/fireNotification.d.ts +33 -1
  79. package/dist/notifications/index.cjs +1 -1
  80. package/dist/notifications/index.d.cts +1 -1
  81. package/dist/notifications/index.d.ts +1 -1
  82. package/dist/notifications/index.js +49 -45
  83. package/dist/notifications/nativeEngine.d.cts +125 -5
  84. package/dist/notifications/nativeEngine.d.ts +125 -5
  85. package/dist/notifications/notificationCardServices.d.cts +5 -1
  86. package/dist/notifications/notificationCardServices.d.ts +5 -1
  87. package/dist/notifications/notificationCommands.d.cts +16 -4
  88. package/dist/notifications/notificationCommands.d.ts +16 -4
  89. package/dist/notifications/notificationOverlaySnapshot.d.cts +1 -0
  90. package/dist/notifications/notificationOverlaySnapshot.d.ts +1 -0
  91. package/dist/notifications/notificationService.d.cts +36 -1
  92. package/dist/notifications/notificationService.d.ts +36 -1
  93. package/dist/notifications/quietHours.d.cts +10 -0
  94. package/dist/notifications/quietHours.d.ts +10 -0
  95. package/dist/notifications/toast.d.cts +32 -1
  96. package/dist/notifications/toast.d.ts +32 -1
  97. package/dist/overlay/ConfirmDialog.d.cts +68 -2
  98. package/dist/overlay/ConfirmDialog.d.ts +68 -2
  99. package/dist/overlay/index.cjs +1 -1
  100. package/dist/overlay/index.js +4 -4
  101. package/dist/{rowSource-C43bEUD4.js → rowSource-D__7o4h0.js} +1 -1
  102. package/dist/{rowSource-Dg-jndEu.cjs → rowSource-DiwTu_r8.cjs} +1 -1
  103. package/dist/server/{AttributeGrid-C_CvCXpC.cjs → AttributeGrid-B7sb3btp.cjs} +1 -1
  104. package/dist/server/{AttributeGrid-D8QYVZDq.js → AttributeGrid-CMi-UtWb.js} +3 -3
  105. package/dist/server/{Button-VKl-_GaO.cjs → Button-0AXWRw9Q.cjs} +1 -1
  106. package/dist/server/{Button-BPNNFcHc.js → Button-3yNrnn4P.js} +1 -1
  107. package/dist/server/{CommandPalette-COVjWlx9.js → CommandPalette-CozogFlk.js} +980 -947
  108. package/dist/server/CommandPalette-DQK6N98N.cjs +1 -0
  109. package/dist/server/{CopyButton-HDffWzaN.js → CopyButton-B6xd9Z6j.js} +1 -1
  110. package/dist/server/{CopyButton-rWDnbTBF.cjs → CopyButton-D8IN6Vnd.cjs} +1 -1
  111. package/dist/server/{DateRangePicker-Dl3zr-PD.js → DateRangePicker-C35q8BTw.js} +2 -2
  112. package/dist/server/{DateRangePicker-Dq0HGz27.cjs → DateRangePicker-KLZzyuPJ.cjs} +1 -1
  113. package/dist/server/{GuidedTour-BoPGRyX5.cjs → GuidedTour-DfV0yzqh.cjs} +1 -1
  114. package/dist/server/{GuidedTour-CIlHyRcR.js → GuidedTour-DmLbBttx.js} +3 -3
  115. package/dist/server/{IconPicker-BDS92veL.cjs → IconPicker-B1soopAp.cjs} +1 -1
  116. package/dist/server/{IconPicker-CZxYKJOT.js → IconPicker-B4aXspLw.js} +4 -4
  117. package/dist/server/{Modal-j54-C2Md.js → Modal-BheFQLs1.js} +2 -2
  118. package/dist/server/{Modal-CtJFoR96.cjs → Modal-BswxV8Pn.cjs} +1 -1
  119. package/dist/server/{PageSkeleton-B0V43uDV.cjs → PageSkeleton-DBo7hQq-.cjs} +1 -1
  120. package/dist/server/{PageSkeleton-BfGfda9G.js → PageSkeleton-DoxlE_bD.js} +3 -3
  121. package/dist/server/{SearchableSelect-ClQzcYdL.cjs → SearchableSelect-09ECcDlB.cjs} +1 -1
  122. package/dist/server/{SearchableSelect-DtcMC7Xu.js → SearchableSelect-vjhS4c-H.js} +2 -2
  123. package/dist/server/{StatusBarNotificationBell-FFpOkyUk.js → StatusBarNotificationBell-D8Jt3PXI.js} +4869 -4515
  124. package/dist/server/StatusBarNotificationBell-LJHLMT9F.cjs +49 -0
  125. package/dist/server/{Stepper-CCEItuZb.cjs → Stepper-DxNrskdq.cjs} +1 -1
  126. package/dist/server/{Stepper-B7wf8h9G.js → Stepper-n5f9r-ye.js} +1 -1
  127. package/dist/server/{TimeSeriesChart-TsaZS7YU.cjs → TimeSeriesChart-BQVXUFoj.cjs} +1 -1
  128. package/dist/server/{TimeSeriesChart-DjNQiCn_.js → TimeSeriesChart-PAb95s6x.js} +1 -1
  129. package/dist/server/{ToggleButton-CHaIvApv.js → ToggleButton-FywO2CCI.js} +3 -3
  130. package/dist/server/{ToggleButton-D6Tux9wG.cjs → ToggleButton-TE3Xf2yD.cjs} +1 -1
  131. package/dist/server/charts/index.cjs +1 -1
  132. package/dist/server/charts/index.js +1 -1
  133. package/dist/server/{createResizableSidebar-Dn9UMUf_.js → createResizableSidebar-BImbKlLe.js} +3 -3
  134. package/dist/server/{createResizableSidebar-B0NDaq7D.cjs → createResizableSidebar-GFgZIj-5.cjs} +1 -1
  135. package/dist/server/de-BqFZ0Ac8.cjs +1 -0
  136. package/dist/{de-CEltsqV5.js → server/de-q3NXnC0J.js} +27 -25
  137. package/dist/server/desktop/index.cjs +1 -1
  138. package/dist/server/desktop/index.js +1 -1
  139. package/dist/server/feedback/index.cjs +1 -1
  140. package/dist/server/feedback/index.js +2 -2
  141. package/dist/server/forms/index.cjs +1 -1
  142. package/dist/server/forms/index.js +6 -6
  143. package/dist/server/grid/index.cjs +1 -1
  144. package/dist/server/grid/index.js +1 -1
  145. package/dist/server/host/index.cjs +1 -1
  146. package/dist/server/host/index.js +1 -1
  147. package/dist/server/i18n/index.cjs +1 -1
  148. package/dist/server/i18n/index.js +1 -1
  149. package/dist/server/{i18n-DW9kcu0G.js → i18n-CBlUGOyu.js} +2 -2
  150. package/dist/{i18n-DZ0JlZal.cjs → server/i18n-D3s-a2a0.cjs} +1 -1
  151. package/dist/server/{index-BfR3Xipt.cjs → index-2mQPVEDR.cjs} +1 -1
  152. package/dist/server/{index-Wv18Fcu8.js → index-UIjsx3oJ.js} +1 -1
  153. package/dist/server/index.cjs +1 -1
  154. package/dist/server/index.js +183 -179
  155. package/dist/server/layout/index.cjs +1 -1
  156. package/dist/server/layout/index.js +2 -2
  157. package/dist/server/navigation/index.cjs +1 -1
  158. package/dist/server/navigation/index.js +1 -1
  159. package/dist/server/notifications/index.cjs +1 -1
  160. package/dist/server/notifications/index.js +49 -45
  161. package/dist/server/overlay/index.cjs +1 -1
  162. package/dist/server/overlay/index.js +3 -3
  163. package/dist/server/{rowSource-CYYdnUFl.js → rowSource-D-wcDmFU.js} +1 -1
  164. package/dist/server/{rowSource-DoBeEg9N.cjs → rowSource-DltiY0o3.cjs} +1 -1
  165. package/dist/server/{tr-CxuAFkCi.js → tr-C_dUz00P.js} +32 -30
  166. package/dist/server/tr-D7bwe7tl.cjs +1 -0
  167. package/dist/server/tree/index.cjs +1 -1
  168. package/dist/server/tree/index.js +1 -1
  169. package/dist/solid/i18n/locales/de.json +2 -0
  170. package/dist/solid/i18n/locales/tr.json +2 -0
  171. package/dist/solid/notifications/NotificationHost.jsx +5 -14
  172. package/dist/solid/notifications/NotificationItem.jsx +40 -15
  173. package/dist/solid/notifications/NotificationPanel.jsx +8 -3
  174. package/dist/solid/notifications/NotificationsCenter.jsx +4 -1
  175. package/dist/solid/notifications/RunningProgressCards.jsx +29 -0
  176. package/dist/solid/notifications/StatusBarNotificationBell.jsx +42 -18
  177. package/dist/solid/notifications/StatusBarNotificationBell.module.css.js +1 -0
  178. package/dist/solid/notifications/catalogAdapter.js +2 -1
  179. package/dist/solid/notifications/createNotificationPreviewRuntime.js +49 -35
  180. package/dist/solid/notifications/fireNotification.js +53 -27
  181. package/dist/solid/notifications/index.js +1 -1
  182. package/dist/solid/notifications/nativeEngine.js +174 -31
  183. package/dist/solid/notifications/notificationCardServices.js +1 -1
  184. package/dist/solid/notifications/notificationOverlaySnapshot.js +2 -0
  185. package/dist/solid/notifications/notificationOverlaySync.js +1 -0
  186. package/dist/solid/notifications/notificationService.js +48 -0
  187. package/dist/solid/notifications/quietHours.js +18 -0
  188. package/dist/solid/notifications/toast.js +30 -11
  189. package/dist/solid/overlay/ConfirmDialog.jsx +57 -17
  190. package/dist/solid/overlay/ConfirmDialog.module.css.js +1 -0
  191. package/dist/style.css +1 -1
  192. package/dist/{tr-CxuAFkCi.js → tr-C_dUz00P.js} +32 -30
  193. package/dist/tr-D7bwe7tl.cjs +1 -0
  194. package/dist/tree/index.cjs +1 -1
  195. package/dist/tree/index.js +1 -1
  196. package/dist/ui.css +1 -1
  197. package/package.json +1 -1
  198. package/dist/CommandPalette-Bf8flX2t.cjs +0 -2
  199. package/dist/CommandPalette-CoIdCmZ0.js +0 -3977
  200. package/dist/StatusBarNotificationBell-B4v__j6s.cjs +0 -50
  201. package/dist/de-DRobPEJV.cjs +0 -1
  202. package/dist/server/CommandPalette-C_9Z8gVc.cjs +0 -1
  203. package/dist/server/StatusBarNotificationBell-D9oc6WVf.cjs +0 -49
  204. package/dist/server/de-DRobPEJV.cjs +0 -1
  205. package/dist/server/tr-BDbiY5YD.cjs +0 -1
  206. package/dist/tr-BDbiY5YD.cjs +0 -1
@@ -1,6 +1,7 @@
1
- import type { NotificationAnnouncement, NotificationPriority, NotificationSeverity } from '../_internal/contract/notification.cjs';
1
+ import type { NotificationAnnouncement, NotificationCardState, NotificationPriority, NotificationSeverity } from '../_internal/contract/notification.cjs';
2
2
  import type { VendorErrorRef } from '../_internal/contract/vendorErrorRef.cjs';
3
3
  import type { NotificationSettings } from '../_internal/platform/settings/settingsTypes.cjs';
4
+ import { type Event } from '../_internal/base/event.cjs';
4
5
  export type { NotificationSeverity };
5
6
  export interface NotificationAction {
6
7
  id?: string;
@@ -44,6 +45,12 @@ export interface NotificationInput extends NotificationInputBase {
44
45
  actions?: NotificationAction[];
45
46
  /** When set, the gear menu offers a "Don't show again" toggle keyed by this id. */
46
47
  neverShowAgainKey?: string;
48
+ /**
49
+ * The key "remind me later" on this card silences. A verb whose card's title moves away from the text it was issued
50
+ * with (a progress's `update`) sets it, so the menu silences the next issue of that text — the key the issue's
51
+ * decision checks; unset, the card derives it from its title. A `neverShowAgainKey` still wins.
52
+ */
53
+ remindKey?: string;
47
54
  progress?: NotificationProgress;
48
55
  /** Opaque route token consumed by the workspace shell when the user
49
56
  * clicks the toast body (away from any anchor/button). The shell maps
@@ -62,22 +69,70 @@ export interface NotificationItem extends NotificationInput {
62
69
  expanded: boolean;
63
70
  hovered: boolean;
64
71
  focused: boolean;
72
+ /**
73
+ * The card is off the toast stack while its progress runs — the user sent it away (Escape, the native overlay's
74
+ * close) where a notification center is reachable, or a setting that silences it took it back or was on when it was
75
+ * issued. It lives on in the notification center, its handles still `open`, until the progress ends (the card is
76
+ * back on the toast stack with its outcome, newest, unless a silencing setting ends it then), an issue under its id is
77
+ * shown, or its program closes it. Only a running card is ever hidden ({@link isProgressRunning}), and only a mounted
78
+ * center draws it (`NotificationsCenter`, `NotificationPanel`). A realm that reaches none says so
79
+ * ({@link NativeNotificationEngineDependencies.centerReachable}): the user's close then leaves the card on the stack.
80
+ * A setting that silences it hides it all the same — the settings keep it off the screen, center or not —, so there
81
+ * it is out of reach until its progress ends.
82
+ */
83
+ hidden?: boolean;
84
+ /**
85
+ * Since when the card has been out of the user's sight on the toast stack, by the engine's clock: sent to the
86
+ * notification center ({@link hidden}), or pushed past the visible cap by newer toasts — the host paints the newest
87
+ * `maxVisibleNotifications` of the cards on the stack ({@link isOnToastStack}). A card keeps the moment it first left
88
+ * sight until the stack shows it again, which clears it. The stack records it — nothing else sets it —, the host
89
+ * paints the cards on the toast stack that have none, and {@link hiddenRunningProgress} orders by it.
90
+ */
91
+ outOfSightSince?: number;
65
92
  }
66
93
  export interface NotificationHandle {
67
94
  id: string;
68
95
  update(patch: Partial<NotificationInput>): void;
69
96
  setProgress(progress: NotificationProgress): void;
70
97
  close(): void;
98
+ /** Where the card this handle opened, or joined under its id, is now (see `NotificationCardState`). */
99
+ state(): NotificationCardState;
100
+ /**
101
+ * Fires once, when that card ends — it leaves the engine, which a running progress sent off the toast stack has not
102
+ * (it is still `open`, in the notification center) —, with where it went.
103
+ */
104
+ readonly onDidChangeState: Event<NotificationCardState>;
71
105
  }
72
106
  /**
73
- * What the engine needs from its owner — the settings it times toasts by, where an auto-fade is counted
74
- * and where a failing listener is reported. The clock and the timers are the platform's unless a test
75
- * drives them.
107
+ * What the engine needs from its owner — the settings it times toasts by, where an auto-fade is counted,
108
+ * where a failing listener is reported, and which cards the notification settings silence. The clock and
109
+ * the timers are the platform's unless a test drives them.
76
110
  */
77
111
  export interface NativeNotificationEngineDependencies {
78
112
  readonly getSettings: () => NotificationSettings;
79
113
  readonly recordAutoFade: (source: string) => void;
80
114
  readonly warn: (message: string, error: unknown) => void;
115
+ /**
116
+ * Whether the notification settings keep this card off the toast stack now — the owner's question, the one its
117
+ * take-back asks too ({@link NativeNotificationEngine.suppress}), so the two cannot disagree. A running progress
118
+ * issued under it lives in the notification center (`hidden`), and the write that ends its progress under it takes
119
+ * the card back (`suppressed`) instead of bringing it on the stack. Unset, the settings silence no card.
120
+ */
121
+ readonly isSilenced?: (item: NotificationItem) => boolean;
122
+ /**
123
+ * Whether the user turned this card's notification down — "don't show again", "remind me later", the owner's key
124
+ * stores that the card's gear menu writes. A running progress is not the user's to end, but one whose notification
125
+ * they turned down is: their close of it ({@link NativeNotificationEngine.dismiss}) ends it instead of sending it to
126
+ * the notification center, from where its outcome would come back as a toast of a notification they turned down.
127
+ * Unset, the user turns no card down.
128
+ */
129
+ readonly isTurnedDown?: (item: NotificationItem) => boolean;
130
+ /**
131
+ * Whether the user can reach a notification center in the realm now — where the user's close sends a running
132
+ * progress ({@link NativeNotificationEngine.dismiss}). Read at each such close: where none is reachable, the card
133
+ * stays on the toast stack. Unset, a center is reachable.
134
+ */
135
+ readonly centerReachable?: () => boolean;
81
136
  readonly now?: () => number;
82
137
  readonly setTimeout?: (callback: () => void, timeoutMs: number) => number;
83
138
  readonly clearTimeout?: (handle: number) => void;
@@ -88,7 +143,46 @@ export interface NativeNotificationEngine {
88
143
  readonly setHover: (id: string, hovered: boolean) => void;
89
144
  readonly setFocus: (id: string, focused: boolean) => void;
90
145
  readonly toggleExpanded: (id: string) => void;
146
+ /**
147
+ * The program closes a card — its handle, the stack by its id, one of its actions that does not keep it (an action
148
+ * answers the card, it does not send it away): its handles report `closed`.
149
+ */
91
150
  readonly close: (id: string) => void;
151
+ /**
152
+ * The user sends a card away — its close button, Escape, Delete, a gear-menu choice, the native overlay's close: the
153
+ * card closes and its handles report `dismissed`. A card whose progress runs is not the user's to end
154
+ * ({@link isProgressRunning}): it only leaves the toast stack and lives on in the notification center (`hidden`), its
155
+ * handles still `open` — and where no center is reachable
156
+ * ({@link NativeNotificationEngineDependencies.centerReachable}) it stays where it is, since nothing could draw it
157
+ * there —, unless the user turned its notification down ({@link NativeNotificationEngineDependencies.isTurnedDown}):
158
+ * the gear menu's "don't show again" and "remind me later", on the stack's card or a center's copy, end it
159
+ * (`dismissed`), as the reference's "Don't Show Again" closes its notification
160
+ * (`workbench/services/notification/common/notificationService.ts:207-217`) and a chosen button expires a running
161
+ * progress (`notificationsViewer.ts:519-529`).
162
+ */
163
+ readonly dismiss: (id: string) => void;
164
+ /**
165
+ * Takes back from the toast stack the cards `silenced` picks — the notification settings no longer let them on it. A
166
+ * card whose progress runs is not the settings' to end either: it goes to the notification center (`hidden`), its
167
+ * handles still `open`, as the reference removes the toasts and keeps the notifications in its center
168
+ * (`notificationsToasts.ts:143-153`); every other card closes and its handles report `suppressed`. A card the center
169
+ * already holds stays there. The stack changes once for all of them.
170
+ */
171
+ readonly suppress: (silenced: (item: NotificationItem) => boolean) => void;
172
+ /**
173
+ * An issue under `id` got no card — the user turned it down on such a card ("don't show again", "remind me later"),
174
+ * or it is an acknowledgment the master switch silences, which the notification center does not hold: the card an
175
+ * earlier issue opened under that id ends with it and its handles report `suppressed` — a running progress too, since
176
+ * its program now holds the new issue's handle and nothing drives the card. An acknowledgment on the screen stays: it
177
+ * is answered, never taken away.
178
+ */
179
+ readonly reject: (id: string) => void;
180
+ /**
181
+ * The settings the engine reads changed: which cards the visible cap (`maxVisibleNotifications`) leaves out of sight
182
+ * is read again ({@link NotificationItem.outOfSightSince}), and the stack emits when that changed. The realm's
183
+ * notification service calls it on every change of the notification settings.
184
+ */
185
+ readonly refresh: () => void;
92
186
  readonly dispose: () => void;
93
187
  }
94
188
  /**
@@ -120,10 +214,36 @@ export declare function isNotificationSticky(item: Pick<NotificationItem, 'stick
120
214
  errorsAlwaysSticky: boolean;
121
215
  warningsAlwaysSticky: boolean;
122
216
  }): boolean;
217
+ /**
218
+ * Whether the card's progress runs — the operation behind it ends such a card, not the user and not a setting: it has
219
+ * no close button, Delete leaves it, and Escape, any other close of the user's or a setting that silences it only
220
+ * sends it to the notification center (reference `notificationsViewer.ts:492-495`, `notificationsCommands.ts:138-141`,
221
+ * `notificationsToasts.ts:481-489` and `:143-153`) — the user's close leaves it where it is when no center is
222
+ * reachable. Only the user's turning its notification down ends it ({@link NativeNotificationEngine.dismiss}). A
223
+ * developer preview's progress (`isolated`: the catalog's preview toast, the preview runtime's cards) has no operation
224
+ * behind it and closes like any card.
225
+ */
226
+ export declare function isProgressRunning(item: Pick<NotificationItem, 'progress' | 'isolated'>): boolean;
227
+ /**
228
+ * Whether the card is on the toast stack: an acknowledgment takes the modal layer instead, and a hidden card lives in
229
+ * the notification center. The host paints these cards, and the engine clips the same ones to the visible cap.
230
+ */
231
+ export declare function isOnToastStack(item: Pick<NotificationItem, 'priority' | 'hidden'>): boolean;
232
+ /**
233
+ * The running progress cards out of the user's sight on the toast stack — sent to the notification center
234
+ * ({@link NotificationItem.hidden}) or pushed past the visible cap by newer toasts —, the one that left sight last
235
+ * first ({@link NotificationItem.outOfSightSince}; of those that left at the same moment, the newest first). Pure:
236
+ * `items` is the stack as it emits them. It is the kit's one answer to "which progress runs out of sight": the status
237
+ * bar bell counts these cards, and an application that mirrors such a progress in its status bar shows the first. The
238
+ * reference does the same with a notification progress whose toast is not visible — hidden, or left out by the
239
+ * toasts' cap (`notificationsToasts.ts:675-676`, `:705`) —: it runs on as a window progress, and the window progress
240
+ * entry shows the last one hidden (`workbench/services/progress/browser/progressService.ts:339-357`, `:127`, `:147`).
241
+ */
242
+ export declare function hiddenRunningProgress(items: readonly NotificationItem[]): NotificationItem[];
123
243
  /**
124
244
  * Creates an in-memory engine — the notification service's toast stack, or a preview's isolated one.
125
245
  * There is no module engine: whoever shows toasts owns one.
126
246
  */
127
247
  export declare function createNativeNotificationEngine(dependencies: NativeNotificationEngineDependencies): NativeNotificationEngine;
128
248
  /** The toast stack as its surfaces drive it — everything of the engine but its disposal. */
129
- export type NotificationStack = Pick<NativeNotificationEngine, 'subscribe' | 'setHover' | 'setFocus' | 'toggleExpanded' | 'close'>;
249
+ export type NotificationStack = Pick<NativeNotificationEngine, 'subscribe' | 'setHover' | 'setFocus' | 'toggleExpanded' | 'close' | 'dismiss'>;
@@ -1,6 +1,7 @@
1
- import type { NotificationAnnouncement, NotificationPriority, NotificationSeverity } from '../_internal/contract/notification.js';
1
+ import type { NotificationAnnouncement, NotificationCardState, NotificationPriority, NotificationSeverity } from '../_internal/contract/notification.js';
2
2
  import type { VendorErrorRef } from '../_internal/contract/vendorErrorRef.js';
3
3
  import type { NotificationSettings } from '../_internal/platform/settings/settingsTypes.js';
4
+ import { type Event } from '../_internal/base/event.js';
4
5
  export type { NotificationSeverity };
5
6
  export interface NotificationAction {
6
7
  id?: string;
@@ -44,6 +45,12 @@ export interface NotificationInput extends NotificationInputBase {
44
45
  actions?: NotificationAction[];
45
46
  /** When set, the gear menu offers a "Don't show again" toggle keyed by this id. */
46
47
  neverShowAgainKey?: string;
48
+ /**
49
+ * The key "remind me later" on this card silences. A verb whose card's title moves away from the text it was issued
50
+ * with (a progress's `update`) sets it, so the menu silences the next issue of that text — the key the issue's
51
+ * decision checks; unset, the card derives it from its title. A `neverShowAgainKey` still wins.
52
+ */
53
+ remindKey?: string;
47
54
  progress?: NotificationProgress;
48
55
  /** Opaque route token consumed by the workspace shell when the user
49
56
  * clicks the toast body (away from any anchor/button). The shell maps
@@ -62,22 +69,70 @@ export interface NotificationItem extends NotificationInput {
62
69
  expanded: boolean;
63
70
  hovered: boolean;
64
71
  focused: boolean;
72
+ /**
73
+ * The card is off the toast stack while its progress runs — the user sent it away (Escape, the native overlay's
74
+ * close) where a notification center is reachable, or a setting that silences it took it back or was on when it was
75
+ * issued. It lives on in the notification center, its handles still `open`, until the progress ends (the card is
76
+ * back on the toast stack with its outcome, newest, unless a silencing setting ends it then), an issue under its id is
77
+ * shown, or its program closes it. Only a running card is ever hidden ({@link isProgressRunning}), and only a mounted
78
+ * center draws it (`NotificationsCenter`, `NotificationPanel`). A realm that reaches none says so
79
+ * ({@link NativeNotificationEngineDependencies.centerReachable}): the user's close then leaves the card on the stack.
80
+ * A setting that silences it hides it all the same — the settings keep it off the screen, center or not —, so there
81
+ * it is out of reach until its progress ends.
82
+ */
83
+ hidden?: boolean;
84
+ /**
85
+ * Since when the card has been out of the user's sight on the toast stack, by the engine's clock: sent to the
86
+ * notification center ({@link hidden}), or pushed past the visible cap by newer toasts — the host paints the newest
87
+ * `maxVisibleNotifications` of the cards on the stack ({@link isOnToastStack}). A card keeps the moment it first left
88
+ * sight until the stack shows it again, which clears it. The stack records it — nothing else sets it —, the host
89
+ * paints the cards on the toast stack that have none, and {@link hiddenRunningProgress} orders by it.
90
+ */
91
+ outOfSightSince?: number;
65
92
  }
66
93
  export interface NotificationHandle {
67
94
  id: string;
68
95
  update(patch: Partial<NotificationInput>): void;
69
96
  setProgress(progress: NotificationProgress): void;
70
97
  close(): void;
98
+ /** Where the card this handle opened, or joined under its id, is now (see `NotificationCardState`). */
99
+ state(): NotificationCardState;
100
+ /**
101
+ * Fires once, when that card ends — it leaves the engine, which a running progress sent off the toast stack has not
102
+ * (it is still `open`, in the notification center) —, with where it went.
103
+ */
104
+ readonly onDidChangeState: Event<NotificationCardState>;
71
105
  }
72
106
  /**
73
- * What the engine needs from its owner — the settings it times toasts by, where an auto-fade is counted
74
- * and where a failing listener is reported. The clock and the timers are the platform's unless a test
75
- * drives them.
107
+ * What the engine needs from its owner — the settings it times toasts by, where an auto-fade is counted,
108
+ * where a failing listener is reported, and which cards the notification settings silence. The clock and
109
+ * the timers are the platform's unless a test drives them.
76
110
  */
77
111
  export interface NativeNotificationEngineDependencies {
78
112
  readonly getSettings: () => NotificationSettings;
79
113
  readonly recordAutoFade: (source: string) => void;
80
114
  readonly warn: (message: string, error: unknown) => void;
115
+ /**
116
+ * Whether the notification settings keep this card off the toast stack now — the owner's question, the one its
117
+ * take-back asks too ({@link NativeNotificationEngine.suppress}), so the two cannot disagree. A running progress
118
+ * issued under it lives in the notification center (`hidden`), and the write that ends its progress under it takes
119
+ * the card back (`suppressed`) instead of bringing it on the stack. Unset, the settings silence no card.
120
+ */
121
+ readonly isSilenced?: (item: NotificationItem) => boolean;
122
+ /**
123
+ * Whether the user turned this card's notification down — "don't show again", "remind me later", the owner's key
124
+ * stores that the card's gear menu writes. A running progress is not the user's to end, but one whose notification
125
+ * they turned down is: their close of it ({@link NativeNotificationEngine.dismiss}) ends it instead of sending it to
126
+ * the notification center, from where its outcome would come back as a toast of a notification they turned down.
127
+ * Unset, the user turns no card down.
128
+ */
129
+ readonly isTurnedDown?: (item: NotificationItem) => boolean;
130
+ /**
131
+ * Whether the user can reach a notification center in the realm now — where the user's close sends a running
132
+ * progress ({@link NativeNotificationEngine.dismiss}). Read at each such close: where none is reachable, the card
133
+ * stays on the toast stack. Unset, a center is reachable.
134
+ */
135
+ readonly centerReachable?: () => boolean;
81
136
  readonly now?: () => number;
82
137
  readonly setTimeout?: (callback: () => void, timeoutMs: number) => number;
83
138
  readonly clearTimeout?: (handle: number) => void;
@@ -88,7 +143,46 @@ export interface NativeNotificationEngine {
88
143
  readonly setHover: (id: string, hovered: boolean) => void;
89
144
  readonly setFocus: (id: string, focused: boolean) => void;
90
145
  readonly toggleExpanded: (id: string) => void;
146
+ /**
147
+ * The program closes a card — its handle, the stack by its id, one of its actions that does not keep it (an action
148
+ * answers the card, it does not send it away): its handles report `closed`.
149
+ */
91
150
  readonly close: (id: string) => void;
151
+ /**
152
+ * The user sends a card away — its close button, Escape, Delete, a gear-menu choice, the native overlay's close: the
153
+ * card closes and its handles report `dismissed`. A card whose progress runs is not the user's to end
154
+ * ({@link isProgressRunning}): it only leaves the toast stack and lives on in the notification center (`hidden`), its
155
+ * handles still `open` — and where no center is reachable
156
+ * ({@link NativeNotificationEngineDependencies.centerReachable}) it stays where it is, since nothing could draw it
157
+ * there —, unless the user turned its notification down ({@link NativeNotificationEngineDependencies.isTurnedDown}):
158
+ * the gear menu's "don't show again" and "remind me later", on the stack's card or a center's copy, end it
159
+ * (`dismissed`), as the reference's "Don't Show Again" closes its notification
160
+ * (`workbench/services/notification/common/notificationService.ts:207-217`) and a chosen button expires a running
161
+ * progress (`notificationsViewer.ts:519-529`).
162
+ */
163
+ readonly dismiss: (id: string) => void;
164
+ /**
165
+ * Takes back from the toast stack the cards `silenced` picks — the notification settings no longer let them on it. A
166
+ * card whose progress runs is not the settings' to end either: it goes to the notification center (`hidden`), its
167
+ * handles still `open`, as the reference removes the toasts and keeps the notifications in its center
168
+ * (`notificationsToasts.ts:143-153`); every other card closes and its handles report `suppressed`. A card the center
169
+ * already holds stays there. The stack changes once for all of them.
170
+ */
171
+ readonly suppress: (silenced: (item: NotificationItem) => boolean) => void;
172
+ /**
173
+ * An issue under `id` got no card — the user turned it down on such a card ("don't show again", "remind me later"),
174
+ * or it is an acknowledgment the master switch silences, which the notification center does not hold: the card an
175
+ * earlier issue opened under that id ends with it and its handles report `suppressed` — a running progress too, since
176
+ * its program now holds the new issue's handle and nothing drives the card. An acknowledgment on the screen stays: it
177
+ * is answered, never taken away.
178
+ */
179
+ readonly reject: (id: string) => void;
180
+ /**
181
+ * The settings the engine reads changed: which cards the visible cap (`maxVisibleNotifications`) leaves out of sight
182
+ * is read again ({@link NotificationItem.outOfSightSince}), and the stack emits when that changed. The realm's
183
+ * notification service calls it on every change of the notification settings.
184
+ */
185
+ readonly refresh: () => void;
92
186
  readonly dispose: () => void;
93
187
  }
94
188
  /**
@@ -120,10 +214,36 @@ export declare function isNotificationSticky(item: Pick<NotificationItem, 'stick
120
214
  errorsAlwaysSticky: boolean;
121
215
  warningsAlwaysSticky: boolean;
122
216
  }): boolean;
217
+ /**
218
+ * Whether the card's progress runs — the operation behind it ends such a card, not the user and not a setting: it has
219
+ * no close button, Delete leaves it, and Escape, any other close of the user's or a setting that silences it only
220
+ * sends it to the notification center (reference `notificationsViewer.ts:492-495`, `notificationsCommands.ts:138-141`,
221
+ * `notificationsToasts.ts:481-489` and `:143-153`) — the user's close leaves it where it is when no center is
222
+ * reachable. Only the user's turning its notification down ends it ({@link NativeNotificationEngine.dismiss}). A
223
+ * developer preview's progress (`isolated`: the catalog's preview toast, the preview runtime's cards) has no operation
224
+ * behind it and closes like any card.
225
+ */
226
+ export declare function isProgressRunning(item: Pick<NotificationItem, 'progress' | 'isolated'>): boolean;
227
+ /**
228
+ * Whether the card is on the toast stack: an acknowledgment takes the modal layer instead, and a hidden card lives in
229
+ * the notification center. The host paints these cards, and the engine clips the same ones to the visible cap.
230
+ */
231
+ export declare function isOnToastStack(item: Pick<NotificationItem, 'priority' | 'hidden'>): boolean;
232
+ /**
233
+ * The running progress cards out of the user's sight on the toast stack — sent to the notification center
234
+ * ({@link NotificationItem.hidden}) or pushed past the visible cap by newer toasts —, the one that left sight last
235
+ * first ({@link NotificationItem.outOfSightSince}; of those that left at the same moment, the newest first). Pure:
236
+ * `items` is the stack as it emits them. It is the kit's one answer to "which progress runs out of sight": the status
237
+ * bar bell counts these cards, and an application that mirrors such a progress in its status bar shows the first. The
238
+ * reference does the same with a notification progress whose toast is not visible — hidden, or left out by the
239
+ * toasts' cap (`notificationsToasts.ts:675-676`, `:705`) —: it runs on as a window progress, and the window progress
240
+ * entry shows the last one hidden (`workbench/services/progress/browser/progressService.ts:339-357`, `:127`, `:147`).
241
+ */
242
+ export declare function hiddenRunningProgress(items: readonly NotificationItem[]): NotificationItem[];
123
243
  /**
124
244
  * Creates an in-memory engine — the notification service's toast stack, or a preview's isolated one.
125
245
  * There is no module engine: whoever shows toasts owns one.
126
246
  */
127
247
  export declare function createNativeNotificationEngine(dependencies: NativeNotificationEngineDependencies): NativeNotificationEngine;
128
248
  /** The toast stack as its surfaces drive it — everything of the engine but its disposal. */
129
- export type NotificationStack = Pick<NativeNotificationEngine, 'subscribe' | 'setHover' | 'setFocus' | 'toggleExpanded' | 'close'>;
249
+ export type NotificationStack = Pick<NativeNotificationEngine, 'subscribe' | 'setHover' | 'setFocus' | 'toggleExpanded' | 'close' | 'dismiss'>;
@@ -11,7 +11,11 @@ import type { NotificationSettings } from '../_internal/platform/settings/settin
11
11
  import type { NotificationItemController, NotificationItemShell } from './NotificationItem.cjs';
12
12
  /**
13
13
  * The card's own verbs over the realm's toast stack. `settings` is the stack's tracked copy of the
14
- * notification settings, so a card's timer follows a change of the default duration at once.
14
+ * notification settings, so a card's timer follows a change of the default duration at once. A card closes
15
+ * through here only by the user's hand — its close button, a gear-menu choice, the native overlay's copy of
16
+ * either — so it is the stack's `dismiss`: the card's handles report the user's close, and a running progress
17
+ * only leaves the toast stack for the notification center (or stays, where none is reachable), unless the gear
18
+ * menu's choice turned it down.
15
19
  */
16
20
  export declare function realmCardController(host: KitHost, settings: Accessor<NotificationSettings>): NotificationItemController;
17
21
  /**
@@ -11,7 +11,11 @@ import type { NotificationSettings } from '../_internal/platform/settings/settin
11
11
  import type { NotificationItemController, NotificationItemShell } from './NotificationItem.js';
12
12
  /**
13
13
  * The card's own verbs over the realm's toast stack. `settings` is the stack's tracked copy of the
14
- * notification settings, so a card's timer follows a change of the default duration at once.
14
+ * notification settings, so a card's timer follows a change of the default duration at once. A card closes
15
+ * through here only by the user's hand — its close button, a gear-menu choice, the native overlay's copy of
16
+ * either — so it is the stack's `dismiss`: the card's handles report the user's close, and a running progress
17
+ * only leaves the toast stack for the notification center (or stays, where none is reachable), unless the gear
18
+ * menu's choice turned it down.
15
19
  */
16
20
  export declare function realmCardController(host: KitHost, settings: Accessor<NotificationSettings>): NotificationItemController;
17
21
  /**
@@ -8,9 +8,15 @@
8
8
  */
9
9
  import type { ICommandRegistry, IKeybindingsRegistry } from '../_internal/app/keybindings/index.cjs';
10
10
  export declare const ACCEPT_PRIMARY_ACTION_NOTIFICATION = "notification.acceptPrimaryAction";
11
- /** Close the focused toast — `Delete` (macOS `Cmd+Backspace`) while focus is in the toast stack. */
11
+ /**
12
+ * Close the focused toast — `Delete` (macOS `Cmd+Backspace`) while focus is in the toast stack. A running progress
13
+ * stays.
14
+ */
12
15
  export declare const CLEAR_NOTIFICATION = "notification.clear";
13
- /** Hide the dismissable toasts — `Escape` while toasts are visible. */
16
+ /**
17
+ * Hide the dismissable toasts — `Escape` while toasts are visible. A running progress is not closed: it goes to the
18
+ * notification center, or stays on the stack where none is reachable.
19
+ */
14
20
  export declare const HIDE_NOTIFICATION_TOASTS = "notifications.hideToasts";
15
21
  export interface NotificationCommandRegistries {
16
22
  readonly commands: ICommandRegistry;
@@ -18,9 +24,15 @@ export interface NotificationCommandRegistries {
18
24
  }
19
25
  export interface NotificationCommandDeps {
20
26
  readonly acceptPrimaryAction: () => void;
21
- /** Close the focused toast and move focus to the next one (the host's focus index). */
27
+ /**
28
+ * Close the focused toast and move focus to the next one (the host's focus index); a running progress stays where
29
+ * it is.
30
+ */
22
31
  readonly clearFocused: () => void;
23
- /** Close every dismissable toast; acknowledgement-required ones stay (#875). */
32
+ /**
33
+ * Send every dismissable toast away — a running progress to the notification center, alive, or nowhere where no
34
+ * center is reachable; acknowledgement-required ones stay (#875).
35
+ */
24
36
  readonly hideToasts: () => void;
25
37
  }
26
38
  export declare function registerNotificationCommands(registries: NotificationCommandRegistries, deps: NotificationCommandDeps): () => void;
@@ -8,9 +8,15 @@
8
8
  */
9
9
  import type { ICommandRegistry, IKeybindingsRegistry } from '../_internal/app/keybindings/index.js';
10
10
  export declare const ACCEPT_PRIMARY_ACTION_NOTIFICATION = "notification.acceptPrimaryAction";
11
- /** Close the focused toast — `Delete` (macOS `Cmd+Backspace`) while focus is in the toast stack. */
11
+ /**
12
+ * Close the focused toast — `Delete` (macOS `Cmd+Backspace`) while focus is in the toast stack. A running progress
13
+ * stays.
14
+ */
12
15
  export declare const CLEAR_NOTIFICATION = "notification.clear";
13
- /** Hide the dismissable toasts — `Escape` while toasts are visible. */
16
+ /**
17
+ * Hide the dismissable toasts — `Escape` while toasts are visible. A running progress is not closed: it goes to the
18
+ * notification center, or stays on the stack where none is reachable.
19
+ */
14
20
  export declare const HIDE_NOTIFICATION_TOASTS = "notifications.hideToasts";
15
21
  export interface NotificationCommandRegistries {
16
22
  readonly commands: ICommandRegistry;
@@ -18,9 +24,15 @@ export interface NotificationCommandRegistries {
18
24
  }
19
25
  export interface NotificationCommandDeps {
20
26
  readonly acceptPrimaryAction: () => void;
21
- /** Close the focused toast and move focus to the next one (the host's focus index). */
27
+ /**
28
+ * Close the focused toast and move focus to the next one (the host's focus index); a running progress stays where
29
+ * it is.
30
+ */
22
31
  readonly clearFocused: () => void;
23
- /** Close every dismissable toast; acknowledgement-required ones stay (#875). */
32
+ /**
33
+ * Send every dismissable toast away — a running progress to the notification center, alive, or nowhere where no
34
+ * center is reachable; acknowledgement-required ones stay (#875).
35
+ */
24
36
  readonly hideToasts: () => void;
25
37
  }
26
38
  export declare function registerNotificationCommands(registries: NotificationCommandRegistries, deps: NotificationCommandDeps): () => void;
@@ -44,6 +44,7 @@ export declare function overlayStateOf(input: {
44
44
  readonly sequence: number;
45
45
  readonly reduceMotion: boolean;
46
46
  readonly animationDuration: 'fast' | 'normal' | 'slow';
47
+ readonly remindLaterEnabled: boolean;
47
48
  readonly bounds: NotificationOverlayBounds | undefined;
48
49
  readonly clipBounds: NotificationOverlayBounds | undefined;
49
50
  readonly items: readonly NotificationOverlayItem[];
@@ -44,6 +44,7 @@ export declare function overlayStateOf(input: {
44
44
  readonly sequence: number;
45
45
  readonly reduceMotion: boolean;
46
46
  readonly animationDuration: 'fast' | 'normal' | 'slow';
47
+ readonly remindLaterEnabled: boolean;
47
48
  readonly bounds: NotificationOverlayBounds | undefined;
48
49
  readonly clipBounds: NotificationOverlayBounds | undefined;
49
50
  readonly items: readonly NotificationOverlayItem[];
@@ -23,7 +23,7 @@ import { NotificationTimeline } from './notificationTimeline.cjs';
23
23
  import { type SourceStats } from './notificationAnalytics.cjs';
24
24
  import { type DigestFlushResult, type DigestNotSentReason, type EmailDigestMessage } from './emailDigest.cjs';
25
25
  import { type Toast } from './toast.cjs';
26
- /** The host's infrastructure the notification service works with. */
26
+ /** The host's infrastructure the notification service works with, and whether its notification center is in reach. */
27
27
  export interface NotificationServiceDependencies {
28
28
  readonly desktop: DesktopBridge;
29
29
  /** Holds the digest's SMTP password and the webhook URLs. */
@@ -35,6 +35,15 @@ export interface NotificationServiceDependencies {
35
35
  readonly errorPresenter: HostErrorPresenter;
36
36
  readonly vendorErrors: VendorErrorSource;
37
37
  readonly log: ILogger;
38
+ /**
39
+ * Whether the user can reach a notification center in the realm now — one the application shows, or a way to one
40
+ * (a status bar bell, a dock). The user's close of a running progress (Escape, the native overlay's close) sends the
41
+ * card to the center, its progress running on; where no center is reachable — an entry window, a page that shows
42
+ * neither a center nor a way to one — nothing could draw it there, so the card stays on the toast stack instead.
43
+ * Turning its notification down on the card still ends it, a finished card closes as always, and a setting that
44
+ * silences a running progress still keeps it off the screen. Read at each such close. Unset, a center is reachable.
45
+ */
46
+ readonly centerReachable?: () => boolean;
38
47
  }
39
48
  /** The realm's notifications. */
40
49
  export interface Notifications {
@@ -85,6 +94,10 @@ export declare class NotificationService implements Notifications, IDisposable {
85
94
  private readonly navigation;
86
95
  private readonly log;
87
96
  private readonly onSettingsChanged;
97
+ private readonly stopWatchingCards;
98
+ /** The start of quiet hours is watched while the stack has cards ({@link watchQuietHoursStart}). */
99
+ private watchingQuietHours;
100
+ private quietHoursTimer;
88
101
  constructor(deps: NotificationServiceDependencies);
89
102
  notify<TParams>(definition: NotificationDefinition<TParams, 'message' | 'query-completed'>, params: NoInfer<TParams>): string;
90
103
  progress<TParams>(definition: NotificationDefinition<TParams, 'progress'>, params: NoInfer<TParams>): ToastProgressHandle;
@@ -96,6 +109,28 @@ export declare class NotificationService implements Notifications, IDisposable {
96
109
  resetStats(): void;
97
110
  requestNavigation(route: string): void;
98
111
  dispose(): void;
112
+ /**
113
+ * The shown cards the notification settings now silence ({@link silencedCard}) are taken back from the toast stack
114
+ * — do not disturb, quiet hours, a muted source, the master switch, "urgent to the center only": the decision an
115
+ * issue would get now. A running progress is not the settings' to end: it goes to the notification center, its
116
+ * handles still `open`, as the reference removes the toast and keeps the notification in its center; the other cards
117
+ * close and their handles report `suppressed`, the timeline keeping their records.
118
+ *
119
+ * The reference reacts to the same moment (`notificationsToasts.ts:143-153`) under its own policy, which the kit
120
+ * does not share: its do not disturb (the error-only filter) hides every toast, urgent ones and errors too, and a
121
+ * source's filter spares that source's errors and urgent cards. The kit takes back what its issue decision
122
+ * (`decideFilter`) silences: do not disturb and quiet hours spare urgent cards (unless `dndBlocksUrgent` /
123
+ * `quietHoursBlocksUrgent`), and a muted source loses its errors too — only urgent cards pass a mute.
124
+ */
125
+ private takeBackSilencedCards;
126
+ /**
127
+ * Quiet hours are scheduled do-not-disturb, but no settings change marks the moment they begin: a timer takes the
128
+ * silenced cards back then, as when do not disturb is switched on. It runs only while the stack has cards — the
129
+ * settings are read once a card is shown, never before the realm has hydrated them — and a long wait is read again
130
+ * every hour, since the clock can move under it (a time-zone or daylight-saving change, a sleep).
131
+ */
132
+ private watchQuietHoursStart;
133
+ private stopWatchingQuietHours;
99
134
  /** A desktop call the service does not wait for — its failure is logged, not thrown. */
100
135
  private unawaited;
101
136
  }
@@ -23,7 +23,7 @@ import { NotificationTimeline } from './notificationTimeline.js';
23
23
  import { type SourceStats } from './notificationAnalytics.js';
24
24
  import { type DigestFlushResult, type DigestNotSentReason, type EmailDigestMessage } from './emailDigest.js';
25
25
  import { type Toast } from './toast.js';
26
- /** The host's infrastructure the notification service works with. */
26
+ /** The host's infrastructure the notification service works with, and whether its notification center is in reach. */
27
27
  export interface NotificationServiceDependencies {
28
28
  readonly desktop: DesktopBridge;
29
29
  /** Holds the digest's SMTP password and the webhook URLs. */
@@ -35,6 +35,15 @@ export interface NotificationServiceDependencies {
35
35
  readonly errorPresenter: HostErrorPresenter;
36
36
  readonly vendorErrors: VendorErrorSource;
37
37
  readonly log: ILogger;
38
+ /**
39
+ * Whether the user can reach a notification center in the realm now — one the application shows, or a way to one
40
+ * (a status bar bell, a dock). The user's close of a running progress (Escape, the native overlay's close) sends the
41
+ * card to the center, its progress running on; where no center is reachable — an entry window, a page that shows
42
+ * neither a center nor a way to one — nothing could draw it there, so the card stays on the toast stack instead.
43
+ * Turning its notification down on the card still ends it, a finished card closes as always, and a setting that
44
+ * silences a running progress still keeps it off the screen. Read at each such close. Unset, a center is reachable.
45
+ */
46
+ readonly centerReachable?: () => boolean;
38
47
  }
39
48
  /** The realm's notifications. */
40
49
  export interface Notifications {
@@ -85,6 +94,10 @@ export declare class NotificationService implements Notifications, IDisposable {
85
94
  private readonly navigation;
86
95
  private readonly log;
87
96
  private readonly onSettingsChanged;
97
+ private readonly stopWatchingCards;
98
+ /** The start of quiet hours is watched while the stack has cards ({@link watchQuietHoursStart}). */
99
+ private watchingQuietHours;
100
+ private quietHoursTimer;
88
101
  constructor(deps: NotificationServiceDependencies);
89
102
  notify<TParams>(definition: NotificationDefinition<TParams, 'message' | 'query-completed'>, params: NoInfer<TParams>): string;
90
103
  progress<TParams>(definition: NotificationDefinition<TParams, 'progress'>, params: NoInfer<TParams>): ToastProgressHandle;
@@ -96,6 +109,28 @@ export declare class NotificationService implements Notifications, IDisposable {
96
109
  resetStats(): void;
97
110
  requestNavigation(route: string): void;
98
111
  dispose(): void;
112
+ /**
113
+ * The shown cards the notification settings now silence ({@link silencedCard}) are taken back from the toast stack
114
+ * — do not disturb, quiet hours, a muted source, the master switch, "urgent to the center only": the decision an
115
+ * issue would get now. A running progress is not the settings' to end: it goes to the notification center, its
116
+ * handles still `open`, as the reference removes the toast and keeps the notification in its center; the other cards
117
+ * close and their handles report `suppressed`, the timeline keeping their records.
118
+ *
119
+ * The reference reacts to the same moment (`notificationsToasts.ts:143-153`) under its own policy, which the kit
120
+ * does not share: its do not disturb (the error-only filter) hides every toast, urgent ones and errors too, and a
121
+ * source's filter spares that source's errors and urgent cards. The kit takes back what its issue decision
122
+ * (`decideFilter`) silences: do not disturb and quiet hours spare urgent cards (unless `dndBlocksUrgent` /
123
+ * `quietHoursBlocksUrgent`), and a muted source loses its errors too — only urgent cards pass a mute.
124
+ */
125
+ private takeBackSilencedCards;
126
+ /**
127
+ * Quiet hours are scheduled do-not-disturb, but no settings change marks the moment they begin: a timer takes the
128
+ * silenced cards back then, as when do not disturb is switched on. It runs only while the stack has cards — the
129
+ * settings are read once a card is shown, never before the realm has hydrated them — and a long wait is read again
130
+ * every hour, since the clock can move under it (a time-zone or daylight-saving change, a sleep).
131
+ */
132
+ private watchQuietHoursStart;
133
+ private stopWatchingQuietHours;
99
134
  /** A desktop call the service does not wait for — its failure is logged, not thrown. */
100
135
  private unawaited;
101
136
  }
@@ -28,3 +28,13 @@ export interface QuietHoursSettings {
28
28
  * the function pure).
29
29
  */
30
30
  export declare function isInQuietHours(settings: QuietHoursSettings, now: Date): boolean;
31
+ /**
32
+ * The first moment after `now` that quiet hours begin — when the cards they silence are taken back, as when do not
33
+ * disturb is switched on. They begin only at their start time or at a midnight: {@link isInQuietHours} reads a window
34
+ * that crosses midnight with the day of the moment, so its after-midnight part begins on its own on a day that is on
35
+ * when the day before is off. Each candidate is asked of {@link isInQuietHours} itself, so the two cannot disagree.
36
+ * `null` when quiet hours are off or never begin within the next week.
37
+ *
38
+ * @param now The moment to look from — supplied by the caller, like {@link isInQuietHours}'s.
39
+ */
40
+ export declare function nextQuietHoursStart(settings: QuietHoursSettings, now: Date): Date | null;