@dxos/react-ui-form 0.8.4-staging.60fe92afc8 → 0.9.1-main.c7dcc2e112

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 (282) hide show
  1. package/dist/lib/browser/index.mjs +2221 -2147
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +2221 -2147
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +3 -3
  8. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
  9. package/dist/types/src/components/Form/Form.d.ts +15 -110
  10. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  11. package/dist/types/src/components/Form/Form.stories.d.ts +3 -37
  12. package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
  13. package/dist/types/src/components/Form/FormControls.d.ts +66 -0
  14. package/dist/types/src/components/Form/FormControls.d.ts.map +1 -0
  15. package/dist/types/src/components/Form/FormField/FieldHeader.d.ts +19 -0
  16. package/dist/types/src/components/Form/FormField/FieldHeader.d.ts.map +1 -0
  17. package/dist/types/src/components/Form/FormField/FormField.d.ts +30 -0
  18. package/dist/types/src/components/Form/FormField/FormField.d.ts.map +1 -0
  19. package/dist/types/src/components/Form/FormField/FormFieldWrapper.d.ts +47 -0
  20. package/dist/types/src/components/Form/FormField/FormFieldWrapper.d.ts.map +1 -0
  21. package/dist/types/src/components/Form/{FormFieldComponent.stories.d.ts → FormField/FormFieldWrapper.stories.d.ts} +3 -3
  22. package/dist/types/src/components/Form/FormField/FormFieldWrapper.stories.d.ts.map +1 -0
  23. package/dist/types/src/components/Form/{fields → FormField/fields/ArrayField}/ArrayField.d.ts +2 -2
  24. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.d.ts.map +1 -0
  25. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts +87 -0
  26. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts.map +1 -0
  27. package/dist/types/src/components/Form/FormField/fields/ArrayField/index.d.ts +2 -0
  28. package/dist/types/src/components/Form/FormField/fields/ArrayField/index.d.ts.map +1 -0
  29. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.d.ts +4 -0
  30. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.d.ts.map +1 -0
  31. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.d.ts +88 -0
  32. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.d.ts.map +1 -0
  33. package/dist/types/src/components/Form/FormField/fields/BooleanField/index.d.ts +2 -0
  34. package/dist/types/src/components/Form/FormField/fields/BooleanField/index.d.ts.map +1 -0
  35. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.d.ts +4 -0
  36. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.d.ts.map +1 -0
  37. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.stories.d.ts +88 -0
  38. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.stories.d.ts.map +1 -0
  39. package/dist/types/src/components/Form/FormField/fields/DateField/index.d.ts +2 -0
  40. package/dist/types/src/components/Form/FormField/fields/DateField/index.d.ts.map +1 -0
  41. package/dist/types/src/components/Form/{fields → FormField/fields/GeoPointField}/GeoPointField.d.ts +2 -2
  42. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.d.ts.map +1 -0
  43. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.d.ts +88 -0
  44. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.d.ts.map +1 -0
  45. package/dist/types/src/components/Form/FormField/fields/GeoPointField/index.d.ts +2 -0
  46. package/dist/types/src/components/Form/FormField/fields/GeoPointField/index.d.ts.map +1 -0
  47. package/dist/types/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.d.ts +2 -2
  48. package/dist/types/src/components/Form/FormField/fields/MarkdownField/MarkdownField.d.ts.map +1 -0
  49. package/dist/types/src/components/Form/FormField/fields/MarkdownField/MarkdownField.stories.d.ts.map +1 -0
  50. package/dist/types/src/components/Form/FormField/fields/MarkdownField/index.d.ts +2 -0
  51. package/dist/types/src/components/Form/FormField/fields/MarkdownField/index.d.ts.map +1 -0
  52. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.d.ts +4 -0
  53. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.d.ts.map +1 -0
  54. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.stories.d.ts +88 -0
  55. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.stories.d.ts.map +1 -0
  56. package/dist/types/src/components/Form/FormField/fields/NumberField/index.d.ts +2 -0
  57. package/dist/types/src/components/Form/FormField/fields/NumberField/index.d.ts.map +1 -0
  58. package/dist/types/src/components/Form/FormField/fields/RefField/InlineRefField.d.ts.map +1 -0
  59. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.d.ts +16 -0
  60. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.d.ts.map +1 -0
  61. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.stories.d.ts +92 -0
  62. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.stories.d.ts.map +1 -0
  63. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.test.d.ts.map +1 -0
  64. package/dist/types/src/components/Form/FormField/fields/RefField/index.d.ts +3 -0
  65. package/dist/types/src/components/Form/FormField/fields/RefField/index.d.ts.map +1 -0
  66. package/dist/types/src/components/Form/{fields → FormField/fields/SelectField}/SelectField.d.ts +2 -2
  67. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.d.ts.map +1 -0
  68. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts +88 -0
  69. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts.map +1 -0
  70. package/dist/types/src/components/Form/FormField/fields/SelectField/index.d.ts +2 -0
  71. package/dist/types/src/components/Form/FormField/fields/SelectField/index.d.ts.map +1 -0
  72. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts +5 -0
  73. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts.map +1 -0
  74. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.stories.d.ts.map +1 -0
  75. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/index.d.ts +2 -0
  76. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/index.d.ts.map +1 -0
  77. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.d.ts +4 -0
  78. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.d.ts.map +1 -0
  79. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts +88 -0
  80. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts.map +1 -0
  81. package/dist/types/src/components/Form/FormField/fields/TextAreaField/index.d.ts +2 -0
  82. package/dist/types/src/components/Form/FormField/fields/TextAreaField/index.d.ts.map +1 -0
  83. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.d.ts +4 -0
  84. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.d.ts.map +1 -0
  85. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.stories.d.ts +88 -0
  86. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.stories.d.ts.map +1 -0
  87. package/dist/types/src/components/Form/FormField/fields/TextField/index.d.ts +2 -0
  88. package/dist/types/src/components/Form/FormField/fields/TextField/index.d.ts.map +1 -0
  89. package/dist/types/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.d.ts +2 -2
  90. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.d.ts.map +1 -0
  91. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts +88 -0
  92. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts.map +1 -0
  93. package/dist/types/src/components/Form/FormField/fields/TupleField/index.d.ts +2 -0
  94. package/dist/types/src/components/Form/FormField/fields/TupleField/index.d.ts.map +1 -0
  95. package/dist/types/src/components/Form/{fields → FormField/fields}/index.d.ts +0 -1
  96. package/dist/types/src/components/Form/FormField/fields/index.d.ts.map +1 -0
  97. package/dist/types/src/components/Form/FormField/index.d.ts +5 -0
  98. package/dist/types/src/components/Form/FormField/index.d.ts.map +1 -0
  99. package/dist/types/src/components/Form/{FormFieldSet.d.ts → FormFieldSet/FormFieldSet.d.ts} +4 -3
  100. package/dist/types/src/components/Form/FormFieldSet/FormFieldSet.d.ts.map +1 -0
  101. package/dist/types/src/components/Form/FormFieldSet/index.d.ts +2 -0
  102. package/dist/types/src/components/Form/FormFieldSet/index.d.ts.map +1 -0
  103. package/dist/types/src/components/Form/FormLayout/FormLayout.d.ts.map +1 -0
  104. package/dist/types/src/components/Form/FormLayout/FormLayout.stories.d.ts.map +1 -0
  105. package/dist/types/src/components/Form/FormLayout/FormLayout.stories.test.d.ts.map +1 -0
  106. package/dist/types/src/components/Form/FormLayout/FormLayout.test.d.ts.map +1 -0
  107. package/dist/types/src/components/Form/FormLayout/index.d.ts +3 -0
  108. package/dist/types/src/components/Form/FormLayout/index.d.ts.map +1 -0
  109. package/dist/types/src/components/Form/FormLayout/parser.d.ts.map +1 -0
  110. package/dist/types/src/components/Form/FormLayout/parser.test.d.ts.map +1 -0
  111. package/dist/types/src/components/Form/index.d.ts +3 -5
  112. package/dist/types/src/components/Form/index.d.ts.map +1 -1
  113. package/dist/types/src/components/Form/meta-tags.d.ts +2 -2
  114. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -1
  115. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +6 -23
  116. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -1
  117. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts.map +1 -1
  118. package/dist/types/src/components/RefEditor/RefEditor.stories.d.ts.map +1 -1
  119. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +1 -1
  120. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  121. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
  122. package/dist/types/src/hooks/index.d.ts +1 -0
  123. package/dist/types/src/hooks/index.d.ts.map +1 -1
  124. package/dist/types/src/hooks/useFormContext.d.ts +37 -0
  125. package/dist/types/src/hooks/useFormContext.d.ts.map +1 -0
  126. package/dist/types/src/hooks/useFormHandler.d.ts +1 -4
  127. package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -1
  128. package/dist/types/src/index.d.ts +1 -0
  129. package/dist/types/src/index.d.ts.map +1 -1
  130. package/dist/types/src/{components/testing.d.ts → testing/TestLayout.d.ts} +1 -1
  131. package/dist/types/src/testing/TestLayout.d.ts.map +1 -0
  132. package/dist/types/src/testing/index.d.ts +3 -0
  133. package/dist/types/src/testing/index.d.ts.map +1 -0
  134. package/dist/types/src/testing/schema.d.ts +43 -0
  135. package/dist/types/src/testing/schema.d.ts.map +1 -0
  136. package/dist/types/src/types.d.ts +112 -0
  137. package/dist/types/src/types.d.ts.map +1 -0
  138. package/dist/types/src/util/index.d.ts +1 -0
  139. package/dist/types/src/util/index.d.ts.map +1 -1
  140. package/dist/types/src/util/omit.d.ts +12 -0
  141. package/dist/types/src/util/omit.d.ts.map +1 -0
  142. package/dist/types/tsconfig.tsbuildinfo +1 -1
  143. package/package.json +35 -34
  144. package/src/components/FieldEditor/FieldEditor.stories.tsx +1 -1
  145. package/src/components/FieldEditor/FieldEditor.test.tsx +1 -1
  146. package/src/components/FieldEditor/FieldEditor.tsx +5 -4
  147. package/src/components/Form/Form.stories.tsx +4 -49
  148. package/src/components/Form/Form.tsx +18 -447
  149. package/src/components/Form/FormControls.tsx +320 -0
  150. package/src/components/Form/FormField/FieldHeader.tsx +36 -0
  151. package/src/components/Form/{FormField.tsx → FormField/FormField.tsx} +35 -59
  152. package/src/components/Form/{FormFieldComponent.stories.tsx → FormField/FormFieldWrapper.stories.tsx} +24 -17
  153. package/src/components/Form/{FormFieldComponent.tsx → FormField/FormFieldWrapper.tsx} +21 -95
  154. package/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.tsx +103 -0
  155. package/src/components/Form/FormField/fields/ArrayField/ArrayField.tsx +269 -0
  156. package/src/components/Form/FormField/fields/ArrayField/index.ts +5 -0
  157. package/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.tsx +52 -0
  158. package/src/components/Form/{fields → FormField/fields/BooleanField}/BooleanField.tsx +10 -3
  159. package/src/components/Form/FormField/fields/BooleanField/index.ts +5 -0
  160. package/src/components/Form/FormField/fields/DateField/DateField.stories.tsx +60 -0
  161. package/src/components/Form/{fields → FormField/fields/DateField}/DateField.tsx +4 -2
  162. package/src/components/Form/FormField/fields/DateField/index.ts +5 -0
  163. package/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.tsx +53 -0
  164. package/src/components/Form/{fields → FormField/fields/GeoPointField}/GeoPointField.tsx +4 -3
  165. package/src/components/Form/FormField/fields/GeoPointField/index.ts +5 -0
  166. package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.tsx +6 -6
  167. package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.tsx +3 -2
  168. package/src/components/Form/FormField/fields/MarkdownField/index.ts +5 -0
  169. package/src/components/Form/FormField/fields/NumberField/NumberField.stories.tsx +52 -0
  170. package/src/components/Form/{fields → FormField/fields/NumberField}/NumberField.tsx +27 -2
  171. package/src/components/Form/FormField/fields/NumberField/index.ts +5 -0
  172. package/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.tsx +8 -7
  173. package/src/components/Form/FormField/fields/RefField/RefField.stories.tsx +97 -0
  174. package/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.ts +2 -1
  175. package/src/components/Form/{fields → FormField/fields/RefField}/RefField.tsx +6 -25
  176. package/src/components/Form/FormField/fields/RefField/index.ts +6 -0
  177. package/src/components/Form/FormField/fields/SelectField/SelectField.stories.tsx +53 -0
  178. package/src/components/Form/{fields → FormField/fields/SelectField}/SelectField.tsx +4 -2
  179. package/src/components/Form/FormField/fields/SelectField/index.ts +5 -0
  180. package/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.stories.tsx +5 -5
  181. package/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.tsx +55 -53
  182. package/src/components/Form/FormField/fields/SelectOptionField/index.ts +5 -0
  183. package/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.tsx +53 -0
  184. package/src/components/Form/{fields → FormField/fields/TextAreaField}/TextAreaField.tsx +4 -2
  185. package/src/components/Form/FormField/fields/TextAreaField/index.ts +5 -0
  186. package/src/components/Form/FormField/fields/TextField/TextField.stories.tsx +52 -0
  187. package/src/components/Form/{fields → FormField/fields/TextField}/TextField.tsx +4 -2
  188. package/src/components/Form/FormField/fields/TextField/index.ts +5 -0
  189. package/src/components/Form/FormField/fields/TupleField/TupleField.stories.tsx +55 -0
  190. package/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.tsx +4 -2
  191. package/src/components/Form/FormField/fields/TupleField/index.ts +5 -0
  192. package/src/components/Form/{fields → FormField/fields}/index.ts +0 -1
  193. package/src/components/Form/FormField/index.ts +8 -0
  194. package/src/components/Form/{FormFieldSet.tsx → FormFieldSet/FormFieldSet.tsx} +16 -32
  195. package/src/components/Form/FormFieldSet/index.ts +5 -0
  196. package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.tsx +4 -4
  197. package/src/components/Form/{Layout → FormLayout}/FormLayout.tsx +7 -6
  198. package/src/components/Form/{Layout → FormLayout}/index.ts +1 -2
  199. package/src/components/Form/index.ts +3 -5
  200. package/src/components/Form/meta-tags.ts +1 -1
  201. package/src/components/ObjectForm/ObjectForm.tsx +15 -14
  202. package/src/components/ObjectPicker/ObjectPicker.tsx +19 -27
  203. package/src/components/ObjectProperties/ObjectProperties.stories.tsx +1 -1
  204. package/src/components/ObjectProperties/ObjectProperties.test.tsx +1 -1
  205. package/src/components/ObjectProperties/ObjectProperties.tsx +2 -1
  206. package/src/components/RefEditor/RefEditor.stories.tsx +0 -1
  207. package/src/components/ViewEditor/ViewEditor.stories.tsx +4 -5
  208. package/src/components/ViewEditor/ViewEditor.test.tsx +1 -1
  209. package/src/components/ViewEditor/ViewEditor.tsx +98 -128
  210. package/src/hooks/index.ts +1 -0
  211. package/src/hooks/useFormContext.ts +86 -0
  212. package/src/hooks/useFormHandler.ts +1 -4
  213. package/src/index.ts +1 -0
  214. package/src/{components/testing.tsx → testing/TestLayout.tsx} +1 -1
  215. package/src/testing/index.ts +7 -0
  216. package/src/testing/schema.ts +59 -0
  217. package/src/types.ts +134 -0
  218. package/src/util/index.ts +1 -0
  219. package/src/util/omit.ts +47 -0
  220. package/src/vitest-setup.ts +40 -0
  221. package/dist/types/src/components/Form/FormField.d.ts +0 -52
  222. package/dist/types/src/components/Form/FormField.d.ts.map +0 -1
  223. package/dist/types/src/components/Form/FormFieldComponent.d.ts +0 -98
  224. package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +0 -1
  225. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +0 -1
  226. package/dist/types/src/components/Form/FormFieldSet.d.ts.map +0 -1
  227. package/dist/types/src/components/Form/FormTooltipsContext.d.ts +0 -19
  228. package/dist/types/src/components/Form/FormTooltipsContext.d.ts.map +0 -1
  229. package/dist/types/src/components/Form/Layout/FormLayout.d.ts.map +0 -1
  230. package/dist/types/src/components/Form/Layout/FormLayout.stories.d.ts.map +0 -1
  231. package/dist/types/src/components/Form/Layout/FormLayout.stories.test.d.ts.map +0 -1
  232. package/dist/types/src/components/Form/Layout/FormLayout.test.d.ts.map +0 -1
  233. package/dist/types/src/components/Form/Layout/annotation.d.ts +0 -30
  234. package/dist/types/src/components/Form/Layout/annotation.d.ts.map +0 -1
  235. package/dist/types/src/components/Form/Layout/index.d.ts +0 -4
  236. package/dist/types/src/components/Form/Layout/index.d.ts.map +0 -1
  237. package/dist/types/src/components/Form/Layout/parser.d.ts.map +0 -1
  238. package/dist/types/src/components/Form/Layout/parser.test.d.ts.map +0 -1
  239. package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +0 -1
  240. package/dist/types/src/components/Form/fields/BooleanField.d.ts +0 -4
  241. package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +0 -1
  242. package/dist/types/src/components/Form/fields/DateField.d.ts +0 -4
  243. package/dist/types/src/components/Form/fields/DateField.d.ts.map +0 -1
  244. package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +0 -1
  245. package/dist/types/src/components/Form/fields/InlineRefField.d.ts.map +0 -1
  246. package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +0 -1
  247. package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts.map +0 -1
  248. package/dist/types/src/components/Form/fields/NumberField.d.ts +0 -4
  249. package/dist/types/src/components/Form/fields/NumberField.d.ts.map +0 -1
  250. package/dist/types/src/components/Form/fields/RefField.d.ts +0 -34
  251. package/dist/types/src/components/Form/fields/RefField.d.ts.map +0 -1
  252. package/dist/types/src/components/Form/fields/RefField.test.d.ts.map +0 -1
  253. package/dist/types/src/components/Form/fields/SelectField.d.ts.map +0 -1
  254. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +0 -5
  255. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +0 -1
  256. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +0 -1
  257. package/dist/types/src/components/Form/fields/TextAreaField.d.ts +0 -4
  258. package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +0 -1
  259. package/dist/types/src/components/Form/fields/TextField.d.ts +0 -4
  260. package/dist/types/src/components/Form/fields/TextField.d.ts.map +0 -1
  261. package/dist/types/src/components/Form/fields/TupleField.d.ts.map +0 -1
  262. package/dist/types/src/components/Form/fields/index.d.ts.map +0 -1
  263. package/dist/types/src/components/testing.d.ts.map +0 -1
  264. package/src/components/Form/AUDIT.md +0 -17
  265. package/src/components/Form/FormTooltipsContext.ts +0 -25
  266. package/src/components/Form/Layout/annotation.ts +0 -38
  267. package/src/components/Form/README.md +0 -3
  268. package/src/components/Form/fields/ArrayField.tsx +0 -173
  269. /package/dist/types/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.d.ts +0 -0
  270. /package/dist/types/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.d.ts +0 -0
  271. /package/dist/types/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.d.ts +0 -0
  272. /package/dist/types/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.stories.d.ts +0 -0
  273. /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.d.ts +0 -0
  274. /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.stories.d.ts +0 -0
  275. /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.stories.test.d.ts +0 -0
  276. /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.test.d.ts +0 -0
  277. /package/dist/types/src/components/Form/{Layout → FormLayout}/parser.d.ts +0 -0
  278. /package/dist/types/src/components/Form/{Layout → FormLayout}/parser.test.d.ts +0 -0
  279. /package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.test.tsx +0 -0
  280. /package/src/components/Form/{Layout → FormLayout}/FormLayout.test.ts +0 -0
  281. /package/src/components/Form/{Layout → FormLayout}/parser.test.ts +0 -0
  282. /package/src/components/Form/{Layout → FormLayout}/parser.ts +0 -0
@@ -6,14 +6,15 @@ import React, { type ChangeEvent, type KeyboardEvent, useCallback, useEffect, us
6
6
 
7
7
  import { type SelectOption } from '@dxos/echo/Format';
8
8
  import { PublicKey } from '@dxos/keys';
9
- import { type ChromaticPalette, IconButton, Input, Tag, useTranslation } from '@dxos/react-ui';
10
- import { List } from '@dxos/react-ui-list';
9
+ import { type ChromaticPalette, IconButton, Input, Tag, ToggleIconButton, useTranslation } from '@dxos/react-ui';
10
+ import { OrderedList } from '@dxos/react-ui-list';
11
11
  import { HuePicker } from '@dxos/react-ui-pickers';
12
12
  import { hues, osTranslations } from '@dxos/ui-theme';
13
13
 
14
14
  import { translationKey } from '#translations';
15
+ import { type FormFieldRendererProps } from '#types';
15
16
 
16
- import { type FormFieldComponentProps, FormFieldLabel } from '../FormFieldComponent';
17
+ import { FormFieldLabel } from '../../FormFieldWrapper';
17
18
 
18
19
  export const SelectOptionField = ({
19
20
  type,
@@ -23,7 +24,7 @@ export const SelectOptionField = ({
23
24
  getStatus,
24
25
  getValue,
25
26
  onValueChange,
26
- }: FormFieldComponentProps<SelectOption[] | undefined>) => {
27
+ }: FormFieldRendererProps<SelectOption[] | undefined>) => {
27
28
  const { t } = useTranslation(translationKey);
28
29
  const { status, error } = getStatus();
29
30
  const [selected, setSelectedId] = useState<string | null>(null);
@@ -123,62 +124,63 @@ export const SelectOptionField = ({
123
124
  <FormFieldLabel error={error} readonly={readonly} label={label} path={jsonPath} />
124
125
  <div>
125
126
  {options && (
126
- <List.Root
127
+ <OrderedList.Root<SelectOption>
127
128
  items={options}
128
129
  isItem={(_item) => true}
130
+ getId={(option) => option.id}
129
131
  onMove={readonly ? undefined : handleMove}
130
132
  readonly={!!readonly}
131
133
  >
132
134
  {({ items }) => (
133
- <div role='list' className='w-full overflow-auto'>
135
+ <OrderedList.Content classNames='w-full overflow-auto'>
134
136
  {items?.map((item) => (
135
- <div key={item.id}>
136
- <List.Item
137
- role='button'
138
- item={item}
139
- classNames='flex flex-col cursor-pointer rounded-xs dx-hover'
140
- aria-expanded={selected === item.id}
141
- >
142
- <div className='flex items-center'>
143
- <List.ItemDragHandle disabled={!!readonly} />
144
- <List.ItemTitle onClick={() => handleClick(item.id)} classNames='flex-1'>
145
- {/* TODO(ZaymonFC): Move spacer into Tag component. */}
146
- <Tag palette={item.color as ChromaticPalette}>{item.title || '\u200b'}</Tag>
147
- </List.ItemTitle>
148
- <IconButton
149
- iconOnly
150
- variant='ghost'
151
- label={t(selected === item.id ? 'collapse.label' : 'expand.label', { ns: osTranslations })}
152
- icon={selected === item.id ? 'ph--caret-down--regular' : 'ph--caret-right--regular'}
153
- onClick={() => handleClick(item.id)}
154
- />
137
+ <OrderedList.Item
138
+ key={item.id}
139
+ id={item.id}
140
+ item={item}
141
+ canDrag={!readonly}
142
+ classNames='flex flex-col cursor-pointer rounded-xs dx-hover'
143
+ >
144
+ <div className='flex items-center'>
145
+ <OrderedList.DragHandle />
146
+ {/* TODO(ZaymonFC): Move spacer into Tag component. */}
147
+ <div className='flex grow items-center truncate px-2' onClick={() => handleClick(item.id)}>
148
+ <Tag palette={item.color as ChromaticPalette}>{item.title || '\u200b'}</Tag>
155
149
  </div>
156
- {selected === item.id && (
157
- <div className='flex flex-col p-form-padding gap-form-gap dx-density-md'>
158
- <Input.Label classNames='text-sm'>{t('select-option.label')}</Input.Label>
159
- <div className='grid grid-cols-[1fr_min-content_min-content] gap-form-gap'>
160
- <Input.TextInput
161
- disabled={!!readonly}
162
- placeholder={t('select-option-label.placeholder')}
163
- ref={selected === item.id ? inputRef : undefined}
164
- value={item.title}
165
- onChange={handleTitleChange(item.id)}
166
- onKeyDown={handleKeyDown}
167
- classNames='flex-1'
168
- />
169
- <HuePicker disabled={!!readonly} value={item.color} onChange={handleColorChange(item.id)} />
170
- <IconButton
171
- disabled={!!readonly}
172
- icon='ph--trash--fill'
173
- iconOnly
174
- label={t('select-option-delete.button')}
175
- onClick={() => handleDelete(item.id)}
176
- />
177
- </div>
150
+ <ToggleIconButton
151
+ iconOnly
152
+ variant='ghost'
153
+ active={selected === item.id}
154
+ icon='ph--caret-right--regular'
155
+ label={t(selected === item.id ? 'collapse.label' : 'expand.label', { ns: osTranslations })}
156
+ onClick={() => handleClick(item.id)}
157
+ />
158
+ </div>
159
+ {selected === item.id && (
160
+ <div className='flex flex-col p-form-padding gap-form-gap dx-density-md'>
161
+ <Input.Label classNames='text-sm'>{t('select-option.label')}</Input.Label>
162
+ <div className='grid grid-cols-[1fr_min-content_min-content] gap-form-gap'>
163
+ <Input.TextInput
164
+ disabled={!!readonly}
165
+ placeholder={t('select-option-label.placeholder')}
166
+ ref={selected === item.id ? inputRef : undefined}
167
+ value={item.title}
168
+ onChange={handleTitleChange(item.id)}
169
+ onKeyDown={handleKeyDown}
170
+ classNames='flex-1'
171
+ />
172
+ <HuePicker disabled={!!readonly} value={item.color} onChange={handleColorChange(item.id)} />
173
+ <IconButton
174
+ disabled={!!readonly}
175
+ icon='ph--trash--fill'
176
+ iconOnly
177
+ label={t('select-option-delete.button')}
178
+ onClick={() => handleDelete(item.id)}
179
+ />
178
180
  </div>
179
- )}
180
- </List.Item>
181
- </div>
181
+ </div>
182
+ )}
183
+ </OrderedList.Item>
182
184
  ))}
183
185
  <IconButton
184
186
  variant='ghost'
@@ -188,9 +190,9 @@ export const SelectOptionField = ({
188
190
  disabled={!!readonly}
189
191
  classNames='w-full'
190
192
  />
191
- </div>
193
+ </OrderedList.Content>
192
194
  )}
193
- </List.Root>
195
+ </OrderedList.Root>
194
196
  )}
195
197
  </div>
196
198
  </Input.Root>
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './SelectOptionField';
@@ -0,0 +1,53 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Schema from 'effect/Schema';
7
+ import React, { useState } from 'react';
8
+
9
+ import { Format } from '@dxos/echo';
10
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
+
12
+ import { translations } from '#translations';
13
+
14
+ import { TestLayout } from '../../../../../testing';
15
+ import { Form } from '../../../Form';
16
+
17
+ const schema = Schema.Struct({
18
+ notes: Format.Text.annotations({ title: 'Notes' }),
19
+ }).pipe(Schema.mutable);
20
+
21
+ type Values = Schema.Schema.Type<typeof schema>;
22
+
23
+ const DefaultStory = () => {
24
+ const [values, setValues] = useState<Values>({ notes: 'Multi-line\nplain text.' });
25
+ return (
26
+ <TestLayout json={values}>
27
+ <Form.Root
28
+ schema={schema}
29
+ values={values}
30
+ onValuesChanged={(values) => setValues((prev) => ({ ...prev, ...values }))}
31
+ >
32
+ <Form.Viewport>
33
+ <Form.Content>
34
+ <Form.FieldSet />
35
+ </Form.Content>
36
+ </Form.Viewport>
37
+ </Form.Root>
38
+ </TestLayout>
39
+ );
40
+ };
41
+
42
+ const meta = {
43
+ title: 'ui/react-ui-form/FormField/TextAreaField',
44
+ render: DefaultStory,
45
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
46
+ parameters: { layout: 'fullscreen', translations },
47
+ } satisfies Meta<typeof DefaultStory>;
48
+
49
+ export default meta;
50
+
51
+ type Story = StoryObj<typeof meta>;
52
+
53
+ export const Default: Story = {};
@@ -6,7 +6,9 @@ import React, { useCallback } from 'react';
6
6
 
7
7
  import { Input, type TextAreaProps } from '@dxos/react-ui';
8
8
 
9
- import { type FormFieldComponentProps, FormFieldWrapper } from '../FormFieldComponent';
9
+ import { type FormFieldRendererProps } from '#types';
10
+
11
+ import { FormFieldWrapper } from '../../FormFieldWrapper';
10
12
 
11
13
  export const TextAreaField = ({
12
14
  type,
@@ -15,7 +17,7 @@ export const TextAreaField = ({
15
17
  onValueChange,
16
18
  onBlur,
17
19
  ...props
18
- }: FormFieldComponentProps<string>) => {
20
+ }: FormFieldRendererProps<string>) => {
19
21
  const handleChange = useCallback<NonNullable<TextAreaProps['onChange']>>(
20
22
  (event) => onValueChange(type, event.target.value),
21
23
  [type, onValueChange],
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './TextAreaField';
@@ -0,0 +1,52 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Schema from 'effect/Schema';
7
+ import React, { useState } from 'react';
8
+
9
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
10
+
11
+ import { translations } from '#translations';
12
+
13
+ import { TestLayout } from '../../../../../testing';
14
+ import { Form } from '../../../Form';
15
+
16
+ const schema = Schema.Struct({
17
+ name: Schema.String.annotations({ title: 'Name' }),
18
+ }).pipe(Schema.mutable);
19
+
20
+ type Values = Schema.Schema.Type<typeof schema>;
21
+
22
+ const DefaultStory = () => {
23
+ const [values, setValues] = useState<Values>({ name: 'Alice' });
24
+ return (
25
+ <TestLayout json={values}>
26
+ <Form.Root
27
+ schema={schema}
28
+ values={values}
29
+ onValuesChanged={(values) => setValues((prev) => ({ ...prev, ...values }))}
30
+ >
31
+ <Form.Viewport>
32
+ <Form.Content>
33
+ <Form.FieldSet />
34
+ </Form.Content>
35
+ </Form.Viewport>
36
+ </Form.Root>
37
+ </TestLayout>
38
+ );
39
+ };
40
+
41
+ const meta = {
42
+ title: 'ui/react-ui-form/FormField/TextField',
43
+ render: DefaultStory,
44
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
45
+ parameters: { layout: 'fullscreen', translations },
46
+ } satisfies Meta<typeof DefaultStory>;
47
+
48
+ export default meta;
49
+
50
+ type Story = StoryObj<typeof meta>;
51
+
52
+ export const Default: Story = {};
@@ -6,7 +6,9 @@ import React, { useCallback } from 'react';
6
6
 
7
7
  import { Input, type TextInputProps } from '@dxos/react-ui';
8
8
 
9
- import { type FormFieldComponentProps, FormFieldWrapper } from '../FormFieldComponent';
9
+ import { type FormFieldRendererProps } from '#types';
10
+
11
+ import { FormFieldWrapper } from '../../FormFieldWrapper';
10
12
 
11
13
  export const TextField = ({
12
14
  type,
@@ -15,7 +17,7 @@ export const TextField = ({
15
17
  onBlur,
16
18
  onValueChange,
17
19
  ...props
18
- }: FormFieldComponentProps<string>) => {
20
+ }: FormFieldRendererProps<string>) => {
19
21
  const handleChange = useCallback<NonNullable<TextInputProps['onChange']>>(
20
22
  (event) => onValueChange(type, event.target.value),
21
23
  [type, onValueChange],
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './TextField';
@@ -0,0 +1,55 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Schema from 'effect/Schema';
7
+ import React, { useState } from 'react';
8
+
9
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
10
+
11
+ import { translations } from '#translations';
12
+
13
+ import { TestLayout } from '../../../../../testing';
14
+ import { Form } from '../../../Form';
15
+ import { TupleField } from './TupleField';
16
+
17
+ // TupleField isn't auto-dispatched and needs a `binding`; wire it via `fieldMap`.
18
+ const schema = Schema.Struct({
19
+ point: Schema.Struct({ x: Schema.Number, y: Schema.Number }).annotations({ title: 'Point' }),
20
+ }).pipe(Schema.mutable);
21
+
22
+ type Values = Schema.Schema.Type<typeof schema>;
23
+
24
+ const DefaultStory = () => {
25
+ const [values, setValues] = useState<Values>({ point: { x: 1, y: 2 } });
26
+ return (
27
+ <TestLayout json={values}>
28
+ <Form.Root
29
+ schema={schema}
30
+ values={values}
31
+ fieldMap={{ point: (props) => <TupleField {...props} binding={['x', 'y']} /> }}
32
+ onValuesChanged={(values) => setValues((prev) => ({ ...prev, ...values }))}
33
+ >
34
+ <Form.Viewport>
35
+ <Form.Content>
36
+ <Form.FieldSet />
37
+ </Form.Content>
38
+ </Form.Viewport>
39
+ </Form.Root>
40
+ </TestLayout>
41
+ );
42
+ };
43
+
44
+ const meta = {
45
+ title: 'ui/react-ui-form/FormField/TupleField',
46
+ render: DefaultStory,
47
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
48
+ parameters: { layout: 'fullscreen', translations },
49
+ } satisfies Meta<typeof DefaultStory>;
50
+
51
+ export default meta;
52
+
53
+ type Story = StoryObj<typeof meta>;
54
+
55
+ export const Default: Story = {};
@@ -8,7 +8,9 @@ import { Input } from '@dxos/react-ui';
8
8
  import { mx } from '@dxos/ui-theme';
9
9
  import { safeParseFloat } from '@dxos/util';
10
10
 
11
- import { type FormFieldComponentProps, FormFieldLabel } from '../FormFieldComponent';
11
+ import { type FormFieldRendererProps } from '#types';
12
+
13
+ import { FormFieldLabel } from '../../FormFieldWrapper';
12
14
 
13
15
  const gridCols = ['grid-cols-1', 'grid-cols-2', 'grid-cols-3', 'grid-cols-4'];
14
16
 
@@ -22,7 +24,7 @@ export const TupleField = ({
22
24
  getValue,
23
25
  onValueChange,
24
26
  onBlur,
25
- }: FormFieldComponentProps<Record<string, number>> & {
27
+ }: FormFieldRendererProps<Record<string, number>> & {
26
28
  binding: string[];
27
29
  }) => {
28
30
  const { status, error } = getStatus();
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './TupleField';
@@ -6,7 +6,6 @@ export * from './ArrayField';
6
6
  export * from './BooleanField';
7
7
  export * from './DateField';
8
8
  export * from './GeoPointField';
9
- export * from './InlineRefField';
10
9
  export * from './MarkdownField';
11
10
  export * from './NumberField';
12
11
  export * from './RefField';
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './FieldHeader';
6
+ export * from './FormField';
7
+ export * from './fields';
8
+ export * from './FormFieldWrapper';
@@ -5,19 +5,18 @@
5
5
  import * as Option from 'effect/Option';
6
6
  import React, { useMemo, useState } from 'react';
7
7
 
8
+ import { DEFAULT_LAYOUT_NAME, FormLayoutAnnotation } from '@dxos/echo/Annotation';
8
9
  import { type AnyProperties } from '@dxos/echo/internal';
9
10
  import { SchemaEx } from '@dxos/effect';
10
- import { IconButton, useTranslation } from '@dxos/react-ui';
11
- import { mx } from '@dxos/ui-theme';
11
+ import { ToggleIconButton, useTranslation } from '@dxos/react-ui';
12
12
 
13
13
  import { translationKey } from '#translations';
14
+ import { type CreateOptions, type FormFieldOptions, type RefFieldDataProps } from '#types';
14
15
 
15
- import { type FormHandlerProps } from '../../hooks';
16
- import { getRootFormProperties } from '../../util';
17
- import { useFormValues } from './Form';
18
- import { FormField, type FormFieldProps } from './FormField';
19
- import { FormFieldErrorBoundary, FormFieldLabel } from './FormFieldComponent';
20
- import { DEFAULT_LAYOUT_NAME, FormLayout, FormLayoutAnnotation } from './Layout';
16
+ import { type FormHandlerProps, useFormValues } from '../../../hooks';
17
+ import { getRootFormProperties } from '../../../util';
18
+ import { FormField, FormFieldErrorBoundary, FormFieldLabel, type FormFieldProps } from '../FormField';
19
+ import { FormLayout } from '../FormLayout';
21
20
 
22
21
  const FORM_FIELDSET_NAME = 'Form.FieldSet';
23
22
 
@@ -37,25 +36,10 @@ export type FormFieldSetProps<T extends AnyProperties> = {
37
36
  */
38
37
  layoutName?: string;
39
38
  } & Pick<FormHandlerProps<T>, 'schema'> &
40
- Pick<
41
- FormFieldProps,
42
- | 'path'
43
- | 'autoFocus'
44
- | 'readonly'
45
- | 'layout'
46
- | 'projection'
47
- | 'fieldMap'
48
- | 'fieldProvider'
49
- | 'createTypename'
50
- | 'createOptionLabel'
51
- | 'createOptionIcon'
52
- | 'createInitialValuePath'
53
- | 'createFieldMap'
54
- | 'db'
55
- | 'useType'
56
- | 'getOptions'
57
- | 'onCreate'
58
- >;
39
+ Pick<FormFieldProps, 'path' | 'autoFocus'> &
40
+ FormFieldOptions &
41
+ CreateOptions &
42
+ Pick<RefFieldDataProps, 'useType' | 'getOptions' | 'onCreate'>;
59
43
 
60
44
  /**
61
45
  * Renders a set of form fields derived from a schema object.
@@ -76,7 +60,7 @@ export const FormFieldSet = ({
76
60
  const { t } = useTranslation(translationKey);
77
61
  const values = useFormValues(FORM_FIELDSET_NAME, path);
78
62
  const properties = useFormFieldSetProperties({ schema, values, exclude, sort, projection });
79
- // TODO(burdon): Generalize collapse state (cf. useSelected in react-ui-attention, plugin-markdown cursor state).
63
+ // TODO(burdon): Generalize collapse state (cf. useSelection in react-ui-attention, plugin-markdown cursor state).
80
64
  const [collapsed, setCollapsed] = useState(false);
81
65
  if ((readonly || layout === 'static') && values == null) {
82
66
  return null;
@@ -120,19 +104,19 @@ export const FormFieldSet = ({
120
104
  <>
121
105
  {layout !== 'inline' && label && (
122
106
  <FormFieldLabel
123
- asChild
107
+ standalone
124
108
  classNames='pl-2'
125
109
  label={label}
126
110
  path={SchemaEx.createJsonPath(path ?? [])}
127
111
  button={
128
112
  collapsible && (
129
- <IconButton
113
+ <ToggleIconButton
114
+ active={!collapsed}
130
115
  classNames='px-1 mr-0.5'
131
116
  variant='ghost'
132
117
  density='xs'
133
118
  iconOnly
134
119
  icon='ph--caret-right--regular'
135
- iconClassNames={mx('transition-transform', !collapsed && 'rotate-90')}
136
120
  label={t(collapsed ? 'expand-fields.label' : 'collapse-fields.label')}
137
121
  />
138
122
  )
@@ -146,7 +130,7 @@ export const FormFieldSet = ({
146
130
 
147
131
  // Nested field sets render inside an indented, bordered container with a collapse toggle.
148
132
  if (collapsible) {
149
- return <div className='border border-subdued-separator rounded-sm mt-2'>{content}</div>;
133
+ return <div className='border border-subdued-separator rounded-sm mb-1'>{content}</div>;
150
134
  }
151
135
 
152
136
  return content;
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './FormFieldSet';
@@ -19,9 +19,9 @@ import { trim } from '@dxos/util';
19
19
 
20
20
  import { translations } from '#translations';
21
21
 
22
- import { TestLayout, TestPanel } from '../../testing';
23
- import { Form, type FormRootProps, omitId } from '../Form';
24
- import { FormLayoutAnnotation } from './annotation';
22
+ import { TestLayout, TestPanel } from '../../../testing';
23
+ import { omitId } from '../../../util';
24
+ import { Form, type FormRootProps } from '../Form';
25
25
  import { parseLayout } from './parser';
26
26
 
27
27
  /**
@@ -84,7 +84,7 @@ const FLIGHT_LAYOUT_COMPACT = trim`
84
84
  */
85
85
  const AnnotatedFlight = Type.getSchema(Flight)
86
86
  .annotations({})
87
- .pipe(FormLayoutAnnotation.set({ default: FLIGHT_LAYOUT, compact: FLIGHT_LAYOUT_COMPACT }));
87
+ .pipe(Annotation.FormLayoutAnnotation.set({ default: FLIGHT_LAYOUT, compact: FLIGHT_LAYOUT_COMPACT }));
88
88
 
89
89
  /**
90
90
  * Sample schema with nested `Place` structs carrying a `LabelAnnotation`.
@@ -13,10 +13,11 @@ import { type AnyProperties } from '@dxos/echo/internal';
13
13
  import { SchemaEx } from '@dxos/effect';
14
14
  import { Input } from '@dxos/react-ui';
15
15
 
16
- import { useFormFieldState } from '../Form';
16
+ import { type FormPresentation } from '#types';
17
+
18
+ import { useFormFieldState } from '../../../hooks';
17
19
  import { FormField, type FormFieldProps } from '../FormField';
18
- import { FormFieldErrorBoundary, FormFieldLabel, type Presentation } from '../FormFieldComponent';
19
- import { DEFAULT_LAYOUT_NAME, FormLayoutAnnotation } from './annotation';
20
+ import { FormFieldErrorBoundary, FormFieldLabel } from '../FormField';
20
21
  import { LayoutParseError, type LayoutNode, parseLayout } from './parser';
21
22
 
22
23
  const FORM_LAYOUT_NAME = 'Form.Layout';
@@ -57,14 +58,14 @@ type FormFieldSetSubset = Pick<
57
58
  export const FormLayout = ({
58
59
  schema,
59
60
  template,
60
- name = DEFAULT_LAYOUT_NAME,
61
+ name = Annotation.DEFAULT_LAYOUT_NAME,
61
62
  path,
62
63
  readonly,
63
64
  layout,
64
65
  projection,
65
66
  ...props
66
67
  }: FormLayoutProps) => {
67
- const annotated = Option.getOrUndefined(FormLayoutAnnotation.get(schema));
68
+ const annotated = Option.getOrUndefined(Annotation.FormLayoutAnnotation.get(schema));
68
69
  const source = template ?? annotated?.[name];
69
70
  if (source === undefined) {
70
71
  throw new LayoutParseError(
@@ -222,7 +223,7 @@ type LabelFieldProps = {
222
223
  schema: Schema.Schema<any>;
223
224
  label: string;
224
225
  path: (string | number)[];
225
- layout?: Presentation;
226
+ layout?: FormPresentation;
226
227
  };
227
228
 
228
229
  /**
@@ -2,6 +2,5 @@
2
2
  // Copyright 2026 DXOS.org
3
3
  //
4
4
 
5
- export * from './annotation';
6
- export { FormLayout } from './FormLayout';
5
+ export { FormLayout, type FormLayoutProps } from './FormLayout';
7
6
  export { LayoutParseError, parseLayout, type LayoutNode } from './parser';
@@ -2,10 +2,8 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- export * from './fields';
5
+ export * from './meta-tags';
6
6
 
7
7
  export * from './Form';
8
- export * from './FormFieldComponent';
9
- export * from './FormTooltipsContext';
10
- export * from './meta-tags';
11
- export * from './Layout';
8
+ export * from './FormField';
9
+ export * from './FormFieldSet';
@@ -6,7 +6,7 @@ import * as Schema from 'effect/Schema';
6
6
 
7
7
  import { Ref, Tag } from '@dxos/echo';
8
8
 
9
- import { omitId } from './Form';
9
+ import { omitId } from '../../util';
10
10
 
11
11
  /**
12
12
  * Form-field key for the synthetic meta-tags array spliced into property/create forms.