@ggui-ai/iframe-runtime 0.6.0 → 0.6.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.
|
@@ -49,10 +49,10 @@ import { parseServerMessage, } from '@ggui-ai/preview-a2ui';
|
|
|
49
49
|
import { Button, Card, Checkbox, Divider, Heading, Icon, Image, Input, Row, Select, Spinner, Stack, Text, } from '@ggui-ai/design/primitives';
|
|
50
50
|
import { PreviewFragmentEnter, PreviewSurface, StreamingText, } from '@ggui-ai/design/preview';
|
|
51
51
|
// A2UI Text carries INLINE markdown (the block level comes from
|
|
52
|
-
// `variant`) — rendered through the
|
|
53
|
-
// subset via
|
|
54
|
-
// prefixes parse to stable ASTs, so re-emitting a
|
|
55
|
-
// only extends the trailing construct.
|
|
52
|
+
// `variant`) — rendered through the design system's own rich-text
|
|
53
|
+
// subset (`@ggui-ai/design/richtext`) via its inline renderer.
|
|
54
|
+
// Streaming-safe: prefixes parse to stable ASTs, so re-emitting a
|
|
55
|
+
// longer `text` only extends the trailing construct.
|
|
56
56
|
import { MarkdownInline } from '@ggui-ai/design';
|
|
57
57
|
const A2UI_ROOT_ID = 'root';
|
|
58
58
|
const EMPTY_STATE = {
|
|
@@ -158,7 +158,7 @@ function renderComponent(component, all) {
|
|
|
158
158
|
const headingMatch = /^h([1-6])$/.exec(variant);
|
|
159
159
|
if (headingMatch) {
|
|
160
160
|
const level = Number(headingMatch[1]);
|
|
161
|
-
return wrap(createElement(Heading, { level }, createElement(StreamingText, null, createElement(MarkdownInline, {
|
|
161
|
+
return wrap(createElement(Heading, { level }, createElement(StreamingText, null, createElement(MarkdownInline, { markdown: component.text }))));
|
|
162
162
|
}
|
|
163
163
|
// A2UI 'caption' / 'label' map onto Text's size/weight/tone
|
|
164
164
|
// axes; anything else degrades to default body text.
|
|
@@ -167,7 +167,7 @@ function renderComponent(component, all) {
|
|
|
167
167
|
: variant === 'label'
|
|
168
168
|
? { size: 'sm', weight: 'medium' }
|
|
169
169
|
: {};
|
|
170
|
-
return wrap(createElement(Text, textProps, createElement(StreamingText, null, createElement(MarkdownInline, {
|
|
170
|
+
return wrap(createElement(Text, textProps, createElement(StreamingText, null, createElement(MarkdownInline, { markdown: component.text }))));
|
|
171
171
|
}
|
|
172
172
|
case 'Image':
|
|
173
173
|
return wrap(createElement(Image, { src: component.src, alt: component.alt ?? '' }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/iframe-runtime",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "The iframe-local ggui runtime: a self-contained ESM bundle that boots inside an MCP Apps host iframe, runs the protocol-version handshake, opens the live-channel WebSocket, and mounts the rendered UI. Bundles React, ReactDOM, and the ggui design system so generated component code has a single seam to read from.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ggui",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"qrcode-generator": "^2.0.4",
|
|
36
36
|
"react": "^19.0.0",
|
|
37
37
|
"react-dom": "^19.0.0",
|
|
38
|
-
"@ggui-ai/live-channel": "0.6.
|
|
39
|
-
"@ggui-ai/
|
|
40
|
-
"@ggui-ai/
|
|
41
|
-
"@ggui-ai/protocol": "0.6.
|
|
42
|
-
"@ggui-ai/
|
|
43
|
-
"@ggui-ai/wire": "0.6.
|
|
38
|
+
"@ggui-ai/live-channel": "0.6.1",
|
|
39
|
+
"@ggui-ai/gadgets": "0.6.1",
|
|
40
|
+
"@ggui-ai/design": "0.6.1",
|
|
41
|
+
"@ggui-ai/protocol": "0.6.1",
|
|
42
|
+
"@ggui-ai/preview-a2ui": "0.6.1",
|
|
43
|
+
"@ggui-ai/wire": "0.6.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@modelcontextprotocol/sdk": "^1.27.0"
|