@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,2985 @@
1
+ {
2
+ "$comment": "AUTO-GENERATED by packages/exponential-ui/scripts/generate-round4.ts — do not edit (inputs live there). Round 4 (VAPP-103), replayed by the TS reference (src/round4.test.ts) and the Rust core (tests/round4_fixtures.rs). validate: reduce the nested input with the core catalog: the issues equal `issues` in order. depth: reduce the nested input: the issues equal `issues` and the Unknown placeholders (pre-order, root then each lifted template: children before slots) equal `placeholders` (maxDepth holds AFTER expansion, each tree from level 1). templateBudget: reduce, set the data (`{\"$fill\": n}` = n zeros) and build every item: each template site (`holder` in `scope`) builds its first `built` items (ids `template + instance + .i`), and the build reports `issues` (ONE: the template whose next item did not fit maxTemplateItems or maxComponents) (a node's style, then the functions its props, visible and on actions call, then a Table's slot columns; a colour is a `$color.*` token, never a literal; a host function is namespaced, `app.toast`). filter: call the core `filter` with `args`: the result equals `expected`. ownWrite: fire `event` with `payload` on `target` (the interaction): the component writes `own` (by prop, exactly what it wrote, never inferred from the payload) and sends `sent`; the data model equals `expected.data` and the action that leaves carries `expected.action` (its context resolved AFTER the own write, `sent` merged over it). closeOnSubmit: submit the valid `form`: the actions leave in `actions` order, the overlay `expected.overlay` closes (null = none: the NEAREST enclosing overlay of any kind decides, and only a dismissible Dialog or Drawer closes) and the data equals `expected.data`.",
3
+ "catalogId": "https://ui.exponential.at/catalogs/core/v1",
4
+ "validate": [
5
+ {
6
+ "name": "depth: counted after macro expansion (a 47-deep Card chain)",
7
+ "input": {
8
+ "id": "card0",
9
+ "component": "Card",
10
+ "children": [
11
+ {
12
+ "id": "card1",
13
+ "component": "Card",
14
+ "children": [
15
+ {
16
+ "id": "card2",
17
+ "component": "Card",
18
+ "children": [
19
+ {
20
+ "id": "card3",
21
+ "component": "Card",
22
+ "children": [
23
+ {
24
+ "id": "card4",
25
+ "component": "Card",
26
+ "children": [
27
+ {
28
+ "id": "card5",
29
+ "component": "Card",
30
+ "children": [
31
+ {
32
+ "id": "card6",
33
+ "component": "Card",
34
+ "children": [
35
+ {
36
+ "id": "card7",
37
+ "component": "Card",
38
+ "children": [
39
+ {
40
+ "id": "card8",
41
+ "component": "Card",
42
+ "children": [
43
+ {
44
+ "id": "card9",
45
+ "component": "Card",
46
+ "children": [
47
+ {
48
+ "id": "card10",
49
+ "component": "Card",
50
+ "children": [
51
+ {
52
+ "id": "card11",
53
+ "component": "Card",
54
+ "children": [
55
+ {
56
+ "id": "card12",
57
+ "component": "Card",
58
+ "children": [
59
+ {
60
+ "id": "card13",
61
+ "component": "Card",
62
+ "children": [
63
+ {
64
+ "id": "card14",
65
+ "component": "Card",
66
+ "children": [
67
+ {
68
+ "id": "card15",
69
+ "component": "Card",
70
+ "children": [
71
+ {
72
+ "id": "card16",
73
+ "component": "Card",
74
+ "children": [
75
+ {
76
+ "id": "card17",
77
+ "component": "Card",
78
+ "children": [
79
+ {
80
+ "id": "card18",
81
+ "component": "Card",
82
+ "children": [
83
+ {
84
+ "id": "card19",
85
+ "component": "Card",
86
+ "children": [
87
+ {
88
+ "id": "card20",
89
+ "component": "Card",
90
+ "children": [
91
+ {
92
+ "id": "card21",
93
+ "component": "Card",
94
+ "children": [
95
+ {
96
+ "id": "card22",
97
+ "component": "Card",
98
+ "children": [
99
+ {
100
+ "id": "card23",
101
+ "component": "Card",
102
+ "children": [
103
+ {
104
+ "id": "card24",
105
+ "component": "Card",
106
+ "children": [
107
+ {
108
+ "id": "card25",
109
+ "component": "Card",
110
+ "children": [
111
+ {
112
+ "id": "card26",
113
+ "component": "Card",
114
+ "children": [
115
+ {
116
+ "id": "card27",
117
+ "component": "Card",
118
+ "children": [
119
+ {
120
+ "id": "card28",
121
+ "component": "Card",
122
+ "children": [
123
+ {
124
+ "id": "card29",
125
+ "component": "Card",
126
+ "children": [
127
+ {
128
+ "id": "card30",
129
+ "component": "Card",
130
+ "children": [
131
+ {
132
+ "id": "card31",
133
+ "component": "Card",
134
+ "children": [
135
+ {
136
+ "id": "card32",
137
+ "component": "Card",
138
+ "children": [
139
+ {
140
+ "id": "card33",
141
+ "component": "Card",
142
+ "children": [
143
+ {
144
+ "id": "card34",
145
+ "component": "Card",
146
+ "children": [
147
+ {
148
+ "id": "card35",
149
+ "component": "Card",
150
+ "children": [
151
+ {
152
+ "id": "card36",
153
+ "component": "Card",
154
+ "children": [
155
+ {
156
+ "id": "card37",
157
+ "component": "Card",
158
+ "children": [
159
+ {
160
+ "id": "card38",
161
+ "component": "Card",
162
+ "children": [
163
+ {
164
+ "id": "card39",
165
+ "component": "Card",
166
+ "children": [
167
+ {
168
+ "id": "card40",
169
+ "component": "Card",
170
+ "children": [
171
+ {
172
+ "id": "card41",
173
+ "component": "Card",
174
+ "children": [
175
+ {
176
+ "id": "card42",
177
+ "component": "Card",
178
+ "children": [
179
+ {
180
+ "id": "card43",
181
+ "component": "Card",
182
+ "children": [
183
+ {
184
+ "id": "card44",
185
+ "component": "Card",
186
+ "children": [
187
+ {
188
+ "id": "card45",
189
+ "component": "Card",
190
+ "children": [
191
+ {
192
+ "id": "card46",
193
+ "component": "Card",
194
+ "children": [
195
+ {
196
+ "id": "leaf",
197
+ "component": "Text",
198
+ "props": {
199
+ "text": "deepest"
200
+ }
201
+ }
202
+ ]
203
+ }
204
+ ]
205
+ }
206
+ ]
207
+ }
208
+ ]
209
+ }
210
+ ]
211
+ }
212
+ ]
213
+ }
214
+ ]
215
+ }
216
+ ]
217
+ }
218
+ ]
219
+ }
220
+ ]
221
+ }
222
+ ]
223
+ }
224
+ ]
225
+ }
226
+ ]
227
+ }
228
+ ]
229
+ }
230
+ ]
231
+ }
232
+ ]
233
+ }
234
+ ]
235
+ }
236
+ ]
237
+ }
238
+ ]
239
+ }
240
+ ]
241
+ }
242
+ ]
243
+ }
244
+ ]
245
+ }
246
+ ]
247
+ }
248
+ ]
249
+ }
250
+ ]
251
+ }
252
+ ]
253
+ }
254
+ ]
255
+ }
256
+ ]
257
+ }
258
+ ]
259
+ }
260
+ ]
261
+ }
262
+ ]
263
+ }
264
+ ]
265
+ }
266
+ ]
267
+ }
268
+ ]
269
+ }
270
+ ]
271
+ }
272
+ ]
273
+ }
274
+ ]
275
+ }
276
+ ]
277
+ }
278
+ ]
279
+ }
280
+ ]
281
+ }
282
+ ]
283
+ }
284
+ ]
285
+ }
286
+ ]
287
+ }
288
+ ]
289
+ }
290
+ ]
291
+ }
292
+ ]
293
+ }
294
+ ]
295
+ },
296
+ "issues": [
297
+ {
298
+ "id": "card24",
299
+ "message": "nesting deeper than 48 levels"
300
+ }
301
+ ]
302
+ },
303
+ {
304
+ "name": "style: a key outside the Box whitelist",
305
+ "input": {
306
+ "id": "root",
307
+ "component": "Box",
308
+ "style": {
309
+ "fontColor": "$color.primary"
310
+ }
311
+ },
312
+ "issues": [
313
+ {
314
+ "id": "root",
315
+ "message": "style.fontColor: not in the Box style whitelist"
316
+ }
317
+ ]
318
+ },
319
+ {
320
+ "name": "style: an unknown token",
321
+ "input": {
322
+ "id": "root",
323
+ "component": "Stack",
324
+ "style": {
325
+ "gap": "$spacing.huge"
326
+ }
327
+ },
328
+ "issues": [
329
+ {
330
+ "id": "root",
331
+ "message": "style.gap: gap: expected px, \"N%\", \"auto\" or a numeric token"
332
+ }
333
+ ]
334
+ },
335
+ {
336
+ "name": "style: a literal colour (a node colour is a token)",
337
+ "input": {
338
+ "id": "root",
339
+ "component": "Box",
340
+ "style": {
341
+ "backgroundColor": "#ff0000",
342
+ "color": "$color.foreground"
343
+ }
344
+ },
345
+ "issues": [
346
+ {
347
+ "id": "root",
348
+ "message": "style.backgroundColor: backgroundColor: expected $color.<name>"
349
+ }
350
+ ]
351
+ },
352
+ {
353
+ "name": "style: a literal colour inside a media block",
354
+ "input": {
355
+ "id": "root",
356
+ "component": "Box",
357
+ "style": {
358
+ "@media (min-width: $breakpoint.md)": {
359
+ "borderColor": "#000000"
360
+ }
361
+ }
362
+ },
363
+ "issues": [
364
+ {
365
+ "id": "root",
366
+ "message": "style.@media (min-width: $breakpoint.md).borderColor: borderColor: expected $color.<name>"
367
+ }
368
+ ]
369
+ },
370
+ {
371
+ "name": "style: a literal gradient stop",
372
+ "input": {
373
+ "id": "root",
374
+ "component": "Box",
375
+ "style": {
376
+ "backgroundGradient": {
377
+ "angle": 90,
378
+ "stops": [
379
+ {
380
+ "color": "$color.primary",
381
+ "offset": 0
382
+ },
383
+ {
384
+ "color": "#00000000",
385
+ "offset": 1
386
+ }
387
+ ]
388
+ }
389
+ }
390
+ },
391
+ "issues": [
392
+ {
393
+ "id": "root",
394
+ "message": "style.backgroundGradient: backgroundGradient: expected {angle, stops: [{color, offset 0..1}, …]} with two or more stops"
395
+ }
396
+ ]
397
+ },
398
+ {
399
+ "name": "prop: a literal colour",
400
+ "input": {
401
+ "id": "root",
402
+ "component": "Chip",
403
+ "props": {
404
+ "label": "Bug",
405
+ "dot": "#ef4444"
406
+ }
407
+ },
408
+ "issues": [
409
+ {
410
+ "id": "root",
411
+ "message": "props.dot: expected $color.<name>"
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ "name": "prop: a colour token passes",
417
+ "input": {
418
+ "id": "root",
419
+ "component": "Chip",
420
+ "props": {
421
+ "label": "Bug",
422
+ "dot": "$color.destructive"
423
+ }
424
+ },
425
+ "issues": []
426
+ },
427
+ {
428
+ "name": "action: an unknown function",
429
+ "input": {
430
+ "id": "root",
431
+ "component": "Button",
432
+ "props": {
433
+ "label": "Docs"
434
+ },
435
+ "on": {
436
+ "press": {
437
+ "functionCall": {
438
+ "call": "opneUrl",
439
+ "args": {
440
+ "url": "https://ui.exponential.at/"
441
+ }
442
+ }
443
+ }
444
+ }
445
+ },
446
+ "issues": [
447
+ {
448
+ "id": "root",
449
+ "message": "on.press.functionCall: unknown function \"opneUrl\"; known: the catalog functions, or a namespaced host function (app.toast)"
450
+ }
451
+ ]
452
+ },
453
+ {
454
+ "name": "action: a namespaced host function passes",
455
+ "input": {
456
+ "id": "root",
457
+ "component": "Button",
458
+ "props": {
459
+ "label": "Wave"
460
+ },
461
+ "on": {
462
+ "press": {
463
+ "functionCall": {
464
+ "call": "app.toast",
465
+ "args": {
466
+ "text": "Hi"
467
+ }
468
+ }
469
+ }
470
+ }
471
+ },
472
+ "issues": []
473
+ },
474
+ {
475
+ "name": "action: an unknown function inside the event context",
476
+ "input": {
477
+ "id": "root",
478
+ "component": "Button",
479
+ "props": {
480
+ "label": "Save"
481
+ },
482
+ "on": {
483
+ "press": {
484
+ "event": {
485
+ "name": "save",
486
+ "context": {
487
+ "title": {
488
+ "call": "trimm",
489
+ "args": {
490
+ "value": {
491
+ "path": "/title"
492
+ }
493
+ }
494
+ }
495
+ }
496
+ }
497
+ }
498
+ }
499
+ },
500
+ "issues": [
501
+ {
502
+ "id": "root",
503
+ "message": "on.press.event.context.title: unknown function \"trimm\"; known: the catalog functions, or a namespaced host function (app.toast)"
504
+ }
505
+ ]
506
+ },
507
+ {
508
+ "name": "prop: an unknown function in a binding",
509
+ "input": {
510
+ "id": "root",
511
+ "component": "Text",
512
+ "props": {
513
+ "text": {
514
+ "call": "concatt",
515
+ "args": {
516
+ "values": [
517
+ "a",
518
+ "b"
519
+ ]
520
+ }
521
+ }
522
+ }
523
+ },
524
+ "issues": [
525
+ {
526
+ "id": "root",
527
+ "message": "props.text: unknown function \"concatt\"; known: the catalog functions, or a namespaced host function (app.toast)"
528
+ }
529
+ ]
530
+ },
531
+ {
532
+ "name": "visible: an unknown function",
533
+ "input": {
534
+ "id": "root",
535
+ "component": "Text",
536
+ "props": {
537
+ "text": "x"
538
+ },
539
+ "visible": {
540
+ "call": "nott",
541
+ "args": {
542
+ "value": {
543
+ "path": "/hide"
544
+ }
545
+ }
546
+ }
547
+ },
548
+ "issues": [
549
+ {
550
+ "id": "root",
551
+ "message": "visible: unknown function \"nott\"; known: the catalog functions, or a namespaced host function (app.toast)"
552
+ }
553
+ ]
554
+ },
555
+ {
556
+ "name": "data: a literal Table row with a call key is a row, never a function",
557
+ "input": {
558
+ "id": "root",
559
+ "component": "Table",
560
+ "props": {
561
+ "columns": [
562
+ {
563
+ "key": "name",
564
+ "label": "Name"
565
+ },
566
+ {
567
+ "key": "call",
568
+ "label": "Call"
569
+ }
570
+ ],
571
+ "rows": [
572
+ {
573
+ "id": "r1",
574
+ "name": "Ana",
575
+ "call": "+1 555 0100"
576
+ },
577
+ {
578
+ "id": "r2",
579
+ "call": "follow up",
580
+ "args": {}
581
+ }
582
+ ]
583
+ }
584
+ },
585
+ "issues": []
586
+ },
587
+ {
588
+ "name": "shaped: a call in a bindable option label is checked",
589
+ "input": {
590
+ "id": "root",
591
+ "component": "Select",
592
+ "props": {
593
+ "name": "s",
594
+ "options": [
595
+ {
596
+ "label": {
597
+ "call": "uppr",
598
+ "args": {
599
+ "value": "a"
600
+ }
601
+ },
602
+ "value": "a"
603
+ },
604
+ {
605
+ "label": "B",
606
+ "value": "b"
607
+ }
608
+ ]
609
+ }
610
+ },
611
+ "issues": [
612
+ {
613
+ "id": "root",
614
+ "message": "props.options[0].label: unknown function \"uppr\"; known: the catalog functions, or a namespaced host function (app.toast)"
615
+ }
616
+ ]
617
+ },
618
+ {
619
+ "name": "action: an unknown function nested in another call's args",
620
+ "input": {
621
+ "id": "root",
622
+ "component": "Button",
623
+ "props": {
624
+ "label": "Go"
625
+ },
626
+ "on": {
627
+ "press": {
628
+ "functionCall": {
629
+ "call": "set",
630
+ "args": {
631
+ "path": "/n",
632
+ "value": {
633
+ "call": "ad",
634
+ "args": {
635
+ "a": 1,
636
+ "b": 2
637
+ }
638
+ }
639
+ }
640
+ }
641
+ }
642
+ }
643
+ },
644
+ "issues": [
645
+ {
646
+ "id": "root",
647
+ "message": "on.press.functionCall.args.value: unknown function \"ad\"; known: the catalog functions, or a namespaced host function (app.toast)"
648
+ }
649
+ ]
650
+ },
651
+ {
652
+ "name": "Table: a slot column naming a missing slot",
653
+ "input": {
654
+ "id": "root",
655
+ "component": "Table",
656
+ "props": {
657
+ "columns": [
658
+ {
659
+ "key": "title",
660
+ "label": "Title"
661
+ },
662
+ {
663
+ "key": "status",
664
+ "label": "Status",
665
+ "type": "slot",
666
+ "slot": "status"
667
+ },
668
+ {
669
+ "key": "owner",
670
+ "label": "Owner",
671
+ "type": "slot"
672
+ }
673
+ ],
674
+ "rows": {
675
+ "path": "/rows"
676
+ }
677
+ },
678
+ "slots": {
679
+ "state": {
680
+ "id": "state-cell",
681
+ "component": "Badge",
682
+ "props": {
683
+ "text": {
684
+ "path": "status"
685
+ }
686
+ }
687
+ }
688
+ }
689
+ },
690
+ "issues": [
691
+ {
692
+ "id": "root",
693
+ "message": "props.columns[1].slot: no slot \"status\" on this Table; slots: state"
694
+ },
695
+ {
696
+ "id": "root",
697
+ "message": "props.columns[2].slot: a slot column names one of the Table's slots"
698
+ }
699
+ ]
700
+ },
701
+ {
702
+ "name": "Table: slot columns naming its slots pass; rows bound to a filter",
703
+ "input": {
704
+ "id": "root",
705
+ "component": "Table",
706
+ "props": {
707
+ "columns": [
708
+ {
709
+ "key": "title",
710
+ "label": "Title"
711
+ },
712
+ {
713
+ "key": "status",
714
+ "label": "Status",
715
+ "type": "slot",
716
+ "slot": "status"
717
+ }
718
+ ],
719
+ "rows": {
720
+ "call": "filter",
721
+ "args": {
722
+ "items": {
723
+ "path": "/rows"
724
+ },
725
+ "query": {
726
+ "path": "/query"
727
+ },
728
+ "fields": [
729
+ "title"
730
+ ],
731
+ "where": {
732
+ "status": {
733
+ "path": "/status"
734
+ }
735
+ }
736
+ }
737
+ }
738
+ },
739
+ "slots": {
740
+ "status": {
741
+ "id": "status-cell",
742
+ "component": "Badge",
743
+ "props": {
744
+ "text": {
745
+ "path": "status"
746
+ }
747
+ }
748
+ }
749
+ }
750
+ },
751
+ "issues": []
752
+ }
753
+ ],
754
+ "depth": [
755
+ {
756
+ "name": "the root tree: the first node past maxDepth after expansion is the placeholder",
757
+ "input": {
758
+ "id": "card0",
759
+ "component": "Card",
760
+ "children": [
761
+ {
762
+ "id": "card1",
763
+ "component": "Card",
764
+ "children": [
765
+ {
766
+ "id": "card2",
767
+ "component": "Card",
768
+ "children": [
769
+ {
770
+ "id": "card3",
771
+ "component": "Card",
772
+ "children": [
773
+ {
774
+ "id": "card4",
775
+ "component": "Card",
776
+ "children": [
777
+ {
778
+ "id": "card5",
779
+ "component": "Card",
780
+ "children": [
781
+ {
782
+ "id": "card6",
783
+ "component": "Card",
784
+ "children": [
785
+ {
786
+ "id": "card7",
787
+ "component": "Card",
788
+ "children": [
789
+ {
790
+ "id": "card8",
791
+ "component": "Card",
792
+ "children": [
793
+ {
794
+ "id": "card9",
795
+ "component": "Card",
796
+ "children": [
797
+ {
798
+ "id": "card10",
799
+ "component": "Card",
800
+ "children": [
801
+ {
802
+ "id": "card11",
803
+ "component": "Card",
804
+ "children": [
805
+ {
806
+ "id": "card12",
807
+ "component": "Card",
808
+ "children": [
809
+ {
810
+ "id": "card13",
811
+ "component": "Card",
812
+ "children": [
813
+ {
814
+ "id": "card14",
815
+ "component": "Card",
816
+ "children": [
817
+ {
818
+ "id": "card15",
819
+ "component": "Card",
820
+ "children": [
821
+ {
822
+ "id": "card16",
823
+ "component": "Card",
824
+ "children": [
825
+ {
826
+ "id": "card17",
827
+ "component": "Card",
828
+ "children": [
829
+ {
830
+ "id": "card18",
831
+ "component": "Card",
832
+ "children": [
833
+ {
834
+ "id": "card19",
835
+ "component": "Card",
836
+ "children": [
837
+ {
838
+ "id": "card20",
839
+ "component": "Card",
840
+ "children": [
841
+ {
842
+ "id": "card21",
843
+ "component": "Card",
844
+ "children": [
845
+ {
846
+ "id": "card22",
847
+ "component": "Card",
848
+ "children": [
849
+ {
850
+ "id": "card23",
851
+ "component": "Card",
852
+ "children": [
853
+ {
854
+ "id": "card24",
855
+ "component": "Card",
856
+ "children": [
857
+ {
858
+ "id": "card25",
859
+ "component": "Card",
860
+ "children": [
861
+ {
862
+ "id": "card26",
863
+ "component": "Card",
864
+ "children": [
865
+ {
866
+ "id": "card27",
867
+ "component": "Card",
868
+ "children": [
869
+ {
870
+ "id": "card28",
871
+ "component": "Card",
872
+ "children": [
873
+ {
874
+ "id": "card29",
875
+ "component": "Card",
876
+ "children": [
877
+ {
878
+ "id": "card30",
879
+ "component": "Card",
880
+ "children": [
881
+ {
882
+ "id": "card31",
883
+ "component": "Card",
884
+ "children": [
885
+ {
886
+ "id": "card32",
887
+ "component": "Card",
888
+ "children": [
889
+ {
890
+ "id": "card33",
891
+ "component": "Card",
892
+ "children": [
893
+ {
894
+ "id": "card34",
895
+ "component": "Card",
896
+ "children": [
897
+ {
898
+ "id": "card35",
899
+ "component": "Card",
900
+ "children": [
901
+ {
902
+ "id": "card36",
903
+ "component": "Card",
904
+ "children": [
905
+ {
906
+ "id": "card37",
907
+ "component": "Card",
908
+ "children": [
909
+ {
910
+ "id": "card38",
911
+ "component": "Card",
912
+ "children": [
913
+ {
914
+ "id": "card39",
915
+ "component": "Card",
916
+ "children": [
917
+ {
918
+ "id": "card40",
919
+ "component": "Card",
920
+ "children": [
921
+ {
922
+ "id": "card41",
923
+ "component": "Card",
924
+ "children": [
925
+ {
926
+ "id": "card42",
927
+ "component": "Card",
928
+ "children": [
929
+ {
930
+ "id": "card43",
931
+ "component": "Card",
932
+ "children": [
933
+ {
934
+ "id": "card44",
935
+ "component": "Card",
936
+ "children": [
937
+ {
938
+ "id": "card45",
939
+ "component": "Card",
940
+ "children": [
941
+ {
942
+ "id": "card46",
943
+ "component": "Card",
944
+ "children": [
945
+ {
946
+ "id": "leaf",
947
+ "component": "Text",
948
+ "props": {
949
+ "text": "deepest"
950
+ }
951
+ }
952
+ ]
953
+ }
954
+ ]
955
+ }
956
+ ]
957
+ }
958
+ ]
959
+ }
960
+ ]
961
+ }
962
+ ]
963
+ }
964
+ ]
965
+ }
966
+ ]
967
+ }
968
+ ]
969
+ }
970
+ ]
971
+ }
972
+ ]
973
+ }
974
+ ]
975
+ }
976
+ ]
977
+ }
978
+ ]
979
+ }
980
+ ]
981
+ }
982
+ ]
983
+ }
984
+ ]
985
+ }
986
+ ]
987
+ }
988
+ ]
989
+ }
990
+ ]
991
+ }
992
+ ]
993
+ }
994
+ ]
995
+ }
996
+ ]
997
+ }
998
+ ]
999
+ }
1000
+ ]
1001
+ }
1002
+ ]
1003
+ }
1004
+ ]
1005
+ }
1006
+ ]
1007
+ }
1008
+ ]
1009
+ }
1010
+ ]
1011
+ }
1012
+ ]
1013
+ }
1014
+ ]
1015
+ }
1016
+ ]
1017
+ }
1018
+ ]
1019
+ }
1020
+ ]
1021
+ }
1022
+ ]
1023
+ }
1024
+ ]
1025
+ }
1026
+ ]
1027
+ }
1028
+ ]
1029
+ }
1030
+ ]
1031
+ }
1032
+ ]
1033
+ }
1034
+ ]
1035
+ }
1036
+ ]
1037
+ }
1038
+ ]
1039
+ }
1040
+ ]
1041
+ }
1042
+ ]
1043
+ }
1044
+ ]
1045
+ },
1046
+ "issues": [
1047
+ {
1048
+ "id": "card24",
1049
+ "message": "nesting deeper than 48 levels"
1050
+ }
1051
+ ],
1052
+ "placeholders": [
1053
+ {
1054
+ "tree": "root",
1055
+ "id": "card24",
1056
+ "component": "Box"
1057
+ }
1058
+ ]
1059
+ },
1060
+ {
1061
+ "name": "a lifted template is capped from its own level 1",
1062
+ "input": {
1063
+ "id": "root",
1064
+ "component": "Stack",
1065
+ "children": [
1066
+ {
1067
+ "id": "list",
1068
+ "component": "Stack",
1069
+ "template": {
1070
+ "component": "tcard0",
1071
+ "path": "/items"
1072
+ }
1073
+ },
1074
+ {
1075
+ "id": "defs",
1076
+ "component": "Box",
1077
+ "visible": false,
1078
+ "children": [
1079
+ {
1080
+ "id": "tcard0",
1081
+ "component": "Card",
1082
+ "children": [
1083
+ {
1084
+ "id": "tcard1",
1085
+ "component": "Card",
1086
+ "children": [
1087
+ {
1088
+ "id": "tcard2",
1089
+ "component": "Card",
1090
+ "children": [
1091
+ {
1092
+ "id": "tcard3",
1093
+ "component": "Card",
1094
+ "children": [
1095
+ {
1096
+ "id": "tcard4",
1097
+ "component": "Card",
1098
+ "children": [
1099
+ {
1100
+ "id": "tcard5",
1101
+ "component": "Card",
1102
+ "children": [
1103
+ {
1104
+ "id": "tcard6",
1105
+ "component": "Card",
1106
+ "children": [
1107
+ {
1108
+ "id": "tcard7",
1109
+ "component": "Card",
1110
+ "children": [
1111
+ {
1112
+ "id": "tcard8",
1113
+ "component": "Card",
1114
+ "children": [
1115
+ {
1116
+ "id": "tcard9",
1117
+ "component": "Card",
1118
+ "children": [
1119
+ {
1120
+ "id": "tcard10",
1121
+ "component": "Card",
1122
+ "children": [
1123
+ {
1124
+ "id": "tcard11",
1125
+ "component": "Card",
1126
+ "children": [
1127
+ {
1128
+ "id": "tcard12",
1129
+ "component": "Card",
1130
+ "children": [
1131
+ {
1132
+ "id": "tcard13",
1133
+ "component": "Card",
1134
+ "children": [
1135
+ {
1136
+ "id": "tcard14",
1137
+ "component": "Card",
1138
+ "children": [
1139
+ {
1140
+ "id": "tcard15",
1141
+ "component": "Card",
1142
+ "children": [
1143
+ {
1144
+ "id": "tcard16",
1145
+ "component": "Card",
1146
+ "children": [
1147
+ {
1148
+ "id": "tcard17",
1149
+ "component": "Card",
1150
+ "children": [
1151
+ {
1152
+ "id": "tcard18",
1153
+ "component": "Card",
1154
+ "children": [
1155
+ {
1156
+ "id": "tcard19",
1157
+ "component": "Card",
1158
+ "children": [
1159
+ {
1160
+ "id": "tcard20",
1161
+ "component": "Card",
1162
+ "children": [
1163
+ {
1164
+ "id": "tcard21",
1165
+ "component": "Card",
1166
+ "children": [
1167
+ {
1168
+ "id": "tcard22",
1169
+ "component": "Card",
1170
+ "children": [
1171
+ {
1172
+ "id": "tcard23",
1173
+ "component": "Card",
1174
+ "children": [
1175
+ {
1176
+ "id": "tcard24",
1177
+ "component": "Card",
1178
+ "children": [
1179
+ {
1180
+ "id": "tleaf",
1181
+ "component": "Text",
1182
+ "props": {
1183
+ "text": "deepest"
1184
+ }
1185
+ }
1186
+ ]
1187
+ }
1188
+ ]
1189
+ }
1190
+ ]
1191
+ }
1192
+ ]
1193
+ }
1194
+ ]
1195
+ }
1196
+ ]
1197
+ }
1198
+ ]
1199
+ }
1200
+ ]
1201
+ }
1202
+ ]
1203
+ }
1204
+ ]
1205
+ }
1206
+ ]
1207
+ }
1208
+ ]
1209
+ }
1210
+ ]
1211
+ }
1212
+ ]
1213
+ }
1214
+ ]
1215
+ }
1216
+ ]
1217
+ }
1218
+ ]
1219
+ }
1220
+ ]
1221
+ }
1222
+ ]
1223
+ }
1224
+ ]
1225
+ }
1226
+ ]
1227
+ }
1228
+ ]
1229
+ }
1230
+ ]
1231
+ }
1232
+ ]
1233
+ }
1234
+ ]
1235
+ }
1236
+ ]
1237
+ }
1238
+ ]
1239
+ },
1240
+ "issues": [
1241
+ {
1242
+ "id": "tcard24",
1243
+ "message": "nesting deeper than 48 levels"
1244
+ }
1245
+ ],
1246
+ "placeholders": [
1247
+ {
1248
+ "tree": "tcard0",
1249
+ "id": "tcard24",
1250
+ "component": "Box"
1251
+ }
1252
+ ]
1253
+ },
1254
+ {
1255
+ "name": "an Unknown leaf at maxDepth + 1 is not reported again",
1256
+ "input": {
1257
+ "id": "card0",
1258
+ "component": "Card",
1259
+ "children": [
1260
+ {
1261
+ "id": "card1",
1262
+ "component": "Card",
1263
+ "children": [
1264
+ {
1265
+ "id": "card2",
1266
+ "component": "Card",
1267
+ "children": [
1268
+ {
1269
+ "id": "card3",
1270
+ "component": "Card",
1271
+ "children": [
1272
+ {
1273
+ "id": "card4",
1274
+ "component": "Card",
1275
+ "children": [
1276
+ {
1277
+ "id": "card5",
1278
+ "component": "Card",
1279
+ "children": [
1280
+ {
1281
+ "id": "card6",
1282
+ "component": "Card",
1283
+ "children": [
1284
+ {
1285
+ "id": "card7",
1286
+ "component": "Card",
1287
+ "children": [
1288
+ {
1289
+ "id": "card8",
1290
+ "component": "Card",
1291
+ "children": [
1292
+ {
1293
+ "id": "card9",
1294
+ "component": "Card",
1295
+ "children": [
1296
+ {
1297
+ "id": "card10",
1298
+ "component": "Card",
1299
+ "children": [
1300
+ {
1301
+ "id": "card11",
1302
+ "component": "Card",
1303
+ "children": [
1304
+ {
1305
+ "id": "card12",
1306
+ "component": "Card",
1307
+ "children": [
1308
+ {
1309
+ "id": "card13",
1310
+ "component": "Card",
1311
+ "children": [
1312
+ {
1313
+ "id": "card14",
1314
+ "component": "Card",
1315
+ "children": [
1316
+ {
1317
+ "id": "card15",
1318
+ "component": "Card",
1319
+ "children": [
1320
+ {
1321
+ "id": "card16",
1322
+ "component": "Card",
1323
+ "children": [
1324
+ {
1325
+ "id": "card17",
1326
+ "component": "Card",
1327
+ "children": [
1328
+ {
1329
+ "id": "card18",
1330
+ "component": "Card",
1331
+ "children": [
1332
+ {
1333
+ "id": "card19",
1334
+ "component": "Card",
1335
+ "children": [
1336
+ {
1337
+ "id": "card20",
1338
+ "component": "Card",
1339
+ "children": [
1340
+ {
1341
+ "id": "card21",
1342
+ "component": "Card",
1343
+ "children": [
1344
+ {
1345
+ "id": "card22",
1346
+ "component": "Card",
1347
+ "children": [
1348
+ {
1349
+ "id": "card23",
1350
+ "component": "Card",
1351
+ "children": [
1352
+ {
1353
+ "id": "nope",
1354
+ "component": "NoSuchComponent"
1355
+ }
1356
+ ]
1357
+ }
1358
+ ]
1359
+ }
1360
+ ]
1361
+ }
1362
+ ]
1363
+ }
1364
+ ]
1365
+ }
1366
+ ]
1367
+ }
1368
+ ]
1369
+ }
1370
+ ]
1371
+ }
1372
+ ]
1373
+ }
1374
+ ]
1375
+ }
1376
+ ]
1377
+ }
1378
+ ]
1379
+ }
1380
+ ]
1381
+ }
1382
+ ]
1383
+ }
1384
+ ]
1385
+ }
1386
+ ]
1387
+ }
1388
+ ]
1389
+ }
1390
+ ]
1391
+ }
1392
+ ]
1393
+ }
1394
+ ]
1395
+ }
1396
+ ]
1397
+ }
1398
+ ]
1399
+ }
1400
+ ]
1401
+ }
1402
+ ]
1403
+ },
1404
+ "issues": [
1405
+ {
1406
+ "id": "nope",
1407
+ "message": "unknown component NoSuchComponent"
1408
+ }
1409
+ ],
1410
+ "placeholders": [
1411
+ {
1412
+ "tree": "root",
1413
+ "id": "nope",
1414
+ "component": "NoSuchComponent"
1415
+ }
1416
+ ]
1417
+ }
1418
+ ],
1419
+ "templateBudget": [
1420
+ {
1421
+ "name": "maxTemplateItems: items are charged depth-first, an item's nested items before the next item",
1422
+ "input": {
1423
+ "id": "root",
1424
+ "component": "Stack",
1425
+ "children": [
1426
+ {
1427
+ "id": "list",
1428
+ "component": "Stack",
1429
+ "template": {
1430
+ "component": "row",
1431
+ "path": "/outer"
1432
+ }
1433
+ },
1434
+ {
1435
+ "id": "defs",
1436
+ "component": "Box",
1437
+ "visible": false,
1438
+ "children": [
1439
+ {
1440
+ "id": "row",
1441
+ "component": "Stack",
1442
+ "template": {
1443
+ "component": "cell",
1444
+ "path": "inner"
1445
+ }
1446
+ },
1447
+ {
1448
+ "id": "cell",
1449
+ "component": "Text",
1450
+ "props": {
1451
+ "text": "x"
1452
+ }
1453
+ }
1454
+ ]
1455
+ }
1456
+ ]
1457
+ },
1458
+ "data": {
1459
+ "outer": [
1460
+ {
1461
+ "inner": {
1462
+ "$fill": 9998
1463
+ }
1464
+ },
1465
+ {
1466
+ "inner": {
1467
+ "$fill": 2
1468
+ }
1469
+ },
1470
+ {
1471
+ "inner": {
1472
+ "$fill": 2
1473
+ }
1474
+ }
1475
+ ]
1476
+ },
1477
+ "sites": [
1478
+ {
1479
+ "holder": "list",
1480
+ "scope": "",
1481
+ "template": "row",
1482
+ "instance": "",
1483
+ "items": 3,
1484
+ "built": 2
1485
+ },
1486
+ {
1487
+ "holder": "row",
1488
+ "scope": "/outer/0",
1489
+ "template": "cell",
1490
+ "instance": ".0",
1491
+ "items": 9998,
1492
+ "built": 9998
1493
+ },
1494
+ {
1495
+ "holder": "row",
1496
+ "scope": "/outer/1",
1497
+ "template": "cell",
1498
+ "instance": ".1",
1499
+ "items": 2,
1500
+ "built": 0
1501
+ },
1502
+ {
1503
+ "holder": "row",
1504
+ "scope": "/outer/2",
1505
+ "template": "cell",
1506
+ "instance": ".2",
1507
+ "items": 2,
1508
+ "built": 0
1509
+ }
1510
+ ],
1511
+ "issues": [
1512
+ {
1513
+ "id": "cell",
1514
+ "message": "template: more than 10000 items; the rest is not rendered"
1515
+ }
1516
+ ]
1517
+ },
1518
+ {
1519
+ "name": "maxComponents: the build starts at the reduced tree's nodes and each item costs its template subtree",
1520
+ "input": {
1521
+ "id": "root",
1522
+ "component": "Stack",
1523
+ "children": [
1524
+ {
1525
+ "id": "rows",
1526
+ "component": "Stack",
1527
+ "template": {
1528
+ "component": "row",
1529
+ "path": "/rows"
1530
+ }
1531
+ },
1532
+ {
1533
+ "id": "more",
1534
+ "component": "Stack",
1535
+ "template": {
1536
+ "component": "extra",
1537
+ "path": "/more"
1538
+ }
1539
+ },
1540
+ {
1541
+ "id": "defs",
1542
+ "component": "Box",
1543
+ "visible": false,
1544
+ "children": [
1545
+ {
1546
+ "id": "row",
1547
+ "component": "Stack",
1548
+ "children": [
1549
+ {
1550
+ "id": "row-a",
1551
+ "component": "Text",
1552
+ "props": {
1553
+ "text": "a"
1554
+ }
1555
+ },
1556
+ {
1557
+ "id": "row-b",
1558
+ "component": "Text",
1559
+ "props": {
1560
+ "text": "b"
1561
+ }
1562
+ }
1563
+ ]
1564
+ },
1565
+ {
1566
+ "id": "extra",
1567
+ "component": "Text",
1568
+ "props": {
1569
+ "text": "e"
1570
+ }
1571
+ }
1572
+ ]
1573
+ }
1574
+ ]
1575
+ },
1576
+ "data": {
1577
+ "rows": {
1578
+ "$fill": 7000
1579
+ },
1580
+ "more": {
1581
+ "$fill": 1
1582
+ }
1583
+ },
1584
+ "sites": [
1585
+ {
1586
+ "holder": "rows",
1587
+ "scope": "",
1588
+ "template": "row",
1589
+ "instance": "",
1590
+ "items": 7000,
1591
+ "built": 6665
1592
+ },
1593
+ {
1594
+ "holder": "more",
1595
+ "scope": "",
1596
+ "template": "extra",
1597
+ "instance": "",
1598
+ "items": 1,
1599
+ "built": 0
1600
+ }
1601
+ ],
1602
+ "issues": [
1603
+ {
1604
+ "id": "row",
1605
+ "message": "surface: more than 20000 components; the rest is dropped"
1606
+ }
1607
+ ]
1608
+ },
1609
+ {
1610
+ "name": "under both limits every item is built, no issue",
1611
+ "input": {
1612
+ "id": "root",
1613
+ "component": "Stack",
1614
+ "children": [
1615
+ {
1616
+ "id": "rows",
1617
+ "component": "Stack",
1618
+ "template": {
1619
+ "component": "row",
1620
+ "path": "/rows"
1621
+ }
1622
+ },
1623
+ {
1624
+ "id": "defs",
1625
+ "component": "Box",
1626
+ "visible": false,
1627
+ "children": [
1628
+ {
1629
+ "id": "row",
1630
+ "component": "Text",
1631
+ "props": {
1632
+ "text": "r"
1633
+ }
1634
+ }
1635
+ ]
1636
+ }
1637
+ ]
1638
+ },
1639
+ "data": {
1640
+ "rows": {
1641
+ "$fill": 5
1642
+ }
1643
+ },
1644
+ "sites": [
1645
+ {
1646
+ "holder": "rows",
1647
+ "scope": "",
1648
+ "template": "row",
1649
+ "instance": "",
1650
+ "items": 5,
1651
+ "built": 5
1652
+ }
1653
+ ],
1654
+ "issues": []
1655
+ }
1656
+ ],
1657
+ "filter": [
1658
+ {
1659
+ "name": "query over fields, case-insensitive",
1660
+ "args": {
1661
+ "items": [
1662
+ {
1663
+ "id": "i1",
1664
+ "title": "Ship the release",
1665
+ "status": "open",
1666
+ "points": 3
1667
+ },
1668
+ {
1669
+ "id": "i2",
1670
+ "title": "Fix the shipping form",
1671
+ "status": "done",
1672
+ "points": 5
1673
+ },
1674
+ {
1675
+ "id": "i3",
1676
+ "title": "Write the changelog",
1677
+ "status": "open",
1678
+ "points": 1
1679
+ },
1680
+ {
1681
+ "id": "i4",
1682
+ "title": "Release notes",
1683
+ "status": "open",
1684
+ "points": 15
1685
+ }
1686
+ ],
1687
+ "query": "SHIP",
1688
+ "fields": [
1689
+ "title"
1690
+ ]
1691
+ },
1692
+ "expected": [
1693
+ {
1694
+ "id": "i1",
1695
+ "title": "Ship the release",
1696
+ "status": "open",
1697
+ "points": 3
1698
+ },
1699
+ {
1700
+ "id": "i2",
1701
+ "title": "Fix the shipping form",
1702
+ "status": "done",
1703
+ "points": 5
1704
+ }
1705
+ ]
1706
+ },
1707
+ {
1708
+ "name": "query over every text and number field when fields is absent",
1709
+ "args": {
1710
+ "items": [
1711
+ {
1712
+ "id": "i1",
1713
+ "title": "Ship the release",
1714
+ "status": "open",
1715
+ "points": 3
1716
+ },
1717
+ {
1718
+ "id": "i2",
1719
+ "title": "Fix the shipping form",
1720
+ "status": "done",
1721
+ "points": 5
1722
+ },
1723
+ {
1724
+ "id": "i3",
1725
+ "title": "Write the changelog",
1726
+ "status": "open",
1727
+ "points": 1
1728
+ },
1729
+ {
1730
+ "id": "i4",
1731
+ "title": "Release notes",
1732
+ "status": "open",
1733
+ "points": 15
1734
+ }
1735
+ ],
1736
+ "query": "5"
1737
+ },
1738
+ "expected": [
1739
+ {
1740
+ "id": "i2",
1741
+ "title": "Fix the shipping form",
1742
+ "status": "done",
1743
+ "points": 5
1744
+ },
1745
+ {
1746
+ "id": "i4",
1747
+ "title": "Release notes",
1748
+ "status": "open",
1749
+ "points": 15
1750
+ }
1751
+ ]
1752
+ },
1753
+ {
1754
+ "name": "where: every field must equal",
1755
+ "args": {
1756
+ "items": [
1757
+ {
1758
+ "id": "i1",
1759
+ "title": "Ship the release",
1760
+ "status": "open",
1761
+ "points": 3
1762
+ },
1763
+ {
1764
+ "id": "i2",
1765
+ "title": "Fix the shipping form",
1766
+ "status": "done",
1767
+ "points": 5
1768
+ },
1769
+ {
1770
+ "id": "i3",
1771
+ "title": "Write the changelog",
1772
+ "status": "open",
1773
+ "points": 1
1774
+ },
1775
+ {
1776
+ "id": "i4",
1777
+ "title": "Release notes",
1778
+ "status": "open",
1779
+ "points": 15
1780
+ }
1781
+ ],
1782
+ "where": {
1783
+ "status": "open"
1784
+ }
1785
+ },
1786
+ "expected": [
1787
+ {
1788
+ "id": "i1",
1789
+ "title": "Ship the release",
1790
+ "status": "open",
1791
+ "points": 3
1792
+ },
1793
+ {
1794
+ "id": "i3",
1795
+ "title": "Write the changelog",
1796
+ "status": "open",
1797
+ "points": 1
1798
+ },
1799
+ {
1800
+ "id": "i4",
1801
+ "title": "Release notes",
1802
+ "status": "open",
1803
+ "points": 15
1804
+ }
1805
+ ]
1806
+ },
1807
+ {
1808
+ "name": "where with a number spelled as a string (eq)",
1809
+ "args": {
1810
+ "items": [
1811
+ {
1812
+ "id": "i1",
1813
+ "title": "Ship the release",
1814
+ "status": "open",
1815
+ "points": 3
1816
+ },
1817
+ {
1818
+ "id": "i2",
1819
+ "title": "Fix the shipping form",
1820
+ "status": "done",
1821
+ "points": 5
1822
+ },
1823
+ {
1824
+ "id": "i3",
1825
+ "title": "Write the changelog",
1826
+ "status": "open",
1827
+ "points": 1
1828
+ },
1829
+ {
1830
+ "id": "i4",
1831
+ "title": "Release notes",
1832
+ "status": "open",
1833
+ "points": 15
1834
+ }
1835
+ ],
1836
+ "where": {
1837
+ "points": "3"
1838
+ }
1839
+ },
1840
+ "expected": [
1841
+ {
1842
+ "id": "i1",
1843
+ "title": "Ship the release",
1844
+ "status": "open",
1845
+ "points": 3
1846
+ }
1847
+ ]
1848
+ },
1849
+ {
1850
+ "name": "where and query together",
1851
+ "args": {
1852
+ "items": [
1853
+ {
1854
+ "id": "i1",
1855
+ "title": "Ship the release",
1856
+ "status": "open",
1857
+ "points": 3
1858
+ },
1859
+ {
1860
+ "id": "i2",
1861
+ "title": "Fix the shipping form",
1862
+ "status": "done",
1863
+ "points": 5
1864
+ },
1865
+ {
1866
+ "id": "i3",
1867
+ "title": "Write the changelog",
1868
+ "status": "open",
1869
+ "points": 1
1870
+ },
1871
+ {
1872
+ "id": "i4",
1873
+ "title": "Release notes",
1874
+ "status": "open",
1875
+ "points": 15
1876
+ }
1877
+ ],
1878
+ "query": "re",
1879
+ "fields": [
1880
+ "title"
1881
+ ],
1882
+ "where": {
1883
+ "status": "open"
1884
+ }
1885
+ },
1886
+ "expected": [
1887
+ {
1888
+ "id": "i1",
1889
+ "title": "Ship the release",
1890
+ "status": "open",
1891
+ "points": 3
1892
+ },
1893
+ {
1894
+ "id": "i4",
1895
+ "title": "Release notes",
1896
+ "status": "open",
1897
+ "points": 15
1898
+ }
1899
+ ]
1900
+ },
1901
+ {
1902
+ "name": "an empty where value and a blank query constrain nothing",
1903
+ "args": {
1904
+ "items": [
1905
+ {
1906
+ "id": "i1",
1907
+ "title": "Ship the release",
1908
+ "status": "open",
1909
+ "points": 3
1910
+ },
1911
+ {
1912
+ "id": "i2",
1913
+ "title": "Fix the shipping form",
1914
+ "status": "done",
1915
+ "points": 5
1916
+ },
1917
+ {
1918
+ "id": "i3",
1919
+ "title": "Write the changelog",
1920
+ "status": "open",
1921
+ "points": 1
1922
+ },
1923
+ {
1924
+ "id": "i4",
1925
+ "title": "Release notes",
1926
+ "status": "open",
1927
+ "points": 15
1928
+ }
1929
+ ],
1930
+ "query": " ",
1931
+ "where": {
1932
+ "status": ""
1933
+ }
1934
+ },
1935
+ "expected": [
1936
+ {
1937
+ "id": "i1",
1938
+ "title": "Ship the release",
1939
+ "status": "open",
1940
+ "points": 3
1941
+ },
1942
+ {
1943
+ "id": "i2",
1944
+ "title": "Fix the shipping form",
1945
+ "status": "done",
1946
+ "points": 5
1947
+ },
1948
+ {
1949
+ "id": "i3",
1950
+ "title": "Write the changelog",
1951
+ "status": "open",
1952
+ "points": 1
1953
+ },
1954
+ {
1955
+ "id": "i4",
1956
+ "title": "Release notes",
1957
+ "status": "open",
1958
+ "points": 15
1959
+ }
1960
+ ]
1961
+ },
1962
+ {
1963
+ "name": "a query is trimmed",
1964
+ "args": {
1965
+ "items": [
1966
+ {
1967
+ "id": "i1",
1968
+ "title": "Ship the release",
1969
+ "status": "open",
1970
+ "points": 3
1971
+ },
1972
+ {
1973
+ "id": "i2",
1974
+ "title": "Fix the shipping form",
1975
+ "status": "done",
1976
+ "points": 5
1977
+ },
1978
+ {
1979
+ "id": "i3",
1980
+ "title": "Write the changelog",
1981
+ "status": "open",
1982
+ "points": 1
1983
+ },
1984
+ {
1985
+ "id": "i4",
1986
+ "title": "Release notes",
1987
+ "status": "open",
1988
+ "points": 15
1989
+ }
1990
+ ],
1991
+ "query": " notes ",
1992
+ "fields": [
1993
+ "title"
1994
+ ]
1995
+ },
1996
+ "expected": [
1997
+ {
1998
+ "id": "i4",
1999
+ "title": "Release notes",
2000
+ "status": "open",
2001
+ "points": 15
2002
+ }
2003
+ ]
2004
+ },
2005
+ {
2006
+ "name": "a field missing on an item never matches where",
2007
+ "args": {
2008
+ "items": [
2009
+ {
2010
+ "id": "i1",
2011
+ "title": "Ship the release",
2012
+ "status": "open",
2013
+ "points": 3
2014
+ },
2015
+ {
2016
+ "id": "i2",
2017
+ "title": "Fix the shipping form",
2018
+ "status": "done",
2019
+ "points": 5
2020
+ },
2021
+ {
2022
+ "id": "i3",
2023
+ "title": "Write the changelog",
2024
+ "status": "open",
2025
+ "points": 1
2026
+ },
2027
+ {
2028
+ "id": "i4",
2029
+ "title": "Release notes",
2030
+ "status": "open",
2031
+ "points": 15
2032
+ }
2033
+ ],
2034
+ "where": {
2035
+ "owner": "ana"
2036
+ }
2037
+ },
2038
+ "expected": []
2039
+ },
2040
+ {
2041
+ "name": "string items match themselves",
2042
+ "args": {
2043
+ "items": [
2044
+ "Alpha",
2045
+ "beta",
2046
+ "Gamma",
2047
+ 42
2048
+ ],
2049
+ "query": "a"
2050
+ },
2051
+ "expected": [
2052
+ "Alpha",
2053
+ "beta",
2054
+ "Gamma"
2055
+ ]
2056
+ },
2057
+ {
2058
+ "name": "not an array: no items",
2059
+ "args": {
2060
+ "items": "abc",
2061
+ "query": "a"
2062
+ },
2063
+ "expected": []
2064
+ }
2065
+ ],
2066
+ "ownWrite": [
2067
+ {
2068
+ "name": "Input change: the bound context reads the text just typed",
2069
+ "input": {
2070
+ "id": "root",
2071
+ "component": "Box",
2072
+ "children": [
2073
+ {
2074
+ "id": "q",
2075
+ "component": "Input",
2076
+ "props": {
2077
+ "name": "q",
2078
+ "label": "Search",
2079
+ "value": {
2080
+ "path": "/query"
2081
+ }
2082
+ },
2083
+ "on": {
2084
+ "change": {
2085
+ "event": {
2086
+ "name": "search",
2087
+ "context": {
2088
+ "query": {
2089
+ "path": "/query"
2090
+ }
2091
+ }
2092
+ }
2093
+ }
2094
+ }
2095
+ }
2096
+ ]
2097
+ },
2098
+ "data": {
2099
+ "query": ""
2100
+ },
2101
+ "target": "q",
2102
+ "event": "change",
2103
+ "payload": {
2104
+ "value": "ship"
2105
+ },
2106
+ "own": {
2107
+ "value": "ship"
2108
+ },
2109
+ "sent": {
2110
+ "value": "ship"
2111
+ },
2112
+ "expected": {
2113
+ "data": {
2114
+ "query": "ship"
2115
+ },
2116
+ "action": {
2117
+ "name": "search",
2118
+ "context": {
2119
+ "query": "ship",
2120
+ "value": "ship"
2121
+ }
2122
+ }
2123
+ }
2124
+ },
2125
+ {
2126
+ "name": "Input change: a filter in the context sees the new query",
2127
+ "input": {
2128
+ "id": "root",
2129
+ "component": "Box",
2130
+ "children": [
2131
+ {
2132
+ "id": "q",
2133
+ "component": "Input",
2134
+ "props": {
2135
+ "name": "q",
2136
+ "label": "Search",
2137
+ "value": {
2138
+ "path": "/query"
2139
+ }
2140
+ },
2141
+ "on": {
2142
+ "change": {
2143
+ "event": {
2144
+ "name": "search",
2145
+ "context": {
2146
+ "hits": {
2147
+ "call": "len",
2148
+ "args": {
2149
+ "value": {
2150
+ "call": "filter",
2151
+ "args": {
2152
+ "items": {
2153
+ "path": "/issues"
2154
+ },
2155
+ "query": {
2156
+ "path": "/query"
2157
+ },
2158
+ "fields": [
2159
+ "title"
2160
+ ]
2161
+ }
2162
+ }
2163
+ }
2164
+ }
2165
+ }
2166
+ }
2167
+ }
2168
+ }
2169
+ }
2170
+ ]
2171
+ },
2172
+ "data": {
2173
+ "query": "",
2174
+ "issues": [
2175
+ {
2176
+ "id": "i1",
2177
+ "title": "Ship the release",
2178
+ "status": "open",
2179
+ "points": 3
2180
+ },
2181
+ {
2182
+ "id": "i2",
2183
+ "title": "Fix the shipping form",
2184
+ "status": "done",
2185
+ "points": 5
2186
+ },
2187
+ {
2188
+ "id": "i3",
2189
+ "title": "Write the changelog",
2190
+ "status": "open",
2191
+ "points": 1
2192
+ },
2193
+ {
2194
+ "id": "i4",
2195
+ "title": "Release notes",
2196
+ "status": "open",
2197
+ "points": 15
2198
+ }
2199
+ ]
2200
+ },
2201
+ "target": "q",
2202
+ "event": "change",
2203
+ "payload": {
2204
+ "value": "ship"
2205
+ },
2206
+ "own": {
2207
+ "value": "ship"
2208
+ },
2209
+ "sent": {
2210
+ "value": "ship"
2211
+ },
2212
+ "expected": {
2213
+ "data": {
2214
+ "query": "ship",
2215
+ "issues": [
2216
+ {
2217
+ "id": "i1",
2218
+ "title": "Ship the release",
2219
+ "status": "open",
2220
+ "points": 3
2221
+ },
2222
+ {
2223
+ "id": "i2",
2224
+ "title": "Fix the shipping form",
2225
+ "status": "done",
2226
+ "points": 5
2227
+ },
2228
+ {
2229
+ "id": "i3",
2230
+ "title": "Write the changelog",
2231
+ "status": "open",
2232
+ "points": 1
2233
+ },
2234
+ {
2235
+ "id": "i4",
2236
+ "title": "Release notes",
2237
+ "status": "open",
2238
+ "points": 15
2239
+ }
2240
+ ]
2241
+ },
2242
+ "action": {
2243
+ "name": "search",
2244
+ "context": {
2245
+ "hits": 2,
2246
+ "value": "ship"
2247
+ }
2248
+ }
2249
+ }
2250
+ },
2251
+ {
2252
+ "name": "Switch change: the bound context reads the new state",
2253
+ "input": {
2254
+ "id": "root",
2255
+ "component": "Box",
2256
+ "children": [
2257
+ {
2258
+ "id": "s",
2259
+ "component": "Switch",
2260
+ "props": {
2261
+ "name": "s",
2262
+ "label": "Notify",
2263
+ "checked": {
2264
+ "path": "/notify"
2265
+ }
2266
+ },
2267
+ "on": {
2268
+ "change": {
2269
+ "event": {
2270
+ "name": "toggled",
2271
+ "context": {
2272
+ "notify": {
2273
+ "path": "/notify"
2274
+ }
2275
+ }
2276
+ }
2277
+ }
2278
+ }
2279
+ }
2280
+ ]
2281
+ },
2282
+ "data": {
2283
+ "notify": false
2284
+ },
2285
+ "target": "s",
2286
+ "event": "change",
2287
+ "payload": {
2288
+ "checked": true
2289
+ },
2290
+ "own": {
2291
+ "checked": true
2292
+ },
2293
+ "sent": {
2294
+ "checked": true
2295
+ },
2296
+ "expected": {
2297
+ "data": {
2298
+ "notify": true
2299
+ },
2300
+ "action": {
2301
+ "name": "toggled",
2302
+ "context": {
2303
+ "notify": true,
2304
+ "checked": true
2305
+ }
2306
+ }
2307
+ }
2308
+ },
2309
+ {
2310
+ "name": "FileUpload upload: the own write is the MERGED list, the payload carries it plus the new batch (added)",
2311
+ "input": {
2312
+ "id": "root",
2313
+ "component": "Box",
2314
+ "children": [
2315
+ {
2316
+ "id": "u",
2317
+ "component": "FileUpload",
2318
+ "props": {
2319
+ "name": "att",
2320
+ "label": "Attachments",
2321
+ "multiple": true,
2322
+ "files": {
2323
+ "path": "/att"
2324
+ }
2325
+ },
2326
+ "on": {
2327
+ "upload": {
2328
+ "event": {
2329
+ "name": "uploaded",
2330
+ "context": {
2331
+ "count": {
2332
+ "call": "len",
2333
+ "args": {
2334
+ "value": {
2335
+ "path": "/att"
2336
+ }
2337
+ }
2338
+ }
2339
+ }
2340
+ }
2341
+ }
2342
+ }
2343
+ }
2344
+ ]
2345
+ },
2346
+ "data": {
2347
+ "att": [
2348
+ {
2349
+ "name": "a.pdf",
2350
+ "size": 1,
2351
+ "type": "application/pdf"
2352
+ },
2353
+ {
2354
+ "name": "b.pdf",
2355
+ "size": 2,
2356
+ "type": "application/pdf"
2357
+ }
2358
+ ]
2359
+ },
2360
+ "target": "u",
2361
+ "event": "upload",
2362
+ "payload": {
2363
+ "files": [
2364
+ {
2365
+ "name": "c.png",
2366
+ "size": 3,
2367
+ "type": "image/png"
2368
+ }
2369
+ ]
2370
+ },
2371
+ "own": {
2372
+ "files": [
2373
+ {
2374
+ "name": "a.pdf",
2375
+ "size": 1,
2376
+ "type": "application/pdf"
2377
+ },
2378
+ {
2379
+ "name": "b.pdf",
2380
+ "size": 2,
2381
+ "type": "application/pdf"
2382
+ },
2383
+ {
2384
+ "name": "c.png",
2385
+ "size": 3,
2386
+ "type": "image/png"
2387
+ }
2388
+ ]
2389
+ },
2390
+ "sent": {
2391
+ "files": [
2392
+ {
2393
+ "name": "a.pdf",
2394
+ "size": 1,
2395
+ "type": "application/pdf"
2396
+ },
2397
+ {
2398
+ "name": "b.pdf",
2399
+ "size": 2,
2400
+ "type": "application/pdf"
2401
+ },
2402
+ {
2403
+ "name": "c.png",
2404
+ "size": 3,
2405
+ "type": "image/png"
2406
+ }
2407
+ ],
2408
+ "added": [
2409
+ {
2410
+ "name": "c.png",
2411
+ "size": 3,
2412
+ "type": "image/png"
2413
+ }
2414
+ ]
2415
+ },
2416
+ "expected": {
2417
+ "data": {
2418
+ "att": [
2419
+ {
2420
+ "name": "a.pdf",
2421
+ "size": 1,
2422
+ "type": "application/pdf"
2423
+ },
2424
+ {
2425
+ "name": "b.pdf",
2426
+ "size": 2,
2427
+ "type": "application/pdf"
2428
+ },
2429
+ {
2430
+ "name": "c.png",
2431
+ "size": 3,
2432
+ "type": "image/png"
2433
+ }
2434
+ ]
2435
+ },
2436
+ "action": {
2437
+ "name": "uploaded",
2438
+ "context": {
2439
+ "count": 3,
2440
+ "files": [
2441
+ {
2442
+ "name": "a.pdf",
2443
+ "size": 1,
2444
+ "type": "application/pdf"
2445
+ },
2446
+ {
2447
+ "name": "b.pdf",
2448
+ "size": 2,
2449
+ "type": "application/pdf"
2450
+ },
2451
+ {
2452
+ "name": "c.png",
2453
+ "size": 3,
2454
+ "type": "image/png"
2455
+ }
2456
+ ],
2457
+ "added": [
2458
+ {
2459
+ "name": "c.png",
2460
+ "size": 3,
2461
+ "type": "image/png"
2462
+ }
2463
+ ]
2464
+ }
2465
+ }
2466
+ }
2467
+ }
2468
+ ],
2469
+ "closeOnSubmit": [
2470
+ {
2471
+ "name": "a Form in a Dialog: submit, then the Dialog closes (bound open written false, change fired)",
2472
+ "input": {
2473
+ "id": "root",
2474
+ "component": "Box",
2475
+ "children": [
2476
+ {
2477
+ "id": "dlg",
2478
+ "component": "Dialog",
2479
+ "props": {
2480
+ "title": "New issue",
2481
+ "open": {
2482
+ "path": "/open"
2483
+ }
2484
+ },
2485
+ "on": {
2486
+ "change": {
2487
+ "event": {
2488
+ "name": "dialogChanged"
2489
+ }
2490
+ }
2491
+ },
2492
+ "children": [
2493
+ {
2494
+ "id": "f",
2495
+ "component": "Form",
2496
+ "props": {
2497
+ "name": "f"
2498
+ },
2499
+ "on": {
2500
+ "submit": {
2501
+ "event": {
2502
+ "name": "create"
2503
+ }
2504
+ }
2505
+ },
2506
+ "children": [
2507
+ {
2508
+ "id": "f-title",
2509
+ "component": "Input",
2510
+ "props": {
2511
+ "name": "title",
2512
+ "label": "Title",
2513
+ "value": {
2514
+ "path": "/draft"
2515
+ }
2516
+ }
2517
+ },
2518
+ {
2519
+ "id": "f-go",
2520
+ "component": "Button",
2521
+ "props": {
2522
+ "label": "Create",
2523
+ "submit": true
2524
+ }
2525
+ }
2526
+ ]
2527
+ }
2528
+ ]
2529
+ }
2530
+ ]
2531
+ },
2532
+ "data": {
2533
+ "open": true,
2534
+ "draft": "Ship it"
2535
+ },
2536
+ "form": "f",
2537
+ "actions": [
2538
+ "create",
2539
+ "dialogChanged"
2540
+ ],
2541
+ "expected": {
2542
+ "overlay": "dlg",
2543
+ "data": {
2544
+ "open": false,
2545
+ "draft": "Ship it"
2546
+ }
2547
+ }
2548
+ },
2549
+ {
2550
+ "name": "a Form in a Drawer closes the Drawer",
2551
+ "input": {
2552
+ "id": "root",
2553
+ "component": "Box",
2554
+ "children": [
2555
+ {
2556
+ "id": "drw",
2557
+ "component": "Drawer",
2558
+ "props": {
2559
+ "title": "Filters",
2560
+ "open": {
2561
+ "path": "/panel"
2562
+ },
2563
+ "side": "right"
2564
+ },
2565
+ "children": [
2566
+ {
2567
+ "id": "f",
2568
+ "component": "Form",
2569
+ "props": {
2570
+ "name": "f"
2571
+ },
2572
+ "on": {
2573
+ "submit": {
2574
+ "event": {
2575
+ "name": "apply"
2576
+ }
2577
+ }
2578
+ },
2579
+ "children": [
2580
+ {
2581
+ "id": "f-title",
2582
+ "component": "Input",
2583
+ "props": {
2584
+ "name": "title",
2585
+ "label": "Title",
2586
+ "value": {
2587
+ "path": "/draft"
2588
+ }
2589
+ }
2590
+ },
2591
+ {
2592
+ "id": "f-go",
2593
+ "component": "Button",
2594
+ "props": {
2595
+ "label": "Create",
2596
+ "submit": true
2597
+ }
2598
+ }
2599
+ ]
2600
+ }
2601
+ ]
2602
+ }
2603
+ ]
2604
+ },
2605
+ "data": {
2606
+ "panel": true,
2607
+ "draft": "x"
2608
+ },
2609
+ "form": "f",
2610
+ "actions": [
2611
+ "apply"
2612
+ ],
2613
+ "expected": {
2614
+ "overlay": "drw",
2615
+ "data": {
2616
+ "panel": false,
2617
+ "draft": "x"
2618
+ }
2619
+ }
2620
+ },
2621
+ {
2622
+ "name": "a Form in a Popover closes nothing (the nearest overlay decides)",
2623
+ "input": {
2624
+ "id": "root",
2625
+ "component": "Box",
2626
+ "children": [
2627
+ {
2628
+ "id": "pop",
2629
+ "component": "Popover",
2630
+ "props": {
2631
+ "open": {
2632
+ "path": "/pop"
2633
+ }
2634
+ },
2635
+ "children": [
2636
+ {
2637
+ "id": "f",
2638
+ "component": "Form",
2639
+ "props": {
2640
+ "name": "f"
2641
+ },
2642
+ "on": {
2643
+ "submit": {
2644
+ "event": {
2645
+ "name": "apply"
2646
+ }
2647
+ }
2648
+ },
2649
+ "children": [
2650
+ {
2651
+ "id": "f-title",
2652
+ "component": "Input",
2653
+ "props": {
2654
+ "name": "title",
2655
+ "label": "Title",
2656
+ "value": {
2657
+ "path": "/draft"
2658
+ }
2659
+ }
2660
+ },
2661
+ {
2662
+ "id": "f-go",
2663
+ "component": "Button",
2664
+ "props": {
2665
+ "label": "Create",
2666
+ "submit": true
2667
+ }
2668
+ }
2669
+ ]
2670
+ }
2671
+ ]
2672
+ }
2673
+ ]
2674
+ },
2675
+ "data": {
2676
+ "pop": true,
2677
+ "draft": "x"
2678
+ },
2679
+ "form": "f",
2680
+ "actions": [
2681
+ "apply"
2682
+ ],
2683
+ "expected": {
2684
+ "overlay": null,
2685
+ "data": {
2686
+ "pop": true,
2687
+ "draft": "x"
2688
+ }
2689
+ }
2690
+ },
2691
+ {
2692
+ "name": "a Form in a Popover inside a Dialog closes neither",
2693
+ "input": {
2694
+ "id": "root",
2695
+ "component": "Box",
2696
+ "children": [
2697
+ {
2698
+ "id": "dlg",
2699
+ "component": "Dialog",
2700
+ "props": {
2701
+ "title": "Edit",
2702
+ "open": {
2703
+ "path": "/open"
2704
+ }
2705
+ },
2706
+ "children": [
2707
+ {
2708
+ "id": "pop",
2709
+ "component": "Popover",
2710
+ "props": {
2711
+ "open": {
2712
+ "path": "/pop"
2713
+ }
2714
+ },
2715
+ "slots": {
2716
+ "trigger": {
2717
+ "id": "pop-trigger",
2718
+ "component": "Button",
2719
+ "props": {
2720
+ "label": "Filters"
2721
+ }
2722
+ }
2723
+ },
2724
+ "children": [
2725
+ {
2726
+ "id": "f",
2727
+ "component": "Form",
2728
+ "props": {
2729
+ "name": "f"
2730
+ },
2731
+ "on": {
2732
+ "submit": {
2733
+ "event": {
2734
+ "name": "apply"
2735
+ }
2736
+ }
2737
+ },
2738
+ "children": [
2739
+ {
2740
+ "id": "f-title",
2741
+ "component": "Input",
2742
+ "props": {
2743
+ "name": "title",
2744
+ "label": "Title",
2745
+ "value": {
2746
+ "path": "/draft"
2747
+ }
2748
+ }
2749
+ },
2750
+ {
2751
+ "id": "f-go",
2752
+ "component": "Button",
2753
+ "props": {
2754
+ "label": "Create",
2755
+ "submit": true
2756
+ }
2757
+ }
2758
+ ]
2759
+ }
2760
+ ]
2761
+ }
2762
+ ]
2763
+ }
2764
+ ]
2765
+ },
2766
+ "data": {
2767
+ "open": true,
2768
+ "pop": true,
2769
+ "draft": "x"
2770
+ },
2771
+ "form": "f",
2772
+ "actions": [
2773
+ "apply"
2774
+ ],
2775
+ "expected": {
2776
+ "overlay": null,
2777
+ "data": {
2778
+ "open": true,
2779
+ "pop": true,
2780
+ "draft": "x"
2781
+ }
2782
+ }
2783
+ },
2784
+ {
2785
+ "name": "a Form in a non-dismissible Dialog never auto-closes it",
2786
+ "input": {
2787
+ "id": "root",
2788
+ "component": "Box",
2789
+ "children": [
2790
+ {
2791
+ "id": "dlg",
2792
+ "component": "Dialog",
2793
+ "props": {
2794
+ "title": "Required",
2795
+ "open": {
2796
+ "path": "/open"
2797
+ },
2798
+ "dismissible": false
2799
+ },
2800
+ "children": [
2801
+ {
2802
+ "id": "f",
2803
+ "component": "Form",
2804
+ "props": {
2805
+ "name": "f"
2806
+ },
2807
+ "on": {
2808
+ "submit": {
2809
+ "event": {
2810
+ "name": "create"
2811
+ }
2812
+ }
2813
+ },
2814
+ "children": [
2815
+ {
2816
+ "id": "f-title",
2817
+ "component": "Input",
2818
+ "props": {
2819
+ "name": "title",
2820
+ "label": "Title",
2821
+ "value": {
2822
+ "path": "/draft"
2823
+ }
2824
+ }
2825
+ },
2826
+ {
2827
+ "id": "f-go",
2828
+ "component": "Button",
2829
+ "props": {
2830
+ "label": "Create",
2831
+ "submit": true
2832
+ }
2833
+ }
2834
+ ]
2835
+ }
2836
+ ]
2837
+ }
2838
+ ]
2839
+ },
2840
+ "data": {
2841
+ "open": true,
2842
+ "draft": "x"
2843
+ },
2844
+ "form": "f",
2845
+ "actions": [
2846
+ "create"
2847
+ ],
2848
+ "expected": {
2849
+ "overlay": null,
2850
+ "data": {
2851
+ "open": true,
2852
+ "draft": "x"
2853
+ }
2854
+ }
2855
+ },
2856
+ {
2857
+ "name": "a Form in an AlertDialog never auto-closes it",
2858
+ "input": {
2859
+ "id": "root",
2860
+ "component": "Box",
2861
+ "children": [
2862
+ {
2863
+ "id": "alert",
2864
+ "component": "AlertDialog",
2865
+ "props": {
2866
+ "title": "Delete?",
2867
+ "open": {
2868
+ "path": "/open"
2869
+ }
2870
+ },
2871
+ "children": [
2872
+ {
2873
+ "id": "f",
2874
+ "component": "Form",
2875
+ "props": {
2876
+ "name": "f"
2877
+ },
2878
+ "on": {
2879
+ "submit": {
2880
+ "event": {
2881
+ "name": "confirmName"
2882
+ }
2883
+ }
2884
+ },
2885
+ "children": [
2886
+ {
2887
+ "id": "f-title",
2888
+ "component": "Input",
2889
+ "props": {
2890
+ "name": "title",
2891
+ "label": "Title",
2892
+ "value": {
2893
+ "path": "/draft"
2894
+ }
2895
+ }
2896
+ },
2897
+ {
2898
+ "id": "f-go",
2899
+ "component": "Button",
2900
+ "props": {
2901
+ "label": "Create",
2902
+ "submit": true
2903
+ }
2904
+ }
2905
+ ]
2906
+ }
2907
+ ]
2908
+ }
2909
+ ]
2910
+ },
2911
+ "data": {
2912
+ "open": true,
2913
+ "draft": "x"
2914
+ },
2915
+ "form": "f",
2916
+ "actions": [
2917
+ "confirmName"
2918
+ ],
2919
+ "expected": {
2920
+ "overlay": null,
2921
+ "data": {
2922
+ "open": true,
2923
+ "draft": "x"
2924
+ }
2925
+ }
2926
+ },
2927
+ {
2928
+ "name": "a Form outside any overlay closes nothing",
2929
+ "input": {
2930
+ "id": "root",
2931
+ "component": "Box",
2932
+ "children": [
2933
+ {
2934
+ "id": "f",
2935
+ "component": "Form",
2936
+ "props": {
2937
+ "name": "f"
2938
+ },
2939
+ "on": {
2940
+ "submit": {
2941
+ "event": {
2942
+ "name": "create"
2943
+ }
2944
+ }
2945
+ },
2946
+ "children": [
2947
+ {
2948
+ "id": "f-title",
2949
+ "component": "Input",
2950
+ "props": {
2951
+ "name": "title",
2952
+ "label": "Title",
2953
+ "value": {
2954
+ "path": "/draft"
2955
+ }
2956
+ }
2957
+ },
2958
+ {
2959
+ "id": "f-go",
2960
+ "component": "Button",
2961
+ "props": {
2962
+ "label": "Create",
2963
+ "submit": true
2964
+ }
2965
+ }
2966
+ ]
2967
+ }
2968
+ ]
2969
+ },
2970
+ "data": {
2971
+ "draft": "x"
2972
+ },
2973
+ "form": "f",
2974
+ "actions": [
2975
+ "create"
2976
+ ],
2977
+ "expected": {
2978
+ "overlay": null,
2979
+ "data": {
2980
+ "draft": "x"
2981
+ }
2982
+ }
2983
+ }
2984
+ ]
2985
+ }