@datalayer/agent-runtimes 1.0.3 → 1.0.5

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.
Files changed (275) hide show
  1. package/README.md +35 -119
  2. package/lib/App.js +1 -1
  3. package/lib/agents/AgentDetails.d.ts +22 -1
  4. package/lib/agents/AgentDetails.js +34 -47
  5. package/lib/api/index.d.ts +0 -1
  6. package/lib/api/index.js +4 -2
  7. package/lib/chat/Chat.d.ts +5 -104
  8. package/lib/chat/Chat.js +4 -4
  9. package/lib/chat/ChatFloating.d.ts +7 -140
  10. package/lib/chat/ChatFloating.js +2 -2
  11. package/lib/chat/ChatPopupStandalone.d.ts +8 -47
  12. package/lib/chat/ChatPopupStandalone.js +3 -3
  13. package/lib/chat/ChatSidebar.d.ts +4 -69
  14. package/lib/chat/ChatSidebar.js +2 -2
  15. package/lib/chat/ChatStandalone.d.ts +4 -54
  16. package/lib/chat/ChatStandalone.js +3 -3
  17. package/lib/chat/base/ChatBase.js +1118 -141
  18. package/lib/chat/header/ChatHeaderBase.d.ts +11 -6
  19. package/lib/chat/header/ChatHeaderBase.js +18 -16
  20. package/lib/chat/indicators/McpStatusIndicator.d.ts +7 -4
  21. package/lib/chat/indicators/McpStatusIndicator.js +7 -32
  22. package/lib/chat/indicators/SandboxStatusIndicator.d.ts +4 -1
  23. package/lib/chat/indicators/SandboxStatusIndicator.js +9 -9
  24. package/lib/chat/indicators/SkillsStatusIndicator.d.ts +7 -0
  25. package/lib/chat/indicators/SkillsStatusIndicator.js +88 -0
  26. package/lib/chat/indicators/index.d.ts +1 -0
  27. package/lib/chat/indicators/index.js +1 -0
  28. package/lib/chat/messages/ChatMessageList.d.ts +1 -1
  29. package/lib/chat/messages/ChatMessageList.js +110 -102
  30. package/lib/chat/prompt/InputFooter.d.ts +19 -6
  31. package/lib/chat/prompt/InputFooter.js +71 -18
  32. package/lib/chat/prompt/InputPrompt.d.ts +3 -1
  33. package/lib/chat/prompt/InputPrompt.js +4 -4
  34. package/lib/chat/prompt/InputPromptFooter.js +1 -1
  35. package/lib/chat/prompt/InputPromptLexical.d.ts +3 -1
  36. package/lib/chat/prompt/InputPromptLexical.js +12 -5
  37. package/lib/chat/prompt/InputPromptText.d.ts +3 -1
  38. package/lib/chat/prompt/InputPromptText.js +2 -2
  39. package/lib/chat/tools/ToolApprovalBanner.js +1 -1
  40. package/lib/chat/tools/ToolCallDisplay.d.ts +3 -1
  41. package/lib/chat/tools/ToolCallDisplay.js +2 -2
  42. package/lib/chat/usage/TokenUsageBar.js +20 -2
  43. package/lib/client/AgentRuntimesClientContext.d.ts +53 -0
  44. package/lib/client/AgentRuntimesClientContext.js +55 -0
  45. package/lib/client/AgentsMixin.d.ts +48 -19
  46. package/lib/client/AgentsMixin.js +115 -30
  47. package/lib/client/IAgentRuntimesClient.d.ts +215 -0
  48. package/lib/client/IAgentRuntimesClient.js +5 -0
  49. package/lib/client/SdkAgentRuntimesClient.d.ts +151 -0
  50. package/lib/client/SdkAgentRuntimesClient.js +134 -0
  51. package/lib/client/index.d.ts +4 -1
  52. package/lib/client/index.js +3 -1
  53. package/lib/components/NotificationEventCard.js +55 -26
  54. package/lib/components/OutputCard.js +21 -7
  55. package/lib/components/ToolApprovalCard.js +20 -2
  56. package/lib/config/AgentConfiguration.js +3 -3
  57. package/lib/context/ContextDistribution.d.ts +3 -1
  58. package/lib/context/ContextDistribution.js +8 -27
  59. package/lib/context/ContextInspector.d.ts +3 -1
  60. package/lib/context/ContextInspector.js +19 -67
  61. package/lib/context/ContextPanel.d.ts +3 -1
  62. package/lib/context/ContextPanel.js +104 -64
  63. package/lib/context/ContextUsage.d.ts +3 -1
  64. package/lib/context/ContextUsage.js +3 -3
  65. package/lib/context/CostTracker.d.ts +9 -3
  66. package/lib/context/CostTracker.js +26 -47
  67. package/lib/context/CostUsageChart.d.ts +12 -0
  68. package/lib/context/CostUsageChart.js +378 -0
  69. package/lib/context/GraphFlowChart.d.ts +16 -0
  70. package/lib/context/GraphFlowChart.js +182 -0
  71. package/lib/context/TokenUsageChart.d.ts +8 -1
  72. package/lib/context/TokenUsageChart.js +349 -211
  73. package/lib/context/TurnGraphChart.d.ts +39 -0
  74. package/lib/context/TurnGraphChart.js +538 -0
  75. package/lib/context/otelWsPool.d.ts +20 -0
  76. package/lib/context/otelWsPool.js +69 -0
  77. package/lib/examples/A2UiComponentGalleryExample.d.ts +0 -17
  78. package/lib/examples/A2UiComponentGalleryExample.js +315 -522
  79. package/lib/examples/A2UiContactCardExample.d.ts +0 -18
  80. package/lib/examples/A2UiContactCardExample.js +154 -411
  81. package/lib/examples/A2UiRestaurantExample.d.ts +0 -30
  82. package/lib/examples/A2UiRestaurantExample.js +114 -212
  83. package/lib/examples/A2UiViewerExample.d.ts +0 -18
  84. package/lib/examples/A2UiViewerExample.js +283 -532
  85. package/lib/examples/AgUiBackendToolRenderingExample.js +1 -1
  86. package/lib/examples/AgUiHaikuGenUiExample.d.ts +1 -1
  87. package/lib/examples/AgUiHaikuGenUiExample.js +1 -1
  88. package/lib/examples/AgentCheckpointsExample.js +14 -34
  89. package/lib/examples/AgentCodemodeExample.d.ts +4 -6
  90. package/lib/examples/AgentCodemodeExample.js +591 -175
  91. package/lib/examples/AgentEvalsExample.js +13 -23
  92. package/lib/examples/AgentGuardrailsExample.js +371 -71
  93. package/lib/examples/AgentHooksExample.d.ts +3 -0
  94. package/lib/examples/AgentHooksExample.js +104 -0
  95. package/lib/examples/AgentMCPExample.d.ts +3 -0
  96. package/lib/examples/AgentMCPExample.js +480 -0
  97. package/lib/examples/AgentMemoryExample.js +14 -24
  98. package/lib/examples/AgentMonitoringExample.js +261 -206
  99. package/lib/examples/AgentNotificationsExample.js +50 -24
  100. package/lib/examples/AgentOtelExample.js +2 -3
  101. package/lib/examples/AgentOutputsExample.d.ts +11 -6
  102. package/lib/examples/AgentOutputsExample.js +383 -88
  103. package/lib/examples/AgentParametersExample.d.ts +3 -0
  104. package/lib/examples/AgentParametersExample.js +246 -0
  105. package/lib/examples/AgentSandboxExample.d.ts +2 -2
  106. package/lib/examples/AgentSandboxExample.js +69 -47
  107. package/lib/examples/AgentSkillsExample.js +92 -106
  108. package/lib/examples/{AgentspecExample.js → AgentSpecsExample.js} +10 -21
  109. package/lib/examples/AgentSubagentsExample.d.ts +14 -0
  110. package/lib/examples/AgentSubagentsExample.js +228 -0
  111. package/lib/examples/AgentToolApprovalsExample.js +30 -493
  112. package/lib/examples/AgentTriggersExample.js +1067 -246
  113. package/lib/examples/ChatCustomExample.js +11 -24
  114. package/lib/examples/ChatExample.js +9 -34
  115. package/lib/examples/CopilotKitLexicalExample.js +2 -1
  116. package/lib/examples/CopilotKitNotebookExample.js +2 -1
  117. package/lib/examples/HomeExample.d.ts +15 -0
  118. package/lib/examples/HomeExample.js +77 -0
  119. package/lib/examples/Lexical2Example.js +4 -2
  120. package/lib/examples/{LexicalExample.d.ts → LexicalAgentExample.d.ts} +4 -4
  121. package/lib/examples/{LexicalExample.js → LexicalAgentExample.js} +65 -16
  122. package/lib/examples/{LexicalSidebarExample.d.ts → LexicalAgentSidebarExample.d.ts} +5 -5
  123. package/lib/examples/LexicalAgentSidebarExample.js +261 -0
  124. package/lib/examples/NotebookAgentExample.d.ts +9 -0
  125. package/lib/examples/NotebookAgentExample.js +192 -0
  126. package/lib/examples/{NotebookSidebarExample.d.ts → NotebookAgentSidebarExample.d.ts} +2 -2
  127. package/lib/examples/NotebookAgentSidebarExample.js +221 -0
  128. package/lib/examples/{DatalayerNotebookExample.d.ts → NotebookCollaborationExample.d.ts} +4 -4
  129. package/lib/examples/{DatalayerNotebookExample.js → NotebookCollaborationExample.js} +3 -3
  130. package/lib/examples/NotebookExample.d.ts +4 -7
  131. package/lib/examples/NotebookExample.js +14 -146
  132. package/lib/examples/components/AuthRequiredView.d.ts +6 -0
  133. package/lib/examples/components/AuthRequiredView.js +33 -0
  134. package/lib/examples/components/ErrorView.d.ts +14 -0
  135. package/lib/examples/components/ErrorView.js +20 -0
  136. package/lib/examples/components/ExampleWrapper.d.ts +7 -0
  137. package/lib/examples/components/ExampleWrapper.js +25 -6
  138. package/lib/examples/{ag-ui → components}/haiku/HaikuDisplay.js +1 -1
  139. package/lib/examples/{ag-ui → components}/haiku/InlineHaikuCard.js +1 -1
  140. package/lib/examples/{ag-ui → components}/haiku/index.d.ts +1 -1
  141. package/lib/examples/{ag-ui → components}/haiku/index.js +1 -1
  142. package/lib/examples/components/index.d.ts +5 -0
  143. package/lib/examples/components/index.js +5 -0
  144. package/lib/examples/{ag-ui → components}/weather/index.d.ts +1 -1
  145. package/lib/examples/{ag-ui → components}/weather/index.js +1 -1
  146. package/lib/examples/example-selector.d.ts +17 -4
  147. package/lib/examples/example-selector.js +107 -41
  148. package/lib/examples/index.d.ts +9 -6
  149. package/lib/examples/index.js +9 -6
  150. package/lib/examples/main.d.ts +1 -0
  151. package/lib/examples/main.js +218 -27
  152. package/lib/examples/utils/a2ui.d.ts +18 -0
  153. package/lib/examples/utils/a2ui.js +69 -0
  154. package/lib/examples/utils/a2uiMarkdownProvider.d.ts +7 -0
  155. package/lib/examples/utils/a2uiMarkdownProvider.js +9 -0
  156. package/lib/examples/utils/agentId.d.ts +18 -0
  157. package/lib/examples/utils/agentId.js +54 -0
  158. package/lib/examples/utils/agents/earthquake-detector.json +11 -11
  159. package/lib/examples/utils/agents/sales-forecaster.json +11 -11
  160. package/lib/examples/utils/agents/social-post-generator.json +11 -11
  161. package/lib/examples/utils/agents/stock-market.json +11 -11
  162. package/lib/examples/utils/examplesStore.js +82 -27
  163. package/lib/hooks/index.d.ts +8 -8
  164. package/lib/hooks/index.js +7 -7
  165. package/lib/hooks/useA2A.d.ts +2 -3
  166. package/lib/hooks/useAIAgentsWebSocket.d.ts +43 -4
  167. package/lib/hooks/useAIAgentsWebSocket.js +118 -12
  168. package/lib/hooks/useAcp.d.ts +1 -2
  169. package/lib/hooks/useAgUi.d.ts +1 -1
  170. package/lib/hooks/{useAgents.d.ts → useAgentRuntimes.d.ts} +39 -2
  171. package/lib/hooks/{useAgents.js → useAgentRuntimes.js} +125 -15
  172. package/lib/hooks/useAgentsCatalog.js +1 -1
  173. package/lib/hooks/useAgentsService.d.ts +2 -2
  174. package/lib/hooks/useAgentsService.js +7 -7
  175. package/lib/hooks/useCheckpoints.js +1 -1
  176. package/lib/hooks/useConfig.d.ts +4 -1
  177. package/lib/hooks/useConfig.js +10 -3
  178. package/lib/hooks/useContextSnapshot.d.ts +9 -4
  179. package/lib/hooks/useContextSnapshot.js +9 -37
  180. package/lib/hooks/useMonitoring.js +3 -0
  181. package/lib/hooks/useSandbox.d.ts +20 -8
  182. package/lib/hooks/useSandbox.js +105 -40
  183. package/lib/hooks/useSkills.d.ts +23 -5
  184. package/lib/hooks/useSkills.js +94 -39
  185. package/lib/hooks/useToolApprovals.d.ts +60 -36
  186. package/lib/hooks/useToolApprovals.js +318 -69
  187. package/lib/hooks/useVercelAI.d.ts +1 -1
  188. package/lib/index.d.ts +2 -1
  189. package/lib/index.js +1 -0
  190. package/lib/inference/index.d.ts +0 -1
  191. package/lib/middleware/index.d.ts +0 -1
  192. package/lib/protocols/AGUIAdapter.js +6 -0
  193. package/lib/protocols/VercelAIAdapter.d.ts +9 -0
  194. package/lib/protocols/VercelAIAdapter.js +144 -26
  195. package/lib/shims/json5.d.ts +4 -0
  196. package/lib/shims/json5.js +8 -0
  197. package/lib/specs/agents/agents.d.ts +10 -0
  198. package/lib/specs/agents/agents.js +752 -24
  199. package/lib/specs/envvars.d.ts +1 -0
  200. package/lib/specs/envvars.js +11 -0
  201. package/lib/specs/events.d.ts +1 -0
  202. package/lib/specs/events.js +1 -0
  203. package/lib/specs/index.d.ts +1 -0
  204. package/lib/specs/index.js +1 -0
  205. package/lib/specs/personas.d.ts +41 -0
  206. package/lib/specs/personas.js +168 -0
  207. package/lib/specs/skills.d.ts +2 -1
  208. package/lib/specs/skills.js +23 -5
  209. package/lib/specs/tools.js +3 -0
  210. package/lib/stores/agentRuntimeStore.d.ts +204 -0
  211. package/lib/stores/agentRuntimeStore.js +636 -0
  212. package/lib/stores/index.d.ts +1 -1
  213. package/lib/stores/index.js +1 -1
  214. package/lib/tools/adapters/copilotkit/lexicalHooks.d.ts +1 -2
  215. package/lib/tools/adapters/copilotkit/lexicalHooks.js +1 -3
  216. package/lib/tools/adapters/copilotkit/notebookHooks.d.ts +1 -2
  217. package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -3
  218. package/lib/tools/index.d.ts +0 -2
  219. package/lib/tools/index.js +0 -1
  220. package/lib/types/agentspecs.d.ts +50 -1
  221. package/lib/types/chat.d.ts +309 -8
  222. package/lib/types/context.d.ts +27 -0
  223. package/lib/types/cost.d.ts +2 -2
  224. package/lib/types/index.d.ts +2 -0
  225. package/lib/types/index.js +2 -0
  226. package/lib/types/mcp.d.ts +8 -0
  227. package/lib/types/models.d.ts +2 -2
  228. package/lib/types/personas.d.ts +25 -0
  229. package/lib/types/personas.js +5 -0
  230. package/lib/types/skills.d.ts +43 -1
  231. package/lib/types/stream.d.ts +110 -0
  232. package/lib/types/stream.js +36 -0
  233. package/lib/types/tools.d.ts +2 -0
  234. package/lib/utils/utils.d.ts +9 -5
  235. package/lib/utils/utils.js +9 -5
  236. package/package.json +13 -9
  237. package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
  238. package/scripts/codegen/__pycache__/generate_events.cpython-313.pyc +0 -0
  239. package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
  240. package/scripts/codegen/generate_agents.py +106 -7
  241. package/scripts/codegen/generate_events.py +47 -17
  242. package/scripts/codegen/generate_personas.py +319 -0
  243. package/scripts/codegen/generate_skills.py +9 -9
  244. package/scripts/codegen/generate_tools.py +20 -0
  245. package/scripts/sync-jupyter.sh +26 -7
  246. package/style/primer-primitives.css +1 -6
  247. package/lib/api/tool-approvals.d.ts +0 -62
  248. package/lib/api/tool-approvals.js +0 -145
  249. package/lib/examples/LexicalSidebarExample.js +0 -163
  250. package/lib/examples/NotebookSidebarExample.js +0 -119
  251. package/lib/examples/NotebookSimpleExample.d.ts +0 -6
  252. package/lib/examples/NotebookSimpleExample.js +0 -22
  253. package/lib/examples/ag-ui/index.d.ts +0 -10
  254. package/lib/examples/ag-ui/index.js +0 -16
  255. package/lib/hooks/useAgentsRegistry.d.ts +0 -10
  256. package/lib/hooks/useAgentsRegistry.js +0 -20
  257. package/lib/stores/agentsStore.d.ts +0 -123
  258. package/lib/stores/agentsStore.js +0 -270
  259. package/scripts/codegen/__pycache__/generate_envvars.cpython-313.pyc +0 -0
  260. package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
  261. package/scripts/codegen/__pycache__/generate_guardrails.cpython-313.pyc +0 -0
  262. package/scripts/codegen/__pycache__/generate_mcp_servers.cpython-313.pyc +0 -0
  263. package/scripts/codegen/__pycache__/generate_memory.cpython-313.pyc +0 -0
  264. package/scripts/codegen/__pycache__/generate_models.cpython-313.pyc +0 -0
  265. package/scripts/codegen/__pycache__/generate_notifications.cpython-313.pyc +0 -0
  266. package/scripts/codegen/__pycache__/generate_outputs.cpython-313.pyc +0 -0
  267. package/scripts/codegen/__pycache__/generate_skills.cpython-313.pyc +0 -0
  268. package/scripts/codegen/__pycache__/generate_teams.cpython-313.pyc +0 -0
  269. package/scripts/codegen/__pycache__/generate_tools.cpython-313.pyc +0 -0
  270. package/scripts/codegen/__pycache__/generate_triggers.cpython-313.pyc +0 -0
  271. /package/lib/examples/{AgentspecExample.d.ts → AgentSpecsExample.d.ts} +0 -0
  272. /package/lib/examples/{ag-ui → components}/haiku/HaikuDisplay.d.ts +0 -0
  273. /package/lib/examples/{ag-ui → components}/haiku/InlineHaikuCard.d.ts +0 -0
  274. /package/lib/examples/{ag-ui → components}/weather/InlineWeatherCard.d.ts +0 -0
  275. /package/lib/examples/{ag-ui → components}/weather/InlineWeatherCard.js +0 -0
@@ -3,561 +3,312 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * Copyright (c) 2025-2026 Datalayer, Inc.
4
4
  * Distributed under the terms of the Modified BSD License.
5
5
  */
6
- /**
7
- * A2UiViewerExample
8
- *
9
- * Demonstrates the standalone A2UIViewer component from @a2ui/react.
10
- * Unlike A2UIProvider + A2UIRenderer (which require context), A2UIViewer
11
- * is a self-contained component that takes component definitions directly.
12
- *
13
- * Features:
14
- * - Standalone rendering — no A2UIProvider needed
15
- * - Multiple pre-built A2UI scenes (recipe card, booking form, dashboard)
16
- * - Shows how to use A2UIViewer for embedding A2UI in any React context
17
- *
18
- * No backend required — uses static ComponentInstance[] arrays.
19
- */
20
- import { useState, useCallback } from 'react';
6
+ import { useCallback, useEffect, useMemo, useState } from 'react';
21
7
  import { Box } from '@datalayer/primer-addons';
8
+ import { SegmentedControl, Text } from '@primer/react';
9
+ import { A2uiSurface } from '@a2ui/react/v0_9';
22
10
  import { ThemedProvider } from './utils/themedProvider';
23
- import { Text, Button as PrimerButton, SegmentedControl } from '@primer/react';
24
- import { A2UIViewer, initializeDefaultCatalog } from '@a2ui/react';
25
- initializeDefaultCatalog();
11
+ import { A2uiMarkdownProvider } from './utils/a2uiMarkdownProvider';
12
+ import { createSceneMessages, useA2uiProcessor } from './utils/a2ui';
26
13
  const SCENES = [
27
- // --- Recipe Card ---
28
14
  {
15
+ id: 'recipe',
29
16
  label: 'Recipe Card',
30
17
  emoji: '🍲',
31
- description: 'A rich recipe card with image, rating, and timing info (from A2UI MCP sample).',
32
- root: 'root-column',
33
- components: [
34
- { id: 'root-column', component: { Card: { child: 'main-column' } } },
35
- {
36
- id: 'main-column',
37
- component: {
38
- Column: {
39
- children: { explicitList: ['recipe-image', 'content'] },
40
- gap: 'small',
41
- },
42
- },
43
- },
44
- {
45
- id: 'recipe-image',
46
- component: {
47
- Image: {
48
- url: { path: '/image' },
49
- altText: { path: '/title' },
50
- fit: 'cover',
51
- },
52
- },
53
- },
54
- {
55
- id: 'content',
56
- component: {
57
- Column: {
58
- children: {
59
- explicitList: ['title', 'rating-row', 'times-row', 'servings'],
60
- },
61
- gap: 'small',
62
- },
63
- },
64
- },
65
- {
66
- id: 'title',
67
- component: { Text: { text: { path: '/title' }, usageHint: 'h3' } },
68
- },
69
- {
70
- id: 'rating-row',
71
- component: {
72
- Row: {
73
- children: { explicitList: ['star-icon', 'rating', 'review-count'] },
74
- gap: 'small',
75
- alignment: 'center',
76
- },
77
- },
78
- },
79
- {
80
- id: 'star-icon',
81
- component: { Icon: { name: { literalString: 'star' } } },
82
- },
83
- {
84
- id: 'rating',
85
- component: { Text: { text: { path: '/rating' }, usageHint: 'body' } },
86
- },
87
- {
88
- id: 'review-count',
89
- component: {
90
- Text: { text: { path: '/reviewCount' }, usageHint: 'caption' },
91
- },
92
- },
93
- {
94
- id: 'times-row',
95
- component: {
96
- Row: {
97
- children: { explicitList: ['prep-time', 'cook-time'] },
98
- gap: 'medium',
99
- },
100
- },
101
- },
102
- {
103
- id: 'prep-time',
104
- component: {
105
- Row: {
106
- children: { explicitList: ['prep-icon', 'prep-text'] },
107
- gap: 'small',
108
- alignment: 'center',
109
- },
110
- },
111
- },
112
- {
113
- id: 'prep-icon',
114
- component: { Icon: { name: { literalString: 'timer' } } },
115
- },
116
- {
117
- id: 'prep-text',
118
- component: {
119
- Text: { text: { path: '/prepTime' }, usageHint: 'caption' },
120
- },
121
- },
122
- {
123
- id: 'cook-time',
124
- component: {
125
- Row: {
126
- children: { explicitList: ['cook-icon', 'cook-text'] },
127
- gap: 'small',
128
- alignment: 'center',
129
- },
130
- },
131
- },
132
- {
133
- id: 'cook-icon',
134
- component: { Icon: { name: { literalString: 'shoppingCart' } } },
135
- },
136
- {
137
- id: 'cook-text',
138
- component: {
139
- Text: { text: { path: '/cookTime' }, usageHint: 'caption' },
140
- },
141
- },
142
- {
143
- id: 'servings',
144
- component: {
145
- Text: { text: { path: '/servings' }, usageHint: 'caption' },
146
- },
147
- },
148
- ],
149
- data: {
150
- image: 'https://images.unsplash.com/photo-1546069901-ba9599a7e63c?w=300&h=180&fit=crop',
151
- title: 'Mediterranean Quinoa Bowl',
152
- rating: 4.9,
153
- reviewCount: '(1,247 reviews)',
154
- prepTime: '15 min prep',
155
- cookTime: '20 min cook',
156
- servings: 'Serves 4',
157
- },
18
+ description: 'Rich recipe card with image and metadata.',
19
+ messages: createSceneMessages({
20
+ surfaceId: 'viewer-recipe',
21
+ components: [
22
+ { id: 'root', component: 'Card', child: 'main' },
23
+ {
24
+ id: 'main',
25
+ component: 'Column',
26
+ children: [
27
+ 'recipe-image',
28
+ 'title',
29
+ 'rating-row',
30
+ 'timing-row',
31
+ 'servings',
32
+ ],
33
+ },
34
+ {
35
+ id: 'recipe-image',
36
+ component: 'Image',
37
+ url: { path: '/image' },
38
+ fit: 'cover',
39
+ variant: 'largeFeature',
40
+ },
41
+ {
42
+ id: 'title',
43
+ component: 'Text',
44
+ variant: 'h3',
45
+ text: { path: '/title' },
46
+ },
47
+ {
48
+ id: 'rating-row',
49
+ component: 'Row',
50
+ align: 'center',
51
+ children: ['star', 'rating', 'reviews'],
52
+ },
53
+ { id: 'star', component: 'Icon', name: 'star' },
54
+ { id: 'rating', component: 'Text', text: { path: '/rating' } },
55
+ {
56
+ id: 'reviews',
57
+ component: 'Text',
58
+ variant: 'caption',
59
+ text: { path: '/reviewCount' },
60
+ },
61
+ { id: 'timing-row', component: 'Row', children: ['prep', 'cook'] },
62
+ {
63
+ id: 'prep',
64
+ component: 'Text',
65
+ variant: 'caption',
66
+ text: { path: '/prepTime' },
67
+ },
68
+ {
69
+ id: 'cook',
70
+ component: 'Text',
71
+ variant: 'caption',
72
+ text: { path: '/cookTime' },
73
+ },
74
+ {
75
+ id: 'servings',
76
+ component: 'Text',
77
+ variant: 'caption',
78
+ text: { path: '/servings' },
79
+ },
80
+ ],
81
+ value: {
82
+ image: 'https://images.unsplash.com/photo-1546069901-ba9599a7e63c?w=300&h=180&fit=crop',
83
+ title: 'Mediterranean Quinoa Bowl',
84
+ rating: '4.9',
85
+ reviewCount: '(1,247 reviews)',
86
+ prepTime: '15 min prep',
87
+ cookTime: '20 min cook',
88
+ servings: 'Serves 4',
89
+ },
90
+ }),
158
91
  },
159
- // --- Booking Form ---
160
92
  {
93
+ id: 'booking',
161
94
  label: 'Booking Form',
162
95
  emoji: '📅',
163
- description: 'A restaurant booking form with text fields, date picker, and submit button.',
164
- root: 'booking-form-column',
165
- components: [
166
- {
167
- id: 'booking-form-column',
168
- component: {
169
- Column: {
170
- children: {
171
- explicitList: [
172
- 'booking-title',
173
- 'party-size-field',
174
- 'datetime-field',
175
- 'dietary-field',
176
- 'submit-button',
177
- ],
178
- },
179
- },
180
- },
181
- },
182
- {
183
- id: 'booking-title',
184
- component: { Text: { usageHint: 'h2', text: { path: '/title' } } },
185
- },
186
- {
187
- id: 'party-size-field',
188
- component: {
189
- TextField: {
190
- label: { literalString: 'Party Size' },
191
- text: { path: '/partySize' },
192
- },
193
- },
194
- },
195
- {
196
- id: 'datetime-field',
197
- component: {
198
- DateTimeInput: {
199
- label: { literalString: 'Date & Time' },
200
- value: { path: '/reservationTime' },
201
- enableDate: true,
202
- enableTime: true,
203
- },
204
- },
205
- },
206
- {
207
- id: 'dietary-field',
208
- component: {
209
- TextField: {
210
- label: { literalString: 'Dietary Requirements' },
211
- text: { path: '/dietary' },
212
- },
213
- },
214
- },
215
- {
216
- id: 'submit-button',
217
- component: {
218
- Button: {
219
- child: 'submit-text',
220
- action: {
96
+ description: 'Form controls and a submit action payload.',
97
+ messages: createSceneMessages({
98
+ surfaceId: 'viewer-booking',
99
+ components: [
100
+ {
101
+ id: 'root',
102
+ component: 'Column',
103
+ children: [
104
+ 'title',
105
+ 'party-size',
106
+ 'date-time',
107
+ 'dietary',
108
+ 'submit-label',
109
+ 'submit-button',
110
+ ],
111
+ },
112
+ {
113
+ id: 'title',
114
+ component: 'Text',
115
+ variant: 'h2',
116
+ text: { path: '/title' },
117
+ },
118
+ {
119
+ id: 'party-size',
120
+ component: 'TextField',
121
+ label: 'Party Size',
122
+ value: { path: '/partySize' },
123
+ },
124
+ {
125
+ id: 'date-time',
126
+ component: 'DateTimeInput',
127
+ label: 'Date & Time',
128
+ value: { path: '/dateTime' },
129
+ },
130
+ {
131
+ id: 'dietary',
132
+ component: 'TextField',
133
+ label: 'Dietary Requirements',
134
+ value: { path: '/dietary' },
135
+ variant: 'longText',
136
+ },
137
+ { id: 'submit-label', component: 'Text', text: 'Submit Reservation' },
138
+ {
139
+ id: 'submit-button',
140
+ component: 'Button',
141
+ variant: 'primary',
142
+ child: 'submit-label',
143
+ action: {
144
+ event: {
221
145
  name: 'submit_booking',
222
- context: [
223
- { key: 'partySize', value: { path: '/partySize' } },
224
- { key: 'reservationTime', value: { path: '/reservationTime' } },
225
- { key: 'dietary', value: { path: '/dietary' } },
226
- ],
227
- },
228
- },
229
- },
230
- },
231
- {
232
- id: 'submit-text',
233
- component: { Text: { text: { literalString: 'Submit Reservation' } } },
234
- },
235
- ],
236
- data: {
237
- title: 'Book a Table at The Fancy Place',
238
- partySize: '2',
239
- reservationTime: '',
240
- dietary: '',
241
- },
242
- },
243
- // --- Sales Dashboard ---
244
- {
245
- label: 'Sales Dashboard',
246
- emoji: '📊',
247
- description: 'A simple data dashboard with cards showing sales by category.',
248
- root: 'root-column',
249
- components: [
250
- {
251
- id: 'root-column',
252
- component: {
253
- Column: {
254
- children: {
255
- explicitList: ['dash-title', 'dash-row-1', 'dash-row-2'],
256
- },
257
- },
258
- },
259
- },
260
- {
261
- id: 'dash-title',
262
- component: {
263
- Text: {
264
- text: { literalString: 'Sales by Category' },
265
- usageHint: 'h2',
266
- },
267
- },
268
- },
269
- // Row 1
270
- {
271
- id: 'dash-row-1',
272
- component: {
273
- Row: {
274
- children: { explicitList: ['card-apparel', 'card-electronics'] },
275
- distribution: 'spaceEvenly',
276
- },
277
- },
278
- },
279
- { id: 'card-apparel', component: { Card: { child: 'apparel-col' } } },
280
- {
281
- id: 'apparel-col',
282
- component: {
283
- Column: {
284
- children: { explicitList: ['apparel-label', 'apparel-value'] },
285
- },
286
- },
287
- },
288
- {
289
- id: 'apparel-label',
290
- component: {
291
- Text: { text: { literalString: 'Apparel' }, usageHint: 'caption' },
292
- },
293
- },
294
- {
295
- id: 'apparel-value',
296
- component: {
297
- Text: { text: { literalString: '$41,200' }, usageHint: 'h3' },
298
- },
299
- },
300
- {
301
- id: 'card-electronics',
302
- component: { Card: { child: 'electronics-col' } },
303
- },
304
- {
305
- id: 'electronics-col',
306
- component: {
307
- Column: {
308
- children: {
309
- explicitList: ['electronics-label', 'electronics-value'],
146
+ context: {
147
+ partySize: { path: '/partySize' },
148
+ dateTime: { path: '/dateTime' },
149
+ dietary: { path: '/dietary' },
150
+ },
310
151
  },
311
152
  },
312
153
  },
154
+ ],
155
+ value: {
156
+ title: 'Book Your Table',
157
+ partySize: '4',
158
+ dateTime: '2026-05-15T19:30:00Z',
159
+ dietary: 'No peanuts',
313
160
  },
314
- {
315
- id: 'electronics-label',
316
- component: {
317
- Text: {
318
- text: { literalString: 'Electronics' },
319
- usageHint: 'caption',
320
- },
321
- },
322
- },
323
- {
324
- id: 'electronics-value',
325
- component: {
326
- Text: { text: { literalString: '$28,900' }, usageHint: 'h3' },
327
- },
328
- },
329
- // Row 2
330
- {
331
- id: 'dash-row-2',
332
- component: {
333
- Row: {
334
- children: { explicitList: ['card-home', 'card-health'] },
335
- distribution: 'spaceEvenly',
336
- },
337
- },
338
- },
339
- { id: 'card-home', component: { Card: { child: 'home-col' } } },
340
- {
341
- id: 'home-col',
342
- component: {
343
- Column: { children: { explicitList: ['home-label', 'home-value'] } },
344
- },
345
- },
346
- {
347
- id: 'home-label',
348
- component: {
349
- Text: { text: { literalString: 'Home Goods' }, usageHint: 'caption' },
350
- },
351
- },
352
- {
353
- id: 'home-value',
354
- component: {
355
- Text: { text: { literalString: '$15,600' }, usageHint: 'h3' },
356
- },
357
- },
358
- { id: 'card-health', component: { Card: { child: 'health-col' } } },
359
- {
360
- id: 'health-col',
361
- component: {
362
- Column: {
363
- children: { explicitList: ['health-label', 'health-value'] },
364
- },
365
- },
366
- },
367
- {
368
- id: 'health-label',
369
- component: {
370
- Text: {
371
- text: { literalString: 'Health & Beauty' },
372
- usageHint: 'caption',
373
- },
374
- },
375
- },
376
- {
377
- id: 'health-value',
378
- component: {
379
- Text: { text: { literalString: '$10,300' }, usageHint: 'h3' },
380
- },
381
- },
382
- ],
161
+ }),
383
162
  },
384
- // --- Confirmation ---
385
163
  {
386
- label: 'Confirmation',
387
- emoji: '',
388
- description: 'A booking confirmation card with details and action buttons.',
389
- root: 'confirmation-card',
390
- components: [
391
- {
392
- id: 'confirmation-card',
393
- component: { Card: { child: 'confirmation-column' } },
394
- },
395
- {
396
- id: 'confirmation-column',
397
- component: {
398
- Column: {
399
- children: {
400
- explicitList: [
401
- 'confirm-title',
402
- 'divider1',
403
- 'confirm-details',
404
- 'confirm-dietary',
405
- 'divider2',
406
- 'confirm-text',
407
- 'divider3',
408
- 'confirm-buttons',
409
- ],
410
- },
411
- alignment: 'stretch',
412
- },
413
- },
414
- },
415
- {
416
- id: 'confirm-title',
417
- component: { Text: { usageHint: 'h2', text: { path: '/title' } } },
418
- },
419
- { id: 'divider1', component: { Divider: {} } },
420
- {
421
- id: 'confirm-details',
422
- component: { Text: { text: { path: '/bookingDetails' } } },
423
- },
424
- {
425
- id: 'confirm-dietary',
426
- component: { Text: { text: { path: '/dietaryRequirements' } } },
427
- },
428
- { id: 'divider2', component: { Divider: {} } },
429
- {
430
- id: 'confirm-text',
431
- component: {
432
- Text: {
433
- usageHint: 'h5',
434
- text: { literalString: 'We look forward to seeing you!' },
435
- },
436
- },
437
- },
438
- { id: 'divider3', component: { Divider: {} } },
439
- {
440
- id: 'confirm-buttons',
441
- component: {
442
- Row: {
443
- children: { explicitList: ['modify-btn', 'cancel-btn'] },
444
- distribution: 'center',
445
- },
446
- },
447
- },
448
- {
449
- id: 'modify-btn',
450
- component: {
451
- Button: {
452
- child: 'modify-text',
453
- primary: true,
454
- action: { name: 'modify_booking' },
455
- },
456
- },
457
- },
458
- {
459
- id: 'modify-text',
460
- component: { Text: { text: { literalString: 'Modify Booking' } } },
461
- },
462
- {
463
- id: 'cancel-btn',
464
- component: {
465
- Button: {
466
- child: 'cancel-text',
467
- primary: false,
468
- action: { name: 'cancel_booking' },
469
- },
470
- },
471
- },
472
- {
473
- id: 'cancel-text',
474
- component: { Text: { text: { literalString: 'Cancel' } } },
475
- },
476
- ],
477
- data: {
478
- title: 'Booking Confirmed — The Fancy Place',
479
- bookingDetails: '4 people at 7:30 PM, Friday March 14',
480
- dietaryRequirements: 'Dietary: Vegetarian option requested',
481
- },
164
+ id: 'dashboard',
165
+ label: 'Sales Snapshot',
166
+ emoji: '📈',
167
+ description: 'Nested cards and list-like KPI tiles.',
168
+ messages: createSceneMessages({
169
+ surfaceId: 'viewer-dashboard',
170
+ components: [
171
+ {
172
+ id: 'root',
173
+ component: 'Column',
174
+ children: ['headline', 'subtitle', 'tiles'],
175
+ },
176
+ {
177
+ id: 'headline',
178
+ component: 'Text',
179
+ variant: 'h2',
180
+ text: 'Sales by Category',
181
+ },
182
+ { id: 'subtitle', component: 'Text', text: 'Q2 performance snapshot' },
183
+ {
184
+ id: 'tiles',
185
+ component: 'Column',
186
+ children: ['tile-1', 'tile-2', 'tile-3', 'tile-4'],
187
+ },
188
+ { id: 'tile-1', component: 'Card', child: 'tile-1-row' },
189
+ {
190
+ id: 'tile-1-row',
191
+ component: 'Row',
192
+ justify: 'spaceBetween',
193
+ children: ['tile-1-label', 'tile-1-value'],
194
+ },
195
+ {
196
+ id: 'tile-1-label',
197
+ component: 'Text',
198
+ variant: 'caption',
199
+ text: 'Apparel',
200
+ },
201
+ {
202
+ id: 'tile-1-value',
203
+ component: 'Text',
204
+ variant: 'h3',
205
+ text: '$41,200',
206
+ },
207
+ { id: 'tile-2', component: 'Card', child: 'tile-2-row' },
208
+ {
209
+ id: 'tile-2-row',
210
+ component: 'Row',
211
+ justify: 'spaceBetween',
212
+ children: ['tile-2-label', 'tile-2-value'],
213
+ },
214
+ {
215
+ id: 'tile-2-label',
216
+ component: 'Text',
217
+ variant: 'caption',
218
+ text: 'Electronics',
219
+ },
220
+ {
221
+ id: 'tile-2-value',
222
+ component: 'Text',
223
+ variant: 'h3',
224
+ text: '$28,900',
225
+ },
226
+ { id: 'tile-3', component: 'Card', child: 'tile-3-row' },
227
+ {
228
+ id: 'tile-3-row',
229
+ component: 'Row',
230
+ justify: 'spaceBetween',
231
+ children: ['tile-3-label', 'tile-3-value'],
232
+ },
233
+ {
234
+ id: 'tile-3-label',
235
+ component: 'Text',
236
+ variant: 'caption',
237
+ text: 'Home Goods',
238
+ },
239
+ {
240
+ id: 'tile-3-value',
241
+ component: 'Text',
242
+ variant: 'h3',
243
+ text: '$15,600',
244
+ },
245
+ { id: 'tile-4', component: 'Card', child: 'tile-4-row' },
246
+ {
247
+ id: 'tile-4-row',
248
+ component: 'Row',
249
+ justify: 'spaceBetween',
250
+ children: ['tile-4-label', 'tile-4-value'],
251
+ },
252
+ {
253
+ id: 'tile-4-label',
254
+ component: 'Text',
255
+ variant: 'caption',
256
+ text: 'Health & Beauty',
257
+ },
258
+ {
259
+ id: 'tile-4-value',
260
+ component: 'Text',
261
+ variant: 'h3',
262
+ text: '$10,300',
263
+ },
264
+ ],
265
+ }),
482
266
  },
483
267
  ];
484
- // ---------------------------------------------------------------------------
485
- // Components
486
- // ---------------------------------------------------------------------------
487
- /**
488
- * A2UiViewerExample — Standalone A2UIViewer with multiple scenes.
489
- * Demonstrates embedding A2UI components without a Provider context.
490
- */
268
+ function ViewerContent({ onAction, }) {
269
+ const { surfaces, processMessages, resetSurfaces } = useA2uiProcessor(onAction);
270
+ const [selectedSceneId, setSelectedSceneId] = useState(SCENES[0].id);
271
+ const selectedScene = useMemo(() => SCENES.find(scene => scene.id === selectedSceneId) ?? SCENES[0], [selectedSceneId]);
272
+ useEffect(() => {
273
+ resetSurfaces();
274
+ processMessages(selectedScene.messages);
275
+ }, [selectedScene, processMessages, resetSurfaces]);
276
+ return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 3, p: 3 }, children: [_jsxs(Box, { sx: {
277
+ width: '100%',
278
+ border: '1px solid',
279
+ borderColor: 'border.default',
280
+ borderRadius: 2,
281
+ p: 3,
282
+ backgroundColor: 'canvas.subtle',
283
+ display: 'flex',
284
+ flexDirection: 'column',
285
+ gap: 3,
286
+ }, children: [_jsx(Text, { sx: { fontSize: 2, fontWeight: 'bold' }, children: "Select Scene" }), _jsx(SegmentedControl, { "aria-label": "A2UI viewer scene picker", fullWidth: true, children: SCENES.map(scene => (_jsx(SegmentedControl.Button, { selected: scene.id === selectedSceneId, onClick: () => setSelectedSceneId(scene.id), children: `${scene.emoji} ${scene.label}` }, scene.id))) }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: selectedScene.description })] }), _jsx(Box, { sx: { width: '100%', display: 'flex', flexDirection: 'column', gap: 3 }, children: surfaces.map(surface => (_jsx(Box, { sx: { width: '100%' }, children: _jsx(A2uiSurface, { surface: surface }) }, surface.id))) })] }));
287
+ }
491
288
  const A2UiViewerExample = () => {
492
- const [sceneIdx, setSceneIdx] = useState(0);
493
289
  const [lastAction, setLastAction] = useState(null);
494
- const scene = SCENES[sceneIdx];
495
290
  const handleAction = useCallback((action) => {
496
- console.log('Viewer action:', action);
291
+ console.log('A2UI Viewer Action:', action);
497
292
  setLastAction(action);
498
293
  }, []);
499
- return (_jsx(ThemedProvider, { children: _jsxs(Box, { sx: {
500
- display: 'flex',
501
- flexDirection: 'column',
502
- minHeight: '100vh',
503
- backgroundColor: 'canvas.default',
504
- }, children: [_jsxs(Box, { sx: {
505
- padding: 3,
506
- borderBottom: '1px solid',
507
- borderColor: 'border.default',
508
- backgroundColor: 'canvas.subtle',
509
- }, children: [_jsx(Text, { as: "h1", sx: {
510
- fontSize: '1.25rem',
511
- fontWeight: 'bold',
512
- display: 'flex',
513
- alignItems: 'center',
514
- gap: 2,
515
- }, children: "\uD83D\uDD0D A2UI Viewer Example" }), _jsx(Text, { sx: { fontSize: '0.875rem', color: 'fg.muted' }, children: "Standalone A2UIViewer \u2014 no Provider needed, just pass components directly" })] }), _jsxs(Box, { sx: {
516
- padding: 3,
517
- borderBottom: '1px solid',
518
- borderColor: 'border.default',
519
- display: 'flex',
520
- alignItems: 'center',
521
- gap: 3,
522
- }, children: [_jsx(Text, { sx: { fontWeight: 'bold', fontSize: '0.875rem' }, children: "Scene:" }), _jsx(SegmentedControl, { "aria-label": "Scene selector", onChange: setSceneIdx, children: SCENES.map((s, idx) => (_jsx(SegmentedControl.Button, { selected: idx === sceneIdx, children: `${s.emoji} ${s.label}` }, s.label))) })] }), _jsxs(Box, { sx: { flex: 1, display: 'flex', padding: 4, gap: 4 }, children: [_jsxs(Box, { sx: { flex: 1, display: 'flex', flexDirection: 'column', gap: 3 }, children: [_jsx(Text, { sx: { color: 'fg.muted', fontSize: '0.875rem' }, children: scene.description }), _jsx(Box, { sx: {
523
- border: '1px solid',
524
- borderColor: 'border.default',
525
- borderRadius: 2,
526
- padding: 3,
527
- backgroundColor: 'canvas.default',
528
- maxWidth: '500px',
529
- }, children: _jsx(A2UIViewer, { root: scene.root, components: scene.components, data: scene.data, onAction: handleAction }) })] }), _jsxs(Box, { sx: {
530
- width: '300px',
531
- borderLeft: '1px solid',
532
- borderColor: 'border.default',
533
- paddingLeft: 3,
534
- display: 'flex',
535
- flexDirection: 'column',
536
- gap: 2,
537
- }, children: [_jsx(Text, { as: "h4", sx: { fontWeight: 'bold', fontSize: '0.875rem' }, children: "Last Action" }), lastAction ? (_jsx(Box, { as: "pre", sx: {
538
- fontSize: '0.75rem',
539
- backgroundColor: 'canvas.subtle',
540
- padding: 2,
541
- borderRadius: 2,
542
- overflow: 'auto',
543
- whiteSpace: 'pre-wrap',
544
- wordBreak: 'break-word',
545
- }, children: JSON.stringify(lastAction, null, 2) })) : (_jsx(Text, { sx: { color: 'fg.muted', fontSize: '0.8rem' }, children: "Interact with a button to see actions here." })), _jsxs(Box, { sx: { marginTop: 3 }, children: [_jsx(Text, { as: "h4", sx: {
546
- fontWeight: 'bold',
547
- fontSize: '0.875rem',
548
- marginBottom: 2,
549
- }, children: "Component Tree" }), _jsxs(Text, { sx: { color: 'fg.muted', fontSize: '0.75rem' }, children: [scene.components.length, " components, root: \"", scene.root, "\""] }), _jsxs(Box, { as: "ul", sx: {
550
- fontSize: '0.7rem',
551
- color: 'fg.muted',
552
- paddingLeft: 3,
553
- marginTop: 1,
554
- }, children: [scene.components.slice(0, 10).map(c => (_jsx("li", { children: _jsxs(Text, { sx: { fontFamily: 'mono', fontSize: '0.7rem' }, children: [c.id, ": ", Object.keys(c.component)[0]] }) }, c.id))), scene.components.length > 10 && (_jsx("li", { children: _jsxs(Text, { sx: { fontSize: '0.7rem', fontStyle: 'italic' }, children: ["...and ", scene.components.length - 10, " more"] }) }))] })] }), _jsx(PrimerButton, { variant: "invisible", onClick: () => {
555
- console.log('Scene JSON:', JSON.stringify({
556
- root: scene.root,
557
- components: scene.components,
558
- data: scene.data,
559
- }, null, 2));
560
- alert('Scene JSON logged to console');
561
- }, sx: { marginTop: 2, fontSize: '0.8rem' }, children: "Log Scene JSON" })] })] })] }) }));
294
+ return (_jsx(ThemedProvider, { children: _jsx(A2uiMarkdownProvider, { children: _jsxs(Box, { sx: { minHeight: '100vh', display: 'flex', flexDirection: 'column' }, children: [_jsxs(Box, { sx: {
295
+ px: 3,
296
+ py: 3,
297
+ borderBottom: '1px solid',
298
+ borderColor: 'border.default',
299
+ backgroundColor: 'canvas.subtle',
300
+ }, children: [_jsx(Text, { as: "h1", sx: { fontSize: 3, fontWeight: 'bold' }, children: "\uD83D\uDD0D A2UI Viewer" }), _jsx(Text, { sx: { color: 'fg.muted' }, children: "Standalone viewer scenes powered by MessageProcessor and A2uiSurface." })] }), _jsx(ViewerContent, { onAction: handleAction }), _jsx(Box, { sx: {
301
+ borderTop: '1px solid',
302
+ borderColor: 'border.default',
303
+ p: 3,
304
+ fontFamily: 'mono',
305
+ fontSize: 0,
306
+ backgroundColor: 'canvas.subtle',
307
+ whiteSpace: 'pre-wrap',
308
+ maxHeight: 180,
309
+ overflow: 'auto',
310
+ }, children: lastAction
311
+ ? JSON.stringify(lastAction, null, 2)
312
+ : 'No action triggered yet.' })] }) }) }));
562
313
  };
563
314
  export default A2UiViewerExample;