@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,620 @@
1
+ {
2
+ "$comment": "VAPP-85: the extension mechanism. `extension` is a complete example extension catalog (a native the host paints, a macro with its own template, its own enum); `cases` are hand-written surfaces against the extension's id and against the core id; `expected` is generated by scripts/generate.ts from the TS reference reducer. The Exponential app's own extension (IssueRow, RunRow, IssueChip, …) lives in packages/ui/exponential-ui/extension.json and is validated by @exp/ui's tests through the same defineExtension.",
3
+ "extension": {
4
+ "id": "https://ui.exponential.at/catalogs/example/v1",
5
+ "name": "Example extension",
6
+ "extends": "https://ui.exponential.at/catalogs/core/v1",
7
+ "enums": {
8
+ "trend": [
9
+ "up",
10
+ "down",
11
+ "flat"
12
+ ]
13
+ },
14
+ "components": {
15
+ "TrendLine": {
16
+ "kind": "native",
17
+ "group": "data",
18
+ "lite": true,
19
+ "children": "none",
20
+ "description": "A tiny inline line chart of recent values, painted by the host.",
21
+ "props": {
22
+ "values": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "number"
26
+ },
27
+ "required": true,
28
+ "description": "The points, oldest first."
29
+ },
30
+ "tone": {
31
+ "type": "enum",
32
+ "enum": "tone",
33
+ "default": "primary",
34
+ "description": "The line colour tone."
35
+ }
36
+ },
37
+ "example": {
38
+ "values": [
39
+ 1,
40
+ 3,
41
+ 2,
42
+ 5
43
+ ]
44
+ }
45
+ },
46
+ "StatCard": {
47
+ "kind": "macro",
48
+ "group": "data",
49
+ "lite": true,
50
+ "children": "none",
51
+ "description": "A card with a label, a big value and a trend arrow.",
52
+ "props": {
53
+ "label": {
54
+ "type": "string",
55
+ "required": true,
56
+ "description": "What the number is."
57
+ },
58
+ "value": {
59
+ "type": "string",
60
+ "required": true,
61
+ "bindable": true,
62
+ "description": "The formatted number."
63
+ },
64
+ "trend": {
65
+ "type": "enum",
66
+ "enum": "trend",
67
+ "default": "flat",
68
+ "description": "Which way it moved."
69
+ },
70
+ "history": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "number"
74
+ },
75
+ "description": "Recent values for the sparkline."
76
+ }
77
+ },
78
+ "events": [
79
+ "press"
80
+ ],
81
+ "example": {
82
+ "label": "Open issues",
83
+ "value": "42",
84
+ "trend": "up"
85
+ }
86
+ }
87
+ },
88
+ "macros": {
89
+ "StatCard": {
90
+ "recipeProps": [
91
+ "trend"
92
+ ],
93
+ "root": {
94
+ "part": "root",
95
+ "component": "Card",
96
+ "props": {
97
+ "padded": true
98
+ },
99
+ "children": [
100
+ {
101
+ "part": "label",
102
+ "component": "Text",
103
+ "props": {
104
+ "text": "{props.label}",
105
+ "variant": "muted"
106
+ }
107
+ },
108
+ {
109
+ "part": "row",
110
+ "component": "Stack",
111
+ "props": {
112
+ "direction": "horizontal",
113
+ "align": "center",
114
+ "gap": "sm"
115
+ },
116
+ "children": [
117
+ {
118
+ "part": "value",
119
+ "component": "Text",
120
+ "props": {
121
+ "text": "{props.value}",
122
+ "variant": "title"
123
+ }
124
+ },
125
+ {
126
+ "part": "trend",
127
+ "component": "Icon",
128
+ "props": {
129
+ "name": {
130
+ "$map": {
131
+ "from": "props.trend",
132
+ "cases": {
133
+ "up": "ui-chevron-up",
134
+ "down": "ui-chevron-down"
135
+ },
136
+ "default": "ui-minus"
137
+ }
138
+ },
139
+ "size": "sm",
140
+ "tone": {
141
+ "$map": {
142
+ "from": "props.trend",
143
+ "cases": {
144
+ "up": "success",
145
+ "down": "danger"
146
+ },
147
+ "default": "neutral"
148
+ }
149
+ }
150
+ }
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "part": "spark",
156
+ "component": "TrendLine",
157
+ "$if": "props.history",
158
+ "props": {
159
+ "values": "{props.history}"
160
+ }
161
+ }
162
+ ]
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "cases": [
168
+ {
169
+ "name": "An extension macro expands through a core macro into natives, keeping the extension's native",
170
+ "catalogId": "https://ui.exponential.at/catalogs/example/v1",
171
+ "components": [
172
+ {
173
+ "id": "root",
174
+ "component": "Stack",
175
+ "direction": "vertical",
176
+ "children": [
177
+ "s1",
178
+ "s2"
179
+ ]
180
+ },
181
+ {
182
+ "id": "s1",
183
+ "component": "StatCard",
184
+ "label": "Open issues",
185
+ "value": "42",
186
+ "trend": "up",
187
+ "history": [
188
+ 1,
189
+ 3,
190
+ 2,
191
+ 5
192
+ ],
193
+ "on": {
194
+ "press": {
195
+ "event": {
196
+ "name": "openStats"
197
+ }
198
+ }
199
+ }
200
+ },
201
+ {
202
+ "id": "s2",
203
+ "component": "StatCard",
204
+ "label": "Merged",
205
+ "value": {
206
+ "path": "/merged"
207
+ }
208
+ }
209
+ ],
210
+ "expected": {
211
+ "root": {
212
+ "id": "root",
213
+ "component": "Box",
214
+ "props": {},
215
+ "children": [
216
+ {
217
+ "id": "s1",
218
+ "component": "Box",
219
+ "props": {},
220
+ "children": [
221
+ {
222
+ "id": "s1.body",
223
+ "component": "Box",
224
+ "props": {},
225
+ "children": [
226
+ {
227
+ "id": "s1.label",
228
+ "component": "Text",
229
+ "props": {
230
+ "text": "Open issues",
231
+ "variant": "muted"
232
+ },
233
+ "children": [],
234
+ "recipe": {
235
+ "macro": "StatCard",
236
+ "part": "label",
237
+ "props": {
238
+ "trend": "up"
239
+ }
240
+ }
241
+ },
242
+ {
243
+ "id": "s1.row",
244
+ "component": "Box",
245
+ "props": {},
246
+ "children": [
247
+ {
248
+ "id": "s1.row.value",
249
+ "component": "Text",
250
+ "props": {
251
+ "text": "42",
252
+ "variant": "title"
253
+ },
254
+ "children": [],
255
+ "recipe": {
256
+ "macro": "StatCard",
257
+ "part": "value",
258
+ "props": {
259
+ "trend": "up"
260
+ }
261
+ }
262
+ },
263
+ {
264
+ "id": "s1.row.trend",
265
+ "component": "Icon",
266
+ "props": {
267
+ "name": "ui-chevron-up",
268
+ "size": "sm",
269
+ "tone": "success"
270
+ },
271
+ "children": [],
272
+ "recipe": {
273
+ "macro": "StatCard",
274
+ "part": "trend",
275
+ "props": {
276
+ "trend": "up"
277
+ }
278
+ }
279
+ }
280
+ ],
281
+ "style": {
282
+ "display": "flex",
283
+ "flexDirection": "row",
284
+ "flexWrap": "nowrap",
285
+ "gap": "$spacing.sm",
286
+ "alignItems": "center",
287
+ "justifyContent": "start"
288
+ },
289
+ "recipe": {
290
+ "macro": "Stack",
291
+ "part": "root",
292
+ "props": {}
293
+ }
294
+ },
295
+ {
296
+ "id": "s1.spark",
297
+ "component": "TrendLine",
298
+ "props": {
299
+ "values": [
300
+ 1,
301
+ 3,
302
+ 2,
303
+ 5
304
+ ]
305
+ },
306
+ "children": [],
307
+ "recipe": {
308
+ "macro": "StatCard",
309
+ "part": "spark",
310
+ "props": {
311
+ "trend": "up"
312
+ }
313
+ }
314
+ }
315
+ ],
316
+ "style": {
317
+ "display": "flex",
318
+ "flexDirection": "column",
319
+ "gap": "$spacing.md",
320
+ "padding": "$spacing.lg"
321
+ },
322
+ "recipe": {
323
+ "macro": "Card",
324
+ "part": "body",
325
+ "props": {}
326
+ }
327
+ }
328
+ ],
329
+ "style": {
330
+ "display": "flex",
331
+ "flexDirection": "column",
332
+ "borderRadius": "$radius.xl",
333
+ "overflow": "hidden"
334
+ },
335
+ "recipe": {
336
+ "macro": "Card",
337
+ "part": "root",
338
+ "props": {}
339
+ },
340
+ "accessibility": {
341
+ "role": "group"
342
+ },
343
+ "on": {
344
+ "press": {
345
+ "event": {
346
+ "name": "openStats"
347
+ }
348
+ }
349
+ }
350
+ },
351
+ {
352
+ "id": "s2",
353
+ "component": "Box",
354
+ "props": {},
355
+ "children": [
356
+ {
357
+ "id": "s2.body",
358
+ "component": "Box",
359
+ "props": {},
360
+ "children": [
361
+ {
362
+ "id": "s2.label",
363
+ "component": "Text",
364
+ "props": {
365
+ "text": "Merged",
366
+ "variant": "muted"
367
+ },
368
+ "children": [],
369
+ "recipe": {
370
+ "macro": "StatCard",
371
+ "part": "label",
372
+ "props": {
373
+ "trend": "flat"
374
+ }
375
+ }
376
+ },
377
+ {
378
+ "id": "s2.row",
379
+ "component": "Box",
380
+ "props": {},
381
+ "children": [
382
+ {
383
+ "id": "s2.row.value",
384
+ "component": "Text",
385
+ "props": {
386
+ "text": {
387
+ "path": "/merged"
388
+ },
389
+ "variant": "title"
390
+ },
391
+ "children": [],
392
+ "recipe": {
393
+ "macro": "StatCard",
394
+ "part": "value",
395
+ "props": {
396
+ "trend": "flat"
397
+ }
398
+ }
399
+ },
400
+ {
401
+ "id": "s2.row.trend",
402
+ "component": "Icon",
403
+ "props": {
404
+ "name": "ui-minus",
405
+ "size": "sm",
406
+ "tone": "neutral"
407
+ },
408
+ "children": [],
409
+ "recipe": {
410
+ "macro": "StatCard",
411
+ "part": "trend",
412
+ "props": {
413
+ "trend": "flat"
414
+ }
415
+ }
416
+ }
417
+ ],
418
+ "style": {
419
+ "display": "flex",
420
+ "flexDirection": "row",
421
+ "flexWrap": "nowrap",
422
+ "gap": "$spacing.sm",
423
+ "alignItems": "center",
424
+ "justifyContent": "start"
425
+ },
426
+ "recipe": {
427
+ "macro": "Stack",
428
+ "part": "root",
429
+ "props": {}
430
+ }
431
+ }
432
+ ],
433
+ "style": {
434
+ "display": "flex",
435
+ "flexDirection": "column",
436
+ "gap": "$spacing.md",
437
+ "padding": "$spacing.lg"
438
+ },
439
+ "recipe": {
440
+ "macro": "Card",
441
+ "part": "body",
442
+ "props": {}
443
+ }
444
+ }
445
+ ],
446
+ "style": {
447
+ "display": "flex",
448
+ "flexDirection": "column",
449
+ "borderRadius": "$radius.xl",
450
+ "overflow": "hidden"
451
+ },
452
+ "recipe": {
453
+ "macro": "Card",
454
+ "part": "root",
455
+ "props": {}
456
+ },
457
+ "accessibility": {
458
+ "role": "group"
459
+ }
460
+ }
461
+ ],
462
+ "style": {
463
+ "display": "flex",
464
+ "flexDirection": "column",
465
+ "flexWrap": "nowrap",
466
+ "gap": "$spacing.md",
467
+ "alignItems": "stretch",
468
+ "justifyContent": "start"
469
+ },
470
+ "recipe": {
471
+ "macro": "Stack",
472
+ "part": "root",
473
+ "props": {}
474
+ }
475
+ },
476
+ "issues": []
477
+ }
478
+ },
479
+ {
480
+ "name": "An extension native passes through with its props validated",
481
+ "catalogId": "https://ui.exponential.at/catalogs/example/v1",
482
+ "components": [
483
+ {
484
+ "id": "root",
485
+ "component": "TrendLine",
486
+ "values": [
487
+ 2,
488
+ 4,
489
+ 3
490
+ ],
491
+ "tone": "success"
492
+ }
493
+ ],
494
+ "expected": {
495
+ "root": {
496
+ "id": "root",
497
+ "component": "TrendLine",
498
+ "props": {
499
+ "values": [
500
+ 2,
501
+ 4,
502
+ 3
503
+ ],
504
+ "tone": "success"
505
+ },
506
+ "children": []
507
+ },
508
+ "issues": []
509
+ }
510
+ },
511
+ {
512
+ "name": "A name neither the core nor the extension defines is the placeholder",
513
+ "catalogId": "https://ui.exponential.at/catalogs/example/v1",
514
+ "components": [
515
+ {
516
+ "id": "root",
517
+ "component": "Stack",
518
+ "children": [
519
+ "x"
520
+ ]
521
+ },
522
+ {
523
+ "id": "x",
524
+ "component": "Gauge",
525
+ "value": 1
526
+ }
527
+ ],
528
+ "expected": {
529
+ "root": {
530
+ "id": "root",
531
+ "component": "Box",
532
+ "props": {},
533
+ "children": [
534
+ {
535
+ "id": "x",
536
+ "component": "Unknown",
537
+ "props": {
538
+ "component": "Gauge",
539
+ "catalogId": "https://ui.exponential.at/catalogs/example/v1"
540
+ },
541
+ "children": []
542
+ }
543
+ ],
544
+ "style": {
545
+ "display": "flex",
546
+ "flexDirection": "column",
547
+ "flexWrap": "nowrap",
548
+ "gap": "$spacing.md",
549
+ "alignItems": "stretch",
550
+ "justifyContent": "start"
551
+ },
552
+ "recipe": {
553
+ "macro": "Stack",
554
+ "part": "root",
555
+ "props": {}
556
+ }
557
+ },
558
+ "issues": [
559
+ {
560
+ "id": "x",
561
+ "message": "unknown component Gauge"
562
+ }
563
+ ]
564
+ }
565
+ },
566
+ {
567
+ "name": "A core-catalog surface does not see the extension's components",
568
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
569
+ "components": [
570
+ {
571
+ "id": "root",
572
+ "component": "Stack",
573
+ "children": [
574
+ "x"
575
+ ]
576
+ },
577
+ {
578
+ "id": "x",
579
+ "component": "TrendLine",
580
+ "values": [
581
+ 1
582
+ ]
583
+ }
584
+ ],
585
+ "expected": {
586
+ "root": {
587
+ "id": "root",
588
+ "component": "Box",
589
+ "props": {},
590
+ "children": [
591
+ {
592
+ "id": "x",
593
+ "component": "TrendLine",
594
+ "props": {
595
+ "values": [
596
+ 1
597
+ ]
598
+ },
599
+ "children": []
600
+ }
601
+ ],
602
+ "style": {
603
+ "display": "flex",
604
+ "flexDirection": "column",
605
+ "flexWrap": "nowrap",
606
+ "gap": "$spacing.md",
607
+ "alignItems": "stretch",
608
+ "justifyContent": "start"
609
+ },
610
+ "recipe": {
611
+ "macro": "Stack",
612
+ "part": "root",
613
+ "props": {}
614
+ }
615
+ },
616
+ "issues": []
617
+ }
618
+ }
619
+ ]
620
+ }