@runic-artifex/vue 0.17.0 → 0.17.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.
Files changed (2) hide show
  1. package/README.md +20 -20
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -196,10 +196,10 @@ is written. A string set on `value` of a field that is not text is taken as its
196
196
  `errors` holds the member's validation messages from the descriptor (`[]` when valid), `error` why the latest write
197
197
  or text failed (a `BridgeError` or a `FieldError`, whose `kind` is `rejected`, `conflict`, `committed-with-error` or
198
198
  `invalid-text`). `FieldError`, `FieldOptions`, `FieldState` and `BridgeField` are exported from this package. See the
199
- [field controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#fields) for the receipts
199
+ [field controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#fields) for the receipts
200
200
  and text forms. An `invalid-text` error has a `reason` and `arguments`: render `useText(() => title.error)` after
201
201
  `configureFieldErrorText` to show your own text for it in the window's language
202
- ([Translating field errors](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#translating-field-errors)).
202
+ ([Translating field errors](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#translating-field-errors)).
203
203
 
204
204
  #### Row cells and nested members
205
205
 
@@ -208,7 +208,7 @@ Since 0.16, `InvoiceFields.address.street` and `InvoiceFields.lines.at(line.id).
208
208
  `useField` in the row's component (`v-model="quantity.text"`); `at(key)` returns the same descriptor for the same
209
209
  key. Such a field always writes checked, conflicts only when another writer changed the same cell, and shows the
210
210
  messages .NET reports at the cell's validation path. See
211
- [Fields below a member and row cells](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.0/packages/web/vue/../views/README.md#fields-below-a-member-and-row-cells).
211
+ [Fields below a member and row cells](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.1/packages/web/vue/../views/README.md#fields-below-a-member-and-row-cells).
212
212
 
213
213
  ### Forms: `useForm(fields, options?)`
214
214
 
@@ -223,7 +223,7 @@ const form = useForm({ title, step }, { dirty: () => editor.state.value?.isDirty
223
223
  ### Text inputs: `useTextField(view, read, write, options?)`
224
224
 
225
225
  Binds a text input to a member through the framework-neutral
226
- [text field controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#text-inputs)
226
+ [text field controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#text-inputs)
227
227
  while the effect scope is active. Each field is a ref, so the handle can be destructured:
228
228
 
229
229
  ```vue
@@ -291,7 +291,7 @@ const { state } = useView({ connect: connectWorkspace });
291
291
  `satisfies ViewRegistry<…>` checks that every kind has a component whose `page`
292
292
  prop accepts that reference. A component whose `page` is a shared page
293
293
  reference, such as `ResultPagePageReference` of a .NET
294
- [`[RunicSharedClient]`](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.0/packages/web/vue/../../dotnet/Runic.Application.Views/README.md#shared-clients)
294
+ [`[RunicSharedClient]`](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.1/packages/web/vue/../../dotnet/Runic.Application.Views/README.md#shared-clients)
295
295
  interface, registers for each of its kinds:
296
296
  `{ ...registryEntries(resultPageKinds, ResultPage), settings: Settings }`.
297
297
 
@@ -396,7 +396,7 @@ neither.
396
396
  ## `useOperation(start, options?)`
397
397
 
398
398
  Observes a generated `start<Command>()` operation through the framework-neutral
399
- [operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#operation-feedback-and-latest-selection)
399
+ [operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#operation-feedback-and-latest-selection)
400
400
  and returns each state field as a shallow ref, with `run`, `cancel` and `reset`:
401
401
 
402
402
  ```vue
@@ -428,7 +428,7 @@ Disposing the effect scope settles run promises without cancelling accepted work
428
428
 
429
429
  Admits only the newest of several reads, for example loading the item the user
430
430
  selected last, through the framework-neutral
431
- [latest-operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#operation-feedback-and-latest-selection),
431
+ [latest-operation controller](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#operation-feedback-and-latest-selection),
432
432
  and returns each state field as a shallow ref, with `run` and `clear`. Each
433
433
  `run(intent)` replaces the queued intent and cancels the active read; the next read
434
434
  starts only after the previous one reaches its terminal status and the intent's
@@ -465,7 +465,7 @@ from `@runic-artifex/views` (re-exported here since 0.11, with the
465
465
  `BridgeConnectionState` and `BridgeConnectionOptions` types) and returns `{ state }`, a shallow ref holding a
466
466
  `BridgeConnectionState`: `connecting`, `connected`, `reconnecting`, `lost` or `closed` (the
467
467
  application closed the window, since 0.15; a closed set, see
468
- [Connection state](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#connection-state)):
468
+ [Connection state](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#connection-state)):
469
469
 
470
470
  ```vue
471
471
  <script setup lang="ts">
@@ -488,7 +488,7 @@ development builds warn. An invalid `lostAfter` throws a `RangeError`.
488
488
  Follows the declared menu bar of a Runic Desktop window that leaves it to the
489
489
  page (`DesktopMenuBarPresentation.Page`) until the current effect scope is
490
490
  disposed. It wraps `createMenuBarController` from `@runic-artifex/views` (see
491
- [In-page menu bar](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#in-page-menu-bar)) and returns `{ state, invoke, handleKeyDown }`: `state` is a shallow ref
491
+ [In-page menu bar](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#in-page-menu-bar)) and returns `{ state, invoke, handleKeyDown }`: `state` is a shallow ref
492
492
  of a `MenuBarState`, and the bar is rendered by the menubar component of the
493
493
  application's own UI library. Runic ships no menubar component.
494
494
 
@@ -519,7 +519,7 @@ rendering creates no controller: `state` stays `connecting`.
519
519
  ### With Reka UI
520
520
 
521
521
  Reka UI's `MenubarRoot` with `v-model` of the open menu; the
522
- [Notes example](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/examples/notes-view-first#in-page-menu-bar) adds submenus, check and radio
522
+ [Notes example](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/examples/notes-view-first#in-page-menu-bar) adds submenus, check and radio
523
523
  items and is tested with real keys:
524
524
 
525
525
  ```vue
@@ -570,7 +570,7 @@ Shows a text reference that a ViewModel produced, such as a status line or a
570
570
  validation error's `text`, in the window's language, and renders again when the
571
571
  language changes. A string shows as it is; `null` and `undefined` show
572
572
  `fallback`. Connect the page's Translations runtime once with
573
- `configureTranslatedText` ([Translated text](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.0/packages/dotnet/Runic.Application.Views/README.md#translated-text)).
573
+ `configureTranslatedText` ([Translated text](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.1/packages/dotnet/Runic.Application.Views/README.md#translated-text)).
574
574
  `useWindowLocale()` reads the window's locale.
575
575
 
576
576
  `useTextLocale()` is the locale that text is shown in, as a ref. It is one ref
@@ -597,7 +597,7 @@ The page's appearance as a ref that renders, computes and watches again when it
597
597
  changes, while the calling component or effect scope lives: the colour scheme,
598
598
  contrast and reduced motion of the page's engine, combined with the desktop's
599
599
  text scale, accent colour, forced-colours palette, contrast and motion that a
600
- Runic host pushes ([Appearance](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.0/packages/web/views/README.md#appearance)). Every member is `null` under
600
+ Runic host pushes ([Appearance](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.1/packages/web/views/README.md#appearance)). Every member is `null` under
601
601
  server rendering.
602
602
 
603
603
  ```ts
@@ -622,7 +622,7 @@ const message = computed(() => describeBridgeError(error.value));
622
622
  ```
623
623
 
624
624
  `instanceof` holds for errors from every copy of the package on the page.
625
- [Errors and diagnostics](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#errors-and-diagnostics)
625
+ [Errors and diagnostics](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#errors-and-diagnostics)
626
626
  lists the kinds. Any other value, such as an exception that your own connect
627
627
  function or command callback throws, arrives unchanged.
628
628
 
@@ -669,10 +669,10 @@ application's own dialog.
669
669
  departure before that is answered by the ViewModel's .NET fallback handler, or
670
670
  fails closed without one.
671
671
 
672
- The [ReactiveUI leave confirmation](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.0/packages/dotnet/Runic.Application.Views.ReactiveUI/README.md#leave-confirmation-in-a-web-view)
672
+ The [ReactiveUI leave confirmation](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.1/packages/dotnet/Runic.Application.Views.ReactiveUI/README.md#leave-confirmation-in-a-web-view)
673
673
  has the .NET side and which View answers which departure. In a frontend test,
674
674
  the generated mock's `interactions.<name>.request(input)` resolves with the
675
- registered handler's answer; see the [Testing guide](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#testing).
675
+ registered handler's answer; see the [Testing guide](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#testing).
676
676
 
677
677
  ## View requests
678
678
 
@@ -708,14 +708,14 @@ the page painted the state the request was raised with, so the field of that
708
708
  state is rendered; `signal` aborts when the handler is replaced or removed, the
709
709
  client is disposed or the connection is lost. A request is never replayed: one
710
710
  raised before the effect ran, or while the page is disconnected, is not
711
- delivered later. See [View requests](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#view-requests) for the rules, and in a frontend
711
+ delivered later. See [View requests](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#view-requests) for the rules, and in a frontend
712
712
  test raise one with the generated mock's `requests.<name>.raise(input)` (the
713
- [Testing guide](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#testing)).
713
+ [Testing guide](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#testing)).
714
714
 
715
715
  ## `useCollectionViewport(options)`
716
716
 
717
717
  Follows a fixed-row-height scroll container and returns `{ viewport, attach }`.
718
- `viewport` is a shallow ref with the [`collectionViewport`](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#collectionviewportoptions)
718
+ `viewport` is a shallow ref with the [`collectionViewport`](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#collectionviewportoptions)
719
719
  range; `attach` is a function ref for the container. Bind it to a native element
720
720
  such as a `<div>`: a component instance (`:ref="attach"` on a component) or a
721
721
  non-HTML element detaches the viewport, and development builds warn. Pass a getter for the
@@ -739,7 +739,7 @@ watch(() => [viewport.value.start, viewport.value.size] as const, ([start, size]
739
739
 
740
740
  ## `useQueryCollection(collection, options)`
741
741
 
742
- Follows a scroll container for a [query collection](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/views#query-collections) (`client.queries.{name}`), whose rows stay in .NET: it
742
+ Follows a scroll container for a [query collection](https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/views#query-collections) (`client.queries.{name}`), whose rows stay in .NET: it
743
743
  loads the rows the container shows, with placeholders until they arrive, and lays them out with variable heights.
744
744
  Pass the collection or a getter (`() => client.value?.queries.rows`) and the options. `viewport` is a ref of the
745
745
  `QueryViewport` (`items` with `top` and `size`, `totalSize`, `total`, `query`, `loading`, `error`); bind `attach` to the
@@ -766,4 +766,4 @@ The package re-exports `installBackNavigation`, `installNavigationPath`,
766
766
  `@runic-artifex/views` (since 0.16). Call the installs once where the page
767
767
  starts, before or after mounting: the mouse's Back button and Alt+Left then go
768
768
  back in the .NET window, and `#/customers/42` follows its path region. See
769
- [Back and the URL](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.0/packages/web/views/README.md#back-and-the-url).
769
+ [Back and the URL](https://github.com/Runic-Artifex/runic-sdk/blob/v0.17.1/packages/web/views/README.md#back-and-the-url).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runic-artifex/vue",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Vue composables for generated Runic Views clients",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,10 +30,10 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "vue": ">=3.5.30 <4",
33
- "@runic-artifex/views": "0.17.0"
33
+ "@runic-artifex/views": "0.17.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@runic-artifex/views": "0.17.0",
36
+ "@runic-artifex/views": "0.17.1",
37
37
  "esbuild": "0.28.2",
38
38
  "happy-dom": "21.0.4",
39
39
  "playwright-core": "1.63.0",
@@ -50,7 +50,7 @@
50
50
  "url": "git+https://github.com/Runic-Artifex/runic-sdk.git",
51
51
  "directory": "packages/web/vue"
52
52
  },
53
- "homepage": "https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.0/packages/web/vue#readme",
53
+ "homepage": "https://github.com/Runic-Artifex/runic-sdk/tree/v0.17.1/packages/web/vue#readme",
54
54
  "bugs": {
55
55
  "url": "https://github.com/Runic-Artifex/runic-sdk/issues"
56
56
  },
@@ -60,5 +60,5 @@
60
60
  "views",
61
61
  "vue"
62
62
  ],
63
- "gitHead": "daeb17e5c3fb0b625d5d988d359cd12ffa51f8c6"
63
+ "gitHead": "4f200eadd987eab9a2e38db6e8841849b743b615"
64
64
  }