@ggui-ai/iframe-runtime 0.5.0-rc.2 → 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.
@@ -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 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
+ 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, { markdown: 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, { markdown: 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.5.0-rc.2",
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.5.0-rc.2",
39
- "@ggui-ai/gadgets": "0.5.0-rc.2",
40
- "@ggui-ai/design": "0.5.0-rc.2",
41
- "@ggui-ai/preview-a2ui": "0.5.0-rc.2",
42
- "@ggui-ai/protocol": "0.5.0-rc.2",
43
- "@ggui-ai/wire": "0.5.0-rc.2"
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"