@mcp-native/react-native 0.8.0 → 0.9.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 +16 -6
- package/dist/legacy.d.ts +9 -0
- package/dist/legacy.d.ts.map +1 -0
- package/dist/legacy.js +8 -0
- package/dist/legacy.js.map +1 -0
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
> **
|
|
15
|
+
> **Pre-1.0 release candidate:** this package mounts the complete pinned A2UI basic catalog,
|
|
16
|
+
> policy-gated media, and exactly negotiated local host extensions. Its `0.9.x` API is frozen for
|
|
17
|
+
> `1.0.0` review; the stable compatibility guarantee begins at `1.0.0`.
|
|
16
18
|
|
|
17
19
|
`@mcp-native/react-native` converts a surface already validated by `@mcp-native/a2ui` into a trusted render plan and mounts it with components supplied by the host application. Servers provide data and declared actions—not JavaScript modules, component implementations, or arbitrary component names.
|
|
18
20
|
|
|
@@ -24,14 +26,17 @@ The renderer is an internal platform layer, not proof of complete A2UI v1.0 conf
|
|
|
24
26
|
npm install @mcp-native/react-native react react-native
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
`@mcp-native/a2ui` and `@mcp-native/core` are installed as dependencies. React is a peer dependency. React Native `>=0.
|
|
29
|
+
`@mcp-native/a2ui` and `@mcp-native/core` are installed as dependencies. React is a peer dependency. React Native `>=0.87.0 <1` is an optional peer because the renderer does not import it or choose a platform implementation; a native host supplies its locally bundled components.
|
|
28
30
|
|
|
29
|
-
##
|
|
31
|
+
## Deprecated custom `0.1` quick start
|
|
32
|
+
|
|
33
|
+
Use the explicit legacy subpaths during `0.9.x`. These APIs leave package roots at `1.0.0`; the
|
|
34
|
+
subpaths remain frozen for migration and security fixes.
|
|
30
35
|
|
|
31
36
|
```tsx
|
|
32
|
-
import { parseA2uiSurface } from "@mcp-native/a2ui";
|
|
37
|
+
import { parseA2uiSurface } from "@mcp-native/a2ui/legacy";
|
|
33
38
|
import type { McpNativeRuntime } from "@mcp-native/core";
|
|
34
|
-
import { McpNativeSurface, useMcpNativeActionDispatcher } from "@mcp-native/react-native";
|
|
39
|
+
import { McpNativeSurface, useMcpNativeActionDispatcher } from "@mcp-native/react-native/legacy";
|
|
35
40
|
import { Button, Text, TextInput, View } from "react-native";
|
|
36
41
|
|
|
37
42
|
const components = { Button, Text, TextInput, View };
|
|
@@ -123,12 +128,17 @@ repeatable Node.js render-plan budgets and fixed-seed generated-input coverage.
|
|
|
123
128
|
|
|
124
129
|
For release/platform testing, `npm run native:host:prepare` generates an official temporary React
|
|
125
130
|
Native host at the package's exact tested boundaries: current latest `0.87.1` and declared minimum
|
|
126
|
-
`0.
|
|
131
|
+
`0.87.0`. Each host installs local package tarballs and the pinned accessibility,
|
|
127
132
|
complete-catalog, media, and Codegen/Fabric extension fixtures.
|
|
128
133
|
The [Expo Go integration PoC policy](../../docs/native-accessibility-testing.md) documents the
|
|
129
134
|
non-blocking app-level compatibility work. Generated hosts remain automated package fixtures and do
|
|
130
135
|
not establish support for a component library.
|
|
131
136
|
|
|
137
|
+
The Milestone 9 fixture also places this native surface beside an isolated MCP Apps WebView through
|
|
138
|
+
the convenience package's host-owned coordinator. It exercises fixed accessibility order,
|
|
139
|
+
application state, dynamic type, reduced motion, orientation, keyboard, back handling, process
|
|
140
|
+
crash/reload, and teardown without treating the two regions as one protocol or accessibility tree.
|
|
141
|
+
|
|
132
142
|
### Host component adapters
|
|
133
143
|
|
|
134
144
|
The catalog may use React Native primitives directly or typed adapters around any locally bundled design system. The adapter helpers receive only the trusted primitive props selected by MCP Native and map them into the host component's API:
|
package/dist/legacy.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for the frozen custom A2UI `0.1` proof surface.
|
|
3
|
+
*
|
|
4
|
+
* @deprecated Migrate to `A2uiV1NativeSurface`. Root aliases are removed at `1.0.0`; this explicit
|
|
5
|
+
* subpath remains isolated and receives security fixes only.
|
|
6
|
+
*/
|
|
7
|
+
export { McpNativeSurface, createNativeRenderPlan, useMcpNativeActionDispatcher, useNativeRenderPlan, } from "./index.js";
|
|
8
|
+
export type { McpNativeActionDispatcherOptions, McpNativeDispatcher, McpNativeSurfaceProps, NativeActionHandler, NativeBindingChangeHandler, NativeComponentName, NativeElement, } from "./index.js";
|
|
9
|
+
//# sourceMappingURL=legacy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../src/legacy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,gCAAgC,EAChC,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC"}
|
package/dist/legacy.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer for the frozen custom A2UI `0.1` proof surface.
|
|
3
|
+
*
|
|
4
|
+
* @deprecated Migrate to `A2uiV1NativeSurface`. Root aliases are removed at `1.0.0`; this explicit
|
|
5
|
+
* subpath remains isolated and receives security fixes only.
|
|
6
|
+
*/
|
|
7
|
+
export { McpNativeSurface, createNativeRenderPlan, useMcpNativeActionDispatcher, useNativeRenderPlan, } from "./index.js";
|
|
8
|
+
//# sourceMappingURL=legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../src/legacy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-native/react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "React Native renderer primitives for MCP Native.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"a2ui",
|
|
@@ -31,14 +31,18 @@
|
|
|
31
31
|
".": {
|
|
32
32
|
"types": "./dist/index.d.ts",
|
|
33
33
|
"import": "./dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./legacy": {
|
|
36
|
+
"types": "./dist/legacy.d.ts",
|
|
37
|
+
"import": "./dist/legacy.js"
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
40
|
"publishConfig": {
|
|
37
41
|
"access": "public"
|
|
38
42
|
},
|
|
39
43
|
"dependencies": {
|
|
40
|
-
"@mcp-native/a2ui": "^0.
|
|
41
|
-
"@mcp-native/core": "^0.
|
|
44
|
+
"@mcp-native/a2ui": "^0.9.1",
|
|
45
|
+
"@mcp-native/core": "^0.9.1"
|
|
42
46
|
},
|
|
43
47
|
"devDependencies": {
|
|
44
48
|
"@types/react": "19.1.17",
|
|
@@ -47,7 +51,7 @@
|
|
|
47
51
|
},
|
|
48
52
|
"peerDependencies": {
|
|
49
53
|
"react": ">=18.3.1 <20",
|
|
50
|
-
"react-native": ">=0.
|
|
54
|
+
"react-native": ">=0.87.0 <1"
|
|
51
55
|
},
|
|
52
56
|
"peerDependenciesMeta": {
|
|
53
57
|
"react-native": {
|