react-x11 2.52.0 → 2.54.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/README.md +10 -10
- package/docs/README.md +160 -314
- package/docs/accessibility.md +176 -229
- package/docs/appearance.md +77 -176
- package/docs/click-to-component.md +18 -51
- package/docs/clipboard.md +40 -59
- package/docs/components.md +518 -1036
- package/docs/dbus.md +61 -133
- package/docs/debugging.md +152 -245
- package/docs/desktop-calendar.md +51 -88
- package/docs/desktop.md +222 -347
- package/docs/devtools.md +50 -167
- package/docs/drag-and-drop.md +126 -204
- package/docs/ecosystem/animation.md +91 -125
- package/docs/ecosystem/data-fetching.md +38 -53
- package/docs/ecosystem/dev-tooling.md +159 -202
- package/docs/ecosystem/forms.md +61 -97
- package/docs/ecosystem/headless.md +64 -89
- package/docs/ecosystem/i18n.md +18 -21
- package/docs/ecosystem/icons.md +93 -126
- package/docs/ecosystem/layout.md +42 -52
- package/docs/ecosystem/routing.md +18 -29
- package/docs/ecosystem/state.md +71 -88
- package/docs/ecosystem/testing.md +131 -157
- package/docs/ecosystem/theming.md +119 -165
- package/docs/ecosystem.md +145 -179
- package/docs/elements.md +1096 -1774
- package/docs/embedding.md +83 -132
- package/docs/events.md +412 -695
- package/docs/extending.md +784 -1326
- package/docs/eyedropper.md +63 -122
- package/docs/filedialog.md +71 -107
- package/docs/frame.md +195 -339
- package/docs/gl.md +65 -62
- package/docs/globalmenu.md +63 -146
- package/docs/macos.md +531 -3234
- package/docs/notifications.md +33 -47
- package/docs/packaging.md +166 -309
- package/docs/permissions.md +9 -14
- package/docs/react-features.md +81 -106
- package/docs/remote.md +32 -76
- package/docs/scale.md +72 -186
- package/docs/styling.md +329 -547
- package/docs/system.md +200 -280
- package/docs/testing.md +63 -83
- package/docs/typescript.md +6 -48
- package/docs/uri-schemes.md +67 -107
- package/docs/wayland-backend.md +200 -459
- package/docs/windows-integrations.md +75 -131
- package/docs/windows.md +343 -1367
- package/package.json +3 -2
- package/src/Reconciler.js +2 -2
- package/src/a11y.js +1 -1
- package/src/backend/context2d.js +3 -3
- package/src/bootstrap.js +1 -1
- package/src/cocoa/app.js +6 -6
- package/src/cocoa/bezels.js +1 -1
- package/src/cocoa/fonts.js +1 -1
- package/src/cocoa/globalmenu.js +1 -1
- package/src/cocoa/keymap.js +1 -1
- package/src/cocoa/panewindow.js +1 -1
- package/src/cocoa/player.js +1 -1
- package/src/cocoa/presenter.js +2 -2
- package/src/cocoa/promotion.js +1 -1
- package/src/cocoa/relaunch.js +1 -1
- package/src/cocoa/threaded.js +1 -1
- package/src/cocoa/video.js +1 -1
- package/src/cocoa/window.js +4 -4
- package/src/components/Menu.js +7 -2
- package/src/components/Switch.js +1 -1
- package/src/components/native.js +1 -1
- package/src/dnd.js +2 -2
- package/src/glnodes.js +1 -1
- package/src/grid.js +1 -1
- package/src/imagedecode-worker.js +32 -0
- package/src/imagedecode.js +140 -2
- package/src/layouts.js +1 -1
- package/src/nodes/animation.js +1 -1
- package/src/nodes/invalidate.js +1 -1
- package/src/nodes/layouthost.js +1 -1
- package/src/nodes/video.js +19 -8
- package/src/nodes/window/droptarget.js +1 -1
- package/src/ntk.d.ts +12 -0
- package/src/pacing.js +1 -1
- package/src/refresh/index.js +2 -1
- package/src/types/video.d.ts +5 -2
- package/src/videobackend.js +28 -0
- package/src/videoframes.js +29 -16
- package/src/wayland/app.js +27 -0
- package/src/wayland/video.js +376 -0
- package/src/win32/a11y.js +1 -1
- package/src/win32/app.js +2 -2
- package/src/win32/fonts.js +1 -1
- package/src/win32/glarea.js +4 -4
- package/src/win32/overlay.js +1 -1
- package/src/win32/panewindow.js +3 -3
- package/src/win32/shell.js +1 -1
- package/src/win32/window.js +2 -2
- package/src/windowid.js +1 -1
- package/src/xvideo.js +189 -0
- package/docs/architecture/accessibility.md +0 -470
- package/docs/architecture/animation.md +0 -707
- package/docs/architecture/container-queries.md +0 -525
- package/docs/architecture/custom-layout.md +0 -334
- package/docs/architecture/drag-and-drop.md +0 -941
- package/docs/architecture/element-layer-contents.md +0 -622
- package/docs/architecture/frame-pacing.md +0 -255
- package/docs/architecture/grid-layout.md +0 -358
- package/docs/architecture/protocol-efficiency.md +0 -357
- package/docs/architecture/video.md +0 -1149
- package/docs/architecture/windowed-regions.md +0 -854
- package/docs/glx.md +0 -137
- package/docs/wayland.md +0 -545
- package/docs/windows-embedding.md +0 -271
- package/docs/windows-gl.md +0 -221
package/docs/notifications.md
CHANGED
|
@@ -23,12 +23,11 @@ function Exporter() {
|
|
|
23
23
|
}
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
An in-app toast is
|
|
27
|
-
to whoever wants it; this page is about the desktop's own banners.
|
|
26
|
+
An in-app toast is **not** this; this page is about the desktop's own banners.
|
|
28
27
|
|
|
29
28
|
## The ladder
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
Like the [file dialog](filedialog.md)'s, four rungs, chosen for you:
|
|
32
31
|
|
|
33
32
|
| | | |
|
|
34
33
|
| --- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -42,10 +41,6 @@ posting anything. Where none answers, `notify()` rejects with a **typed**
|
|
|
42
41
|
`NoNotificationServiceError` — the signal to fall back to your own UI, not a
|
|
43
42
|
crash — and `useNotifier().available` is that branch as render state.
|
|
44
43
|
|
|
45
|
-
The top rung is never chosen by naming a backend: `notify()` asks the
|
|
46
|
-
connection the tree renders through whether it has a centre, and whether that
|
|
47
|
-
centre can deliver.
|
|
48
|
-
|
|
49
44
|
## `notify()` and the handle
|
|
50
45
|
|
|
51
46
|
```ts
|
|
@@ -63,12 +58,11 @@ await banner.update({ body }); // in place, where the rung can
|
|
|
63
58
|
await banner.close(); // take it down, where the rung can
|
|
64
59
|
```
|
|
65
60
|
|
|
66
|
-
**The
|
|
61
|
+
**The vocabulary is freedesktop's on every rung.** `urgency` is
|
|
67
62
|
`low | normal | critical`, an action is `{ key, label }`, a click on the
|
|
68
63
|
banner itself is the action keyed `'default'`, and a banner that went away
|
|
69
|
-
reports `'expired' | 'dismissed' | 'closed' | 'unknown'
|
|
70
|
-
|
|
71
|
-
of many clients. The cocoa rung translates into them.
|
|
64
|
+
reports `'expired' | 'dismissed' | 'closed' | 'unknown'`. The cocoa rung
|
|
65
|
+
translates into them.
|
|
72
66
|
|
|
73
67
|
**Attribution is filled in for you.** On Linux the `desktop-entry` hint is
|
|
74
68
|
the `appId` [`registerApplication()`](uri-schemes.md) established, which is
|
|
@@ -86,51 +80,41 @@ is nothing to pass.
|
|
|
86
80
|
| `osascript` | posts anew | nothing | no | nothing |
|
|
87
81
|
| `notify-send` | with an id, yes | nothing | no | nothing |
|
|
88
82
|
|
|
89
|
-
`win32`
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
packaging question ([windows.md](windows.md) §"Packaging and identity"), and
|
|
96
|
-
a balloon is what can be shown without asking the user to install anything.
|
|
97
|
-
|
|
98
|
-
The shell-out rungs are the crude floor: they show a banner and know nothing
|
|
99
|
-
afterwards. `handle.backend` says which rung answered, so an app that cares
|
|
83
|
+
On `win32` the banner is a real toast in the action centre, but
|
|
84
|
+
fire-and-forget: buttons, replies and update-in-place would need an
|
|
85
|
+
AppUserModelID for the process, which is a packaging question
|
|
86
|
+
([windows.md](windows.md) §"Packaging and identity").
|
|
87
|
+
|
|
88
|
+
The shell-out rungs show a banner and know nothing afterwards. `handle.backend` says which rung answered, so an app that cares
|
|
100
89
|
can say "open the app to see it" there rather than promise a button it
|
|
101
90
|
cannot deliver.
|
|
102
91
|
|
|
103
|
-
**Actions on the bus are gated by the daemon.**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
so they are dropped with a development warning rather than sent blind.
|
|
107
|
-
Capabilities are read once per bus session.
|
|
92
|
+
**Actions on the bus are gated by the daemon.** To a daemon that cannot show
|
|
93
|
+
buttons (no `actions` in its `GetCapabilities`, read once per bus session)
|
|
94
|
+
they are dropped with a development warning rather than sent blind.
|
|
108
95
|
|
|
109
96
|
**A refusal is not fallen through.** On the cocoa backend the first post asks
|
|
110
|
-
the system's authorization prompt, once per bundle.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
`
|
|
124
|
-
|
|
125
|
-
Which is why an app that counts progress should ask before it decides. `examples/notify.jsx` (`npm run examples:notify`) is a download manager built around exactly that: it posts one banner and updates it in place where the rung can, and on `osascript` or `notify-send` stays quiet and posts once at the end, because posting per step there would be four banners for one download.
|
|
97
|
+
the system's authorization prompt, once per bundle. If the user declined,
|
|
98
|
+
`notify()` rejects with `NotificationsDeniedError` rather than posting through
|
|
99
|
+
`osascript`.
|
|
100
|
+
|
|
101
|
+
**A prompt nobody saw is not a refusal.** A bundle macOS has not registered
|
|
102
|
+
(typically an ad-hoc signature in a temp directory) never gets the prompt and
|
|
103
|
+
stays `notDetermined`; the ladder then carries on to `osascript`. Only
|
|
104
|
+
`backend: 'cocoa'` turns that into an error, and it says `notDetermined`
|
|
105
|
+
rather than blaming the user.
|
|
106
|
+
|
|
107
|
+
So an app that reports progress should check `handle.backend` before it
|
|
108
|
+
decides how often to post. `examples/notify.jsx` (`npm run examples:notify`)
|
|
109
|
+
updates one banner in place where the rung can, and on `osascript` or
|
|
110
|
+
`notify-send` posts once at the end.
|
|
126
111
|
|
|
127
112
|
## The bundle, on macOS
|
|
128
113
|
|
|
129
114
|
`UNUserNotificationCenter` attributes every banner to an app bundle — a
|
|
130
|
-
`CFBundleIdentifier` Launch Services can see —
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
banners are Script Editor's. To get the real thing, run as a bundle: the
|
|
115
|
+
`CFBundleIdentifier` Launch Services can see — so a bare `node` process gets
|
|
116
|
+
`available: false` from the centre and `notify()` takes the `osascript` rung,
|
|
117
|
+
whose banners are Script Editor's. To get the real thing, run as a bundle: the
|
|
134
118
|
executable in `Name.app/Contents/MacOS/`, an `Info.plist` that names it and
|
|
135
119
|
carries `CFBundleIdentifier`, and a signature
|
|
136
120
|
(`codesign --force --sign - Name.app` is enough locally). See
|
|
@@ -162,3 +146,5 @@ call win.
|
|
|
162
146
|
The bus rung holds one session-bus reference while any banner is live and
|
|
163
147
|
releases it when the last one closes, so an app that closed its banners on
|
|
164
148
|
the way out is free to exit.
|
|
149
|
+
|
|
150
|
+
Design notes: [design/notifications.md](../design/notifications.md).
|