@vokril/ui-solid 0.33.5 → 0.34.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 +24 -0
- package/README.md +40 -0
- package/dist/{StatusBarNotificationBell-DE1jIaBt.js → StatusBarNotificationBell-Lps0FfKd.js} +4241 -4154
- package/dist/StatusBarNotificationBell-pBGZ_2eb.cjs +53 -0
- package/dist/_internal/contract/browser/workspace.d.cts +5 -0
- package/dist/_internal/contract/browser/workspace.d.ts +5 -0
- package/dist/_internal/contract/notification.d.cts +30 -4
- package/dist/_internal/contract/notification.d.ts +30 -4
- package/dist/_internal/contract/notificationCatalog.d.cts +15 -1
- package/dist/_internal/contract/notificationCatalog.d.ts +15 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/createNotificationPreviewRuntime.d.cts +1 -0
- package/dist/notifications/createNotificationPreviewRuntime.d.ts +1 -0
- package/dist/notifications/fireNotification.d.cts +14 -7
- package/dist/notifications/fireNotification.d.ts +14 -7
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/nativeEngine.d.cts +8 -1
- package/dist/notifications/nativeEngine.d.ts +8 -1
- package/dist/notifications/notificationService.d.cts +2 -1
- package/dist/notifications/notificationService.d.ts +2 -1
- package/dist/notifications/notifications.notifications.d.cts +0 -1
- package/dist/notifications/notifications.notifications.d.ts +0 -1
- package/dist/notifications/toast.d.cts +19 -3
- package/dist/notifications/toast.d.ts +19 -3
- package/dist/notifications/toastFilterPolicy.d.cts +15 -1
- package/dist/notifications/toastFilterPolicy.d.ts +15 -1
- package/dist/server/StatusBarNotificationBell-D0UzYPs6.cjs +52 -0
- package/dist/server/{StatusBarNotificationBell-y5cPAlMY.js → StatusBarNotificationBell-DiVJ-EnY.js} +4255 -4168
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +1 -1
- package/dist/solid/notifications/NotificationItem.jsx +4 -3
- package/dist/solid/notifications/catalogAdapter.js +8 -9
- package/dist/solid/notifications/createNotificationPreviewRuntime.js +34 -18
- package/dist/solid/notifications/fireNotification.js +9 -5
- package/dist/solid/notifications/notificationOverlaySnapshot.js +1 -0
- package/dist/solid/notifications/notificationService.js +1 -0
- package/dist/solid/notifications/notifications.notifications.js +8 -0
- package/dist/solid/notifications/toast.js +70 -31
- package/dist/solid/notifications/toastFilterPolicy.js +8 -0
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/StatusBarNotificationBell-CLrNtOO9.cjs +0 -50
- package/dist/server/StatusBarNotificationBell-fLacxZ0X.cjs +0 -49
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,30 @@ 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.34.0
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- 1fcaf55: The notifications the kit issues itself are the user's own action (`origin: 'user-action'`): each answers a click — "Show as toast again" on a record of `NotificationPanel`, the timeline's export and its failure, a gear-menu choice or the center's do-not-disturb toggle the settings store refused to save (`notificationSettingsUpdateFailed`), an error's button that failed (`errorActionFailed`). They are now always shown and never taken back, and they stay inside the app. "Show as toast again" was issued `urgent` so a muted source would still surface; under do not disturb with `dndBlocksUrgent`, quiet hours with `quietHoursBlocksUrgent` or "urgent to the center only" the click showed nothing, and a replay reached the OS notification, the webhooks and the email digest again.
|
|
13
|
+
- 1c566e9: A catalog payload's `title` is the card's title line for every severity and kind, and the message opens the card's body, before `subtitle` / `description`. The catalog delivery (`catalogAdapter`) dropped `payload.title` for a warning, an info, a success, a query-completed and a progress — the card showed the message as its title line —, and for an error `title` replaced the message, which the card then did not show at all (the record kept the message or the description, not the title). One rule now makes a card's two lines (`cardLines`): under a `title` the title line is the title and the body the message, then the description, a blank line between them; without one the message is the title line and the description the body, as before. The raw verbs take it too: `title` moved from `ToastErrorOptions` to `ToastCommonOptions`, so `toast.success`, `info`, `warning`, `queryCompleted` and `progress` accept it as `error` did. A progress under a `title` keeps its title line, and `update`, `success` and `fail` replace the message in its body. The notification center records a titled card's title line and its message, a line each (an error: its title line and its body, as before). The OS-only route, the developer catalog's preview toast (`showPreview`) and the isolated preview runtime (`createNotificationPreviewRuntime`) take the same two lines; the OS notification put the description over the message, and the previews dropped the message under a title. The user's rules (`notificationRules`) and the "remind me later" derived from the text read the title line — an error's did already. An error's vendor code still splits an untitled message into the code (the title line) and the vendor's text; a titled one is left whole, its documentation action added as before.
|
|
14
|
+
|
|
15
|
+
`NotificationItem` renders the title line in the card's title row and the body in its expandable body, as it did; a card has no third line.
|
|
16
|
+
|
|
17
|
+
**Behaviour change:** a definition that sets `title` and was not an error now shows the title as the card's title line and moves its message into the body; an error that sets `title` now shows its message in the body. Two notifications under the same title line and source (and the same primary action) are equal to the engine's de-duplication, which compares the title line: the later updates the earlier card in place, as two of the same message did.
|
|
18
|
+
- 6bcd162: A notification can say it is the visible result of the user's own action: `NotificationOrigin` (`'system' | 'user-action'`), declared by a catalog definition as `origin: 'user-action'` (`NotificationCatalogMetadata.origin`, unset `'system'`) and taken by the raw verbs as `ToastCommonOptions.origin`, which carries it from the catalog delivery as `inAppOnly` carries `delivery: 'in-app-only'`. A host that reports the outcome of a click — a save, a test, a toggle on a settings page still on the screen — as a toast instead of an inline message needs the toast to be there: a toast that do not disturb, quiet hours or a muted source swallow leaves the user with a click that did nothing, and the filtering lives in the kit's verbs, where the host cannot reach it.
|
|
19
|
+
|
|
20
|
+
Such a notification is shown like a dialog, by every verb — `success`, `error`, `info`, `warning`, `queryCompleted`, `progress` — and every catalog kind:
|
|
21
|
+
|
|
22
|
+
- the decision (`decideFilter`, `toastFilterPolicy`) takes `origin` and answers a `user-action` issue first: `showToast: true` whatever the master switch, do not disturb (urgent blocked or not), quiet hours, a muted source, "urgent to the center only", a silent priority, the run-time `errors-only` filter, or a "don't show again" / "remind me later" chosen on another card of its key or text; `recordTimeline` follows the caller's `recordTimeline` alone, so the notification center records it even with the master switch off. `FilterDecision` gains `withoutSound`: set when the settings would have kept the toast off the screen, and the toast then plays no severity tone;
|
|
23
|
+
- the user's rules (`notificationRules`) neither hold it back nor reshape it, and `showSuccessToasts: false` does not hold back a user-action success or query-completed;
|
|
24
|
+
- a setting that turns on afterwards does not take its card back: the notification service's silencing question (`isSilenced`, which `takeBackSilencedCards` asks when the settings, the run-time filter or quiet hours change) spares a `user-action` card, so turning do not disturb on no longer removes the toast that confirms it; a running user-action progress opens on the toast stack under any setting and its outcome comes back there. It is never turned down either (`turnedDownCard`): Escape sends a running one to the notification center, as it does any progress;
|
|
25
|
+
- it never leaves the app: no OS notification, webhook or email digest, whatever the definition's `delivery` says — an `os-only` message definition shows as a toast;
|
|
26
|
+
- its card's gear menu (`NotificationItem`) leaves out the choices that would do nothing for it: "Don't show again", the three "Remind me" entries and the source's mute toggle. "Notification settings…" and the card's secondary actions stay;
|
|
27
|
+
- `NotificationInput.origin` carries it on the card, and the native overlay's snapshot carries it on the card's copy (`NotificationOverlayItem.origin`), so an overlay page gives it to the `NotificationItem` it draws;
|
|
28
|
+
- the developer catalog's preview runtime follows the same rules: a user-action definition is shown under every preview behaviour, past the rules, and its delivery record's `channel` is `in-app-only`.
|
|
29
|
+
|
|
30
|
+
**Breaking (structural):** a copy of `NotificationOverlayItem` kept outside the kit — a host's contract, a schema that checks the snapshot at a process boundary — adds `origin`, and the overlay page forwards it to its card; without it the overlay card of a user-action notification offers the choices the main window's leaves out. A `FilterDecision` read outside the kit may carry `withoutSound`.
|
|
31
|
+
|
|
8
32
|
## 0.33.5
|
|
9
33
|
|
|
10
34
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -76,6 +76,41 @@ const [centerOpen, setCenterOpen] = createSignal(false);
|
|
|
76
76
|
setCenterOpen(true);
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
A card has two lines: a title line and a body the user can expand. A definition's payload fills
|
|
80
|
+
them: its `message` is the title line and its `description` (or `subtitle`) the body. With a
|
|
81
|
+
`title`, the title is the title line and the message opens the body, before the description — for
|
|
82
|
+
every severity and kind, the OS notification and the previews alike; a progress keeps its title
|
|
83
|
+
line, and `update`, `success` and `fail` replace the message in the body. The raw verbs take the same
|
|
84
|
+
`title` option.
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
const serverRestarting = defineNotification(
|
|
88
|
+
{ id: 'server.restarting', source: 'general', severity: 'warning', priority: 'default', delivery: 'in-app', kind: 'message' },
|
|
89
|
+
({ exits }: { readonly exits: number }) => ({ title: 'Server', message: `It stopped ${exits} times and is restarting.` }),
|
|
90
|
+
);
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
A notification that is the visible result of the user's own action — the outcome of a save, a
|
|
94
|
+
test or a toggle, often on a surface still on the screen — is declared so: `origin: 'user-action'`
|
|
95
|
+
(the default is `'system'`). Like a dialog, it is always shown. Do not disturb, quiet hours, a muted
|
|
96
|
+
source, the master switch, `showSuccessToasts`, "urgent to the center only", the run-time filter,
|
|
97
|
+
the user's rules and a "don't show again" or "remind me later" chosen on another card do not hold it
|
|
98
|
+
back, and a setting that turns on afterwards does not take its card back — turning do not disturb on
|
|
99
|
+
from a settings page shows the toast that confirms it. It is recorded in the notification center as
|
|
100
|
+
any notification, plays its severity tone only where the settings would have shown it anyway, and
|
|
101
|
+
stays inside the app: no OS notification, webhook or email digest, whatever its `delivery` says (an
|
|
102
|
+
`os-only` one shows as a toast). Its card's gear menu leaves out the choices that would do nothing
|
|
103
|
+
for it — muting its source, "remind me later", "don't show again". A meaning the application also
|
|
104
|
+
issues on its own (a retry in the background) is a second definition. The raw verbs take the same
|
|
105
|
+
`origin` option.
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
const settingsSaved = defineNotification(
|
|
109
|
+
{ id: 'settings.saved', source: 'settings', severity: 'success', priority: 'default', delivery: 'in-app', kind: 'message', origin: 'user-action' },
|
|
110
|
+
() => ({ message: 'Settings saved' }),
|
|
111
|
+
);
|
|
112
|
+
```
|
|
113
|
+
|
|
79
114
|
A running progress is ended by its operation, not by the user or a setting: Escape, do not
|
|
80
115
|
disturb and the like only send it off the toast stack into the notification center
|
|
81
116
|
(`NotificationsCenter`, which the bell opens, or `NotificationPanel`). Only turning its
|
|
@@ -508,6 +543,11 @@ there — a schema in the host's main process — takes the densities from
|
|
|
508
543
|
`@vokril/ui-solid/tokens/menu-density`, whose module graph loads no package and touches no DOM;
|
|
509
544
|
`/settings` exports the same list, with the settings registry, which needs solid-js.
|
|
510
545
|
|
|
546
|
+
A card of the snapshot (`NotificationOverlayItem`) carries what the overlay page gives the kit's
|
|
547
|
+
`NotificationItem` it draws — among them `remindKey` and, for the visible result of the user's own
|
|
548
|
+
action, `origin: 'user-action'`, without which the overlay card's gear menu offers the choices the
|
|
549
|
+
main window's leaves out. A schema that checks the snapshot at the process boundary lets it through.
|
|
550
|
+
|
|
511
551
|
The snapshot carries every custom property written inline on the host's root, so the host keeps a
|
|
512
552
|
value that belongs to one window out of the root's inline style — in a stylesheet rule, as the
|
|
513
553
|
title bar inset in [Modals](#modals).
|