@exponential-at/ui 0.0.0-stage → 0.1.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.
Files changed (251) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +54 -0
  3. package/README.md +360 -2
  4. package/catalog/a11y.json +668 -0
  5. package/catalog/basic-map.json +104 -0
  6. package/catalog/code.json +58 -0
  7. package/catalog/core.catalog.json +4752 -0
  8. package/catalog/core.schema.json +22667 -0
  9. package/catalog/host.json +64 -0
  10. package/catalog/layout.json +20 -0
  11. package/catalog/limits.json +9 -0
  12. package/catalog/locale.json +48 -0
  13. package/catalog/macros.json +3417 -0
  14. package/catalog/recipes.json +61 -0
  15. package/catalog/strings.json +72 -0
  16. package/catalog/style.json +128 -0
  17. package/catalog/theme.schema.json +42543 -0
  18. package/catalog/tokens.json +47 -0
  19. package/conformance/README.md +217 -0
  20. package/conformance/baseline.ts +101 -0
  21. package/conformance/browser-page.ts +146 -0
  22. package/conformance/browser-suites.ts +683 -0
  23. package/conformance/compare.ts +201 -0
  24. package/conformance/dom.ts +96 -0
  25. package/conformance/dump.ts +163 -0
  26. package/conformance/fonts.json +154 -0
  27. package/conformance/manifest.json +224 -0
  28. package/conformance/parity-compare.ts +191 -0
  29. package/conformance/parity-report.schema.json +73 -0
  30. package/conformance/parity.ts +412 -0
  31. package/conformance/pixel.ts +177 -0
  32. package/conformance/primitives-page.ts +49 -0
  33. package/conformance/report.schema.json +66 -0
  34. package/conformance/run.ts +118 -0
  35. package/dist/chunks/index-98npjvsd.js +3940 -0
  36. package/dist/chunks/index-98npjvsd.js.map +27 -0
  37. package/dist/chunks/index-gwkt14w3.js +7314 -0
  38. package/dist/chunks/index-gwkt14w3.js.map +10 -0
  39. package/dist/chunks/index-njt7yzzm.js +134 -0
  40. package/dist/chunks/index-njt7yzzm.js.map +9 -0
  41. package/dist/chunks/index-we7va6v6.js +7984 -0
  42. package/dist/chunks/index-we7va6v6.js.map +15 -0
  43. package/dist/chunks/index-xrm6f7wc.js +2563 -0
  44. package/dist/chunks/index-xrm6f7wc.js.map +10 -0
  45. package/dist/conformance.js +182749 -0
  46. package/dist/conformance.js.map +10 -0
  47. package/dist/entries/prompt.js +251 -0
  48. package/dist/entries/prompt.js.map +11 -0
  49. package/dist/entries/schema.js +1725 -0
  50. package/dist/entries/schema.js.map +11 -0
  51. package/dist/host/index.js +122 -0
  52. package/dist/host/index.js.map +9 -0
  53. package/dist/index.js +3213 -0
  54. package/dist/index.js.map +27 -0
  55. package/dist/types/src/a11y.d.ts +21 -0
  56. package/dist/types/src/animation.d.ts +76 -0
  57. package/dist/types/src/basic-map.d.ts +38 -0
  58. package/dist/types/src/builder.d.ts +50 -0
  59. package/dist/types/src/catalog.d.ts +54 -0
  60. package/dist/types/src/catalog.described.d.ts +33 -0
  61. package/dist/types/src/catalog.generated.d.ts +829 -0
  62. package/dist/types/src/chart.d.ts +46 -0
  63. package/dist/types/src/code.d.ts +44 -0
  64. package/dist/types/src/color.d.ts +20 -0
  65. package/dist/types/src/conformance.d.ts +39 -0
  66. package/dist/types/src/connector/app.d.ts +14 -0
  67. package/dist/types/src/connector/connector.d.ts +77 -0
  68. package/dist/types/src/connector/index.d.ts +4 -0
  69. package/dist/types/src/css.d.ts +29 -0
  70. package/dist/types/src/define.d.ts +66 -0
  71. package/dist/types/src/direction.d.ts +16 -0
  72. package/dist/types/src/dynamic.d.ts +159 -0
  73. package/dist/types/src/entries/prompt.d.ts +11 -0
  74. package/dist/types/src/entries/schema.d.ts +8 -0
  75. package/dist/types/src/expr.d.ts +71 -0
  76. package/dist/types/src/extension.d.ts +4 -0
  77. package/dist/types/src/format.d.ts +112 -0
  78. package/dist/types/src/geometry.d.ts +40 -0
  79. package/dist/types/src/host/contract.d.ts +188 -0
  80. package/dist/types/src/host/decoders.d.ts +61 -0
  81. package/dist/types/src/host/index.d.ts +11 -0
  82. package/dist/types/src/host/package.d.ts +58 -0
  83. package/dist/types/src/host/policy.d.ts +105 -0
  84. package/dist/types/src/host/router.d.ts +34 -0
  85. package/dist/types/src/host/runtime.d.ts +205 -0
  86. package/dist/types/src/host/sources.d.ts +15 -0
  87. package/dist/types/src/host/transports.d.ts +109 -0
  88. package/dist/types/src/index.d.ts +63 -0
  89. package/dist/types/src/layout.d.ts +20 -0
  90. package/dist/types/src/limits.d.ts +21 -0
  91. package/dist/types/src/list.d.ts +133 -0
  92. package/dist/types/src/locale.d.ts +22 -0
  93. package/dist/types/src/macros.d.ts +29 -0
  94. package/dist/types/src/overlay.d.ts +27 -0
  95. package/dist/types/src/prompt.d.ts +44 -0
  96. package/dist/types/src/recipes.d.ts +17 -0
  97. package/dist/types/src/reducer.d.ts +41 -0
  98. package/dist/types/src/resizable.d.ts +38 -0
  99. package/dist/types/src/schema.d.ts +7 -0
  100. package/dist/types/src/strings.d.ts +13 -0
  101. package/dist/types/src/style.d.ts +201 -0
  102. package/dist/types/src/test-preload.d.ts +1 -0
  103. package/dist/types/src/text-shimmer.d.ts +24 -0
  104. package/dist/types/src/theme-types.d.ts +162 -0
  105. package/dist/types/src/theme.d.ts +73 -0
  106. package/dist/types/src/themes.d.ts +22 -0
  107. package/dist/types/src/tree-guides.d.ts +17 -0
  108. package/dist/types/src/types.d.ts +314 -0
  109. package/dist/types/src/validate.d.ts +31 -0
  110. package/dist/types/src/web/base-css.d.ts +1 -0
  111. package/dist/types/src/web/box-css.d.ts +55 -0
  112. package/dist/types/src/web/coerce.d.ts +32 -0
  113. package/dist/types/src/web/data.d.ts +105 -0
  114. package/dist/types/src/web/dates.d.ts +12 -0
  115. package/dist/types/src/web/form.d.ts +44 -0
  116. package/dist/types/src/web/host-types.d.ts +119 -0
  117. package/dist/types/src/web/index.d.ts +28 -0
  118. package/dist/types/src/web/inputs.d.ts +55 -0
  119. package/dist/types/src/web/list.d.ts +13 -0
  120. package/dist/types/src/web/listbox.d.ts +14 -0
  121. package/dist/types/src/web/markdown.d.ts +96 -0
  122. package/dist/types/src/web/media.d.ts +62 -0
  123. package/dist/types/src/web/parts.d.ts +4 -0
  124. package/dist/types/src/web/primitives/alert-dialog.d.ts +10 -0
  125. package/dist/types/src/web/primitives/alert.d.ts +9 -0
  126. package/dist/types/src/web/primitives/avatar-color.d.ts +2 -0
  127. package/dist/types/src/web/primitives/avatar.d.ts +13 -0
  128. package/dist/types/src/web/primitives/badge.d.ts +10 -0
  129. package/dist/types/src/web/primitives/breadcrumb.d.ts +10 -0
  130. package/dist/types/src/web/primitives/button.d.ts +6 -0
  131. package/dist/types/src/web/primitives/calendar.d.ts +43 -0
  132. package/dist/types/src/web/primitives/card.d.ts +9 -0
  133. package/dist/types/src/web/primitives/checkbox.d.ts +5 -0
  134. package/dist/types/src/web/primitives/choice-tiles.d.ts +32 -0
  135. package/dist/types/src/web/primitives/cn.d.ts +3 -0
  136. package/dist/types/src/web/primitives/code-block.d.ts +24 -0
  137. package/dist/types/src/web/primitives/command.d.ts +134 -0
  138. package/dist/types/src/web/primitives/context-ring.d.ts +24 -0
  139. package/dist/types/src/web/primitives/dialog-arms.d.ts +6 -0
  140. package/dist/types/src/web/primitives/dialog.d.ts +24 -0
  141. package/dist/types/src/web/primitives/disclosure-header.d.ts +5 -0
  142. package/dist/types/src/web/primitives/dock.d.ts +42 -0
  143. package/dist/types/src/web/primitives/dropdown-menu.d.ts +14 -0
  144. package/dist/types/src/web/primitives/empty-state.d.ts +15 -0
  145. package/dist/types/src/web/primitives/glass-card.d.ts +4 -0
  146. package/dist/types/src/web/primitives/hover-card.d.ts +7 -0
  147. package/dist/types/src/web/primitives/icon-disc.d.ts +12 -0
  148. package/dist/types/src/web/primitives/index.d.ts +48 -0
  149. package/dist/types/src/web/primitives/input.d.ts +5 -0
  150. package/dist/types/src/web/primitives/kbd.d.ts +4 -0
  151. package/dist/types/src/web/primitives/label.d.ts +3 -0
  152. package/dist/types/src/web/primitives/menu-surface.d.ts +17 -0
  153. package/dist/types/src/web/primitives/meter.d.ts +21 -0
  154. package/dist/types/src/web/primitives/popover.d.ts +3 -0
  155. package/dist/types/src/web/primitives/progress-ring.d.ts +5 -0
  156. package/dist/types/src/web/primitives/progress.d.ts +8 -0
  157. package/dist/types/src/web/primitives/scroll-area.d.ts +49 -0
  158. package/dist/types/src/web/primitives/segmented-control.d.ts +5 -0
  159. package/dist/types/src/web/primitives/select.d.ts +47 -0
  160. package/dist/types/src/web/primitives/separator.d.ts +3 -0
  161. package/dist/types/src/web/primitives/sheet-chrome.d.ts +4 -0
  162. package/dist/types/src/web/primitives/sheet.d.ts +20 -0
  163. package/dist/types/src/web/primitives/skeleton.d.ts +3 -0
  164. package/dist/types/src/web/primitives/spinner.d.ts +3 -0
  165. package/dist/types/src/web/primitives/switch.d.ts +4 -0
  166. package/dist/types/src/web/primitives/table.d.ts +11 -0
  167. package/dist/types/src/web/primitives/tabs.d.ts +13 -0
  168. package/dist/types/src/web/primitives/textarea.d.ts +3 -0
  169. package/dist/types/src/web/primitives/toast.d.ts +163 -0
  170. package/dist/types/src/web/primitives/tooltip.d.ts +3 -0
  171. package/dist/types/src/web/primitives/truncate.d.ts +7 -0
  172. package/dist/types/src/web/primitives/typeahead-portal.d.ts +12 -0
  173. package/dist/types/src/web/share.d.ts +6 -0
  174. package/dist/types/src/web/table.d.ts +20 -0
  175. package/dist/types/src/web/theme-css.d.ts +69 -0
  176. package/dist/types/src/web/urls.d.ts +21 -0
  177. package/dist/web/index.js +2303 -0
  178. package/dist/web/index.js.map +26 -0
  179. package/dist/web/primitives/index.js +1450 -0
  180. package/dist/web/primitives/index.js.map +57 -0
  181. package/docs/components.generated.json +6238 -0
  182. package/docs/round-1-contract.md +679 -0
  183. package/docs/round-2-contract.md +476 -0
  184. package/docs/round-3-contract.md +174 -0
  185. package/docs/themes.generated.json +3503 -0
  186. package/fixtures/animations.json +2890 -0
  187. package/fixtures/bench-list.json +58 -0
  188. package/fixtures/bind-time.json +30664 -0
  189. package/fixtures/catalog-basic-map.json +1692 -0
  190. package/fixtures/catalog-components.json +9323 -0
  191. package/fixtures/catalog-extension.json +620 -0
  192. package/fixtures/catalog-macros.json +36370 -0
  193. package/fixtures/code-tokens.json +1993 -0
  194. package/fixtures/conformance-baseline.json +55544 -0
  195. package/fixtures/conformance-cases.json +49 -0
  196. package/fixtures/conformance-known.json +2123 -0
  197. package/fixtures/control-geometry.json +4200 -0
  198. package/fixtures/dashboard.data.json +74 -0
  199. package/fixtures/dashboard.json +752 -0
  200. package/fixtures/demo-surface.json +47 -0
  201. package/fixtures/format.json +870 -0
  202. package/fixtures/host-policy.json +1067 -0
  203. package/fixtures/host-router.json +1152 -0
  204. package/fixtures/host-transport.json +590 -0
  205. package/fixtures/interactions-round1.json +773 -0
  206. package/fixtures/kitchen-sink.expanded.json +10844 -0
  207. package/fixtures/kitchen-sink.json +3049 -0
  208. package/fixtures/layout-geometry-round1.json +7278 -0
  209. package/fixtures/layout-geometry.json +2072 -0
  210. package/fixtures/overlay-geometry.json +272 -0
  211. package/fixtures/primitive-specimens.json +58 -0
  212. package/fixtures/prompt-budget.json +33 -0
  213. package/fixtures/resizable.json +714 -0
  214. package/fixtures/round4-contract.json +2985 -0
  215. package/fixtures/specimens.json +9832 -0
  216. package/fixtures/style-conditions.json +336 -0
  217. package/fixtures/template-items.json +2215 -0
  218. package/fixtures/text-direction.json +309 -0
  219. package/fixtures/text-shimmer.json +96 -0
  220. package/fixtures/theme-extends.json +573 -0
  221. package/fixtures/theme-invalid.json +1296 -0
  222. package/fixtures/theme-recipes.json +58600 -0
  223. package/fixtures/theme-resolved.json +23949 -0
  224. package/fixtures/toast-stack.json +215 -0
  225. package/fixtures/tree-guides.json +224 -0
  226. package/fixtures/virtual-list.json +733 -0
  227. package/generated/ExponentialUICatalog.generated.kt +67 -0
  228. package/generated/ExponentialUICatalog.generated.swift +67 -0
  229. package/generated/ExponentialUIThemes.generated.kt +23 -0
  230. package/generated/ExponentialUIThemes.generated.swift +23 -0
  231. package/generated/catalog.descriptions.generated.rs +6 -0
  232. package/generated/catalog.generated.rs +80 -0
  233. package/generated/catalog.themes.generated.rs +34 -0
  234. package/generated/core.descriptions.json +2505 -0
  235. package/generated/core.runtime.json +3609 -0
  236. package/package.json +87 -4
  237. package/themes/exponential.recipes.json +49 -0
  238. package/themes/exponential.theme.json +755 -0
  239. package/themes/neutral.theme.json +5676 -0
  240. package/themes/orange.theme.json +43 -0
  241. package/themes/playful.theme.json +219 -0
  242. package/vendor/a2ui/LICENSE.txt +203 -0
  243. package/vendor/a2ui/README.md +27 -0
  244. package/vendor/a2ui/v0_9/basic_catalog.json +1387 -0
  245. package/vendor/a2ui/v0_9/basic_catalog_rules.txt +5 -0
  246. package/vendor/a2ui/v0_9/client_capabilities.json +97 -0
  247. package/vendor/a2ui/v0_9/client_to_server.json +104 -0
  248. package/vendor/a2ui/v0_9/common_types.json +315 -0
  249. package/vendor/a2ui/v0_9/server_to_client.json +132 -0
  250. package/vendor/json-render/LICENSE.txt +201 -0
  251. package/vendor/json-render/README.md +13 -0
@@ -0,0 +1,590 @@
1
+ {
2
+ "$comment": "VAPP-91: the wire decoders (catalog/host.json transport). Inputs hand-written; `expected` filled by `bun run --filter @exponential-at/ui generate` from the TS reference (src/host/decoders.ts). Every renderer's conformance runner replays it: feed `chunks` in order through ONE decoder, then end().",
3
+ "jsonl": [
4
+ {
5
+ "name": "one message per line",
6
+ "chunks": [
7
+ "{\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\n{\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}\n"
8
+ ],
9
+ "expected": {
10
+ "messages": [
11
+ {
12
+ "version": "v0.9",
13
+ "createSurface": {
14
+ "surfaceId": "s1",
15
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
16
+ }
17
+ },
18
+ {
19
+ "version": "v0.9",
20
+ "updateComponents": {
21
+ "surfaceId": "s1",
22
+ "components": [
23
+ {
24
+ "id": "root",
25
+ "component": "Text",
26
+ "text": "Hi"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ ],
32
+ "issues": []
33
+ }
34
+ },
35
+ {
36
+ "name": "a line split across chunks",
37
+ "chunks": [
38
+ "{\"version\": \"v0.9",
39
+ "\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\n{\"ver",
40
+ "sion\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}\n"
41
+ ],
42
+ "expected": {
43
+ "messages": [
44
+ {
45
+ "version": "v0.9",
46
+ "createSurface": {
47
+ "surfaceId": "s1",
48
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
49
+ }
50
+ },
51
+ {
52
+ "version": "v0.9",
53
+ "updateComponents": {
54
+ "surfaceId": "s1",
55
+ "components": [
56
+ {
57
+ "id": "root",
58
+ "component": "Text",
59
+ "text": "Hi"
60
+ }
61
+ ]
62
+ }
63
+ }
64
+ ],
65
+ "issues": []
66
+ }
67
+ },
68
+ {
69
+ "name": "CRLF and blank lines",
70
+ "chunks": [
71
+ "{\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\r\n\r\n\n{\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}\r\n"
72
+ ],
73
+ "expected": {
74
+ "messages": [
75
+ {
76
+ "version": "v0.9",
77
+ "createSurface": {
78
+ "surfaceId": "s1",
79
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
80
+ }
81
+ },
82
+ {
83
+ "version": "v0.9",
84
+ "updateComponents": {
85
+ "surfaceId": "s1",
86
+ "components": [
87
+ {
88
+ "id": "root",
89
+ "component": "Text",
90
+ "text": "Hi"
91
+ }
92
+ ]
93
+ }
94
+ }
95
+ ],
96
+ "issues": []
97
+ }
98
+ },
99
+ {
100
+ "name": "no trailing newline",
101
+ "chunks": [
102
+ "{\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\n{\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}"
103
+ ],
104
+ "expected": {
105
+ "messages": [
106
+ {
107
+ "version": "v0.9",
108
+ "createSurface": {
109
+ "surfaceId": "s1",
110
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
111
+ }
112
+ },
113
+ {
114
+ "version": "v0.9",
115
+ "updateComponents": {
116
+ "surfaceId": "s1",
117
+ "components": [
118
+ {
119
+ "id": "root",
120
+ "component": "Text",
121
+ "text": "Hi"
122
+ }
123
+ ]
124
+ }
125
+ }
126
+ ],
127
+ "issues": []
128
+ }
129
+ },
130
+ {
131
+ "name": "a bad line is an issue, never fatal",
132
+ "chunks": [
133
+ "{\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\nnot json\n{\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}\n"
134
+ ],
135
+ "expected": {
136
+ "messages": [
137
+ {
138
+ "version": "v0.9",
139
+ "createSurface": {
140
+ "surfaceId": "s1",
141
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
142
+ }
143
+ },
144
+ {
145
+ "version": "v0.9",
146
+ "updateComponents": {
147
+ "surfaceId": "s1",
148
+ "components": [
149
+ {
150
+ "id": "root",
151
+ "component": "Text",
152
+ "text": "Hi"
153
+ }
154
+ ]
155
+ }
156
+ }
157
+ ],
158
+ "issues": [
159
+ {
160
+ "at": 2,
161
+ "message": "line 2 is not JSON"
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ {
167
+ "name": "unicode across chunk edges",
168
+ "chunks": [
169
+ "{\"version\":\"v0.9\",\"updateDataModel\":{\"surfaceId\":\"s1\",\"path\":\"/t\",\"value\":\"Grüße 👋\"}}\n"
170
+ ],
171
+ "expected": {
172
+ "messages": [
173
+ {
174
+ "version": "v0.9",
175
+ "updateDataModel": {
176
+ "surfaceId": "s1",
177
+ "path": "/t",
178
+ "value": "Grüße 👋"
179
+ }
180
+ }
181
+ ],
182
+ "issues": []
183
+ }
184
+ }
185
+ ],
186
+ "sse": [
187
+ {
188
+ "name": "one message per event",
189
+ "chunks": [
190
+ "data: {\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\n\n",
191
+ "data: {\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}\n\n"
192
+ ],
193
+ "expected": {
194
+ "messages": [
195
+ {
196
+ "version": "v0.9",
197
+ "createSurface": {
198
+ "surfaceId": "s1",
199
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
200
+ }
201
+ },
202
+ {
203
+ "version": "v0.9",
204
+ "updateComponents": {
205
+ "surfaceId": "s1",
206
+ "components": [
207
+ {
208
+ "id": "root",
209
+ "component": "Text",
210
+ "text": "Hi"
211
+ }
212
+ ]
213
+ }
214
+ }
215
+ ],
216
+ "issues": []
217
+ }
218
+ },
219
+ {
220
+ "name": "comments, retry and id fields are ignored",
221
+ "chunks": [
222
+ ": keep-alive\n\nretry: 1000\nid: 7\ndata: {\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\n\n"
223
+ ],
224
+ "expected": {
225
+ "messages": [
226
+ {
227
+ "version": "v0.9",
228
+ "createSurface": {
229
+ "surfaceId": "s1",
230
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
231
+ }
232
+ }
233
+ ],
234
+ "issues": []
235
+ }
236
+ },
237
+ {
238
+ "name": "multi-line data is JSONL",
239
+ "chunks": [
240
+ "data: {\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\ndata: {\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}\n\n"
241
+ ],
242
+ "expected": {
243
+ "messages": [
244
+ {
245
+ "version": "v0.9",
246
+ "createSurface": {
247
+ "surfaceId": "s1",
248
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
249
+ }
250
+ },
251
+ {
252
+ "version": "v0.9",
253
+ "updateComponents": {
254
+ "surfaceId": "s1",
255
+ "components": [
256
+ {
257
+ "id": "root",
258
+ "component": "Text",
259
+ "text": "Hi"
260
+ }
261
+ ]
262
+ }
263
+ }
264
+ ],
265
+ "issues": []
266
+ }
267
+ },
268
+ {
269
+ "name": "an a2ui-named event counts, another name is dropped",
270
+ "chunks": [
271
+ "event: a2ui\ndata: {\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\n\nevent: ping\ndata: {\"ping\":1}\n\n"
272
+ ],
273
+ "expected": {
274
+ "messages": [
275
+ {
276
+ "version": "v0.9",
277
+ "createSurface": {
278
+ "surfaceId": "s1",
279
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
280
+ }
281
+ }
282
+ ],
283
+ "issues": []
284
+ }
285
+ },
286
+ {
287
+ "name": "CRLF lines and a split field",
288
+ "chunks": [
289
+ "da",
290
+ "ta: {\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\r\n\r\n"
291
+ ],
292
+ "expected": {
293
+ "messages": [
294
+ {
295
+ "version": "v0.9",
296
+ "createSurface": {
297
+ "surfaceId": "s1",
298
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
299
+ }
300
+ }
301
+ ],
302
+ "issues": []
303
+ }
304
+ },
305
+ {
306
+ "name": "a bad event is an issue",
307
+ "chunks": [
308
+ "data: nope\n\ndata: {\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}\n\n"
309
+ ],
310
+ "expected": {
311
+ "messages": [
312
+ {
313
+ "version": "v0.9",
314
+ "updateComponents": {
315
+ "surfaceId": "s1",
316
+ "components": [
317
+ {
318
+ "id": "root",
319
+ "component": "Text",
320
+ "text": "Hi"
321
+ }
322
+ ]
323
+ }
324
+ }
325
+ ],
326
+ "issues": [
327
+ {
328
+ "at": 1,
329
+ "message": "event 1 is not JSON"
330
+ }
331
+ ]
332
+ }
333
+ },
334
+ {
335
+ "name": "end() flushes the last event",
336
+ "chunks": [
337
+ "data: {\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}"
338
+ ],
339
+ "expected": {
340
+ "messages": [
341
+ {
342
+ "version": "v0.9",
343
+ "updateComponents": {
344
+ "surfaceId": "s1",
345
+ "components": [
346
+ {
347
+ "id": "root",
348
+ "component": "Text",
349
+ "text": "Hi"
350
+ }
351
+ ]
352
+ }
353
+ }
354
+ ],
355
+ "issues": []
356
+ }
357
+ }
358
+ ],
359
+ "mcp": [
360
+ {
361
+ "name": "a resource with JSONL text",
362
+ "result": {
363
+ "content": [
364
+ {
365
+ "type": "text",
366
+ "text": "Here is your form"
367
+ },
368
+ {
369
+ "type": "resource",
370
+ "resource": {
371
+ "uri": "a2ui://s1",
372
+ "mimeType": "application/json+a2ui",
373
+ "text": "{\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\n{\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}\n"
374
+ }
375
+ }
376
+ ]
377
+ },
378
+ "expected": {
379
+ "messages": [
380
+ {
381
+ "version": "v0.9",
382
+ "createSurface": {
383
+ "surfaceId": "s1",
384
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
385
+ }
386
+ },
387
+ {
388
+ "version": "v0.9",
389
+ "updateComponents": {
390
+ "surfaceId": "s1",
391
+ "components": [
392
+ {
393
+ "id": "root",
394
+ "component": "Text",
395
+ "text": "Hi"
396
+ }
397
+ ]
398
+ }
399
+ }
400
+ ],
401
+ "issues": []
402
+ }
403
+ },
404
+ {
405
+ "name": "the alternate mime type and a JSON array",
406
+ "result": {
407
+ "content": [
408
+ {
409
+ "type": "resource",
410
+ "resource": {
411
+ "uri": "a2ui://s1",
412
+ "mimeType": "application/a2ui+json",
413
+ "text": "[{\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}},{\"version\": \"v0.9\", \"updateComponents\": {\"surfaceId\": \"s1\", \"components\": [{\"id\": \"root\", \"component\": \"Text\", \"text\": \"Hi\"}]}}]"
414
+ }
415
+ }
416
+ ]
417
+ },
418
+ "expected": {
419
+ "messages": [
420
+ {
421
+ "version": "v0.9",
422
+ "createSurface": {
423
+ "surfaceId": "s1",
424
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
425
+ }
426
+ },
427
+ {
428
+ "version": "v0.9",
429
+ "updateComponents": {
430
+ "surfaceId": "s1",
431
+ "components": [
432
+ {
433
+ "id": "root",
434
+ "component": "Text",
435
+ "text": "Hi"
436
+ }
437
+ ]
438
+ }
439
+ }
440
+ ],
441
+ "issues": []
442
+ }
443
+ },
444
+ {
445
+ "name": "other mime types are ignored",
446
+ "result": {
447
+ "content": [
448
+ {
449
+ "type": "resource",
450
+ "resource": {
451
+ "uri": "x",
452
+ "mimeType": "application/json",
453
+ "text": "{\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}"
454
+ }
455
+ }
456
+ ]
457
+ },
458
+ "expected": {
459
+ "messages": [],
460
+ "issues": []
461
+ }
462
+ },
463
+ {
464
+ "name": "structuredContent.a2ui",
465
+ "result": {
466
+ "structuredContent": {
467
+ "a2ui": [
468
+ {
469
+ "version": "v0.9",
470
+ "createSurface": {
471
+ "surfaceId": "s2",
472
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
473
+ }
474
+ }
475
+ ]
476
+ },
477
+ "content": []
478
+ },
479
+ "expected": {
480
+ "messages": [
481
+ {
482
+ "version": "v0.9",
483
+ "createSurface": {
484
+ "surfaceId": "s2",
485
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
486
+ }
487
+ }
488
+ ],
489
+ "issues": []
490
+ }
491
+ },
492
+ {
493
+ "name": "a broken resource line",
494
+ "result": {
495
+ "content": [
496
+ {
497
+ "type": "resource",
498
+ "resource": {
499
+ "uri": "a2ui://s1",
500
+ "mimeType": "application/json+a2ui",
501
+ "text": "{\"version\": \"v0.9\", \"createSurface\": {\"surfaceId\": \"s1\", \"catalogId\": \"https://ui.exponential.at/catalogs/core/v1\"}}\n{oops\n"
502
+ }
503
+ }
504
+ ]
505
+ },
506
+ "expected": {
507
+ "messages": [
508
+ {
509
+ "version": "v0.9",
510
+ "createSurface": {
511
+ "surfaceId": "s1",
512
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1"
513
+ }
514
+ }
515
+ ],
516
+ "issues": [
517
+ {
518
+ "at": 1,
519
+ "message": "content[0]: line 2 is not JSON"
520
+ }
521
+ ]
522
+ }
523
+ }
524
+ ],
525
+ "mcpAction": [
526
+ {
527
+ "name": "an action goes back as tools/call a2ui_event",
528
+ "message": {
529
+ "version": "v0.9",
530
+ "action": {
531
+ "name": "save",
532
+ "surfaceId": "s1",
533
+ "sourceComponentId": "btn",
534
+ "timestamp": "2026-10-08T12:00:00.000Z",
535
+ "context": {
536
+ "id": "d1"
537
+ }
538
+ }
539
+ },
540
+ "expected": {
541
+ "method": "tools/call",
542
+ "params": {
543
+ "name": "a2ui_event",
544
+ "arguments": {
545
+ "message": {
546
+ "version": "v0.9",
547
+ "action": {
548
+ "name": "save",
549
+ "surfaceId": "s1",
550
+ "sourceComponentId": "btn",
551
+ "timestamp": "2026-10-08T12:00:00.000Z",
552
+ "context": {
553
+ "id": "d1"
554
+ }
555
+ }
556
+ }
557
+ }
558
+ }
559
+ }
560
+ },
561
+ {
562
+ "name": "a custom action tool",
563
+ "tool": "vapp_event",
564
+ "message": {
565
+ "version": "v0.9",
566
+ "error": {
567
+ "code": "FUNCTION_DENIED",
568
+ "surfaceId": "s1",
569
+ "message": "harness.mcp was not allowed"
570
+ }
571
+ },
572
+ "expected": {
573
+ "method": "tools/call",
574
+ "params": {
575
+ "name": "vapp_event",
576
+ "arguments": {
577
+ "message": {
578
+ "version": "v0.9",
579
+ "error": {
580
+ "code": "FUNCTION_DENIED",
581
+ "surfaceId": "s1",
582
+ "message": "harness.mcp was not allowed"
583
+ }
584
+ }
585
+ }
586
+ }
587
+ }
588
+ }
589
+ ]
590
+ }