@assistant-ui/react-generative-ui 0.1.0 → 0.1.2
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 +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @assistant-ui/react-generative-ui
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
Declare the components the model is allowed to render in a library, then expose
|
|
16
|
-
them through the `present` tool. The model emits a `{
|
|
17
|
-
(
|
|
16
|
+
them through the `present` tool. The model emits a `{ _type, ...props }` tree
|
|
17
|
+
(`_type` names the component, so a real `type` prop never collides); the tool
|
|
18
18
|
renders it against the library.
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
@@ -60,9 +60,9 @@ A node's `children` prop is rendered recursively, so components can be nested:
|
|
|
60
60
|
|
|
61
61
|
```json
|
|
62
62
|
{
|
|
63
|
-
"
|
|
63
|
+
"_type": "Card",
|
|
64
64
|
"title": "Hello",
|
|
65
|
-
"children": [{ "
|
|
65
|
+
"children": [{ "_type": "Text", "tone": "muted", "children": "Nested text" }]
|
|
66
66
|
}
|
|
67
67
|
```
|
|
68
68
|
|
|
@@ -132,7 +132,7 @@ export default defineToolkit({
|
|
|
132
132
|
});
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
The model calls `present` with a node like `{ "
|
|
135
|
+
The model calls `present` with a node like `{ "_type": "Weather", "city": "SF" }`.
|
|
136
136
|
Pass `present({ display: "standalone" })` to render the component on its own
|
|
137
137
|
surface instead of inline. See the
|
|
138
138
|
[`"use generative"` docs](https://www.assistant-ui.com/docs) for the build setup.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/react-generative-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Generative UI components for assistant-ui",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"generative-ui",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"sideEffects": false,
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@assistant-ui/generative-ui": "^0.0.
|
|
53
|
+
"@assistant-ui/generative-ui": "^0.0.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@assistant-ui/react": "^0.15.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@assistant-ui/react": "0.15.
|
|
67
|
+
"@assistant-ui/react": "0.15.28",
|
|
68
68
|
"@assistant-ui/x-buildutils": "0.0.30",
|
|
69
69
|
"@assistant-ui/x-react18": "0.0.0",
|
|
70
70
|
"@types/react": "^19.3.0",
|