@arkitektio/bsx 4.2.0 → 5.0.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 (307) hide show
  1. package/README.md +39 -18
  2. package/dist/bsx/parse.d.ts +13 -7
  3. package/dist/bsx/parse.d.ts.map +1 -1
  4. package/dist/bsx/parse.js +18 -57
  5. package/dist/bsx/parse.js.map +1 -1
  6. package/dist/bsx/print.d.ts.map +1 -1
  7. package/dist/bsx/print.js +22 -35
  8. package/dist/bsx/print.js.map +1 -1
  9. package/dist/bsx/references.d.ts +5 -5
  10. package/dist/bsx/references.d.ts.map +1 -1
  11. package/dist/bsx/references.js +124 -30
  12. package/dist/bsx/references.js.map +1 -1
  13. package/dist/catalogs/html.d.ts +1 -1
  14. package/dist/catalogs/html.d.ts.map +1 -1
  15. package/dist/catalogs/html.js +3 -3
  16. package/dist/catalogs/html.js.map +1 -1
  17. package/dist/catalogs/index.d.ts +209 -139
  18. package/dist/catalogs/index.d.ts.map +1 -1
  19. package/dist/catalogs/index.js +6 -2
  20. package/dist/catalogs/index.js.map +1 -1
  21. package/dist/catalogs/logo.d.ts +5 -5
  22. package/dist/catalogs/logo.d.ts.map +1 -1
  23. package/dist/catalogs/logo.js +3 -3
  24. package/dist/catalogs/logo.js.map +1 -1
  25. package/dist/catalogs/parts/data.d.ts +6 -6
  26. package/dist/catalogs/parts/feedback.d.ts +15 -15
  27. package/dist/catalogs/parts/forms.d.ts +55 -27
  28. package/dist/catalogs/parts/forms.d.ts.map +1 -1
  29. package/dist/catalogs/parts/forms.js +32 -0
  30. package/dist/catalogs/parts/forms.js.map +1 -1
  31. package/dist/catalogs/parts/html.d.ts +1 -1
  32. package/dist/catalogs/parts/html.d.ts.map +1 -1
  33. package/dist/catalogs/parts/html.js +1 -1
  34. package/dist/catalogs/parts/html.js.map +1 -1
  35. package/dist/catalogs/parts/icons.d.ts +11 -11
  36. package/dist/catalogs/parts/icons.js +1 -1
  37. package/dist/catalogs/parts/index.d.ts +183 -137
  38. package/dist/catalogs/parts/index.d.ts.map +1 -1
  39. package/dist/catalogs/parts/layout.d.ts +11 -1
  40. package/dist/catalogs/parts/layout.d.ts.map +1 -1
  41. package/dist/catalogs/parts/layout.js +9 -0
  42. package/dist/catalogs/parts/layout.js.map +1 -1
  43. package/dist/catalogs/parts/logo.d.ts +8 -8
  44. package/dist/catalogs/parts/logo.d.ts.map +1 -1
  45. package/dist/catalogs/parts/logo.js +2 -2
  46. package/dist/catalogs/parts/logo.js.map +1 -1
  47. package/dist/catalogs/parts/navigation.d.ts +20 -20
  48. package/dist/catalogs/parts/overlays.d.ts +55 -55
  49. package/dist/catalogs/parts/run.d.ts +13 -5
  50. package/dist/catalogs/parts/run.d.ts.map +1 -1
  51. package/dist/catalogs/parts/run.js +1 -1
  52. package/dist/catalogs/parts/scene.d.ts +12 -4
  53. package/dist/catalogs/parts/scene.d.ts.map +1 -1
  54. package/dist/catalogs/parts/scene.js +4 -0
  55. package/dist/catalogs/parts/scene.js.map +1 -1
  56. package/dist/catalogs/parts/structure.js +2 -2
  57. package/dist/catalogs/parts/toast.js +1 -1
  58. package/dist/catalogs/parts/toast.js.map +1 -1
  59. package/dist/catalogs/parts/typography.js +1 -1
  60. package/dist/catalogs/parts/typography.js.map +1 -1
  61. package/dist/catalogs/props.d.ts +3 -3
  62. package/dist/catalogs/scene.d.ts +13 -5
  63. package/dist/catalogs/scene.d.ts.map +1 -1
  64. package/dist/catalogs/scene.js +3 -3
  65. package/dist/catalogs/scene.js.map +1 -1
  66. package/dist/catalogs/shadcn.d.ts +106 -58
  67. package/dist/catalogs/shadcn.d.ts.map +1 -1
  68. package/dist/catalogs/shadcn.js +6 -4
  69. package/dist/catalogs/shadcn.js.map +1 -1
  70. package/dist/catalogs/structure.d.ts +1 -1
  71. package/dist/catalogs/structure.d.ts.map +1 -1
  72. package/dist/catalogs/structure.js +3 -3
  73. package/dist/catalogs/structure.js.map +1 -1
  74. package/dist/catalogs/ui.d.ts +83 -73
  75. package/dist/catalogs/ui.d.ts.map +1 -1
  76. package/dist/catalogs/ui.js +4 -3
  77. package/dist/catalogs/ui.js.map +1 -1
  78. package/dist/catalogs.d.ts +1 -1
  79. package/dist/catalogs.d.ts.map +1 -1
  80. package/dist/catalogs.js +2 -2
  81. package/dist/catalogs.js.map +1 -1
  82. package/dist/ports.js +1 -1
  83. package/dist/ports.js.map +1 -1
  84. package/dist/renderer/BlokRenderer.d.ts +4 -1
  85. package/dist/renderer/BlokRenderer.d.ts.map +1 -1
  86. package/dist/renderer/BlokRenderer.js +5 -1
  87. package/dist/renderer/BlokRenderer.js.map +1 -1
  88. package/dist/renderer/baseCatalog.d.ts +8 -6
  89. package/dist/renderer/baseCatalog.d.ts.map +1 -1
  90. package/dist/renderer/baseCatalog.js +7 -5
  91. package/dist/renderer/baseCatalog.js.map +1 -1
  92. package/dist/renderer/bloks/control.d.ts +14 -0
  93. package/dist/renderer/bloks/control.d.ts.map +1 -1
  94. package/dist/renderer/bloks/control.js +105 -6
  95. package/dist/renderer/bloks/control.js.map +1 -1
  96. package/dist/renderer/bloks/data.d.ts +6 -6
  97. package/dist/renderer/bloks/feedback.d.ts +15 -15
  98. package/dist/renderer/bloks/forms.d.ts +51 -27
  99. package/dist/renderer/bloks/forms.d.ts.map +1 -1
  100. package/dist/renderer/bloks/forms.js +56 -0
  101. package/dist/renderer/bloks/forms.js.map +1 -1
  102. package/dist/renderer/bloks/html.js +2 -2
  103. package/dist/renderer/bloks/icons.d.ts +5 -5
  104. package/dist/renderer/bloks/index.d.ts +166 -134
  105. package/dist/renderer/bloks/index.d.ts.map +1 -1
  106. package/dist/renderer/bloks/index.js +1 -1
  107. package/dist/renderer/bloks/layout.d.ts +9 -1
  108. package/dist/renderer/bloks/layout.d.ts.map +1 -1
  109. package/dist/renderer/bloks/layout.js +15 -0
  110. package/dist/renderer/bloks/layout.js.map +1 -1
  111. package/dist/renderer/bloks/logo/index.d.ts +5 -5
  112. package/dist/renderer/bloks/logo/index.d.ts.map +1 -1
  113. package/dist/renderer/bloks/logo/index.js +2 -2
  114. package/dist/renderer/bloks/logo/index.js.map +1 -1
  115. package/dist/renderer/bloks/navigation.d.ts +20 -20
  116. package/dist/renderer/bloks/overlays.d.ts +55 -55
  117. package/dist/renderer/bloks/run/components.d.ts +6 -2
  118. package/dist/renderer/bloks/run/components.d.ts.map +1 -1
  119. package/dist/renderer/bloks/run/components.js +1 -1
  120. package/dist/renderer/bloks/run/host.d.ts +32 -3
  121. package/dist/renderer/bloks/run/host.d.ts.map +1 -1
  122. package/dist/renderer/bloks/run/host.js.map +1 -1
  123. package/dist/renderer/bloks/scene/index.d.ts +6 -2
  124. package/dist/renderer/bloks/scene/index.d.ts.map +1 -1
  125. package/dist/renderer/bloks/toast.d.ts +1 -1
  126. package/dist/renderer/bloks/typography.js +1 -1
  127. package/dist/renderer/catalog.d.ts +4 -7
  128. package/dist/renderer/catalog.d.ts.map +1 -1
  129. package/dist/renderer/catalog.js +7 -31
  130. package/dist/renderer/catalog.js.map +1 -1
  131. package/dist/renderer/declare.d.ts +31 -19
  132. package/dist/renderer/declare.d.ts.map +1 -1
  133. package/dist/renderer/declare.js +44 -18
  134. package/dist/renderer/declare.js.map +1 -1
  135. package/dist/renderer/functions/v2/index.d.ts.map +1 -1
  136. package/dist/renderer/functions/v2/index.js +39 -0
  137. package/dist/renderer/functions/v2/index.js.map +1 -1
  138. package/dist/renderer/runtime/catalog.d.ts +27 -7
  139. package/dist/renderer/runtime/catalog.d.ts.map +1 -1
  140. package/dist/renderer/runtime/catalog.js +30 -3
  141. package/dist/renderer/runtime/catalog.js.map +1 -1
  142. package/dist/renderer/runtime/components.d.ts +7 -1
  143. package/dist/renderer/runtime/components.d.ts.map +1 -1
  144. package/dist/renderer/runtime/components.js +3 -0
  145. package/dist/renderer/runtime/components.js.map +1 -1
  146. package/dist/renderer/runtime/context.d.ts +2 -0
  147. package/dist/renderer/runtime/context.d.ts.map +1 -1
  148. package/dist/renderer/runtime/context.js +4 -0
  149. package/dist/renderer/runtime/context.js.map +1 -1
  150. package/dist/renderer/runtime/describe.d.ts +14 -4
  151. package/dist/renderer/runtime/describe.d.ts.map +1 -1
  152. package/dist/renderer/runtime/describe.js +3 -0
  153. package/dist/renderer/runtime/describe.js.map +1 -1
  154. package/dist/renderer/runtime/hooks.d.ts.map +1 -1
  155. package/dist/renderer/runtime/hooks.js +1 -0
  156. package/dist/renderer/runtime/hooks.js.map +1 -1
  157. package/dist/renderer/runtime/index.d.ts +1 -0
  158. package/dist/renderer/runtime/index.d.ts.map +1 -1
  159. package/dist/renderer/runtime/index.js +1 -0
  160. package/dist/renderer/runtime/index.js.map +1 -1
  161. package/dist/renderer/runtime/preflight.d.ts.map +1 -1
  162. package/dist/renderer/runtime/preflight.js +5 -2
  163. package/dist/renderer/runtime/preflight.js.map +1 -1
  164. package/dist/renderer/runtime/resolution.d.ts +2 -0
  165. package/dist/renderer/runtime/resolution.d.ts.map +1 -1
  166. package/dist/renderer/runtime/resolution.js +17 -1
  167. package/dist/renderer/runtime/resolution.js.map +1 -1
  168. package/dist/renderer/runtime/schemas.d.ts +5 -5
  169. package/dist/renderer/runtime/task.d.ts +25 -2
  170. package/dist/renderer/runtime/task.d.ts.map +1 -1
  171. package/dist/renderer/runtime/task.js +11 -2
  172. package/dist/renderer/runtime/task.js.map +1 -1
  173. package/dist/renderer/runtime/text.d.ts +28 -0
  174. package/dist/renderer/runtime/text.d.ts.map +1 -0
  175. package/dist/renderer/runtime/text.js +82 -0
  176. package/dist/renderer/runtime/text.js.map +1 -0
  177. package/dist/renderer/runtime/types.d.ts +7 -2
  178. package/dist/renderer/runtime/types.d.ts.map +1 -1
  179. package/dist/runtime.d.ts +0 -1
  180. package/dist/runtime.d.ts.map +1 -1
  181. package/dist/runtime.js +0 -1
  182. package/dist/runtime.js.map +1 -1
  183. package/dist/scene.d.ts +1 -1
  184. package/dist/scene.d.ts.map +1 -1
  185. package/dist/scene.js +2 -2
  186. package/dist/scene.js.map +1 -1
  187. package/dist/shadcn.d.ts +169 -137
  188. package/dist/shadcn.d.ts.map +1 -1
  189. package/dist/shadcn.js +8 -5
  190. package/dist/shadcn.js.map +1 -1
  191. package/dist/spec/bsx_v2.json +3080 -2372
  192. package/dist/spec/catalogs/base@3.json +13029 -0
  193. package/dist/spec/catalogs/base@3.json.js +13029 -0
  194. package/dist/spec/catalogs/orkestrator@1.json +489 -0
  195. package/dist/spec/catalogs/orkestrator@1.json.js +489 -0
  196. package/dist/spec/catalogs.d.ts +109 -46
  197. package/dist/spec/catalogs.d.ts.map +1 -1
  198. package/dist/spec/catalogs.js +241 -73
  199. package/dist/spec/catalogs.js.map +1 -1
  200. package/dist/spec/vocabulary.d.ts +21 -3
  201. package/dist/spec/vocabulary.d.ts.map +1 -1
  202. package/dist/spec/vocabulary.js +16 -2
  203. package/dist/spec/vocabulary.js.map +1 -1
  204. package/dist/spec/vocabulary.json +73 -27
  205. package/dist/spec/vocabulary.json.js +73 -27
  206. package/dist/vendor/core/ui/button-group.d.ts +1 -1
  207. package/dist/vendor/core/ui/button.d.ts +1 -1
  208. package/dist/vendor/core/ui/field.d.ts +1 -1
  209. package/package.json +1 -1
  210. package/src/bsx/infer.test.ts +18 -26
  211. package/src/bsx/language.test.ts +2 -2
  212. package/src/bsx/parse.ts +18 -62
  213. package/src/bsx/partial.test.ts +1 -1
  214. package/src/bsx/print.ts +24 -34
  215. package/src/bsx/references.test.ts +71 -10
  216. package/src/bsx/references.ts +114 -35
  217. package/src/catalogs/catalogs.test.ts +45 -14
  218. package/src/catalogs/html.ts +3 -3
  219. package/src/catalogs/index.ts +6 -2
  220. package/src/catalogs/logo.ts +3 -3
  221. package/src/catalogs/parts/forms.ts +32 -0
  222. package/src/catalogs/parts/html.ts +1 -1
  223. package/src/catalogs/parts/icons.ts +1 -1
  224. package/src/catalogs/parts/layout.ts +11 -0
  225. package/src/catalogs/parts/logo.ts +2 -2
  226. package/src/catalogs/parts/run.ts +1 -1
  227. package/src/catalogs/parts/scene.ts +6 -0
  228. package/src/catalogs/parts/structure.ts +2 -2
  229. package/src/catalogs/parts/toast.ts +1 -1
  230. package/src/catalogs/parts/typography.ts +1 -1
  231. package/src/catalogs/scene.ts +3 -3
  232. package/src/catalogs/shadcn.ts +6 -4
  233. package/src/catalogs/structure.ts +3 -3
  234. package/src/catalogs/ui.ts +4 -3
  235. package/src/catalogs.ts +9 -2
  236. package/src/ports.ts +1 -1
  237. package/src/renderer/BlokRenderer.tsx +9 -0
  238. package/src/renderer/addBlokComponents.test.tsx +8 -22
  239. package/src/renderer/baseCatalog.ts +7 -5
  240. package/src/renderer/bloks/components.test.tsx +2 -2
  241. package/src/renderer/bloks/control.tsx +133 -6
  242. package/src/renderer/bloks/flow.test.tsx +1 -1
  243. package/src/renderer/bloks/forms.tsx +126 -0
  244. package/src/renderer/bloks/html.tsx +2 -2
  245. package/src/renderer/bloks/index.ts +1 -1
  246. package/src/renderer/bloks/layout.tsx +28 -0
  247. package/src/renderer/bloks/logo/index.tsx +2 -2
  248. package/src/renderer/bloks/run/components.tsx +1 -1
  249. package/src/renderer/bloks/run/host.tsx +33 -3
  250. package/src/renderer/bloks/run/space.test.tsx +76 -0
  251. package/src/renderer/bloks/time.test.tsx +1 -1
  252. package/src/renderer/bloks/toast.tsx +1 -1
  253. package/src/renderer/bloks/typography.tsx +1 -1
  254. package/src/renderer/catalog.tsx +7 -31
  255. package/src/renderer/declare.test.ts +41 -0
  256. package/src/renderer/declare.ts +70 -32
  257. package/src/renderer/functions/v2/functions.test.ts +40 -1
  258. package/src/renderer/functions/v2/index.ts +47 -0
  259. package/src/renderer/runtime/catalog.ts +35 -10
  260. package/src/renderer/runtime/components.tsx +10 -1
  261. package/src/renderer/runtime/context.tsx +6 -0
  262. package/src/renderer/runtime/describe.ts +17 -4
  263. package/src/renderer/runtime/hooks.ts +1 -0
  264. package/src/renderer/runtime/index.ts +1 -0
  265. package/src/renderer/runtime/preflight.ts +5 -2
  266. package/src/renderer/runtime/resolution.test.ts +14 -0
  267. package/src/renderer/runtime/resolution.ts +15 -1
  268. package/src/renderer/runtime/task.ts +33 -4
  269. package/src/renderer/runtime/text.test.tsx +65 -0
  270. package/src/renderer/runtime/text.ts +88 -0
  271. package/src/renderer/runtime/types.ts +7 -2
  272. package/src/runtime.ts +0 -1
  273. package/src/scene.ts +2 -2
  274. package/src/shadcn.ts +8 -5
  275. package/src/spec/bsx_v2.json +3080 -2372
  276. package/src/spec/catalogs/base@3.json +13029 -0
  277. package/src/spec/catalogs/orkestrator@1.json +489 -0
  278. package/src/spec/catalogs.ts +257 -101
  279. package/src/spec/spec.test.ts +107 -21
  280. package/src/spec/vocabulary.json +73 -27
  281. package/src/spec/vocabulary.ts +36 -7
  282. package/dist/renderer/modules.d.ts +0 -4
  283. package/dist/renderer/modules.d.ts.map +0 -1
  284. package/dist/renderer/modules.js +0 -11
  285. package/dist/renderer/modules.js.map +0 -1
  286. package/dist/spec/catalogs/base@2.json +0 -222
  287. package/dist/spec/catalogs/base@2.json.js +0 -222
  288. package/dist/spec/catalogs/html@1.json +0 -308
  289. package/dist/spec/catalogs/html@1.json.js +0 -308
  290. package/dist/spec/catalogs/logo@1.json +0 -1687
  291. package/dist/spec/catalogs/logo@1.json.js +0 -1687
  292. package/dist/spec/catalogs/scene@1.json +0 -858
  293. package/dist/spec/catalogs/scene@1.json.js +0 -858
  294. package/dist/spec/catalogs/shadcn@1.json +0 -3860
  295. package/dist/spec/catalogs/shadcn@1.json.js +0 -3860
  296. package/dist/spec/catalogs/structure@1.json +0 -185
  297. package/dist/spec/catalogs/structure@1.json.js +0 -185
  298. package/dist/spec/catalogs/ui@1.json +0 -5349
  299. package/dist/spec/catalogs/ui@1.json.js +0 -5349
  300. package/src/renderer/modules.ts +0 -12
  301. package/src/spec/catalogs/base@2.json +0 -222
  302. package/src/spec/catalogs/html@1.json +0 -308
  303. package/src/spec/catalogs/logo@1.json +0 -1687
  304. package/src/spec/catalogs/scene@1.json +0 -858
  305. package/src/spec/catalogs/shadcn@1.json +0 -3860
  306. package/src/spec/catalogs/structure@1.json +0 -185
  307. package/src/spec/catalogs/ui@1.json +0 -5349
@@ -1,185 +0,0 @@
1
- {
2
- "name": "structure",
3
- "version": 1,
4
- "description": "Pick, show and view structures, typed by `\"@package/key\"`.",
5
- "components": [
6
- {
7
- "name": "StructureDisplay",
8
- "description": "Shows a structure through the display of the module that owns it.",
9
- "context": "HTML",
10
- "children_context": null,
11
- "inherits_context": false,
12
- "accepts_children": false,
13
- "downstream_of": [],
14
- "not_downstream_of": [],
15
- "text_prop": null,
16
- "props": [
17
- {
18
- "key": "className",
19
- "kind": "STRING",
20
- "required": false,
21
- "description": "Extra Tailwind classes appended to the element."
22
- },
23
- {
24
- "key": "emptyText",
25
- "kind": "ANY",
26
- "required": false,
27
- "description": "Shown while there is no structure."
28
- },
29
- {
30
- "key": "link",
31
- "kind": "BOOL",
32
- "required": false,
33
- "description": "Link to the structure's own page."
34
- },
35
- {
36
- "key": "value",
37
- "kind": "DICT",
38
- "required": false,
39
- "description": "The structure to show."
40
- },
41
- {
42
- "key": "variant",
43
- "kind": "STRING",
44
- "required": false,
45
- "description": "How much of it to show. Defaults to \"card\".",
46
- "values": [
47
- "inline",
48
- "avatar",
49
- "chip",
50
- "card"
51
- ]
52
- }
53
- ]
54
- },
55
- {
56
- "name": "StructurePicker",
57
- "description": "A search-backed picker for one structure of a given identifier. Writes {\"object\", \"__identifier\"}, or null when cleared. The candidates come from its `query`, or from the module that owns the structure when it has none.",
58
- "context": "HTML",
59
- "children_context": null,
60
- "inherits_context": false,
61
- "accepts_children": false,
62
- "downstream_of": [],
63
- "not_downstream_of": [],
64
- "text_prop": null,
65
- "props": [
66
- {
67
- "key": "bind",
68
- "kind": "ANY",
69
- "required": false,
70
- "description": "The local (or a path below one) this control reads and writes: bind={name}."
71
- },
72
- {
73
- "key": "className",
74
- "kind": "STRING",
75
- "required": false,
76
- "description": "Extra Tailwind classes appended to the element."
77
- },
78
- {
79
- "key": "disabled",
80
- "kind": "BOOL",
81
- "required": false,
82
- "description": "Disables the control."
83
- },
84
- {
85
- "key": "identifier",
86
- "kind": "STRING",
87
- "required": false,
88
- "description": "The kind of structure to pick, e.g. \"@mikro/arraydataset\". As the widget of an action input it defaults to the structure the input is typed on."
89
- },
90
- {
91
- "key": "onChange",
92
- "kind": "CALLBACK",
93
- "required": false,
94
- "description": "Runs on selection. event.value is the structure reference, or null when cleared.",
95
- "event": [
96
- {
97
- "key": "value",
98
- "kind": "DICT",
99
- "description": "The structure reference picked, or null when cleared."
100
- }
101
- ]
102
- },
103
- {
104
- "key": "placeholder",
105
- "kind": "ANY",
106
- "required": false,
107
- "description": "Shown while nothing is selected."
108
- },
109
- {
110
- "key": "query",
111
- "kind": "STRING",
112
- "required": false,
113
- "description": "The GraphQL query that lists the candidates, run on the `ward` service: one `query` operation, never a mutation. It selects a list aliased `options` with `value` (the id), `label` and optionally `description`, and may declare: $search: String (what the user typed), $values: [ID!] (ids to resolve), $limit: Int and $offset: Int (a page), $requires (the constraints of the action input being filled). Any other variable is read from `variables`, else from the data path of the same name; a structure held there is passed as its id. A nullable one narrows the list while it has a value and the user may lift it; the picker waits for one declared non-null. Without a query the module that owns the structure answers."
114
- },
115
- {
116
- "key": "value",
117
- "kind": "DICT",
118
- "required": false,
119
- "description": "Controlled value, a structure reference."
120
- },
121
- {
122
- "key": "variables",
123
- "kind": "DICT",
124
- "required": false,
125
- "description": "Values for the variables `query` declares beyond the ones the picker supplies."
126
- },
127
- {
128
- "key": "ward",
129
- "kind": "STRING",
130
- "required": false,
131
- "description": "The service that runs `query`, by its key, e.g. \"mikro\"."
132
- }
133
- ]
134
- },
135
- {
136
- "name": "StructureViewer",
137
- "description": "An interactive viewer for a structure (a mikro image or scene), provided by the module that owns it.",
138
- "context": "HTML",
139
- "children_context": null,
140
- "inherits_context": false,
141
- "accepts_children": false,
142
- "downstream_of": [],
143
- "not_downstream_of": [],
144
- "text_prop": null,
145
- "props": [
146
- {
147
- "key": "className",
148
- "kind": "STRING",
149
- "required": false,
150
- "description": "Extra Tailwind classes appended to the element."
151
- },
152
- {
153
- "key": "controls",
154
- "kind": "BOOL",
155
- "required": false,
156
- "description": "Show the viewer's own controls. Defaults to true."
157
- },
158
- {
159
- "key": "emptyText",
160
- "kind": "ANY",
161
- "required": false,
162
- "description": "Shown while there is no structure."
163
- },
164
- {
165
- "key": "height",
166
- "kind": "STRING",
167
- "required": false,
168
- "description": "CSS height of the viewer. Defaults to \"24rem\"."
169
- },
170
- {
171
- "key": "minHeight",
172
- "kind": "STRING",
173
- "required": false,
174
- "description": "CSS minimum height of the viewer."
175
- },
176
- {
177
- "key": "value",
178
- "kind": "DICT",
179
- "required": false,
180
- "description": "The structure to open."
181
- }
182
- ]
183
- }
184
- ]
185
- }
@@ -1,185 +0,0 @@
1
- export default {
2
- "name": "structure",
3
- "version": 1,
4
- "description": "Pick, show and view structures, typed by `\"@package/key\"`.",
5
- "components": [
6
- {
7
- "name": "StructureDisplay",
8
- "description": "Shows a structure through the display of the module that owns it.",
9
- "context": "HTML",
10
- "children_context": null,
11
- "inherits_context": false,
12
- "accepts_children": false,
13
- "downstream_of": [],
14
- "not_downstream_of": [],
15
- "text_prop": null,
16
- "props": [
17
- {
18
- "key": "className",
19
- "kind": "STRING",
20
- "required": false,
21
- "description": "Extra Tailwind classes appended to the element."
22
- },
23
- {
24
- "key": "emptyText",
25
- "kind": "ANY",
26
- "required": false,
27
- "description": "Shown while there is no structure."
28
- },
29
- {
30
- "key": "link",
31
- "kind": "BOOL",
32
- "required": false,
33
- "description": "Link to the structure's own page."
34
- },
35
- {
36
- "key": "value",
37
- "kind": "DICT",
38
- "required": false,
39
- "description": "The structure to show."
40
- },
41
- {
42
- "key": "variant",
43
- "kind": "STRING",
44
- "required": false,
45
- "description": "How much of it to show. Defaults to \"card\".",
46
- "values": [
47
- "inline",
48
- "avatar",
49
- "chip",
50
- "card"
51
- ]
52
- }
53
- ]
54
- },
55
- {
56
- "name": "StructurePicker",
57
- "description": "A search-backed picker for one structure of a given identifier. Writes {\"object\", \"__identifier\"}, or null when cleared. The candidates come from its `query`, or from the module that owns the structure when it has none.",
58
- "context": "HTML",
59
- "children_context": null,
60
- "inherits_context": false,
61
- "accepts_children": false,
62
- "downstream_of": [],
63
- "not_downstream_of": [],
64
- "text_prop": null,
65
- "props": [
66
- {
67
- "key": "bind",
68
- "kind": "ANY",
69
- "required": false,
70
- "description": "The local (or a path below one) this control reads and writes: bind={name}."
71
- },
72
- {
73
- "key": "className",
74
- "kind": "STRING",
75
- "required": false,
76
- "description": "Extra Tailwind classes appended to the element."
77
- },
78
- {
79
- "key": "disabled",
80
- "kind": "BOOL",
81
- "required": false,
82
- "description": "Disables the control."
83
- },
84
- {
85
- "key": "identifier",
86
- "kind": "STRING",
87
- "required": false,
88
- "description": "The kind of structure to pick, e.g. \"@mikro/arraydataset\". As the widget of an action input it defaults to the structure the input is typed on."
89
- },
90
- {
91
- "key": "onChange",
92
- "kind": "CALLBACK",
93
- "required": false,
94
- "description": "Runs on selection. event.value is the structure reference, or null when cleared.",
95
- "event": [
96
- {
97
- "key": "value",
98
- "kind": "DICT",
99
- "description": "The structure reference picked, or null when cleared."
100
- }
101
- ]
102
- },
103
- {
104
- "key": "placeholder",
105
- "kind": "ANY",
106
- "required": false,
107
- "description": "Shown while nothing is selected."
108
- },
109
- {
110
- "key": "query",
111
- "kind": "STRING",
112
- "required": false,
113
- "description": "The GraphQL query that lists the candidates, run on the `ward` service: one `query` operation, never a mutation. It selects a list aliased `options` with `value` (the id), `label` and optionally `description`, and may declare: $search: String (what the user typed), $values: [ID!] (ids to resolve), $limit: Int and $offset: Int (a page), $requires (the constraints of the action input being filled). Any other variable is read from `variables`, else from the data path of the same name; a structure held there is passed as its id. A nullable one narrows the list while it has a value and the user may lift it; the picker waits for one declared non-null. Without a query the module that owns the structure answers."
114
- },
115
- {
116
- "key": "value",
117
- "kind": "DICT",
118
- "required": false,
119
- "description": "Controlled value, a structure reference."
120
- },
121
- {
122
- "key": "variables",
123
- "kind": "DICT",
124
- "required": false,
125
- "description": "Values for the variables `query` declares beyond the ones the picker supplies."
126
- },
127
- {
128
- "key": "ward",
129
- "kind": "STRING",
130
- "required": false,
131
- "description": "The service that runs `query`, by its key, e.g. \"mikro\"."
132
- }
133
- ]
134
- },
135
- {
136
- "name": "StructureViewer",
137
- "description": "An interactive viewer for a structure (a mikro image or scene), provided by the module that owns it.",
138
- "context": "HTML",
139
- "children_context": null,
140
- "inherits_context": false,
141
- "accepts_children": false,
142
- "downstream_of": [],
143
- "not_downstream_of": [],
144
- "text_prop": null,
145
- "props": [
146
- {
147
- "key": "className",
148
- "kind": "STRING",
149
- "required": false,
150
- "description": "Extra Tailwind classes appended to the element."
151
- },
152
- {
153
- "key": "controls",
154
- "kind": "BOOL",
155
- "required": false,
156
- "description": "Show the viewer's own controls. Defaults to true."
157
- },
158
- {
159
- "key": "emptyText",
160
- "kind": "ANY",
161
- "required": false,
162
- "description": "Shown while there is no structure."
163
- },
164
- {
165
- "key": "height",
166
- "kind": "STRING",
167
- "required": false,
168
- "description": "CSS height of the viewer. Defaults to \"24rem\"."
169
- },
170
- {
171
- "key": "minHeight",
172
- "kind": "STRING",
173
- "required": false,
174
- "description": "CSS minimum height of the viewer."
175
- },
176
- {
177
- "key": "value",
178
- "kind": "DICT",
179
- "required": false,
180
- "description": "The structure to open."
181
- }
182
- ]
183
- }
184
- ]
185
- };