@xmachines/play-vue 6.0.0 → 6.1.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 -5
- package/dist/ActorProvider.js +0 -7
- package/dist/PlayRenderer.js +0 -7
- package/dist/PlayUIProvider.js +0 -7
- package/dist/types.d.ts +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/core @xmachines/play @xmachines/play-atom @xstate/store@^4.2.3 @xmachines/json-render-vue@^0.21.0-xm.
|
|
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.2 @xmachines/json-render-core@^0.21.0-xm.2 @xmachines/json-render-xstate@^0.21.0-xm.2
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
`@xstate/store` is the peer of [`@xmachines/play-atom`](../play-atom/README.md), and not of this
|
|
@@ -98,7 +98,7 @@ The composite provider. It wraps `<ActorProvider>` and `JSONUIProvider` in one c
|
|
|
98
98
|
|
|
99
99
|
The provider contains an error of the **render** of a descendant — the render function, the setup function, and a lifecycle hook — so that a subtree that throws cannot take the whole application down. It calls `onError`, and it renders the `fallback` slot instead of the children. The next view emission clears the error, so a view transition retries the render. A throw of a catalog component reaches the per-element boundary of `@xmachines/json-render-vue` first, and `onRenderError` reports it; this boundary is the outer net for everything else.
|
|
100
100
|
|
|
101
|
-
The boundary stops a render error, so `app.config.errorHandler`
|
|
101
|
+
The boundary stops a render error, so `app.config.errorHandler` does not see it. Without an `onError` prop the provider therefore writes the error to `console.error`.
|
|
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
|
|
|
@@ -195,8 +195,6 @@ const view = usePlayView();
|
|
|
195
195
|
|
|
196
196
|
`usePlayView()` returns a **Proxy**: every property read goes to the live context of the provider.
|
|
197
197
|
|
|
198
|
-
> **Note:** `usePlayView` was named `getPlayViewContext` before. That alias is gone.
|
|
199
|
-
|
|
200
198
|
---
|
|
201
199
|
|
|
202
200
|
### Re-exported from `@xmachines/json-render-vue`
|
package/dist/ActorProvider.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import "./actor-provider-context.js";
|
|
2
2
|
import ActorProvider_vue_vue_type_script_lang_default from "./ActorProvider.vue_vue_type_script_lang.js";
|
|
3
|
-
import { useSSRContext } from "vue";
|
|
4
3
|
//#region packages/play-vue/src/ActorProvider.vue
|
|
5
|
-
var _sfc_setup = ActorProvider_vue_vue_type_script_lang_default.setup;
|
|
6
|
-
ActorProvider_vue_vue_type_script_lang_default.setup = (props, ctx) => {
|
|
7
|
-
const ssrContext = useSSRContext();
|
|
8
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("packages/play-vue/src/ActorProvider.vue");
|
|
9
|
-
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
10
|
-
};
|
|
11
4
|
var ActorProvider_default = ActorProvider_vue_vue_type_script_lang_default;
|
|
12
5
|
//#endregion
|
|
13
6
|
export { ActorProvider_default as default };
|
package/dist/PlayRenderer.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import PlayRenderer_vue_vue_type_script_lang_default from "./PlayRenderer.vue_vue_type_script_lang.js";
|
|
2
|
-
import { useSSRContext } from "vue";
|
|
3
2
|
//#region packages/play-vue/src/PlayRenderer.vue
|
|
4
|
-
var _sfc_setup = PlayRenderer_vue_vue_type_script_lang_default.setup;
|
|
5
|
-
PlayRenderer_vue_vue_type_script_lang_default.setup = (props, ctx) => {
|
|
6
|
-
const ssrContext = useSSRContext();
|
|
7
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("packages/play-vue/src/PlayRenderer.vue");
|
|
8
|
-
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
9
|
-
};
|
|
10
3
|
var PlayRenderer_default = PlayRenderer_vue_vue_type_script_lang_default;
|
|
11
4
|
//#endregion
|
|
12
5
|
export { PlayRenderer_default as default };
|
package/dist/PlayUIProvider.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import PlayUIProvider_vue_vue_type_script_lang_default from "./PlayUIProvider.vue_vue_type_script_lang.js";
|
|
2
|
-
import { useSSRContext } from "vue";
|
|
3
2
|
//#region packages/play-vue/src/PlayUIProvider.vue
|
|
4
|
-
var _sfc_setup = PlayUIProvider_vue_vue_type_script_lang_default.setup;
|
|
5
|
-
PlayUIProvider_vue_vue_type_script_lang_default.setup = (props, ctx) => {
|
|
6
|
-
const ssrContext = useSSRContext();
|
|
7
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("packages/play-vue/src/PlayUIProvider.vue");
|
|
8
|
-
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
9
|
-
};
|
|
10
3
|
var PlayUIProvider_default = PlayUIProvider_vue_vue_type_script_lang_default;
|
|
11
4
|
//#endregion
|
|
12
5
|
export { PlayUIProvider_default as default };
|
package/dist/types.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface ActorProviderProps extends BaseActorProviderProps<DefineRegistr
|
|
|
47
47
|
* `currentView` changes), so a view transition retries the render.
|
|
48
48
|
*
|
|
49
49
|
* The boundary stops the error. Without this prop the provider therefore writes the
|
|
50
|
-
* error to `console.error`, because `app.config.errorHandler`
|
|
50
|
+
* error to `console.error`, because `app.config.errorHandler` does not see it.
|
|
51
51
|
*
|
|
52
52
|
* Element-level catalog component throws are caught upstream by the per-element
|
|
53
53
|
* boundary of @json-render, and reported through `onRenderError`. This boundary is
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmachines/play-vue",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.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": "6.
|
|
50
|
-
"@xmachines/play-view": "6.
|
|
49
|
+
"@xmachines/play-actor": "6.1.0",
|
|
50
|
+
"@xmachines/play-view": "6.1.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.21.0-xm.
|
|
59
|
-
"@xmachines/json-render-vue": "^0.21.0-xm.
|
|
60
|
-
"@xmachines/json-render-xstate": "^0.21.0-xm.
|
|
61
|
-
"@xmachines/play": "6.
|
|
62
|
-
"@xmachines/play-atom": "6.
|
|
58
|
+
"@xmachines/json-render-core": "^0.21.0-xm.2",
|
|
59
|
+
"@xmachines/json-render-vue": "^0.21.0-xm.2",
|
|
60
|
+
"@xmachines/json-render-xstate": "^0.21.0-xm.2",
|
|
61
|
+
"@xmachines/play": "6.1.0",
|
|
62
|
+
"@xmachines/play-atom": "6.1.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.21.0-xm.
|
|
75
|
-
"@xmachines/json-render-vue": "^0.21.0-xm.
|
|
76
|
-
"@xmachines/json-render-xstate": "^0.21.0-xm.
|
|
77
|
-
"@xmachines/play": "6.
|
|
78
|
-
"@xmachines/play-atom": "6.
|
|
74
|
+
"@xmachines/json-render-core": "^0.21.0-xm.2",
|
|
75
|
+
"@xmachines/json-render-vue": "^0.21.0-xm.2",
|
|
76
|
+
"@xmachines/json-render-xstate": "^0.21.0-xm.2",
|
|
77
|
+
"@xmachines/play": "6.1.0",
|
|
78
|
+
"@xmachines/play-atom": "6.1.0",
|
|
79
79
|
"vue": "^3.5.0"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|