@runic-artifex/vue 0.11.0 → 0.12.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.
Files changed (2) hide show
  1. package/README.md +14 -9
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -134,6 +134,11 @@ const { run: navigate } = useCommand((name: "showWelcome" | "showCounter") => cl
134
134
  // <button @click="navigate('showWelcome')">Welcome</button>
135
135
  ```
136
136
 
137
+ `pending` covers only this component's run. Whether .NET can run the command is
138
+ the View's state: a command without an argument publishes `can<Name>` (such as
139
+ `state.canSave`), so disable a button while either says no. A command with an
140
+ argument has the `can<Name>(input)` query on the client instead.
141
+
137
142
  For a command that declares a failure (`[RunicFailure]` in .NET), `run` resolves the
138
143
  `BridgeOutcome`, and `failure` holds the declared failure of the latest run, typed
139
144
  from the outcome, while `error` keeps unexpected failures. Starting a run and
@@ -143,7 +148,7 @@ neither.
143
148
  ## `useOperation(start, options?)`
144
149
 
145
150
  Observes a generated `start<Command>()` operation through the framework-neutral
146
- [operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/packages/web/views#operation-feedback-and-latest-selection)
151
+ [operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/packages/web/views#operation-feedback-and-latest-selection)
147
152
  and returns each state field as a shallow ref, with `run`, `cancel` and `reset`:
148
153
 
149
154
  ```vue
@@ -172,7 +177,7 @@ Disposing the effect scope settles run promises without cancelling accepted work
172
177
 
173
178
  Admits only the newest of several reads, for example loading the item the user
174
179
  selected last, through the framework-neutral
175
- [latest-operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/packages/web/views#operation-feedback-and-latest-selection),
180
+ [latest-operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/packages/web/views#operation-feedback-and-latest-selection),
176
181
  and returns each state field as a shallow ref, with `run` and `clear`. Each
177
182
  `run(intent)` replaces the queued intent and cancels the active read; the next read
178
183
  starts only after the previous one reaches its terminal status and the intent's
@@ -209,7 +214,7 @@ from `@runic-artifex/views` (re-exported here since 0.11, with the
209
214
  `BridgeConnectionState` and `BridgeConnectionOptions` types) and returns `{ state }`, a shallow ref holding a
210
215
  `BridgeConnectionState`: `connecting`, `connected`, `reconnecting` or `lost` (a
211
216
  closed set, see
212
- [Connection state](https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/packages/web/views#connection-state)):
217
+ [Connection state](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/packages/web/views#connection-state)):
213
218
 
214
219
  ```vue
215
220
  <script setup lang="ts">
@@ -232,7 +237,7 @@ development builds warn. An invalid `lostAfter` throws a `RangeError`.
232
237
  Follows the declared menu bar of a Runic Desktop window that leaves it to the
233
238
  page (`DesktopMenuBarPresentation.Page`) until the current effect scope is
234
239
  disposed. It wraps `createMenuBarController` from `@runic-artifex/views` (see
235
- [In-page menu bar](https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/packages/web/views#in-page-menu-bar)) and returns `{ state, invoke, handleKeyDown }`: `state` is a shallow ref
240
+ [In-page menu bar](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/packages/web/views#in-page-menu-bar)) and returns `{ state, invoke, handleKeyDown }`: `state` is a shallow ref
236
241
  of a `MenuBarState`, and the bar is rendered by the menubar component of the
237
242
  application's own UI library. Runic ships no menubar component.
238
243
 
@@ -263,7 +268,7 @@ rendering creates no controller: `state` stays `connecting`.
263
268
  ### With Reka UI
264
269
 
265
270
  Reka UI's `MenubarRoot` with `v-model` of the open menu; the
266
- [Notes example](https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/examples/notes-view-first#in-page-menu-bar) adds submenus, check and radio
271
+ [Notes example](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/examples/notes-view-first#in-page-menu-bar) adds submenus, check and radio
267
272
  items and is tested with real keys:
268
273
 
269
274
  ```vue
@@ -322,7 +327,7 @@ const offline = error.value instanceof BridgeError && error.value.kind === "disc
322
327
  ```
323
328
 
324
329
  `instanceof` holds for errors from every copy of the package on the page.
325
- [Errors and diagnostics](https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/packages/web/views#errors-and-diagnostics)
330
+ [Errors and diagnostics](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/packages/web/views#errors-and-diagnostics)
326
331
  lists the kinds. Any other value, such as an exception that your own connect
327
332
  function or command callback throws, arrives unchanged.
328
333
 
@@ -369,15 +374,15 @@ application's own dialog.
369
374
  departure before that is answered by the ViewModel's .NET fallback handler, or
370
375
  fails closed without one.
371
376
 
372
- The [ReactiveUI leave confirmation](https://github.com/Runic-Artifex/runic-sdk/blob/v0.11.0/packages/dotnet/Runic.Application.Views.ReactiveUI/README.md#leave-confirmation-in-a-web-view)
377
+ The [ReactiveUI leave confirmation](https://github.com/Runic-Artifex/runic-sdk/blob/v0.12.0/packages/dotnet/Runic.Application.Views.ReactiveUI/README.md#leave-confirmation-in-a-web-view)
373
378
  has the .NET side and which View answers which departure. In a frontend test,
374
379
  the generated mock's `interactions.<name>.request(input)` resolves with the
375
- registered handler's answer; see the [Testing guide](https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/packages/web/views#testing).
380
+ registered handler's answer; see the [Testing guide](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/packages/web/views#testing).
376
381
 
377
382
  ## `useCollectionViewport(options)`
378
383
 
379
384
  Follows a fixed-row-height scroll container and returns `{ viewport, attach }`.
380
- `viewport` is a shallow ref with the [`collectionViewport`](https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/packages/web/views#collectionviewportoptions)
385
+ `viewport` is a shallow ref with the [`collectionViewport`](https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/packages/web/views#collectionviewportoptions)
381
386
  range; `attach` is a function ref for the container. Bind it to a native element
382
387
  such as a `<div>`: a component instance (`:ref="attach"` on a component) or a
383
388
  non-HTML element detaches the viewport, and development builds warn. Pass a getter for the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runic-artifex/vue",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Vue composables for generated Runic Views clients",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,11 +30,11 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "vue": ">=3.5.30 <4",
33
- "@runic-artifex/views": "0.11.0"
33
+ "@runic-artifex/views": "0.12.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@runic-artifex/views": "0.11.0",
37
- "happy-dom": "20.14.5",
36
+ "@runic-artifex/views": "0.12.0",
37
+ "happy-dom": "21.0.4",
38
38
  "typescript": "6.0.3",
39
39
  "vitest": "5.0.3",
40
40
  "vue": "3.5.43"
@@ -48,7 +48,7 @@
48
48
  "url": "git+https://github.com/Runic-Artifex/runic-sdk.git",
49
49
  "directory": "packages/web/vue"
50
50
  },
51
- "homepage": "https://github.com/Runic-Artifex/runic-sdk/tree/v0.11.0/packages/web/vue#readme",
51
+ "homepage": "https://github.com/Runic-Artifex/runic-sdk/tree/v0.12.0/packages/web/vue#readme",
52
52
  "bugs": {
53
53
  "url": "https://github.com/Runic-Artifex/runic-sdk/issues"
54
54
  },
@@ -58,5 +58,5 @@
58
58
  "views",
59
59
  "vue"
60
60
  ],
61
- "gitHead": "318762a9d5dcdd74303ca30b095fed355a1ab21f"
61
+ "gitHead": "cb95ea2838ba61c7a24b9cda05bf5f0bd6fcc2d7"
62
62
  }