@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.
- package/CHANGELOG.md +81 -0
- package/README.md +48 -4
- package/dist/{AttributeGrid-eND8YDby.cjs → AttributeGrid-Ch1k9v5j.cjs} +1 -1
- package/dist/{AttributeGrid-CASILa4u.js → AttributeGrid-DqFd4gBm.js} +3 -3
- package/dist/Button-4meERfnv.js +300 -0
- package/dist/Button-OyZHrl-t.cjs +1 -0
- package/dist/CommandPalette-CxYZUJtN.cjs +2 -0
- package/dist/{CommandPalette-Cj618AOz.js → CommandPalette-DwOp8y1-.js} +1467 -1466
- package/dist/{CopyButton-B5gS2ft3.cjs → CopyButton-16QNPgz6.cjs} +1 -1
- package/dist/{CopyButton-g-WSiBDZ.js → CopyButton-BVS49lMS.js} +1 -1
- package/dist/{DateRangePicker-CJD9ADgB.js → DateRangePicker-8QvydugY.js} +4 -4
- package/dist/{DateRangePicker-Frc0HVxp.cjs → DateRangePicker-DI-06xWY.cjs} +1 -1
- package/dist/{GuidedTour-B6q7lYhn.cjs → GuidedTour-DUQwdW8n.cjs} +1 -1
- package/dist/{GuidedTour-CFCvRJN4.js → GuidedTour-DXMmHn0o.js} +2 -2
- package/dist/{HostPortal-CXGUUhP8.js → HostPortal-Ba3MD9CG.js} +1 -1
- package/dist/HostPortal-CpWsArs6.cjs +1 -0
- package/dist/{IconPicker-DYqNi5ud.js → IconPicker-D1G8HK92.js} +3 -3
- package/dist/{IconPicker-CIbJb1ei.cjs → IconPicker-Q-ZDtNkd.cjs} +1 -1
- package/dist/Input-Brp5EDhg.cjs +1 -0
- package/dist/Input-CZi8KEfm.js +374 -0
- package/dist/Modal-CBi7Wd2V.cjs +1 -0
- package/dist/Modal-iyY1HUtr.js +588 -0
- package/dist/{PageSkeleton-BPbb28-H.cjs → PageSkeleton-B_-4fz1q.cjs} +1 -1
- package/dist/{PageSkeleton-CLnJO6uD.js → PageSkeleton-zNyjLPlk.js} +3 -3
- package/dist/{Popover-Cttb6NYT.js → Popover-DVi179wu.js} +4 -3
- package/dist/Popover-DXrczbt9.cjs +1 -0
- package/dist/{SearchableSelect-BvCm4enQ.js → SearchableSelect-DtHbWJhR.js} +34 -33
- package/dist/SearchableSelect-yLVqCGFo.cjs +1 -0
- package/dist/StatusBarNotificationBell-DQs5g1K6.cjs +50 -0
- package/dist/{StatusBarNotificationBell-yryWdwyX.js → StatusBarNotificationBell-ZTEhZFmJ.js} +4980 -4678
- package/dist/{Stepper-D9i1Xclm.js → Stepper-CyRgzWlR.js} +1 -1
- package/dist/{Stepper-Ci5JpLbS.cjs → Stepper-u2ZsE5oP.cjs} +1 -1
- package/dist/{Textarea-CeAGf08O.cjs → Textarea-DASNQNoi.cjs} +1 -1
- package/dist/{Textarea-B5QqqKnI.js → Textarea-szHXQahi.js} +1 -1
- package/dist/{TimeSeriesChart-DOwi2lJs.js → TimeSeriesChart-D7lIqolp.js} +1 -1
- package/dist/{TimeSeriesChart-huvheefm.cjs → TimeSeriesChart-DGzM9B--.cjs} +1 -1
- package/dist/{ToggleButton-CFM8P3JY.js → ToggleButton-B22PsCqo.js} +61 -60
- package/dist/ToggleButton-DWslrIBN.cjs +1 -0
- package/dist/_internal/contract/notification.d.cts +13 -3
- package/dist/_internal/contract/notification.d.ts +13 -3
- package/dist/_internal/contract/notificationCatalog.d.cts +2 -0
- package/dist/_internal/contract/notificationCatalog.d.ts +2 -0
- package/dist/_internal/platform/settings/settingsTypes.d.cts +0 -8
- package/dist/_internal/platform/settings/settingsTypes.d.ts +0 -8
- package/dist/anchoredLayout-CBjQ1etD.cjs +1 -0
- package/dist/anchoredLayout-E0mqCWxk.js +233 -0
- package/dist/appThemeDerivation-BylmT80v.cjs +1 -0
- package/dist/{appThemeDerivation-CKoSe4KP.js → appThemeDerivation-DBAOkGl7.js} +260 -231
- package/dist/base.css +2 -2
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/context/DesktopContextMenuContext.d.cts +8 -1
- package/dist/context/DesktopContextMenuContext.d.ts +8 -1
- package/dist/createDialogShellFocus-CQ0VNC2g.cjs +1 -0
- package/dist/{createDialogShellFocus-B4piXDU4.js → createDialogShellFocus-DbiQmLgb.js} +9 -9
- package/dist/createResizableSidebar-COlpGQ7H.cjs +1 -0
- package/dist/createResizableSidebar-cmCKTIg_.js +504 -0
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +3 -3
- package/dist/dialogFocusRestore-BhxVTSiP.js +10 -0
- package/dist/dialogFocusRestore-DP5b1bDo.cjs +1 -0
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +3 -3
- package/dist/forms/Input.d.cts +20 -0
- package/dist/forms/Input.d.ts +20 -0
- package/dist/forms/InputMessage.d.cts +19 -0
- package/dist/forms/InputMessage.d.ts +19 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +9 -9
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +516 -509
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/layout/resizeCarry.d.cts +17 -0
- package/dist/layout/resizeCarry.d.ts +17 -0
- package/dist/mainRealmDom-B215swW-.js +166 -0
- package/dist/mainRealmDom-BYGSE-fo.cjs +1 -0
- package/dist/nativeTitleHold-A9jUISgQ.js +170 -0
- package/dist/nativeTitleHold-B7Ou-W9b.cjs +1 -0
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/NotificationItem.d.cts +12 -3
- package/dist/notifications/NotificationItem.d.ts +12 -3
- package/dist/notifications/NotificationsCenter.d.cts +18 -0
- package/dist/notifications/NotificationsCenter.d.ts +18 -0
- package/dist/notifications/RunningProgressCards.d.cts +3 -0
- package/dist/notifications/RunningProgressCards.d.ts +3 -0
- package/dist/notifications/StatusBarNotificationBell.d.cts +18 -6
- package/dist/notifications/StatusBarNotificationBell.d.ts +18 -6
- package/dist/notifications/dismissableToastIds.d.cts +2 -1
- package/dist/notifications/dismissableToastIds.d.ts +2 -1
- package/dist/notifications/fireNotification.d.cts +35 -16
- package/dist/notifications/fireNotification.d.ts +35 -16
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +1 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +56 -52
- package/dist/notifications/nativeEngine.d.cts +54 -16
- package/dist/notifications/nativeEngine.d.ts +54 -16
- package/dist/notifications/notificationCardServices.d.cts +2 -1
- package/dist/notifications/notificationCardServices.d.ts +2 -1
- package/dist/notifications/notificationCommands.d.cts +3 -3
- package/dist/notifications/notificationCommands.d.ts +3 -3
- package/dist/notifications/notificationEntryList.d.cts +91 -0
- package/dist/notifications/notificationEntryList.d.ts +91 -0
- package/dist/notifications/notificationService.d.cts +33 -3
- package/dist/notifications/notificationService.d.ts +33 -3
- package/dist/notifications/toast.d.cts +3 -0
- package/dist/notifications/toast.d.ts +3 -0
- package/dist/notifications/toastCorner.d.cts +8 -0
- package/dist/notifications/toastCorner.d.ts +8 -0
- package/dist/notifications/toastFilterPolicy.d.cts +33 -1
- package/dist/notifications/toastFilterPolicy.d.ts +33 -1
- package/dist/overlay/Modal.d.cts +6 -0
- package/dist/overlay/Modal.d.ts +6 -0
- package/dist/overlay/backgroundInert.d.cts +6 -2
- package/dist/overlay/backgroundInert.d.ts +6 -2
- package/dist/overlay/command-palette/CommandPalette.d.cts +12 -0
- package/dist/overlay/command-palette/CommandPalette.d.ts +12 -0
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +70 -68
- package/dist/overlay/nativeTitleHold.d.cts +24 -0
- package/dist/overlay/nativeTitleHold.d.ts +24 -0
- package/dist/ownerAnimationFrame-DzFcMSmn.js +19 -0
- package/dist/ownerAnimationFrame-T6jf6qYC.cjs +1 -0
- package/dist/server/{AttributeGrid-CMi-UtWb.js → AttributeGrid-Bpjlauuz.js} +2 -2
- package/dist/server/{AttributeGrid-B7sb3btp.cjs → AttributeGrid-DNYdKb8J.cjs} +1 -1
- package/dist/server/CommandPalette-BuVxnqBG.cjs +1 -0
- package/dist/server/{CommandPalette-CozogFlk.js → CommandPalette-Dn3NKXPM.js} +1095 -1069
- package/dist/server/{DateRangePicker-KLZzyuPJ.cjs → DateRangePicker-BFzNjaME.cjs} +1 -1
- package/dist/server/{DateRangePicker-C35q8BTw.js → DateRangePicker-CnYkTgXX.js} +3 -3
- package/dist/server/{GuidedTour-DmLbBttx.js → GuidedTour-BZardPYW.js} +1 -1
- package/dist/server/{GuidedTour-DfV0yzqh.cjs → GuidedTour-yhdZk2SU.cjs} +1 -1
- package/dist/server/{HostPortal-CXGUUhP8.js → HostPortal-C4IrAeWN.js} +1 -1
- package/dist/server/HostPortal-D5ECrJvn.cjs +1 -0
- package/dist/server/{IconPicker-B1soopAp.cjs → IconPicker-C5lAN9pX.cjs} +1 -1
- package/dist/server/{IconPicker-B4aXspLw.js → IconPicker-DDWgB7sm.js} +3 -3
- package/dist/server/Input-AdF-i0O8.js +245 -0
- package/dist/server/Input-XF9Jr0G9.cjs +1 -0
- package/dist/server/{Modal-BheFQLs1.js → Modal-C5dzgcRW.js} +102 -97
- package/dist/server/{Modal-BswxV8Pn.cjs → Modal-nAhBS1L9.cjs} +1 -1
- package/dist/server/Popover-C5avmGWz.cjs +1 -0
- package/dist/server/{Popover-Cg28aPUZ.js → Popover-H3AAYZI0.js} +57 -57
- package/dist/server/{SearchableSelect-09ECcDlB.cjs → SearchableSelect-CZrXDKfC.cjs} +1 -1
- package/dist/server/{SearchableSelect-vjhS4c-H.js → SearchableSelect-DMqed5Er.js} +1 -1
- package/dist/server/StatusBarNotificationBell-CGcMdT4h.cjs +49 -0
- package/dist/server/{StatusBarNotificationBell-DdAdsduo.js → StatusBarNotificationBell-DW2l5O9B.js} +4812 -4520
- package/dist/server/{Stepper-DxNrskdq.cjs → Stepper-CpapA_WH.cjs} +1 -1
- package/dist/server/{Stepper-n5f9r-ye.js → Stepper-gGA7JwjV.js} +1 -1
- package/dist/server/{Textarea-BQf2lL59.cjs → Textarea-Bh5LVrBn.cjs} +1 -1
- package/dist/server/{Textarea-BTH48NET.js → Textarea-DVkfGkP0.js} +1 -1
- package/dist/server/{ToggleButton-TE3Xf2yD.cjs → ToggleButton-CA9T-OsI.cjs} +1 -1
- package/dist/server/{ToggleButton-FywO2CCI.js → ToggleButton-CBNKajZa.js} +4 -4
- package/dist/server/{VpTrash-Dlq8o6Uv.js → VpTrash-CZMWCIpF.js} +84 -70
- package/dist/server/VpTrash-DiczWhwm.cjs +1 -0
- package/dist/server/appThemeDerivation-BylmT80v.cjs +1 -0
- package/dist/server/{appThemeDerivation-CKoSe4KP.js → appThemeDerivation-DBAOkGl7.js} +260 -231
- package/dist/server/{createDialogShellFocus-BiBAZOCI.cjs → createDialogShellFocus-CDaLuPg8.cjs} +1 -1
- package/dist/server/{createDialogShellFocus-BFo8awdj.js → createDialogShellFocus-LGDBOVnr.js} +6 -6
- package/dist/server/{createResizableSidebar-BImbKlLe.js → createResizableSidebar-Dvu7iEk1.js} +1 -1
- package/dist/server/{createResizableSidebar-GFgZIj-5.cjs → createResizableSidebar-v40ZOb-Q.cjs} +1 -1
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +3 -3
- package/dist/server/dialogFocusRestore-BhxVTSiP.js +10 -0
- package/dist/server/dialogFocusRestore-DP5b1bDo.cjs +1 -0
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +7 -7
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/{index-UIjsx3oJ.js → index-BEARfm54.js} +3604 -3617
- package/dist/server/index-C6rYfWCJ.cjs +1 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +478 -472
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +56 -52
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +54 -53
- package/dist/server/tokens/index.cjs +1 -1
- package/dist/server/tokens/index.js +30 -28
- package/dist/solid/feedback/Badge.jsx +3 -14
- package/dist/solid/forms/Button.jsx +3 -14
- package/dist/solid/forms/Input.jsx +31 -5
- package/dist/solid/forms/Input.module.css.js +1 -0
- package/dist/solid/forms/InputMessage.jsx +86 -0
- package/dist/solid/forms/PressableSurface.jsx +3 -14
- package/dist/solid/layout/ResizeHandle.jsx +11 -1
- package/dist/solid/layout/resizeCarry.js +31 -0
- package/dist/solid/notifications/NotificationHost.jsx +6 -29
- package/dist/solid/notifications/NotificationItem.jsx +5 -5
- package/dist/solid/notifications/NotificationPanel.jsx +14 -4
- package/dist/solid/notifications/NotificationsCenter.jsx +70 -12
- package/dist/solid/notifications/RunningProgressCards.jsx +1 -1
- package/dist/solid/notifications/StatusBarNotificationBell.jsx +21 -19
- package/dist/solid/notifications/catalogAdapter.js +1 -0
- package/dist/solid/notifications/fireNotification.js +21 -16
- package/dist/solid/notifications/index.js +1 -0
- package/dist/solid/notifications/nativeEngine.js +51 -11
- package/dist/solid/notifications/notificationEntryList.js +168 -0
- package/dist/solid/notifications/notificationService.js +22 -4
- package/dist/solid/notifications/toast.js +54 -7
- package/dist/solid/notifications/toastCorner.js +3 -0
- package/dist/solid/notifications/toastFilterPolicy.js +12 -0
- package/dist/solid/overlay/Drawer.jsx +2 -1
- package/dist/solid/overlay/Modal.jsx +42 -4
- package/dist/solid/overlay/command-palette/CommandPalette.jsx +4 -4
- package/dist/solid/overlay/context-menu/DesktopContextMenu.jsx +8 -7
- package/dist/solid/overlay/nativeTitleHold.js +33 -0
- package/dist/solid/overlay/tooltipDirective.js +3 -11
- package/dist/solid/tokens/index.js +1 -0
- package/dist/solid/tokens/palette/paletteContract.js +27 -0
- package/dist/style.css +2 -2
- package/dist/theme.css +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +30 -28
- package/dist/tokens/palette/paletteContract.d.cts +17 -0
- package/dist/tokens/palette/paletteContract.d.ts +17 -0
- package/dist/tokens/tokens.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/Button-Bb68ymNP.cjs +0 -1
- package/dist/Button-D-T0tyGF.js +0 -305
- package/dist/CommandPalette-5FQRgPG9.cjs +0 -2
- package/dist/HostPortal-CgJwxt-f.cjs +0 -1
- package/dist/Input-CZruORyy.cjs +0 -1
- package/dist/Input-DkPhsdfk.js +0 -227
- package/dist/Modal-CY6ePolt.cjs +0 -1
- package/dist/Modal-NzZzHSwb.js +0 -559
- package/dist/Popover-CWrR51eG.cjs +0 -1
- package/dist/SearchableSelect-CVqdVMOC.cjs +0 -1
- package/dist/StatusBarNotificationBell-CJ3HuhRu.cjs +0 -50
- package/dist/ToggleButton-BFWh1_o5.cjs +0 -1
- package/dist/anchoredLayout-Dstwa5OH.cjs +0 -1
- package/dist/anchoredLayout-FC-qv8xm.js +0 -250
- package/dist/appThemeDerivation-Be_oKljl.cjs +0 -1
- package/dist/createDialogShellFocus-CJaw9-B9.cjs +0 -1
- package/dist/createResizableSidebar-BDUlX9-G.js +0 -472
- package/dist/createResizableSidebar-BVJBU2kP.cjs +0 -1
- package/dist/dialogFocusRestore--dH59ER2.js +0 -35
- package/dist/dialogFocusRestore-CL-ExfAA.cjs +0 -1
- package/dist/mainRealmDom-C12lr9lm.js +0 -171
- package/dist/mainRealmDom-S6teqEr4.cjs +0 -1
- package/dist/server/CommandPalette-DQK6N98N.cjs +0 -1
- package/dist/server/HostPortal-CgJwxt-f.cjs +0 -1
- package/dist/server/Input-CjvD8w18.cjs +0 -1
- package/dist/server/Input-DaEN2JJd.js +0 -127
- package/dist/server/Popover-BsxIKBbl.cjs +0 -1
- package/dist/server/StatusBarNotificationBell-Z2LmIkM1.cjs +0 -49
- package/dist/server/VpTrash-D49oUUJh.cjs +0 -1
- package/dist/server/appThemeDerivation-Be_oKljl.cjs +0 -1
- package/dist/server/dialogFocusRestore--dH59ER2.js +0 -35
- package/dist/server/dialogFocusRestore-CL-ExfAA.cjs +0 -1
- package/dist/server/index-2mQPVEDR.cjs +0 -1
- package/dist/tooltipCoordinator-BzxEyKhA.js +0 -144
- 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
|
|
50
|
-
*
|
|
51
|
-
*
|
|
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
|
|
75
|
-
* the notification center, its handles still `open`, until the progress ends (the card is
|
|
76
|
-
* with its outcome, newest, unless a silencing setting ends it then), an issue under its id is
|
|
77
|
-
* closes it. Only a running card is ever hidden ({@link isProgressRunning}), and only a mounted
|
|
78
|
-
* (`NotificationsCenter`, `NotificationPanel`)
|
|
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` —
|
|
139
|
-
* ({@link NativeNotificationEngineDependencies.
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
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`)
|
|
197
|
-
* ({@link NativeNotificationEngine.dismiss}). A
|
|
198
|
-
* the preview runtime's cards) has no operation
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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
|
-
|
|
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"
|
|
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
|
-
|
|
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"
|
|
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;
|