@vokril/ui-solid 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +21 -4
- package/dist/{StatusBarNotificationBell-yryWdwyX.js → StatusBarNotificationBell-7Izs_msz.js} +4083 -4058
- package/dist/StatusBarNotificationBell-BJiORN4s.cjs +50 -0
- package/dist/_internal/contract/notification.d.cts +4 -3
- package/dist/_internal/contract/notification.d.ts +4 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +153 -152
- package/dist/notifications/NotificationItem.d.cts +3 -3
- package/dist/notifications/NotificationItem.d.ts +3 -3
- 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/index.cjs +1 -1
- package/dist/notifications/index.js +41 -40
- package/dist/notifications/nativeEngine.d.cts +50 -13
- package/dist/notifications/nativeEngine.d.ts +50 -13
- 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/notificationService.d.cts +10 -1
- package/dist/notifications/notificationService.d.ts +10 -1
- package/dist/server/{StatusBarNotificationBell-DdAdsduo.js → StatusBarNotificationBell-D8Jt3PXI.js} +3885 -3860
- package/dist/server/StatusBarNotificationBell-LJHLMT9F.cjs +49 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +138 -137
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +41 -40
- package/dist/solid/notifications/NotificationHost.jsx +1 -11
- package/dist/solid/notifications/StatusBarNotificationBell.jsx +14 -17
- package/dist/solid/notifications/nativeEngine.js +51 -11
- package/dist/solid/notifications/notificationService.js +2 -0
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/StatusBarNotificationBell-CJ3HuhRu.cjs +0 -50
- package/dist/server/StatusBarNotificationBell-Z2LmIkM1.cjs +0 -49
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to `@vokril/ui-solid` are listed here. Versions follow
|
|
|
5
5
|
contain breaking changes. From 0.1.1 on, entries are written by Changesets
|
|
6
6
|
(`npm run release:version`) above the previous release.
|
|
7
7
|
|
|
8
|
+
## 0.29.0
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- The status bar bell's notification center can be opened from code: `StatusBarNotificationBell` takes `open` (`StatusBarNotificationBellProps.open`), the controlled state the kit's other popovers take with `onOpenChange` (`DropdownMenu`, `Picker`). A host that passes it holds the popover's state: the bell shows what `open` says and asks for each change of its own — its click, a click outside, Escape, the center's hide, leaving the page while open — through `onOpenChange`, so the host's own code opens the center by setting its state, as a status-bar entry of a progress that runs out of sight does (the reference's window progress entry runs `notifications.showList`, `workbench/services/progress/browser/progressService.ts:258-263`). Opening the center marks the backlog seen whoever opened it. Unset, the bell holds the state itself, as before.
|
|
13
|
+
- A realm can tell its notification service that no notification center is in reach: `NotificationServiceDependencies.centerReachable` (the engine's `NativeNotificationEngineDependencies.centerReachable`), read at each close of the user's. The user's close of a running progress — Escape, the native overlay's close — sends the card to the notification center, which draws it until its progress ends; where the user can reach no center — an entry or login window, a page that shows neither a center nor a way to one, the quick start that mounts none — nothing could draw it there, and the card was out of reach until its operation ended. There the card now stays on the toast stack instead, its handles `open`, as Delete leaves it. Turning its notification down on the card ("don't show again", "remind me later") still ends it (`dismissed`), a finished card closes as before, and a setting that silences a running progress (do not disturb, quiet hours, a muted source …) still keeps it off the screen: the settings' choice holds with or without a center, and the progress's outcome comes back on the stack or ends `suppressed`, the timeline keeping its record. The reference's workbench always has its center, so it needs no such answer. Unset, a center is reachable, as before.
|
|
14
|
+
- The kit says which running progress is out of the user's sight: the pure `hiddenRunningProgress(items)` takes the stack's cards as it emits them and returns the running progress cards that are off the toast stack — sent to the notification center (`hidden`) — or clipped past the visible cap by newer toasts (`maxVisibleNotifications`), the one that left sight last first (of those that left at the same moment, the newest). An application that mirrors such a progress in its status bar shows the first, as the reference turns a notification progress whose toast is not visible — hidden, or left out by the toasts' cap (`notificationsToasts.ts:675-676`, `:705`) — into a window progress and shows the last one hidden (`workbench/services/progress/browser/progressService.ts:339-357`, `:127`, `:147`); until now an application read `hidden` and could not see a clipped card, nor tell which card was hidden last. The stack records it: `NotificationItem.outOfSightSince`, since when the card has been out of sight by the engine's clock — kept from the moment it first left sight until the stack shows it again, which clears it. The stack is the one authority on the cap: `NotificationHost` paints the cards on the toast stack that have no such record instead of clipping the stack again by itself, the timers that wait while a card is clipped (`pauseTimerWhileHidden`) read the same cut, and the engine's new `refresh()` reads it again when the settings change — the realm's notification service calls it on every change of the notification settings, so a new cap moves cards in or out of sight at once.
|
|
15
|
+
|
|
16
|
+
Behaviour change: the status bar bell's "Notifications ({count} in progress)" hint counts these cards — the one definition the bell and an application's mirror share. A hidden or clipped running progress is now counted while other toasts are showing (until now any toast on the stack hid the count, and a clipped card never counted), and a running card the stack shows is not; the bell no longer reads which window paints the toasts — the stack paints in the window that owns the display, the focused one, so a card it shows is in sight wherever the user looks — and no longer registers its window with `KitHost.displayOwner`. While its popover is open the count is still zero, the center listing the cards.
|
|
17
|
+
|
|
8
18
|
## 0.28.0
|
|
9
19
|
|
|
10
20
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -62,23 +62,39 @@ rendered without them throws. `NotificationHost` paints the realm's toasts; moun
|
|
|
62
62
|
window, near the root. `centerOpen` tells it when the application's notification center is
|
|
63
63
|
showing (the stack hides meanwhile, the center lists the same cards); a window without a center
|
|
64
64
|
passes `() => false`. `StatusBarNotificationBell` opens the center in a popover and says when
|
|
65
|
-
through `onOpenChange
|
|
65
|
+
through `onOpenChange`; a host that opens the center from its own code holds the state and
|
|
66
|
+
passes it back as `open`:
|
|
66
67
|
|
|
67
68
|
```tsx
|
|
68
69
|
const [centerOpen, setCenterOpen] = createSignal(false);
|
|
69
70
|
|
|
70
71
|
// in the status bar
|
|
71
|
-
<StatusBarNotificationBell onOpenChange={setCenterOpen} />;
|
|
72
|
+
<StatusBarNotificationBell open={centerOpen()} onOpenChange={setCenterOpen} />;
|
|
72
73
|
// near the root, as above
|
|
73
74
|
<NotificationHost centerOpen={centerOpen} />;
|
|
75
|
+
// anywhere: open the center
|
|
76
|
+
setCenterOpen(true);
|
|
74
77
|
```
|
|
75
78
|
|
|
76
79
|
A running progress is ended by its operation, not by the user or a setting: Escape, do not
|
|
77
80
|
disturb and the like only send it off the toast stack into the notification center
|
|
78
81
|
(`NotificationsCenter`, which the bell opens, or `NotificationPanel`). Only turning its
|
|
79
82
|
notification down on the card ("don't show again", "remind me later") ends it. Mount a center in
|
|
80
|
-
every window that shows progress
|
|
81
|
-
|
|
83
|
+
every window that shows progress. Where the user cannot reach one — the quickstart above mounts
|
|
84
|
+
none; an application's login screen, a page that shows neither a center nor the bell — the realm's
|
|
85
|
+
notification service is told so (`centerReachable`, see
|
|
86
|
+
[Embedding in an application](#embedding-in-an-application)): there Escape leaves a running
|
|
87
|
+
progress on the toast stack. A setting that silences it still keeps it off the screen, out of
|
|
88
|
+
reach until its operation ends.
|
|
89
|
+
|
|
90
|
+
Which running progress is out of the user's sight — sent to the center, or clipped under newer
|
|
91
|
+
toasts past `maxVisibleNotifications` — the kit answers once: `hiddenRunningProgress(items)` over
|
|
92
|
+
the stack's cards (`notifications.stack.subscribe`), the one that left sight last first. The bell
|
|
93
|
+
counts these, and a status bar that mirrors such a progress shows the first:
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
notifications.stack.subscribe((items) => setMirrored(hiddenRunningProgress(items)[0] ?? null));
|
|
97
|
+
```
|
|
82
98
|
|
|
83
99
|
## Stylesheets
|
|
84
100
|
|
|
@@ -294,6 +310,7 @@ const notifications = new NotificationService({
|
|
|
294
310
|
errorPresenter: messageErrorPresenter,
|
|
295
311
|
vendorErrors, // registeredVendorIds() / errorHelpersFor(vendorId)
|
|
296
312
|
log,
|
|
313
|
+
centerReachable: () => centerInReach(), // optional: whether the user can reach a notification center now
|
|
297
314
|
});
|
|
298
315
|
notifications.onDidRequestNavigation((route) => router.open(route));
|
|
299
316
|
|