@runic-artifex/react 0.12.0 → 0.12.1
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 +9 -9
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -171,7 +171,7 @@ neither.
|
|
|
171
171
|
## `useOperation(start, options?)`
|
|
172
172
|
|
|
173
173
|
Observes a generated `start<Command>()` operation through the framework-neutral
|
|
174
|
-
[operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
174
|
+
[operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/packages/web/views#operation-feedback-and-latest-selection).
|
|
175
175
|
`run(...args)` calls the latest `start`, so it may close over the current client:
|
|
176
176
|
|
|
177
177
|
```tsx
|
|
@@ -200,7 +200,7 @@ controller's options.
|
|
|
200
200
|
|
|
201
201
|
Admits only the newest of several reads, for example loading the item the user
|
|
202
202
|
selected last, through the framework-neutral
|
|
203
|
-
[latest-operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
203
|
+
[latest-operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/packages/web/views#operation-feedback-and-latest-selection).
|
|
204
204
|
Each `run(intent)` replaces the queued intent and cancels the active read; the next
|
|
205
205
|
read starts only after the previous one reaches its terminal status and the intent's
|
|
206
206
|
optional `waitForCompletion` barrier:
|
|
@@ -230,7 +230,7 @@ It wraps `onBridgeConnection` from `@runic-artifex/views` (re-exported here sinc
|
|
|
230
230
|
`BridgeConnectionState` and `BridgeConnectionOptions` types) and returns
|
|
231
231
|
`{ state }`, where `state` is a `BridgeConnectionState`: `connecting`,
|
|
232
232
|
`connected`, `reconnecting` or `lost` (a closed set, see
|
|
233
|
-
[Connection state](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
233
|
+
[Connection state](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/packages/web/views#connection-state)):
|
|
234
234
|
|
|
235
235
|
```tsx
|
|
236
236
|
import { useBridgeConnection } from "@runic-artifex/react";
|
|
@@ -251,7 +251,7 @@ subscribes again; an invalid one throws a `RangeError`. A server render reads
|
|
|
251
251
|
Follows the declared menu bar of a Runic Desktop window that leaves it to the
|
|
252
252
|
page (`DesktopMenuBarPresentation.Page`) while the component is mounted. It
|
|
253
253
|
wraps `createMenuBarController` from `@runic-artifex/views` (see
|
|
254
|
-
[In-page menu bar](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
254
|
+
[In-page menu bar](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/packages/web/views#in-page-menu-bar)) and returns `{ state, invoke, handleKeyDown }`: `state` is a
|
|
255
255
|
`MenuBarState`, and the bar is rendered by the menubar component of the
|
|
256
256
|
application's own UI library. Runic ships no menubar component.
|
|
257
257
|
|
|
@@ -281,7 +281,7 @@ The controller starts in an effect, so a server render reads `connecting`, and
|
|
|
281
281
|
|
|
282
282
|
Base UI's `Menubar` (`@base-ui/react`, the base of shadcn/ui's Base UI
|
|
283
283
|
Menubar) with a controlled open menu; the
|
|
284
|
-
[Notes example](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
284
|
+
[Notes example](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/examples/notes-view-first#in-page-menu-bar) adds submenus, check and radio
|
|
285
285
|
items and is tested with real keys:
|
|
286
286
|
|
|
287
287
|
```tsx
|
|
@@ -346,7 +346,7 @@ const offline = error instanceof BridgeError && error.kind === "disconnected";
|
|
|
346
346
|
```
|
|
347
347
|
|
|
348
348
|
`instanceof` holds for errors from every copy of the package on the page.
|
|
349
|
-
[Errors and diagnostics](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
349
|
+
[Errors and diagnostics](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/packages/web/views#errors-and-diagnostics)
|
|
350
350
|
lists the kinds. Any other value, such as an exception that your own connect
|
|
351
351
|
function or command callback throws, arrives unchanged.
|
|
352
352
|
|
|
@@ -388,16 +388,16 @@ the application's own dialog.
|
|
|
388
388
|
such as a close during the page's first render, is answered by the
|
|
389
389
|
ViewModel's .NET fallback handler, or fails closed without one.
|
|
390
390
|
|
|
391
|
-
The [ReactiveUI leave confirmation](https://github.com/Runic-Artifex/runic-sdk/blob/v0.12.
|
|
391
|
+
The [ReactiveUI leave confirmation](https://github.com/Runic-Artifex/runic-sdk/blob/v0.12.1/packages/dotnet/Runic.Application.Views.ReactiveUI/README.md#leave-confirmation-in-a-web-view)
|
|
392
392
|
has the .NET side and which View answers which departure. In a frontend test,
|
|
393
393
|
the generated mock's `interactions.<name>.request(input)` resolves with the
|
|
394
394
|
registered handler's answer; see the
|
|
395
|
-
[Testing guide](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
395
|
+
[Testing guide](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/packages/web/views#testing).
|
|
396
396
|
|
|
397
397
|
## `useCollectionViewport(options)`
|
|
398
398
|
|
|
399
399
|
Follows a fixed-row-height scroll container and returns `{ viewport, ref }`.
|
|
400
|
-
`viewport` is the [`collectionViewport`](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
400
|
+
`viewport` is the [`collectionViewport`](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/packages/web/views#collectionviewportoptions)
|
|
401
401
|
range for the container; it changes only when the range or sizes change. Send
|
|
402
402
|
the range to the ViewModel from an effect:
|
|
403
403
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runic-artifex/react",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "React hooks for generated Runic Views clients",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"packageManager": "bun@1.4.
|
|
7
|
+
"packageManager": "bun@1.4.4",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": ">=18.3.0 <20",
|
|
33
|
-
"@runic-artifex/views": "0.12.
|
|
33
|
+
"@runic-artifex/views": "0.12.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@runic-artifex/views": "0.12.
|
|
36
|
+
"@runic-artifex/views": "0.12.1",
|
|
37
37
|
"@types/react": "19.3.0",
|
|
38
38
|
"@types/react-dom": "19.3.0",
|
|
39
39
|
"happy-dom": "21.0.4",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"url": "git+https://github.com/Runic-Artifex/runic-sdk.git",
|
|
52
52
|
"directory": "packages/web/react"
|
|
53
53
|
},
|
|
54
|
-
"homepage": "https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.
|
|
54
|
+
"homepage": "https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.1/packages/web/react#readme",
|
|
55
55
|
"bugs": {
|
|
56
56
|
"url": "https://github.com/Runic-Artifex/runic-sdk/issues"
|
|
57
57
|
},
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"views",
|
|
62
62
|
"react"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "124a532e5861cff03e77d2ef0c5d4f081ee99a47"
|
|
65
65
|
}
|