@ggui-ai/iframe-runtime 0.5.0-rc.2 → 0.6.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.
|
@@ -48,6 +48,12 @@ const PREVIEW_CHANNEL = '_ggui:preview';
|
|
|
48
48
|
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
|
+
// A2UI Text carries INLINE markdown (the block level comes from
|
|
52
|
+
// `variant`) — rendered through the shared @silverprotocol/richtext
|
|
53
|
+
// subset via the design system's inline renderer. Streaming-safe:
|
|
54
|
+
// prefixes parse to stable ASTs, so re-emitting a longer `text`
|
|
55
|
+
// only extends the trailing construct.
|
|
56
|
+
import { MarkdownInline } from '@ggui-ai/design';
|
|
51
57
|
const A2UI_ROOT_ID = 'root';
|
|
52
58
|
const EMPTY_STATE = {
|
|
53
59
|
surfaceId: null,
|
|
@@ -152,7 +158,7 @@ function renderComponent(component, all) {
|
|
|
152
158
|
const headingMatch = /^h([1-6])$/.exec(variant);
|
|
153
159
|
if (headingMatch) {
|
|
154
160
|
const level = Number(headingMatch[1]);
|
|
155
|
-
return wrap(createElement(Heading, { level }, createElement(StreamingText, null, component.text)));
|
|
161
|
+
return wrap(createElement(Heading, { level }, createElement(StreamingText, null, createElement(MarkdownInline, { text: component.text }))));
|
|
156
162
|
}
|
|
157
163
|
// A2UI 'caption' / 'label' map onto Text's size/weight/tone
|
|
158
164
|
// axes; anything else degrades to default body text.
|
|
@@ -161,7 +167,7 @@ function renderComponent(component, all) {
|
|
|
161
167
|
: variant === 'label'
|
|
162
168
|
? { size: 'sm', weight: 'medium' }
|
|
163
169
|
: {};
|
|
164
|
-
return wrap(createElement(Text, textProps, createElement(StreamingText, null, component.text)));
|
|
170
|
+
return wrap(createElement(Text, textProps, createElement(StreamingText, null, createElement(MarkdownInline, { text: component.text }))));
|
|
165
171
|
}
|
|
166
172
|
case 'Image':
|
|
167
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.
|
|
3
|
+
"version": "0.6.0",
|
|
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.
|
|
39
|
-
"@ggui-ai/
|
|
40
|
-
"@ggui-ai/
|
|
41
|
-
"@ggui-ai/
|
|
42
|
-
"@ggui-ai/
|
|
43
|
-
"@ggui-ai/wire": "0.
|
|
38
|
+
"@ggui-ai/live-channel": "0.6.0",
|
|
39
|
+
"@ggui-ai/preview-a2ui": "0.6.0",
|
|
40
|
+
"@ggui-ai/gadgets": "0.6.0",
|
|
41
|
+
"@ggui-ai/protocol": "0.6.0",
|
|
42
|
+
"@ggui-ai/design": "0.6.0",
|
|
43
|
+
"@ggui-ai/wire": "0.6.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@modelcontextprotocol/sdk": "^1.27.0"
|