@vokril/ui-solid 0.28.0 → 0.31.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 (262) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +48 -4
  3. package/dist/{AttributeGrid-eND8YDby.cjs → AttributeGrid-Ch1k9v5j.cjs} +1 -1
  4. package/dist/{AttributeGrid-CASILa4u.js → AttributeGrid-DqFd4gBm.js} +3 -3
  5. package/dist/Button-4meERfnv.js +300 -0
  6. package/dist/Button-OyZHrl-t.cjs +1 -0
  7. package/dist/CommandPalette-CxYZUJtN.cjs +2 -0
  8. package/dist/{CommandPalette-Cj618AOz.js → CommandPalette-DwOp8y1-.js} +1467 -1466
  9. package/dist/{CopyButton-B5gS2ft3.cjs → CopyButton-16QNPgz6.cjs} +1 -1
  10. package/dist/{CopyButton-g-WSiBDZ.js → CopyButton-BVS49lMS.js} +1 -1
  11. package/dist/{DateRangePicker-CJD9ADgB.js → DateRangePicker-8QvydugY.js} +4 -4
  12. package/dist/{DateRangePicker-Frc0HVxp.cjs → DateRangePicker-DI-06xWY.cjs} +1 -1
  13. package/dist/{GuidedTour-B6q7lYhn.cjs → GuidedTour-DUQwdW8n.cjs} +1 -1
  14. package/dist/{GuidedTour-CFCvRJN4.js → GuidedTour-DXMmHn0o.js} +2 -2
  15. package/dist/{HostPortal-CXGUUhP8.js → HostPortal-Ba3MD9CG.js} +1 -1
  16. package/dist/HostPortal-CpWsArs6.cjs +1 -0
  17. package/dist/{IconPicker-DYqNi5ud.js → IconPicker-D1G8HK92.js} +3 -3
  18. package/dist/{IconPicker-CIbJb1ei.cjs → IconPicker-Q-ZDtNkd.cjs} +1 -1
  19. package/dist/Input-Brp5EDhg.cjs +1 -0
  20. package/dist/Input-CZi8KEfm.js +374 -0
  21. package/dist/Modal-CBi7Wd2V.cjs +1 -0
  22. package/dist/Modal-iyY1HUtr.js +588 -0
  23. package/dist/{PageSkeleton-BPbb28-H.cjs → PageSkeleton-B_-4fz1q.cjs} +1 -1
  24. package/dist/{PageSkeleton-CLnJO6uD.js → PageSkeleton-zNyjLPlk.js} +3 -3
  25. package/dist/{Popover-Cttb6NYT.js → Popover-DVi179wu.js} +4 -3
  26. package/dist/Popover-DXrczbt9.cjs +1 -0
  27. package/dist/{SearchableSelect-BvCm4enQ.js → SearchableSelect-DtHbWJhR.js} +34 -33
  28. package/dist/SearchableSelect-yLVqCGFo.cjs +1 -0
  29. package/dist/StatusBarNotificationBell-DQs5g1K6.cjs +50 -0
  30. package/dist/{StatusBarNotificationBell-yryWdwyX.js → StatusBarNotificationBell-ZTEhZFmJ.js} +4980 -4678
  31. package/dist/{Stepper-D9i1Xclm.js → Stepper-CyRgzWlR.js} +1 -1
  32. package/dist/{Stepper-Ci5JpLbS.cjs → Stepper-u2ZsE5oP.cjs} +1 -1
  33. package/dist/{Textarea-CeAGf08O.cjs → Textarea-DASNQNoi.cjs} +1 -1
  34. package/dist/{Textarea-B5QqqKnI.js → Textarea-szHXQahi.js} +1 -1
  35. package/dist/{TimeSeriesChart-DOwi2lJs.js → TimeSeriesChart-D7lIqolp.js} +1 -1
  36. package/dist/{TimeSeriesChart-huvheefm.cjs → TimeSeriesChart-DGzM9B--.cjs} +1 -1
  37. package/dist/{ToggleButton-CFM8P3JY.js → ToggleButton-B22PsCqo.js} +61 -60
  38. package/dist/ToggleButton-DWslrIBN.cjs +1 -0
  39. package/dist/_internal/contract/notification.d.cts +13 -3
  40. package/dist/_internal/contract/notification.d.ts +13 -3
  41. package/dist/_internal/contract/notificationCatalog.d.cts +2 -0
  42. package/dist/_internal/contract/notificationCatalog.d.ts +2 -0
  43. package/dist/_internal/platform/settings/settingsTypes.d.cts +0 -8
  44. package/dist/_internal/platform/settings/settingsTypes.d.ts +0 -8
  45. package/dist/anchoredLayout-CBjQ1etD.cjs +1 -0
  46. package/dist/anchoredLayout-E0mqCWxk.js +233 -0
  47. package/dist/appThemeDerivation-BylmT80v.cjs +1 -0
  48. package/dist/{appThemeDerivation-CKoSe4KP.js → appThemeDerivation-DBAOkGl7.js} +260 -231
  49. package/dist/base.css +2 -2
  50. package/dist/charts/index.cjs +1 -1
  51. package/dist/charts/index.js +1 -1
  52. package/dist/context/DesktopContextMenuContext.d.cts +8 -1
  53. package/dist/context/DesktopContextMenuContext.d.ts +8 -1
  54. package/dist/createDialogShellFocus-CQ0VNC2g.cjs +1 -0
  55. package/dist/{createDialogShellFocus-B4piXDU4.js → createDialogShellFocus-DbiQmLgb.js} +9 -9
  56. package/dist/createResizableSidebar-COlpGQ7H.cjs +1 -0
  57. package/dist/createResizableSidebar-cmCKTIg_.js +504 -0
  58. package/dist/desktop/index.cjs +1 -1
  59. package/dist/desktop/index.js +3 -3
  60. package/dist/dialogFocusRestore-BhxVTSiP.js +10 -0
  61. package/dist/dialogFocusRestore-DP5b1bDo.cjs +1 -0
  62. package/dist/feedback/index.cjs +1 -1
  63. package/dist/feedback/index.js +3 -3
  64. package/dist/forms/Input.d.cts +20 -0
  65. package/dist/forms/Input.d.ts +20 -0
  66. package/dist/forms/InputMessage.d.cts +19 -0
  67. package/dist/forms/InputMessage.d.ts +19 -0
  68. package/dist/forms/index.cjs +1 -1
  69. package/dist/forms/index.js +9 -9
  70. package/dist/grid/index.cjs +1 -1
  71. package/dist/grid/index.js +1 -1
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.js +516 -509
  74. package/dist/layout/index.cjs +1 -1
  75. package/dist/layout/index.js +2 -2
  76. package/dist/layout/resizeCarry.d.cts +17 -0
  77. package/dist/layout/resizeCarry.d.ts +17 -0
  78. package/dist/mainRealmDom-B215swW-.js +166 -0
  79. package/dist/mainRealmDom-BYGSE-fo.cjs +1 -0
  80. package/dist/nativeTitleHold-A9jUISgQ.js +170 -0
  81. package/dist/nativeTitleHold-B7Ou-W9b.cjs +1 -0
  82. package/dist/navigation/index.cjs +1 -1
  83. package/dist/navigation/index.js +1 -1
  84. package/dist/notifications/NotificationItem.d.cts +12 -3
  85. package/dist/notifications/NotificationItem.d.ts +12 -3
  86. package/dist/notifications/NotificationsCenter.d.cts +18 -0
  87. package/dist/notifications/NotificationsCenter.d.ts +18 -0
  88. package/dist/notifications/RunningProgressCards.d.cts +3 -0
  89. package/dist/notifications/RunningProgressCards.d.ts +3 -0
  90. package/dist/notifications/StatusBarNotificationBell.d.cts +18 -6
  91. package/dist/notifications/StatusBarNotificationBell.d.ts +18 -6
  92. package/dist/notifications/dismissableToastIds.d.cts +2 -1
  93. package/dist/notifications/dismissableToastIds.d.ts +2 -1
  94. package/dist/notifications/fireNotification.d.cts +35 -16
  95. package/dist/notifications/fireNotification.d.ts +35 -16
  96. package/dist/notifications/index.cjs +1 -1
  97. package/dist/notifications/index.d.cts +1 -0
  98. package/dist/notifications/index.d.ts +1 -0
  99. package/dist/notifications/index.js +56 -52
  100. package/dist/notifications/nativeEngine.d.cts +54 -16
  101. package/dist/notifications/nativeEngine.d.ts +54 -16
  102. package/dist/notifications/notificationCardServices.d.cts +2 -1
  103. package/dist/notifications/notificationCardServices.d.ts +2 -1
  104. package/dist/notifications/notificationCommands.d.cts +3 -3
  105. package/dist/notifications/notificationCommands.d.ts +3 -3
  106. package/dist/notifications/notificationEntryList.d.cts +91 -0
  107. package/dist/notifications/notificationEntryList.d.ts +91 -0
  108. package/dist/notifications/notificationService.d.cts +33 -3
  109. package/dist/notifications/notificationService.d.ts +33 -3
  110. package/dist/notifications/toast.d.cts +3 -0
  111. package/dist/notifications/toast.d.ts +3 -0
  112. package/dist/notifications/toastCorner.d.cts +8 -0
  113. package/dist/notifications/toastCorner.d.ts +8 -0
  114. package/dist/notifications/toastFilterPolicy.d.cts +33 -1
  115. package/dist/notifications/toastFilterPolicy.d.ts +33 -1
  116. package/dist/overlay/Modal.d.cts +6 -0
  117. package/dist/overlay/Modal.d.ts +6 -0
  118. package/dist/overlay/backgroundInert.d.cts +6 -2
  119. package/dist/overlay/backgroundInert.d.ts +6 -2
  120. package/dist/overlay/command-palette/CommandPalette.d.cts +12 -0
  121. package/dist/overlay/command-palette/CommandPalette.d.ts +12 -0
  122. package/dist/overlay/index.cjs +1 -1
  123. package/dist/overlay/index.js +70 -68
  124. package/dist/overlay/nativeTitleHold.d.cts +24 -0
  125. package/dist/overlay/nativeTitleHold.d.ts +24 -0
  126. package/dist/ownerAnimationFrame-DzFcMSmn.js +19 -0
  127. package/dist/ownerAnimationFrame-T6jf6qYC.cjs +1 -0
  128. package/dist/server/{AttributeGrid-CMi-UtWb.js → AttributeGrid-Bpjlauuz.js} +2 -2
  129. package/dist/server/{AttributeGrid-B7sb3btp.cjs → AttributeGrid-DNYdKb8J.cjs} +1 -1
  130. package/dist/server/CommandPalette-BuVxnqBG.cjs +1 -0
  131. package/dist/server/{CommandPalette-CozogFlk.js → CommandPalette-Dn3NKXPM.js} +1095 -1069
  132. package/dist/server/{DateRangePicker-KLZzyuPJ.cjs → DateRangePicker-BFzNjaME.cjs} +1 -1
  133. package/dist/server/{DateRangePicker-C35q8BTw.js → DateRangePicker-CnYkTgXX.js} +3 -3
  134. package/dist/server/{GuidedTour-DmLbBttx.js → GuidedTour-BZardPYW.js} +1 -1
  135. package/dist/server/{GuidedTour-DfV0yzqh.cjs → GuidedTour-yhdZk2SU.cjs} +1 -1
  136. package/dist/server/{HostPortal-CXGUUhP8.js → HostPortal-C4IrAeWN.js} +1 -1
  137. package/dist/server/HostPortal-D5ECrJvn.cjs +1 -0
  138. package/dist/server/{IconPicker-B1soopAp.cjs → IconPicker-C5lAN9pX.cjs} +1 -1
  139. package/dist/server/{IconPicker-B4aXspLw.js → IconPicker-DDWgB7sm.js} +3 -3
  140. package/dist/server/Input-AdF-i0O8.js +245 -0
  141. package/dist/server/Input-XF9Jr0G9.cjs +1 -0
  142. package/dist/server/{Modal-BheFQLs1.js → Modal-C5dzgcRW.js} +102 -97
  143. package/dist/server/{Modal-BswxV8Pn.cjs → Modal-nAhBS1L9.cjs} +1 -1
  144. package/dist/server/Popover-C5avmGWz.cjs +1 -0
  145. package/dist/server/{Popover-Cg28aPUZ.js → Popover-H3AAYZI0.js} +57 -57
  146. package/dist/server/{SearchableSelect-09ECcDlB.cjs → SearchableSelect-CZrXDKfC.cjs} +1 -1
  147. package/dist/server/{SearchableSelect-vjhS4c-H.js → SearchableSelect-DMqed5Er.js} +1 -1
  148. package/dist/server/StatusBarNotificationBell-CGcMdT4h.cjs +49 -0
  149. package/dist/server/{StatusBarNotificationBell-DdAdsduo.js → StatusBarNotificationBell-DW2l5O9B.js} +4812 -4520
  150. package/dist/server/{Stepper-DxNrskdq.cjs → Stepper-CpapA_WH.cjs} +1 -1
  151. package/dist/server/{Stepper-n5f9r-ye.js → Stepper-gGA7JwjV.js} +1 -1
  152. package/dist/server/{Textarea-BQf2lL59.cjs → Textarea-Bh5LVrBn.cjs} +1 -1
  153. package/dist/server/{Textarea-BTH48NET.js → Textarea-DVkfGkP0.js} +1 -1
  154. package/dist/server/{ToggleButton-TE3Xf2yD.cjs → ToggleButton-CA9T-OsI.cjs} +1 -1
  155. package/dist/server/{ToggleButton-FywO2CCI.js → ToggleButton-CBNKajZa.js} +4 -4
  156. package/dist/server/{VpTrash-Dlq8o6Uv.js → VpTrash-CZMWCIpF.js} +84 -70
  157. package/dist/server/VpTrash-DiczWhwm.cjs +1 -0
  158. package/dist/server/appThemeDerivation-BylmT80v.cjs +1 -0
  159. package/dist/server/{appThemeDerivation-CKoSe4KP.js → appThemeDerivation-DBAOkGl7.js} +260 -231
  160. package/dist/server/{createDialogShellFocus-BiBAZOCI.cjs → createDialogShellFocus-CDaLuPg8.cjs} +1 -1
  161. package/dist/server/{createDialogShellFocus-BFo8awdj.js → createDialogShellFocus-LGDBOVnr.js} +6 -6
  162. package/dist/server/{createResizableSidebar-BImbKlLe.js → createResizableSidebar-Dvu7iEk1.js} +1 -1
  163. package/dist/server/{createResizableSidebar-GFgZIj-5.cjs → createResizableSidebar-v40ZOb-Q.cjs} +1 -1
  164. package/dist/server/desktop/index.cjs +1 -1
  165. package/dist/server/desktop/index.js +3 -3
  166. package/dist/server/dialogFocusRestore-BhxVTSiP.js +10 -0
  167. package/dist/server/dialogFocusRestore-DP5b1bDo.cjs +1 -0
  168. package/dist/server/forms/index.cjs +1 -1
  169. package/dist/server/forms/index.js +7 -7
  170. package/dist/server/grid/index.cjs +1 -1
  171. package/dist/server/grid/index.js +1 -1
  172. package/dist/server/{index-UIjsx3oJ.js → index-BEARfm54.js} +3604 -3617
  173. package/dist/server/index-C6rYfWCJ.cjs +1 -0
  174. package/dist/server/index.cjs +1 -1
  175. package/dist/server/index.js +478 -472
  176. package/dist/server/layout/index.cjs +1 -1
  177. package/dist/server/layout/index.js +2 -2
  178. package/dist/server/navigation/index.cjs +1 -1
  179. package/dist/server/navigation/index.js +1 -1
  180. package/dist/server/notifications/index.cjs +1 -1
  181. package/dist/server/notifications/index.js +56 -52
  182. package/dist/server/overlay/index.cjs +1 -1
  183. package/dist/server/overlay/index.js +54 -53
  184. package/dist/server/tokens/index.cjs +1 -1
  185. package/dist/server/tokens/index.js +30 -28
  186. package/dist/solid/feedback/Badge.jsx +3 -14
  187. package/dist/solid/forms/Button.jsx +3 -14
  188. package/dist/solid/forms/Input.jsx +31 -5
  189. package/dist/solid/forms/Input.module.css.js +1 -0
  190. package/dist/solid/forms/InputMessage.jsx +86 -0
  191. package/dist/solid/forms/PressableSurface.jsx +3 -14
  192. package/dist/solid/layout/ResizeHandle.jsx +11 -1
  193. package/dist/solid/layout/resizeCarry.js +31 -0
  194. package/dist/solid/notifications/NotificationHost.jsx +6 -29
  195. package/dist/solid/notifications/NotificationItem.jsx +5 -5
  196. package/dist/solid/notifications/NotificationPanel.jsx +14 -4
  197. package/dist/solid/notifications/NotificationsCenter.jsx +70 -12
  198. package/dist/solid/notifications/RunningProgressCards.jsx +1 -1
  199. package/dist/solid/notifications/StatusBarNotificationBell.jsx +21 -19
  200. package/dist/solid/notifications/catalogAdapter.js +1 -0
  201. package/dist/solid/notifications/fireNotification.js +21 -16
  202. package/dist/solid/notifications/index.js +1 -0
  203. package/dist/solid/notifications/nativeEngine.js +51 -11
  204. package/dist/solid/notifications/notificationEntryList.js +168 -0
  205. package/dist/solid/notifications/notificationService.js +22 -4
  206. package/dist/solid/notifications/toast.js +54 -7
  207. package/dist/solid/notifications/toastCorner.js +3 -0
  208. package/dist/solid/notifications/toastFilterPolicy.js +12 -0
  209. package/dist/solid/overlay/Drawer.jsx +2 -1
  210. package/dist/solid/overlay/Modal.jsx +42 -4
  211. package/dist/solid/overlay/command-palette/CommandPalette.jsx +4 -4
  212. package/dist/solid/overlay/context-menu/DesktopContextMenu.jsx +8 -7
  213. package/dist/solid/overlay/nativeTitleHold.js +33 -0
  214. package/dist/solid/overlay/tooltipDirective.js +3 -11
  215. package/dist/solid/tokens/index.js +1 -0
  216. package/dist/solid/tokens/palette/paletteContract.js +27 -0
  217. package/dist/style.css +2 -2
  218. package/dist/theme.css +1 -1
  219. package/dist/tokens/index.cjs +1 -1
  220. package/dist/tokens/index.d.cts +1 -0
  221. package/dist/tokens/index.d.ts +1 -0
  222. package/dist/tokens/index.js +30 -28
  223. package/dist/tokens/palette/paletteContract.d.cts +17 -0
  224. package/dist/tokens/palette/paletteContract.d.ts +17 -0
  225. package/dist/tokens/tokens.css +1 -1
  226. package/dist/ui.css +1 -1
  227. package/package.json +1 -1
  228. package/dist/Button-Bb68ymNP.cjs +0 -1
  229. package/dist/Button-D-T0tyGF.js +0 -305
  230. package/dist/CommandPalette-5FQRgPG9.cjs +0 -2
  231. package/dist/HostPortal-CgJwxt-f.cjs +0 -1
  232. package/dist/Input-CZruORyy.cjs +0 -1
  233. package/dist/Input-DkPhsdfk.js +0 -227
  234. package/dist/Modal-CY6ePolt.cjs +0 -1
  235. package/dist/Modal-NzZzHSwb.js +0 -559
  236. package/dist/Popover-CWrR51eG.cjs +0 -1
  237. package/dist/SearchableSelect-CVqdVMOC.cjs +0 -1
  238. package/dist/StatusBarNotificationBell-CJ3HuhRu.cjs +0 -50
  239. package/dist/ToggleButton-BFWh1_o5.cjs +0 -1
  240. package/dist/anchoredLayout-Dstwa5OH.cjs +0 -1
  241. package/dist/anchoredLayout-FC-qv8xm.js +0 -250
  242. package/dist/appThemeDerivation-Be_oKljl.cjs +0 -1
  243. package/dist/createDialogShellFocus-CJaw9-B9.cjs +0 -1
  244. package/dist/createResizableSidebar-BDUlX9-G.js +0 -472
  245. package/dist/createResizableSidebar-BVJBU2kP.cjs +0 -1
  246. package/dist/dialogFocusRestore--dH59ER2.js +0 -35
  247. package/dist/dialogFocusRestore-CL-ExfAA.cjs +0 -1
  248. package/dist/mainRealmDom-C12lr9lm.js +0 -171
  249. package/dist/mainRealmDom-S6teqEr4.cjs +0 -1
  250. package/dist/server/CommandPalette-DQK6N98N.cjs +0 -1
  251. package/dist/server/HostPortal-CgJwxt-f.cjs +0 -1
  252. package/dist/server/Input-CjvD8w18.cjs +0 -1
  253. package/dist/server/Input-DaEN2JJd.js +0 -127
  254. package/dist/server/Popover-BsxIKBbl.cjs +0 -1
  255. package/dist/server/StatusBarNotificationBell-Z2LmIkM1.cjs +0 -49
  256. package/dist/server/VpTrash-D49oUUJh.cjs +0 -1
  257. package/dist/server/appThemeDerivation-Be_oKljl.cjs +0 -1
  258. package/dist/server/dialogFocusRestore--dH59ER2.js +0 -35
  259. package/dist/server/dialogFocusRestore-CL-ExfAA.cjs +0 -1
  260. package/dist/server/index-2mQPVEDR.cjs +0 -1
  261. package/dist/tooltipCoordinator-BzxEyKhA.js +0 -144
  262. package/dist/tooltipCoordinator-DslqMlsI.cjs +0 -1
@@ -46,9 +46,10 @@ export interface NotificationInput extends NotificationInputBase {
46
46
  /** When set, the gear menu offers a "Don't show again" toggle keyed by this id. */
47
47
  neverShowAgainKey?: string;
48
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.
49
+ * The key "remind me later" on this card silences — it wins over `neverShowAgainKey` (`cardRemindKey`). The issuer's
50
+ * key (`ToastCommonOptions.remindKey`) sets it; so does a verb whose card's title moves away from the text it was
51
+ * issued with (a progress's `update`), with its "don't show again" key, else the key of that text, so the menu
52
+ * silences the next issue the decision checks. Unset, the card keys on `neverShowAgainKey`, else on its title.
52
53
  */
53
54
  remindKey?: string;
54
55
  progress?: NotificationProgress;
@@ -71,13 +72,24 @@ export interface NotificationItem extends NotificationInput {
71
72
  focused: boolean;
72
73
  /**
73
74
  * The card is off the toast stack while its progress runs — the user sent it away (Escape, the native overlay's
74
- * close), or a setting that silences it took it back or was on when it was issued. It lives on in
75
- * the notification center, its handles still `open`, until the progress ends (the card is back on the toast stack
76
- * with its outcome, newest, unless a silencing setting ends it then), an issue under its id is shown, or its program
77
- * closes it. Only a running card is ever hidden ({@link isProgressRunning}), and only a mounted center draws it
78
- * (`NotificationsCenter`, `NotificationPanel`): a window that mounts none has no way to the card until then.
75
+ * close) where a notification center is reachable, or a setting that silences it took it back or was on when it was
76
+ * issued. It lives on in the notification center, its handles still `open`, until the progress ends (the card is
77
+ * back on the toast stack with its outcome, newest, unless a silencing setting ends it then), an issue under its id is
78
+ * shown, or its program closes it. Only a running card is ever hidden ({@link isProgressRunning}), and only a mounted
79
+ * center draws it (`NotificationsCenter`, `NotificationPanel`). A realm that reaches none says so
80
+ * ({@link NativeNotificationEngineDependencies.centerReachable}): the user's close then leaves the card on the stack.
81
+ * A setting that silences it hides it all the same — the settings keep it off the screen, center or not —, so there
82
+ * it is out of reach until its progress ends.
79
83
  */
80
84
  hidden?: boolean;
85
+ /**
86
+ * Since when the card has been out of the user's sight on the toast stack, by the engine's clock: sent to the
87
+ * notification center ({@link hidden}), or pushed past the visible cap by newer toasts — the host paints the newest
88
+ * `maxVisibleNotifications` of the cards on the stack ({@link isOnToastStack}). A card keeps the moment it first left
89
+ * sight until the stack shows it again, which clears it. The stack records it — nothing else sets it —, the host
90
+ * paints the cards on the toast stack that have none, and {@link hiddenRunningProgress} orders by it.
91
+ */
92
+ outOfSightSince?: number;
81
93
  }
82
94
  export interface NotificationHandle {
83
95
  id: string;
@@ -116,6 +128,12 @@ export interface NativeNotificationEngineDependencies {
116
128
  * Unset, the user turns no card down.
117
129
  */
118
130
  readonly isTurnedDown?: (item: NotificationItem) => boolean;
131
+ /**
132
+ * Whether the user can reach a notification center in the realm now — where the user's close sends a running
133
+ * progress ({@link NativeNotificationEngine.dismiss}). Read at each such close: where none is reachable, the card
134
+ * stays on the toast stack. Unset, a center is reachable.
135
+ */
136
+ readonly centerReachable?: () => boolean;
119
137
  readonly now?: () => number;
120
138
  readonly setTimeout?: (callback: () => void, timeoutMs: number) => number;
121
139
  readonly clearTimeout?: (handle: number) => void;
@@ -135,11 +153,13 @@ export interface NativeNotificationEngine {
135
153
  * The user sends a card away — its close button, Escape, Delete, a gear-menu choice, the native overlay's close: the
136
154
  * card closes and its handles report `dismissed`. A card whose progress runs is not the user's to end
137
155
  * ({@link isProgressRunning}): it only leaves the toast stack and lives on in the notification center (`hidden`), its
138
- * handles still `open` — unless the user turned its notification down
139
- * ({@link NativeNotificationEngineDependencies.isTurnedDown}): the gear menu's "don't show again" and "remind me
140
- * later", on the stack's card or a center's copy, end it (`dismissed`), as the reference's "Don't Show Again" closes
141
- * its notification (`workbench/services/notification/common/notificationService.ts:207-217`) and a chosen button
142
- * expires a running progress (`notificationsViewer.ts:519-529`).
156
+ * handles still `open` — and where no center is reachable
157
+ * ({@link NativeNotificationEngineDependencies.centerReachable}) it stays where it is, since nothing could draw it
158
+ * there —, unless the user turned its notification down ({@link NativeNotificationEngineDependencies.isTurnedDown}):
159
+ * the gear menu's "don't show again" and "remind me later", on the stack's card or a center's copy, end it
160
+ * (`dismissed`), as the reference's "Don't Show Again" closes its notification
161
+ * (`workbench/services/notification/common/notificationService.ts:207-217`) and a chosen button expires a running
162
+ * progress (`notificationsViewer.ts:519-529`).
143
163
  */
144
164
  readonly dismiss: (id: string) => void;
145
165
  /**
@@ -158,6 +178,12 @@ export interface NativeNotificationEngine {
158
178
  * is answered, never taken away.
159
179
  */
160
180
  readonly reject: (id: string) => void;
181
+ /**
182
+ * The settings the engine reads changed: which cards the visible cap (`maxVisibleNotifications`) leaves out of sight
183
+ * is read again ({@link NotificationItem.outOfSightSince}), and the stack emits when that changed. The realm's
184
+ * notification service calls it on every change of the notification settings.
185
+ */
186
+ readonly refresh: () => void;
161
187
  readonly dispose: () => void;
162
188
  }
163
189
  /**
@@ -193,9 +219,10 @@ export declare function isNotificationSticky(item: Pick<NotificationItem, 'stick
193
219
  * Whether the card's progress runs — the operation behind it ends such a card, not the user and not a setting: it has
194
220
  * no close button, Delete leaves it, and Escape, any other close of the user's or a setting that silences it only
195
221
  * sends it to the notification center (reference `notificationsViewer.ts:492-495`, `notificationsCommands.ts:138-141`,
196
- * `notificationsToasts.ts:481-489` and `:143-153`). Only the user's turning its notification down ends it
197
- * ({@link NativeNotificationEngine.dismiss}). A developer preview's progress (`isolated`: the catalog's preview toast,
198
- * the preview runtime's cards) has no operation behind it and closes like any card.
222
+ * `notificationsToasts.ts:481-489` and `:143-153`) — the user's close leaves it where it is when no center is
223
+ * reachable. Only the user's turning its notification down ends it ({@link NativeNotificationEngine.dismiss}). A
224
+ * developer preview's progress (`isolated`: the catalog's preview toast, the preview runtime's cards) has no operation
225
+ * behind it and closes like any card.
199
226
  */
200
227
  export declare function isProgressRunning(item: Pick<NotificationItem, 'progress' | 'isolated'>): boolean;
201
228
  /**
@@ -203,6 +230,17 @@ export declare function isProgressRunning(item: Pick<NotificationItem, 'progress
203
230
  * the notification center. The host paints these cards, and the engine clips the same ones to the visible cap.
204
231
  */
205
232
  export declare function isOnToastStack(item: Pick<NotificationItem, 'priority' | 'hidden'>): boolean;
233
+ /**
234
+ * The running progress cards out of the user's sight on the toast stack — sent to the notification center
235
+ * ({@link NotificationItem.hidden}) or pushed past the visible cap by newer toasts —, the one that left sight last
236
+ * first ({@link NotificationItem.outOfSightSince}; of those that left at the same moment, the newest first). Pure:
237
+ * `items` is the stack as it emits them. It is the kit's one answer to "which progress runs out of sight": the status
238
+ * bar bell counts these cards, and an application that mirrors such a progress in its status bar shows the first. The
239
+ * reference does the same with a notification progress whose toast is not visible — hidden, or left out by the
240
+ * toasts' cap (`notificationsToasts.ts:675-676`, `:705`) —: it runs on as a window progress, and the window progress
241
+ * entry shows the last one hidden (`workbench/services/progress/browser/progressService.ts:339-357`, `:127`, `:147`).
242
+ */
243
+ export declare function hiddenRunningProgress(items: readonly NotificationItem[]): NotificationItem[];
206
244
  /**
207
245
  * Creates an in-memory engine — the notification service's toast stack, or a preview's isolated one.
208
246
  * There is no module engine: whoever shows toasts owns one.
@@ -14,7 +14,8 @@ import type { NotificationItemController, NotificationItemShell } from './Notifi
14
14
  * notification settings, so a card's timer follows a change of the default duration at once. A card closes
15
15
  * through here only by the user's hand — its close button, a gear-menu choice, the native overlay's copy of
16
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, unless the gear menu's choice turned it down.
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.
18
19
  */
19
20
  export declare function realmCardController(host: KitHost, settings: Accessor<NotificationSettings>): NotificationItemController;
20
21
  /**
@@ -14,7 +14,8 @@ import type { NotificationItemController, NotificationItemShell } from './Notifi
14
14
  * notification settings, so a card's timer follows a change of the default duration at once. A card closes
15
15
  * through here only by the user's hand — its close button, a gear-menu choice, the native overlay's copy of
16
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, unless the gear menu's choice turned it down.
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.
18
19
  */
19
20
  export declare function realmCardController(host: KitHost, settings: Accessor<NotificationSettings>): NotificationItemController;
20
21
  /**
@@ -15,7 +15,7 @@ export declare const ACCEPT_PRIMARY_ACTION_NOTIFICATION = "notification.acceptPr
15
15
  export declare const CLEAR_NOTIFICATION = "notification.clear";
16
16
  /**
17
17
  * Hide the dismissable toasts — `Escape` while toasts are visible. A running progress is not closed: it goes to the
18
- * notification center.
18
+ * notification center, or stays on the stack where none is reachable.
19
19
  */
20
20
  export declare const HIDE_NOTIFICATION_TOASTS = "notifications.hideToasts";
21
21
  export interface NotificationCommandRegistries {
@@ -30,8 +30,8 @@ export interface NotificationCommandDeps {
30
30
  */
31
31
  readonly clearFocused: () => void;
32
32
  /**
33
- * Send every dismissable toast away — a running progress to the notification center, alive; acknowledgement-required
34
- * ones stay (#875).
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
35
  */
36
36
  readonly hideToasts: () => void;
37
37
  }
@@ -15,7 +15,7 @@ export declare const ACCEPT_PRIMARY_ACTION_NOTIFICATION = "notification.acceptPr
15
15
  export declare const CLEAR_NOTIFICATION = "notification.clear";
16
16
  /**
17
17
  * Hide the dismissable toasts — `Escape` while toasts are visible. A running progress is not closed: it goes to the
18
- * notification center.
18
+ * notification center, or stays on the stack where none is reachable.
19
19
  */
20
20
  export declare const HIDE_NOTIFICATION_TOASTS = "notifications.hideToasts";
21
21
  export interface NotificationCommandRegistries {
@@ -30,8 +30,8 @@ export interface NotificationCommandDeps {
30
30
  */
31
31
  readonly clearFocused: () => void;
32
32
  /**
33
- * Send every dismissable toast away — a running progress to the notification center, alive; acknowledgement-required
34
- * ones stay (#875).
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
35
  */
36
36
  readonly hideToasts: () => void;
37
37
  }
@@ -0,0 +1,91 @@
1
+ import type { NotificationTimelineEntry } from './notificationTimeline.cjs';
2
+ /** The mark of an entry of a notification center or panel, spread on the entry's element. */
3
+ export declare const notificationEntryMark: {
4
+ readonly "data-notification-entry": "";
5
+ };
6
+ /**
7
+ * Moves the focus to the first entry of the notification center or panel drawn under `root` — a running progress
8
+ * card, else the newest record —, as the reference's center does when it is shown. Whether the entry now holds the
9
+ * focus: `false` when `root` lists no entry, or when the one it lists could not take the focus (an inert or hidden
10
+ * subtree); the caller then focuses what it shows instead (the reference focuses its empty list).
11
+ */
12
+ export declare function focusFirstNotificationEntry(root: ParentNode, options?: FocusOptions): boolean;
13
+ /**
14
+ * What Page Up and Page Down do on a surface — the one row of the key table that differs between them:
15
+ * - `'ends'`, the toast stack: the first and the last toast, as Home and End — the reference binds its first-toast and
16
+ * last-toast commands to Page Up and Page Down, with Home and End as their second keys
17
+ * (`workbench/browser/parts/notifications/notificationsCommands.ts:248-270`);
18
+ * - a function, a scrolled list: the entry a page away from `current` toward `direction`, read from the list's
19
+ * geometry ({@link notificationListPageStep}), as the reference's list pages (`listCommands.ts:143-167`).
20
+ */
21
+ export type NotificationListPaging = 'ends' | ((current: number | null, direction: -1 | 1) => number);
22
+ /**
23
+ * A list's own keys — one table for the toast stack and the notification lists: Down moves to the next entry, Up to
24
+ * the previous one, without wrapping (`listCommands.ts:75-107`); Home goes to the first, End to the last
25
+ * (`listCommands.ts:169-193`); Page Up and Page Down are the surface's `paging`. From no focused entry (`current`
26
+ * null) Down starts at the first and Up at the last. `null` for any other key and for an empty list.
27
+ */
28
+ export declare function notificationListFocusStep(event: {
29
+ readonly key: string;
30
+ }, current: number | null, count: number, paging: NotificationListPaging): number | null;
31
+ /** Where a scrolled list's entries lie and how much of them shows: what a page step reads. */
32
+ export interface NotificationListPage {
33
+ /** Each entry's top and bottom, in pixels down from the top of the scrolled content, in drawing order. */
34
+ readonly extents: readonly {
35
+ readonly top: number;
36
+ readonly bottom: number;
37
+ }[];
38
+ /** How far the content is scrolled. */
39
+ readonly scrollTop: number;
40
+ /** The height that shows. */
41
+ readonly height: number;
42
+ /** The furthest the content scrolls. */
43
+ readonly maxScrollTop: number;
44
+ }
45
+ /**
46
+ * The entry a Page key moves to in a scrolled list, as the reference's list pages (`base/browser/ui/list/
47
+ * listWidget.ts:1836-1902`): Page Down goes to the last entry that ends inside the page that shows, and from there to
48
+ * the last that ends inside the page below; Page Up goes to the first entry that starts inside the page that shows,
49
+ * and from there to the first that starts inside the page above. At either end of the content the focus stays. The
50
+ * step never goes against its key and always moves while an entry lies beyond the focus, so an entry taller than the
51
+ * page is still reached.
52
+ */
53
+ export declare function notificationListPageStep(page: NotificationListPage, current: number | null, direction: -1 | 1): number;
54
+ /**
55
+ * The list keys of a center's entries, for the `keydown` of the scrolled element that holds them (`viewport`): from an
56
+ * entry, or from a control inside one, the key moves the focus along the entries {@link notificationListFocusStep},
57
+ * a page at a time for Page Up and Page Down, and the entry that takes it is scrolled just into view, as the
58
+ * reference reveals its list's focus (`listCommands.ts:58-73`; `listWidget.ts:1985-1996`). A key aimed elsewhere,
59
+ * one an editable element takes, or one already handled is left alone.
60
+ */
61
+ export declare function moveNotificationEntryFocus(event: KeyboardEvent, viewport: HTMLElement): void;
62
+ /** What a notification list that follows its focus tells its owner. */
63
+ export interface NotificationListFocus {
64
+ /**
65
+ * Whether the keyboard focus is in the list: set when the focus enters it, cleared when the focus moves to an element
66
+ * outside it (`focusin`). It still holds after the element that had the focus went away with its entry — the
67
+ * reference measures "the center had the focus" before the removal (`notificationsCenter.ts:344-346`) —, so an owner
68
+ * that hands the focus back when the list closes reads it rather than where the focus fell.
69
+ */
70
+ readonly holdsFocus: () => boolean;
71
+ }
72
+ export interface NotificationListFocusOptions {
73
+ /** The element whose focus is followed: a center, a panel's list. */
74
+ readonly container: () => HTMLElement | undefined;
75
+ /** Reads what the list draws — tracked: the focus is checked once each change has been drawn. */
76
+ readonly drawn: () => unknown;
77
+ /** Focuses the list's own target when no entry is left to take the focus. */
78
+ readonly fallback: (container: HTMLElement) => void;
79
+ }
80
+ /**
81
+ * Keeps the keyboard focus in a notification list whose entries change under it, as the reference's list does
82
+ * (`notificationsList.ts:149-199`): the entry that held the focus keeps it when it is still drawn; when it went away,
83
+ * the focus goes to the entry before it — the first when it was the first —, and to the list's own target when no
84
+ * entry is left. Call it in the component's setup.
85
+ */
86
+ export declare function followNotificationListFocus(options: NotificationListFocusOptions): NotificationListFocus;
87
+ /**
88
+ * A record's accessible name — its severity, its message and its source, as the reference names a notification of
89
+ * its list (`notificationsList.ts:271-283`).
90
+ */
91
+ export declare function timelineEntryAriaLabel(entry: NotificationTimelineEntry): string;
@@ -0,0 +1,91 @@
1
+ import type { NotificationTimelineEntry } from './notificationTimeline.js';
2
+ /** The mark of an entry of a notification center or panel, spread on the entry's element. */
3
+ export declare const notificationEntryMark: {
4
+ readonly "data-notification-entry": "";
5
+ };
6
+ /**
7
+ * Moves the focus to the first entry of the notification center or panel drawn under `root` — a running progress
8
+ * card, else the newest record —, as the reference's center does when it is shown. Whether the entry now holds the
9
+ * focus: `false` when `root` lists no entry, or when the one it lists could not take the focus (an inert or hidden
10
+ * subtree); the caller then focuses what it shows instead (the reference focuses its empty list).
11
+ */
12
+ export declare function focusFirstNotificationEntry(root: ParentNode, options?: FocusOptions): boolean;
13
+ /**
14
+ * What Page Up and Page Down do on a surface — the one row of the key table that differs between them:
15
+ * - `'ends'`, the toast stack: the first and the last toast, as Home and End — the reference binds its first-toast and
16
+ * last-toast commands to Page Up and Page Down, with Home and End as their second keys
17
+ * (`workbench/browser/parts/notifications/notificationsCommands.ts:248-270`);
18
+ * - a function, a scrolled list: the entry a page away from `current` toward `direction`, read from the list's
19
+ * geometry ({@link notificationListPageStep}), as the reference's list pages (`listCommands.ts:143-167`).
20
+ */
21
+ export type NotificationListPaging = 'ends' | ((current: number | null, direction: -1 | 1) => number);
22
+ /**
23
+ * A list's own keys — one table for the toast stack and the notification lists: Down moves to the next entry, Up to
24
+ * the previous one, without wrapping (`listCommands.ts:75-107`); Home goes to the first, End to the last
25
+ * (`listCommands.ts:169-193`); Page Up and Page Down are the surface's `paging`. From no focused entry (`current`
26
+ * null) Down starts at the first and Up at the last. `null` for any other key and for an empty list.
27
+ */
28
+ export declare function notificationListFocusStep(event: {
29
+ readonly key: string;
30
+ }, current: number | null, count: number, paging: NotificationListPaging): number | null;
31
+ /** Where a scrolled list's entries lie and how much of them shows: what a page step reads. */
32
+ export interface NotificationListPage {
33
+ /** Each entry's top and bottom, in pixels down from the top of the scrolled content, in drawing order. */
34
+ readonly extents: readonly {
35
+ readonly top: number;
36
+ readonly bottom: number;
37
+ }[];
38
+ /** How far the content is scrolled. */
39
+ readonly scrollTop: number;
40
+ /** The height that shows. */
41
+ readonly height: number;
42
+ /** The furthest the content scrolls. */
43
+ readonly maxScrollTop: number;
44
+ }
45
+ /**
46
+ * The entry a Page key moves to in a scrolled list, as the reference's list pages (`base/browser/ui/list/
47
+ * listWidget.ts:1836-1902`): Page Down goes to the last entry that ends inside the page that shows, and from there to
48
+ * the last that ends inside the page below; Page Up goes to the first entry that starts inside the page that shows,
49
+ * and from there to the first that starts inside the page above. At either end of the content the focus stays. The
50
+ * step never goes against its key and always moves while an entry lies beyond the focus, so an entry taller than the
51
+ * page is still reached.
52
+ */
53
+ export declare function notificationListPageStep(page: NotificationListPage, current: number | null, direction: -1 | 1): number;
54
+ /**
55
+ * The list keys of a center's entries, for the `keydown` of the scrolled element that holds them (`viewport`): from an
56
+ * entry, or from a control inside one, the key moves the focus along the entries {@link notificationListFocusStep},
57
+ * a page at a time for Page Up and Page Down, and the entry that takes it is scrolled just into view, as the
58
+ * reference reveals its list's focus (`listCommands.ts:58-73`; `listWidget.ts:1985-1996`). A key aimed elsewhere,
59
+ * one an editable element takes, or one already handled is left alone.
60
+ */
61
+ export declare function moveNotificationEntryFocus(event: KeyboardEvent, viewport: HTMLElement): void;
62
+ /** What a notification list that follows its focus tells its owner. */
63
+ export interface NotificationListFocus {
64
+ /**
65
+ * Whether the keyboard focus is in the list: set when the focus enters it, cleared when the focus moves to an element
66
+ * outside it (`focusin`). It still holds after the element that had the focus went away with its entry — the
67
+ * reference measures "the center had the focus" before the removal (`notificationsCenter.ts:344-346`) —, so an owner
68
+ * that hands the focus back when the list closes reads it rather than where the focus fell.
69
+ */
70
+ readonly holdsFocus: () => boolean;
71
+ }
72
+ export interface NotificationListFocusOptions {
73
+ /** The element whose focus is followed: a center, a panel's list. */
74
+ readonly container: () => HTMLElement | undefined;
75
+ /** Reads what the list draws — tracked: the focus is checked once each change has been drawn. */
76
+ readonly drawn: () => unknown;
77
+ /** Focuses the list's own target when no entry is left to take the focus. */
78
+ readonly fallback: (container: HTMLElement) => void;
79
+ }
80
+ /**
81
+ * Keeps the keyboard focus in a notification list whose entries change under it, as the reference's list does
82
+ * (`notificationsList.ts:149-199`): the entry that held the focus keeps it when it is still drawn; when it went away,
83
+ * the focus goes to the entry before it — the first when it was the first —, and to the list's own target when no
84
+ * entry is left. Call it in the component's setup.
85
+ */
86
+ export declare function followNotificationListFocus(options: NotificationListFocusOptions): NotificationListFocus;
87
+ /**
88
+ * A record's accessible name — its severity, its message and its source, as the reference names a notification of
89
+ * its list (`notificationsList.ts:271-283`).
90
+ */
91
+ export declare function timelineEntryAriaLabel(entry: NotificationTimelineEntry): string;
@@ -23,7 +23,8 @@ 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
+ import type { NotificationFilter } from './toastFilterPolicy.cjs';
27
+ /** The host's infrastructure the notification service works with, and whether its notification center is in reach. */
27
28
  export interface NotificationServiceDependencies {
28
29
  readonly desktop: DesktopBridge;
29
30
  /** Holds the digest's SMTP password and the webhook URLs. */
@@ -35,6 +36,15 @@ export interface NotificationServiceDependencies {
35
36
  readonly errorPresenter: HostErrorPresenter;
36
37
  readonly vendorErrors: VendorErrorSource;
37
38
  readonly log: ILogger;
39
+ /**
40
+ * Whether the user can reach a notification center in the realm now — one the application shows, or a way to one
41
+ * (a status bar bell, a dock). The user's close of a running progress (Escape, the native overlay's close) sends the
42
+ * card to the center, its progress running on; where no center is reachable — an entry window, a page that shows
43
+ * neither a center nor a way to one — nothing could draw it there, so the card stays on the toast stack instead.
44
+ * Turning its notification down on the card still ends it, a finished card closes as always, and a setting that
45
+ * silences a running progress still keeps it off the screen. Read at each such close. Unset, a center is reachable.
46
+ */
47
+ readonly centerReachable?: () => boolean;
38
48
  }
39
49
  /** The realm's notifications. */
40
50
  export interface Notifications {
@@ -68,6 +78,21 @@ export interface Notifications {
68
78
  */
69
79
  readonly onDidRequestNavigation: Event<string>;
70
80
  requestNavigation(route: string): void;
81
+ /**
82
+ * The realm's run-time notification filter (`NotificationFilter`), `'off'` until a host sets it — the reference's
83
+ * `INotificationService.getFilter`.
84
+ */
85
+ getFilter(): NotificationFilter;
86
+ /**
87
+ * Sets the run-time filter — not a setting: nothing of it is stored, and it ends with the realm. A host sets it while
88
+ * a state of its own lasts and sets `'off'` after, as the reference's Zen mode sets its error filter while
89
+ * `zenMode.silentNotifications` is on and turns it off on exit (`workbench/browser/layout.ts:1513-1515`,
90
+ * `:1549-1555`, `:1592-1594`). Like a settings change, it takes back the shown cards it now silences; a running
91
+ * progress goes to the notification center, alive.
92
+ */
93
+ setFilter(filter: NotificationFilter): void;
94
+ /** The run-time filter changed — the reference's `onDidChangeFilter`. */
95
+ readonly onDidChangeFilter: Event<NotificationFilter>;
71
96
  }
72
97
  export declare class NotificationService implements Notifications, IDisposable {
73
98
  private readonly deps;
@@ -76,6 +101,9 @@ export declare class NotificationService implements Notifications, IDisposable {
76
101
  readonly stack: NotificationStack;
77
102
  readonly timeline: NotificationTimeline;
78
103
  readonly onDidRequestNavigation: Event<string>;
104
+ readonly onDidChangeFilter: Event<NotificationFilter>;
105
+ private filter;
106
+ private readonly filterChange;
79
107
  private readonly engine;
80
108
  private readonly analytics;
81
109
  private readonly sounds;
@@ -99,11 +127,13 @@ export declare class NotificationService implements Notifications, IDisposable {
99
127
  getStatsSnapshot(): SourceStats[];
100
128
  resetStats(): void;
101
129
  requestNavigation(route: string): void;
130
+ getFilter(): NotificationFilter;
131
+ setFilter(filter: NotificationFilter): void;
102
132
  dispose(): void;
103
133
  /**
104
134
  * The shown cards the notification settings now silence ({@link silencedCard}) are taken back from the toast stack
105
- * — do not disturb, quiet hours, a muted source, the master switch, "urgent to the center only": the decision an
106
- * issue would get now. A running progress is not the settings' to end: it goes to the notification center, its
135
+ * — do not disturb, quiet hours, a muted source, the master switch, "urgent to the center only", the run-time filter:
136
+ * the decision an issue would get now. A running progress is not the settings' to end: it goes to the notification center, its
107
137
  * handles still `open`, as the reference removes the toast and keeps the notification in its center; the other cards
108
138
  * close and their handles report `suppressed`, the timeline keeping their records.
109
139
  *
@@ -23,7 +23,8 @@ 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
+ import type { NotificationFilter } from './toastFilterPolicy.js';
27
+ /** The host's infrastructure the notification service works with, and whether its notification center is in reach. */
27
28
  export interface NotificationServiceDependencies {
28
29
  readonly desktop: DesktopBridge;
29
30
  /** Holds the digest's SMTP password and the webhook URLs. */
@@ -35,6 +36,15 @@ export interface NotificationServiceDependencies {
35
36
  readonly errorPresenter: HostErrorPresenter;
36
37
  readonly vendorErrors: VendorErrorSource;
37
38
  readonly log: ILogger;
39
+ /**
40
+ * Whether the user can reach a notification center in the realm now — one the application shows, or a way to one
41
+ * (a status bar bell, a dock). The user's close of a running progress (Escape, the native overlay's close) sends the
42
+ * card to the center, its progress running on; where no center is reachable — an entry window, a page that shows
43
+ * neither a center nor a way to one — nothing could draw it there, so the card stays on the toast stack instead.
44
+ * Turning its notification down on the card still ends it, a finished card closes as always, and a setting that
45
+ * silences a running progress still keeps it off the screen. Read at each such close. Unset, a center is reachable.
46
+ */
47
+ readonly centerReachable?: () => boolean;
38
48
  }
39
49
  /** The realm's notifications. */
40
50
  export interface Notifications {
@@ -68,6 +78,21 @@ export interface Notifications {
68
78
  */
69
79
  readonly onDidRequestNavigation: Event<string>;
70
80
  requestNavigation(route: string): void;
81
+ /**
82
+ * The realm's run-time notification filter (`NotificationFilter`), `'off'` until a host sets it — the reference's
83
+ * `INotificationService.getFilter`.
84
+ */
85
+ getFilter(): NotificationFilter;
86
+ /**
87
+ * Sets the run-time filter — not a setting: nothing of it is stored, and it ends with the realm. A host sets it while
88
+ * a state of its own lasts and sets `'off'` after, as the reference's Zen mode sets its error filter while
89
+ * `zenMode.silentNotifications` is on and turns it off on exit (`workbench/browser/layout.ts:1513-1515`,
90
+ * `:1549-1555`, `:1592-1594`). Like a settings change, it takes back the shown cards it now silences; a running
91
+ * progress goes to the notification center, alive.
92
+ */
93
+ setFilter(filter: NotificationFilter): void;
94
+ /** The run-time filter changed — the reference's `onDidChangeFilter`. */
95
+ readonly onDidChangeFilter: Event<NotificationFilter>;
71
96
  }
72
97
  export declare class NotificationService implements Notifications, IDisposable {
73
98
  private readonly deps;
@@ -76,6 +101,9 @@ export declare class NotificationService implements Notifications, IDisposable {
76
101
  readonly stack: NotificationStack;
77
102
  readonly timeline: NotificationTimeline;
78
103
  readonly onDidRequestNavigation: Event<string>;
104
+ readonly onDidChangeFilter: Event<NotificationFilter>;
105
+ private filter;
106
+ private readonly filterChange;
79
107
  private readonly engine;
80
108
  private readonly analytics;
81
109
  private readonly sounds;
@@ -99,11 +127,13 @@ export declare class NotificationService implements Notifications, IDisposable {
99
127
  getStatsSnapshot(): SourceStats[];
100
128
  resetStats(): void;
101
129
  requestNavigation(route: string): void;
130
+ getFilter(): NotificationFilter;
131
+ setFilter(filter: NotificationFilter): void;
102
132
  dispose(): void;
103
133
  /**
104
134
  * The shown cards the notification settings now silence ({@link silencedCard}) are taken back from the toast stack
105
- * — do not disturb, quiet hours, a muted source, the master switch, "urgent to the center only": the decision an
106
- * issue would get now. A running progress is not the settings' to end: it goes to the notification center, its
135
+ * — do not disturb, quiet hours, a muted source, the master switch, "urgent to the center only", the run-time filter:
136
+ * the decision an issue would get now. A running progress is not the settings' to end: it goes to the notification center, its
107
137
  * handles still `open`, as the reference removes the toast and keeps the notification in its center; the other cards
108
138
  * close and their handles report `suppressed`, the timeline keeping their records.
109
139
  *
@@ -12,6 +12,7 @@
12
12
  import type { ToastCommonOptions, ToastErrorOptions, ToastProgressHandle } from '../_internal/contract/notification.cjs';
13
13
  import { type NotificationTimeline } from './notificationTimeline.cjs';
14
14
  import { type VendorErrorMatch, type VendorErrorSource } from '../_internal/platform/vendorErrors/index.cjs';
15
+ import { type NotificationFilter } from './toastFilterPolicy.cjs';
15
16
  import { type NotificationSinks } from './fireNotification.cjs';
16
17
  export interface ErrorToastEnrichment {
17
18
  readonly text: string;
@@ -78,5 +79,7 @@ export interface ToastDependencies {
78
79
  readonly vendorErrors: VendorErrorSource;
79
80
  /** Opens a vendor's documentation link (the error toast's docs action). */
80
81
  readonly openExternal: (url: string) => void;
82
+ /** The realm's run-time notification filter now (`Notifications.getFilter`), read at each issue. */
83
+ readonly filter: () => NotificationFilter;
81
84
  }
82
85
  export declare function createToast(deps: ToastDependencies): Toast;
@@ -12,6 +12,7 @@
12
12
  import type { ToastCommonOptions, ToastErrorOptions, ToastProgressHandle } from '../_internal/contract/notification.js';
13
13
  import { type NotificationTimeline } from './notificationTimeline.js';
14
14
  import { type VendorErrorMatch, type VendorErrorSource } from '../_internal/platform/vendorErrors/index.js';
15
+ import { type NotificationFilter } from './toastFilterPolicy.js';
15
16
  import { type NotificationSinks } from './fireNotification.js';
16
17
  export interface ErrorToastEnrichment {
17
18
  readonly text: string;
@@ -78,5 +79,7 @@ export interface ToastDependencies {
78
79
  readonly vendorErrors: VendorErrorSource;
79
80
  /** Opens a vendor's documentation link (the error toast's docs action). */
80
81
  readonly openExternal: (url: string) => void;
82
+ /** The realm's run-time notification filter now (`Notifications.getFilter`), read at each issue. */
83
+ readonly filter: () => NotificationFilter;
81
84
  }
82
85
  export declare function createToast(deps: ToastDependencies): Toast;
@@ -0,0 +1,8 @@
1
+ import type { ToastPosition } from '../_internal/platform/settings/settingsTypes.cjs';
2
+ /**
3
+ * The window edge a notifications corner is on — the edge the toast stack and the center grow away from, which
4
+ * turns the icons that point along them, as the reference turns its center's hide icon and its cards' expand and
5
+ * collapse icons with the notifications' position (`workbench/browser/parts/notifications/notificationsCenter.ts:
6
+ * 104-111`; `notificationsActions.ts:19-24`, `:29-35`).
7
+ */
8
+ export declare function toastCornerEdge(corner: ToastPosition): 'top' | 'bottom';
@@ -0,0 +1,8 @@
1
+ import type { ToastPosition } from '../_internal/platform/settings/settingsTypes.js';
2
+ /**
3
+ * The window edge a notifications corner is on — the edge the toast stack and the center grow away from, which
4
+ * turns the icons that point along them, as the reference turns its center's hide icon and its cards' expand and
5
+ * collapse icons with the notifications' position (`workbench/browser/parts/notifications/notificationsCenter.ts:
6
+ * 104-111`; `notificationsActions.ts:19-24`, `:29-35`).
7
+ */
8
+ export declare function toastCornerEdge(corner: ToastPosition): 'top' | 'bottom';
@@ -22,7 +22,23 @@
22
22
  * cannot import from the app anyway, so this is not a stylistic choice but a structural
23
23
  * necessity.
24
24
  */
25
- import type { NotificationPriority } from '../_internal/contract/notification.cjs';
25
+ import type { NotificationPriority, NotificationSeverity } from '../_internal/contract/notification.cjs';
26
+ /**
27
+ * A run-time notification filter — not a setting: a host sets it while a state of its own lasts and turns it off
28
+ * after, and nothing of it is stored (the reference's `NotificationsFilter`).
29
+ * - `'off'`: every notification is decided by the settings alone.
30
+ * - `'errors-only'`: the reference's error filter, the one its Zen mode sets while `zenMode.silentNotifications` is on
31
+ * (`workbench/browser/layout.ts:1485`, `:1513-1515`, `:1549-1555`, `:1592-1594`): a notification of the default or
32
+ * the optional priority that is not an error is silent — recorded, no toast (`workbench/common/notifications.ts:
33
+ * 494-502`). Errors, urgent notifications and acknowledgments still toast.
34
+ */
35
+ export type NotificationFilter = 'off' | 'errors-only';
36
+ /**
37
+ * The priority an issue is decided under the run-time filter: the reference's error filter makes a default or optional
38
+ * notification that is not an error silent, the priority the decision already knows — one rule, no second silencing
39
+ * path. The notification keeps the priority it was issued with everywhere else (its record, its card).
40
+ */
41
+ export declare function filteredPriority(priority: NotificationPriority, severity: NotificationSeverity, filter: NotificationFilter): NotificationPriority;
26
42
  export interface FilterDecision {
27
43
  showToast: boolean;
28
44
  recordTimeline: boolean;
@@ -60,4 +76,20 @@ export interface ToastFilterInput {
60
76
  * apart, "remind me later" would silently silence nothing.
61
77
  */
62
78
  export declare function deriveImplicitRemindKey(source: string, title: string): string;
79
+ /** What a card's "remind me later" keys on — its fields that name the notification. */
80
+ export interface RemindKeySource {
81
+ /** The key the card carries: its issuer's (`ToastCommonOptions.remindKey`), or the one a progress was issued with. */
82
+ readonly remindKey?: string | undefined;
83
+ readonly neverShowAgainKey?: string | undefined;
84
+ readonly source?: string | undefined;
85
+ readonly title: string;
86
+ }
87
+ /**
88
+ * The key "remind me later" on a card silences: the key the card carries, else its "don't show again" key, else the
89
+ * key derived from its source and title.
90
+ *
91
+ * ⚠ SINGLE HOME: the card's gear menu writes this key and the check that a running card was turned down reads it; two
92
+ * copies drifting apart would silence nothing.
93
+ */
94
+ export declare function cardRemindKey(card: RemindKeySource): string;
63
95
  export declare function decideFilter(input: ToastFilterInput, settings: ToastFilterSettings, gates: ToastFilterGates): FilterDecision;