@xmachines/play-vue 5.0.2 → 6.0.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 +3 -3
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Vue 3 renderer for the XMachines Play Architecture. It observes the actor atoms and renders the UI through `@xmachines/json-render-vue`.
|
|
4
4
|
|
|
5
|
-
[](https://opensource.org/licenses/MIT) [](https://opensource.org/licenses/MIT) [](https://www.npmjs.com/package/@xmachines/play-vue)
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -27,7 +27,7 @@ pnpm add @xmachines/play-vue
|
|
|
27
27
|
**Peer dependencies.** Install them with the package:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
pnpm add vue@^3.5.0 @xmachines/play @xmachines/play-atom @xstate/store@^4.2.3 @xmachines/json-render-vue@^0.
|
|
30
|
+
pnpm add vue@^3.5.0 @xmachines/core @xmachines/play @xmachines/play-atom @xstate/store@^4.2.3 @xmachines/json-render-vue@^0.21.0-xm.1 @xmachines/json-render-core@^0.21.0-xm.1 @xmachines/json-render-xstate@^0.21.0-xm.1
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
`@xstate/store` is the peer of [`@xmachines/play-atom`](../play-atom/README.md), and not of this
|
|
@@ -102,7 +102,7 @@ The boundary stops a render error, so `app.config.errorHandler` sees it no longe
|
|
|
102
102
|
|
|
103
103
|
The second parameter is the **reset**, for a retry that the host starts. It renders the view that the actor holds at the moment of the call, so a retry cannot rewind the screen to the view that failed. A reset that the host calls from inside the handler does nothing, because no input changed between the two attempts, and a reset after the provider goes away does nothing. The five renderers hold the same three rules.
|
|
104
104
|
|
|
105
|
-
**A handler that throws reaches no caller.** The provider contains that throw, and it writes the throw to `console.error`. The errored flag schedules a render, so a throw that left the handler would stop that render and skip the `return false` of `onErrorCaptured`: the subtree that threw stays on the screen and the error reaches `app.config.errorHandler` as well. Report a failure from `onError`. To escalate one, raise it from a task of your own — `
|
|
105
|
+
**A handler that throws reaches no caller.** The provider contains that throw, and it writes the throw to `console.error`. The errored flag schedules a render, so a throw that left the handler would stop that render and skip the `return false` of `onErrorCaptured`: the subtree that threw stays on the screen and the error reaches `app.config.errorHandler` as well. Report a failure from `onError`. To escalate one, raise it from a task of your own — `rethrowLater(error)` of [`@xmachines/core/utils`](../core/README.md) — which reaches the global handler of the page and leaves the containment whole. Install that package next to this one, because your code imports it and a package manager such as pnpm does not let your code import a package that it does not declare. The five renderers hold this one rule.
|
|
106
106
|
|
|
107
107
|
`onErrorCaptured` of Vue also fires for an error of an **event handler** and of a **watcher callback**, which the boundaries of React, Solid, and Svelte each see never. The provider leaves such an error alone: the view stays on the screen, `onError` stays silent, and the error continues to `app.config.errorHandler` exactly as it does without this provider. A click handler that throws therefore does not replace your view with the fallback, and it reaches your global handler one time. `onError` reports a failure of the render, in every renderer.
|
|
108
108
|
|
package/dist/types.d.ts
CHANGED
|
@@ -68,8 +68,9 @@ export interface ActorProviderProps extends BaseActorProviderProps<DefineRegistr
|
|
|
68
68
|
* `app.config.errorHandler`.
|
|
69
69
|
*
|
|
70
70
|
* Report a failure from this handler. To ESCALATE one, raise it from a task of your
|
|
71
|
-
* own — `
|
|
72
|
-
* the page and leaves the containment whole. The
|
|
71
|
+
* own — `rethrowLater(error)` of `@xmachines/core/utils` — which reaches the global handler of
|
|
72
|
+
* the page and leaves the containment whole. The host installs `@xmachines/core` itself.
|
|
73
|
+
* The five renderers hold this one rule.
|
|
73
74
|
*/
|
|
74
75
|
onError?: (error: unknown, reset: () => void) => void;
|
|
75
76
|
}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,O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E,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmachines/play-vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Vue renderer for XMachines Play architecture",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"reactive",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"test:watch": "vitest"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@xmachines/play-actor": "
|
|
50
|
-
"@xmachines/play-view": "
|
|
49
|
+
"@xmachines/play-actor": "6.0.0",
|
|
50
|
+
"@xmachines/play-view": "6.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@testing-library/jest-dom": "^7.0.1",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"@vitejs/plugin-vue": "^6.0.9",
|
|
56
56
|
"@vitest/browser-playwright": "^5.0.1",
|
|
57
57
|
"@vue/test-utils": "^2.5.0",
|
|
58
|
-
"@xmachines/json-render-core": "^0.
|
|
59
|
-
"@xmachines/json-render-vue": "^0.
|
|
60
|
-
"@xmachines/json-render-xstate": "^0.
|
|
61
|
-
"@xmachines/play": "
|
|
62
|
-
"@xmachines/play-atom": "
|
|
58
|
+
"@xmachines/json-render-core": "^0.21.0-xm.1",
|
|
59
|
+
"@xmachines/json-render-vue": "^0.21.0-xm.1",
|
|
60
|
+
"@xmachines/json-render-xstate": "^0.21.0-xm.1",
|
|
61
|
+
"@xmachines/play": "6.0.0",
|
|
62
|
+
"@xmachines/play-atom": "6.0.0",
|
|
63
63
|
"oxfmt": "^0.70.0",
|
|
64
64
|
"oxlint": "^1.85.0",
|
|
65
65
|
"typescript": "^5.9.3 || ^6.0.3",
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"zod": "^4.6.5"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@xmachines/json-render-core": "^0.
|
|
75
|
-
"@xmachines/json-render-vue": "^0.
|
|
76
|
-
"@xmachines/json-render-xstate": "^0.
|
|
77
|
-
"@xmachines/play": "
|
|
78
|
-
"@xmachines/play-atom": "
|
|
74
|
+
"@xmachines/json-render-core": "^0.21.0-xm.1",
|
|
75
|
+
"@xmachines/json-render-vue": "^0.21.0-xm.1",
|
|
76
|
+
"@xmachines/json-render-xstate": "^0.21.0-xm.1",
|
|
77
|
+
"@xmachines/play": "6.0.0",
|
|
78
|
+
"@xmachines/play-atom": "6.0.0",
|
|
79
79
|
"vue": "^3.5.0"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|