@dxos/react-ui-form 0.9.0 → 0.9.1-staging.ee54ba693a

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 (372) hide show
  1. package/dist/lib/browser/index.mjs +2337 -1919
  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 +2337 -1919
  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/annotations.d.ts +47 -0
  8. package/dist/types/src/annotations.d.ts.map +1 -0
  9. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +3 -3
  10. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
  11. package/dist/types/src/components/Form/Form.d.ts +23 -110
  12. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  13. package/dist/types/src/components/Form/Form.stories.d.ts +48 -101
  14. package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
  15. package/dist/types/src/components/Form/Form.theme.d.ts +252 -0
  16. package/dist/types/src/components/Form/Form.theme.d.ts.map +1 -0
  17. package/dist/types/src/components/Form/Form.theme.test.d.ts +2 -0
  18. package/dist/types/src/components/Form/Form.theme.test.d.ts.map +1 -0
  19. package/dist/types/src/components/Form/FormControls.d.ts +75 -0
  20. package/dist/types/src/components/Form/FormControls.d.ts.map +1 -0
  21. package/dist/types/src/components/Form/FormField/FormField.d.ts +44 -0
  22. package/dist/types/src/components/Form/FormField/FormField.d.ts.map +1 -0
  23. package/dist/types/src/components/Form/FormField/FormFieldHeader.d.ts +27 -0
  24. package/dist/types/src/components/Form/FormField/FormFieldHeader.d.ts.map +1 -0
  25. package/dist/types/src/components/Form/FormField/FormRow.d.ts +85 -0
  26. package/dist/types/src/components/Form/FormField/FormRow.d.ts.map +1 -0
  27. package/dist/types/src/components/Form/{FormFieldComponent.stories.d.ts → FormField/FormRow.stories.d.ts} +6 -3
  28. package/dist/types/src/components/Form/FormField/FormRow.stories.d.ts.map +1 -0
  29. package/dist/types/src/components/Form/{fields → FormField/fields/ArrayField}/ArrayField.d.ts +2 -2
  30. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.d.ts.map +1 -0
  31. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts +88 -0
  32. package/dist/types/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.d.ts.map +1 -0
  33. package/dist/types/src/components/Form/FormField/fields/ArrayField/index.d.ts +2 -0
  34. package/dist/types/src/components/Form/FormField/fields/ArrayField/index.d.ts.map +1 -0
  35. package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.d.ts +12 -0
  36. package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.d.ts.map +1 -0
  37. package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/index.d.ts +2 -0
  38. package/dist/types/src/components/Form/FormField/fields/AsyncSelectField/index.d.ts.map +1 -0
  39. package/dist/types/src/components/Form/FormField/fields/AutofillField/AutofillField.d.ts +12 -0
  40. package/dist/types/src/components/Form/FormField/fields/AutofillField/AutofillField.d.ts.map +1 -0
  41. package/dist/types/src/components/Form/FormField/fields/AutofillField/index.d.ts +2 -0
  42. package/dist/types/src/components/Form/FormField/fields/AutofillField/index.d.ts.map +1 -0
  43. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.d.ts +4 -0
  44. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.d.ts.map +1 -0
  45. package/dist/types/src/components/{Settings/Settings.stories.d.ts → Form/FormField/fields/BooleanField/BooleanField.stories.d.ts} +1 -2
  46. package/dist/types/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.d.ts.map +1 -0
  47. package/dist/types/src/components/Form/FormField/fields/BooleanField/index.d.ts +2 -0
  48. package/dist/types/src/components/Form/FormField/fields/BooleanField/index.d.ts.map +1 -0
  49. package/dist/types/src/components/Form/FormField/fields/ComboboxField/ComboboxField.d.ts +12 -0
  50. package/dist/types/src/components/Form/FormField/fields/ComboboxField/ComboboxField.d.ts.map +1 -0
  51. package/dist/types/src/components/Form/FormField/fields/ComboboxField/index.d.ts +2 -0
  52. package/dist/types/src/components/Form/FormField/fields/ComboboxField/index.d.ts.map +1 -0
  53. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.d.ts +4 -0
  54. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.d.ts.map +1 -0
  55. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.stories.d.ts +88 -0
  56. package/dist/types/src/components/Form/FormField/fields/DateField/DateField.stories.d.ts.map +1 -0
  57. package/dist/types/src/components/Form/FormField/fields/DateField/index.d.ts +2 -0
  58. package/dist/types/src/components/Form/FormField/fields/DateField/index.d.ts.map +1 -0
  59. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.d.ts +5 -0
  60. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.d.ts.map +1 -0
  61. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.d.ts +88 -0
  62. package/dist/types/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.d.ts.map +1 -0
  63. package/dist/types/src/components/Form/FormField/fields/GeoPointField/index.d.ts +2 -0
  64. package/dist/types/src/components/Form/FormField/fields/GeoPointField/index.d.ts.map +1 -0
  65. package/dist/types/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.d.ts +2 -2
  66. package/dist/types/src/components/Form/FormField/fields/MarkdownField/MarkdownField.d.ts.map +1 -0
  67. package/dist/types/src/components/Form/FormField/fields/MarkdownField/MarkdownField.stories.d.ts.map +1 -0
  68. package/dist/types/src/components/Form/FormField/fields/MarkdownField/index.d.ts +2 -0
  69. package/dist/types/src/components/Form/FormField/fields/MarkdownField/index.d.ts.map +1 -0
  70. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.d.ts +15 -0
  71. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.d.ts.map +1 -0
  72. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.stories.d.ts +88 -0
  73. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.stories.d.ts.map +1 -0
  74. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.test.d.ts +2 -0
  75. package/dist/types/src/components/Form/FormField/fields/NumberField/NumberField.test.d.ts.map +1 -0
  76. package/dist/types/src/components/Form/FormField/fields/NumberField/index.d.ts +2 -0
  77. package/dist/types/src/components/Form/FormField/fields/NumberField/index.d.ts.map +1 -0
  78. package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.d.ts +4 -0
  79. package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.d.ts.map +1 -0
  80. package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.d.ts +88 -0
  81. package/dist/types/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.d.ts.map +1 -0
  82. package/dist/types/src/components/Form/FormField/fields/PasswordField/index.d.ts +2 -0
  83. package/dist/types/src/components/Form/FormField/fields/PasswordField/index.d.ts.map +1 -0
  84. package/dist/types/src/components/Form/FormField/fields/RefField/InlineRefField.d.ts.map +1 -0
  85. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.d.ts +16 -0
  86. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.d.ts.map +1 -0
  87. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.stories.d.ts +92 -0
  88. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.stories.d.ts.map +1 -0
  89. package/dist/types/src/components/Form/FormField/fields/RefField/RefField.test.d.ts.map +1 -0
  90. package/dist/types/src/components/Form/FormField/fields/RefField/index.d.ts +3 -0
  91. package/dist/types/src/components/Form/FormField/fields/RefField/index.d.ts.map +1 -0
  92. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.d.ts +29 -0
  93. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.d.ts.map +1 -0
  94. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts +88 -0
  95. package/dist/types/src/components/Form/FormField/fields/SelectField/SelectField.stories.d.ts.map +1 -0
  96. package/dist/types/src/components/Form/FormField/fields/SelectField/index.d.ts +2 -0
  97. package/dist/types/src/components/Form/FormField/fields/SelectField/index.d.ts.map +1 -0
  98. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts +5 -0
  99. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.d.ts.map +1 -0
  100. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/SelectOptionField.stories.d.ts.map +1 -0
  101. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/index.d.ts +2 -0
  102. package/dist/types/src/components/Form/FormField/fields/SelectOptionField/index.d.ts.map +1 -0
  103. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.d.ts +4 -0
  104. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.d.ts.map +1 -0
  105. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts +88 -0
  106. package/dist/types/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.d.ts.map +1 -0
  107. package/dist/types/src/components/Form/FormField/fields/TextAreaField/index.d.ts +2 -0
  108. package/dist/types/src/components/Form/FormField/fields/TextAreaField/index.d.ts.map +1 -0
  109. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.d.ts +4 -0
  110. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.d.ts.map +1 -0
  111. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.stories.d.ts +88 -0
  112. package/dist/types/src/components/Form/FormField/fields/TextField/TextField.stories.d.ts.map +1 -0
  113. package/dist/types/src/components/Form/FormField/fields/TextField/index.d.ts +2 -0
  114. package/dist/types/src/components/Form/FormField/fields/TextField/index.d.ts.map +1 -0
  115. package/dist/types/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.d.ts +2 -2
  116. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.d.ts.map +1 -0
  117. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts +88 -0
  118. package/dist/types/src/components/Form/FormField/fields/TupleField/TupleField.stories.d.ts.map +1 -0
  119. package/dist/types/src/components/Form/FormField/fields/TupleField/index.d.ts +2 -0
  120. package/dist/types/src/components/Form/FormField/fields/TupleField/index.d.ts.map +1 -0
  121. package/dist/types/src/components/Form/{fields → FormField/fields}/index.d.ts +4 -1
  122. package/dist/types/src/components/Form/FormField/fields/index.d.ts.map +1 -0
  123. package/dist/types/src/components/Form/FormField/index.d.ts +6 -0
  124. package/dist/types/src/components/Form/FormField/index.d.ts.map +1 -0
  125. package/dist/types/src/components/Form/FormField/presentation.d.ts +22 -0
  126. package/dist/types/src/components/Form/FormField/presentation.d.ts.map +1 -0
  127. package/dist/types/src/components/Form/FormFieldSet/FormFieldSet.d.ts +30 -0
  128. package/dist/types/src/components/Form/FormFieldSet/FormFieldSet.d.ts.map +1 -0
  129. package/dist/types/src/components/Form/FormFieldSet/FormFieldSetContainer.d.ts +22 -0
  130. package/dist/types/src/components/Form/FormFieldSet/FormFieldSetContainer.d.ts.map +1 -0
  131. package/dist/types/src/components/Form/FormFieldSet/index.d.ts +3 -0
  132. package/dist/types/src/components/Form/FormFieldSet/index.d.ts.map +1 -0
  133. package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.d.ts +2 -0
  134. package/dist/types/src/components/Form/FormLayout/FormLayout.d.ts.map +1 -0
  135. package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.stories.d.ts +5 -5
  136. package/dist/types/src/components/Form/FormLayout/FormLayout.stories.d.ts.map +1 -0
  137. package/dist/types/src/components/Form/FormLayout/FormLayout.stories.test.d.ts.map +1 -0
  138. package/dist/types/src/components/Form/FormLayout/FormLayout.test.d.ts.map +1 -0
  139. package/dist/types/src/components/Form/FormLayout/index.d.ts +3 -0
  140. package/dist/types/src/components/Form/FormLayout/index.d.ts.map +1 -0
  141. package/dist/types/src/components/Form/FormLayout/parser.d.ts.map +1 -0
  142. package/dist/types/src/components/Form/FormLayout/parser.test.d.ts.map +1 -0
  143. package/dist/types/src/components/Form/index.d.ts +3 -5
  144. package/dist/types/src/components/Form/index.d.ts.map +1 -1
  145. package/dist/types/src/components/Form/meta-tags.d.ts +1 -12
  146. package/dist/types/src/components/Form/meta-tags.d.ts.map +1 -1
  147. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -1
  148. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +6 -23
  149. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -1
  150. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts +2 -1
  151. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts.map +1 -1
  152. package/dist/types/src/components/RefEditor/RefEditor.stories.d.ts +2 -2
  153. package/dist/types/src/components/RefEditor/RefEditor.stories.d.ts.map +1 -1
  154. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +1 -1
  155. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  156. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +2 -2
  157. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
  158. package/dist/types/src/components/index.d.ts +0 -1
  159. package/dist/types/src/components/index.d.ts.map +1 -1
  160. package/dist/types/src/hooks/index.d.ts +2 -0
  161. package/dist/types/src/hooks/index.d.ts.map +1 -1
  162. package/dist/types/src/hooks/useAsyncFieldEffect.d.ts +24 -0
  163. package/dist/types/src/hooks/useAsyncFieldEffect.d.ts.map +1 -0
  164. package/dist/types/src/hooks/useFormContext.d.ts +42 -0
  165. package/dist/types/src/hooks/useFormContext.d.ts.map +1 -0
  166. package/dist/types/src/hooks/useFormHandler.d.ts +9 -6
  167. package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -1
  168. package/dist/types/src/index.d.ts +2 -0
  169. package/dist/types/src/index.d.ts.map +1 -1
  170. package/dist/types/src/{components/testing.d.ts → testing/TestLayout.d.ts} +2 -2
  171. package/dist/types/src/testing/TestLayout.d.ts.map +1 -0
  172. package/dist/types/src/testing/index.d.ts +3 -0
  173. package/dist/types/src/testing/index.d.ts.map +1 -0
  174. package/dist/types/src/testing/schema.d.ts +40 -0
  175. package/dist/types/src/testing/schema.d.ts.map +1 -0
  176. package/dist/types/src/types.d.ts +161 -0
  177. package/dist/types/src/types.d.ts.map +1 -0
  178. package/dist/types/src/util/index.d.ts +1 -1
  179. package/dist/types/src/util/index.d.ts.map +1 -1
  180. package/dist/types/src/util/omit.d.ts +12 -0
  181. package/dist/types/src/util/omit.d.ts.map +1 -0
  182. package/dist/types/tsconfig.tsbuildinfo +1 -1
  183. package/package.json +43 -41
  184. package/src/annotations.ts +63 -0
  185. package/src/components/FieldEditor/FieldEditor.stories.tsx +1 -1
  186. package/src/components/FieldEditor/FieldEditor.test.tsx +1 -1
  187. package/src/components/FieldEditor/FieldEditor.tsx +10 -6
  188. package/src/components/Form/DESIGN.md +24 -0
  189. package/src/components/Form/Form.stories.tsx +260 -61
  190. package/src/components/Form/Form.theme.test.ts +33 -0
  191. package/src/components/Form/Form.theme.ts +86 -0
  192. package/src/components/Form/Form.tsx +30 -453
  193. package/src/components/Form/FormControls.tsx +377 -0
  194. package/src/components/Form/{FormField.tsx → FormField/FormField.tsx} +98 -71
  195. package/src/components/Form/FormField/FormFieldHeader.tsx +68 -0
  196. package/src/components/Form/FormField/FormRow.stories.tsx +97 -0
  197. package/src/components/Form/FormField/FormRow.tsx +298 -0
  198. package/src/components/Form/FormField/fields/ArrayField/ArrayField.stories.tsx +119 -0
  199. package/src/components/Form/FormField/fields/ArrayField/ArrayField.tsx +328 -0
  200. package/src/components/Form/FormField/fields/ArrayField/index.ts +5 -0
  201. package/src/components/Form/FormField/fields/AsyncSelectField/AsyncSelectField.tsx +59 -0
  202. package/src/components/Form/FormField/fields/AsyncSelectField/index.ts +5 -0
  203. package/src/components/Form/FormField/fields/AutofillField/AutofillField.tsx +67 -0
  204. package/src/components/Form/FormField/fields/AutofillField/index.ts +5 -0
  205. package/src/components/Form/FormField/fields/BooleanField/BooleanField.stories.tsx +52 -0
  206. package/src/components/Form/FormField/fields/BooleanField/BooleanField.tsx +28 -0
  207. package/src/components/Form/FormField/fields/BooleanField/index.ts +5 -0
  208. package/src/components/Form/FormField/fields/ComboboxField/ComboboxField.tsx +104 -0
  209. package/src/components/Form/FormField/fields/ComboboxField/index.ts +5 -0
  210. package/src/components/Form/FormField/fields/DateField/DateField.stories.tsx +60 -0
  211. package/src/components/Form/{fields → FormField/fields/DateField}/DateField.tsx +12 -10
  212. package/src/components/Form/FormField/fields/DateField/index.ts +5 -0
  213. package/src/components/Form/FormField/fields/GeoPointField/GeoPointField.stories.tsx +53 -0
  214. package/src/components/Form/{fields → FormField/fields/GeoPointField}/GeoPointField.tsx +19 -21
  215. package/src/components/Form/FormField/fields/GeoPointField/index.ts +5 -0
  216. package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.tsx +8 -8
  217. package/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.tsx +41 -41
  218. package/src/components/Form/FormField/fields/MarkdownField/index.ts +5 -0
  219. package/src/components/Form/FormField/fields/NumberField/NumberField.stories.tsx +52 -0
  220. package/src/components/Form/FormField/fields/NumberField/NumberField.test.ts +29 -0
  221. package/src/components/Form/FormField/fields/NumberField/NumberField.tsx +140 -0
  222. package/src/components/Form/FormField/fields/NumberField/index.ts +5 -0
  223. package/src/components/Form/FormField/fields/PasswordField/PasswordField.stories.tsx +53 -0
  224. package/src/components/Form/FormField/fields/PasswordField/PasswordField.tsx +41 -0
  225. package/src/components/Form/FormField/fields/PasswordField/index.ts +5 -0
  226. package/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.tsx +21 -14
  227. package/src/components/Form/FormField/fields/RefField/RefField.stories.tsx +97 -0
  228. package/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.ts +10 -1
  229. package/src/components/Form/{fields → FormField/fields/RefField}/RefField.tsx +55 -47
  230. package/src/components/Form/FormField/fields/RefField/index.ts +6 -0
  231. package/src/components/Form/FormField/fields/SelectField/SelectField.stories.tsx +53 -0
  232. package/src/components/Form/FormField/fields/SelectField/SelectField.tsx +136 -0
  233. package/src/components/Form/FormField/fields/SelectField/index.ts +5 -0
  234. package/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.stories.tsx +5 -5
  235. package/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.tsx +56 -54
  236. package/src/components/Form/FormField/fields/SelectOptionField/index.ts +5 -0
  237. package/src/components/Form/FormField/fields/TextAreaField/TextAreaField.stories.tsx +53 -0
  238. package/src/components/Form/{fields → FormField/fields/TextAreaField}/TextAreaField.tsx +6 -4
  239. package/src/components/Form/FormField/fields/TextAreaField/index.ts +5 -0
  240. package/src/components/Form/FormField/fields/TextField/TextField.stories.tsx +52 -0
  241. package/src/components/Form/{fields → FormField/fields/TextField}/TextField.tsx +6 -4
  242. package/src/components/Form/FormField/fields/TextField/index.ts +5 -0
  243. package/src/components/Form/FormField/fields/TupleField/TupleField.stories.tsx +55 -0
  244. package/src/components/Form/{fields → FormField/fields/TupleField}/TupleField.tsx +4 -2
  245. package/src/components/Form/FormField/fields/TupleField/index.ts +5 -0
  246. package/src/components/Form/{fields → FormField/fields}/index.ts +4 -1
  247. package/src/components/Form/FormField/index.ts +10 -0
  248. package/src/components/Form/FormField/presentation.tsx +32 -0
  249. package/src/components/Form/{FormFieldSet.tsx → FormFieldSet/FormFieldSet.tsx} +53 -90
  250. package/src/components/Form/FormFieldSet/FormFieldSetContainer.tsx +93 -0
  251. package/src/components/Form/FormFieldSet/index.ts +6 -0
  252. package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.tsx +11 -9
  253. package/src/components/Form/{Layout → FormLayout}/FormLayout.tsx +29 -18
  254. package/src/components/Form/FormLayout/index.ts +6 -0
  255. package/src/components/Form/index.ts +3 -5
  256. package/src/components/Form/meta-tags.test.ts +1 -1
  257. package/src/components/Form/meta-tags.ts +1 -1
  258. package/src/components/ObjectForm/ObjectForm.tsx +15 -14
  259. package/src/components/ObjectPicker/ObjectPicker.tsx +20 -27
  260. package/src/components/ObjectProperties/ObjectProperties.stories.tsx +2 -2
  261. package/src/components/ObjectProperties/ObjectProperties.test.tsx +1 -1
  262. package/src/components/ObjectProperties/ObjectProperties.tsx +13 -8
  263. package/src/components/RefEditor/RefEditor.stories.tsx +2 -3
  264. package/src/components/RefEditor/RefEditor.tsx +1 -1
  265. package/src/components/ViewEditor/ViewEditor.stories.tsx +6 -7
  266. package/src/components/ViewEditor/ViewEditor.test.tsx +9 -3
  267. package/src/components/ViewEditor/ViewEditor.tsx +98 -128
  268. package/src/components/index.ts +0 -1
  269. package/src/hooks/index.ts +2 -0
  270. package/src/hooks/useAsyncFieldEffect.ts +81 -0
  271. package/src/hooks/useFormContext.ts +89 -0
  272. package/src/hooks/useFormHandler.ts +12 -10
  273. package/src/index.ts +2 -0
  274. package/src/{components/testing.tsx → testing/TestLayout.tsx} +16 -13
  275. package/src/testing/index.ts +7 -0
  276. package/src/testing/schema.ts +59 -0
  277. package/src/types.ts +186 -0
  278. package/src/util/index.ts +1 -1
  279. package/src/util/omit.ts +61 -0
  280. package/src/util/properties.test.ts +110 -28
  281. package/src/util/refs.ts +1 -1
  282. package/src/vitest-setup.ts +40 -0
  283. package/dist/types/src/components/Form/FormField.d.ts +0 -52
  284. package/dist/types/src/components/Form/FormField.d.ts.map +0 -1
  285. package/dist/types/src/components/Form/FormFieldComponent.d.ts +0 -98
  286. package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +0 -1
  287. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +0 -1
  288. package/dist/types/src/components/Form/FormFieldSet.d.ts +0 -26
  289. package/dist/types/src/components/Form/FormFieldSet.d.ts.map +0 -1
  290. package/dist/types/src/components/Form/FormTooltipsContext.d.ts +0 -19
  291. package/dist/types/src/components/Form/FormTooltipsContext.d.ts.map +0 -1
  292. package/dist/types/src/components/Form/Layout/FormLayout.d.ts.map +0 -1
  293. package/dist/types/src/components/Form/Layout/FormLayout.stories.d.ts.map +0 -1
  294. package/dist/types/src/components/Form/Layout/FormLayout.stories.test.d.ts.map +0 -1
  295. package/dist/types/src/components/Form/Layout/FormLayout.test.d.ts.map +0 -1
  296. package/dist/types/src/components/Form/Layout/annotation.d.ts +0 -30
  297. package/dist/types/src/components/Form/Layout/annotation.d.ts.map +0 -1
  298. package/dist/types/src/components/Form/Layout/index.d.ts +0 -4
  299. package/dist/types/src/components/Form/Layout/index.d.ts.map +0 -1
  300. package/dist/types/src/components/Form/Layout/parser.d.ts.map +0 -1
  301. package/dist/types/src/components/Form/Layout/parser.test.d.ts.map +0 -1
  302. package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +0 -1
  303. package/dist/types/src/components/Form/fields/BooleanField.d.ts +0 -4
  304. package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +0 -1
  305. package/dist/types/src/components/Form/fields/DateField.d.ts +0 -4
  306. package/dist/types/src/components/Form/fields/DateField.d.ts.map +0 -1
  307. package/dist/types/src/components/Form/fields/GeoPointField.d.ts +0 -5
  308. package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +0 -1
  309. package/dist/types/src/components/Form/fields/InlineRefField.d.ts.map +0 -1
  310. package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +0 -1
  311. package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts.map +0 -1
  312. package/dist/types/src/components/Form/fields/NumberField.d.ts +0 -4
  313. package/dist/types/src/components/Form/fields/NumberField.d.ts.map +0 -1
  314. package/dist/types/src/components/Form/fields/RefField.d.ts +0 -34
  315. package/dist/types/src/components/Form/fields/RefField.d.ts.map +0 -1
  316. package/dist/types/src/components/Form/fields/RefField.test.d.ts.map +0 -1
  317. package/dist/types/src/components/Form/fields/SelectField.d.ts +0 -13
  318. package/dist/types/src/components/Form/fields/SelectField.d.ts.map +0 -1
  319. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +0 -5
  320. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +0 -1
  321. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +0 -1
  322. package/dist/types/src/components/Form/fields/TextAreaField.d.ts +0 -4
  323. package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +0 -1
  324. package/dist/types/src/components/Form/fields/TextField.d.ts +0 -4
  325. package/dist/types/src/components/Form/fields/TextField.d.ts.map +0 -1
  326. package/dist/types/src/components/Form/fields/TupleField.d.ts.map +0 -1
  327. package/dist/types/src/components/Form/fields/index.d.ts.map +0 -1
  328. package/dist/types/src/components/Settings/Settings.d.ts +0 -51
  329. package/dist/types/src/components/Settings/Settings.d.ts.map +0 -1
  330. package/dist/types/src/components/Settings/Settings.stories.d.ts.map +0 -1
  331. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts +0 -43
  332. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts.map +0 -1
  333. package/dist/types/src/components/Settings/SettingsItem.d.ts +0 -16
  334. package/dist/types/src/components/Settings/SettingsItem.d.ts.map +0 -1
  335. package/dist/types/src/components/Settings/SettingsSelectField.d.ts +0 -18
  336. package/dist/types/src/components/Settings/SettingsSelectField.d.ts.map +0 -1
  337. package/dist/types/src/components/Settings/index.d.ts +0 -4
  338. package/dist/types/src/components/Settings/index.d.ts.map +0 -1
  339. package/dist/types/src/components/testing.d.ts.map +0 -1
  340. package/dist/types/src/util/field-type.d.ts +0 -19
  341. package/dist/types/src/util/field-type.d.ts.map +0 -1
  342. package/src/components/Form/AUDIT.md +0 -17
  343. package/src/components/Form/FormFieldComponent.stories.tsx +0 -65
  344. package/src/components/Form/FormFieldComponent.tsx +0 -253
  345. package/src/components/Form/FormTooltipsContext.ts +0 -25
  346. package/src/components/Form/Layout/annotation.ts +0 -38
  347. package/src/components/Form/Layout/index.ts +0 -7
  348. package/src/components/Form/README.md +0 -3
  349. package/src/components/Form/fields/ArrayField.tsx +0 -173
  350. package/src/components/Form/fields/BooleanField.tsx +0 -22
  351. package/src/components/Form/fields/NumberField.tsx +0 -76
  352. package/src/components/Form/fields/SelectField.tsx +0 -77
  353. package/src/components/Settings/AUDIT.md +0 -51
  354. package/src/components/Settings/Settings.stories.tsx +0 -104
  355. package/src/components/Settings/Settings.tsx +0 -81
  356. package/src/components/Settings/SettingsFieldSet.tsx +0 -257
  357. package/src/components/Settings/SettingsItem.tsx +0 -58
  358. package/src/components/Settings/SettingsSelectField.tsx +0 -59
  359. package/src/components/Settings/index.ts +0 -7
  360. package/src/util/field-type.ts +0 -60
  361. /package/dist/types/src/components/Form/{fields → FormField/fields/MarkdownField}/MarkdownField.stories.d.ts +0 -0
  362. /package/dist/types/src/components/Form/{fields → FormField/fields/RefField}/InlineRefField.d.ts +0 -0
  363. /package/dist/types/src/components/Form/{fields → FormField/fields/RefField}/RefField.test.d.ts +0 -0
  364. /package/dist/types/src/components/Form/{fields → FormField/fields/SelectOptionField}/SelectOptionField.stories.d.ts +0 -0
  365. /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.stories.test.d.ts +0 -0
  366. /package/dist/types/src/components/Form/{Layout → FormLayout}/FormLayout.test.d.ts +0 -0
  367. /package/dist/types/src/components/Form/{Layout → FormLayout}/parser.d.ts +0 -0
  368. /package/dist/types/src/components/Form/{Layout → FormLayout}/parser.test.d.ts +0 -0
  369. /package/src/components/Form/{Layout → FormLayout}/FormLayout.stories.test.tsx +0 -0
  370. /package/src/components/Form/{Layout → FormLayout}/FormLayout.test.ts +0 -0
  371. /package/src/components/Form/{Layout → FormLayout}/parser.test.ts +0 -0
  372. /package/src/components/Form/{Layout → FormLayout}/parser.ts +0 -0
@@ -8,7 +8,7 @@ import { Type } from '@dxos/echo';
8
8
  * row (see the `Linear` story). The `FormLayoutAnnotation` on this schema
9
9
  * arranges the same fields in a 2-column grid with selective spans.
10
10
  */
11
- declare const Flight: Type.Obj<{
11
+ declare const Flight: Type.ObjClass<unknown, {
12
12
  readonly airline?: string | undefined;
13
13
  readonly flightNumber?: string | undefined;
14
14
  readonly origin?: string | undefined;
@@ -17,15 +17,15 @@ declare const Flight: Type.Obj<{
17
17
  readonly arriveAt?: string | undefined;
18
18
  readonly cabin?: "business" | "economy" | "first" | "premium" | undefined;
19
19
  readonly notes?: string | undefined;
20
- }, Schema.Struct.Fields>;
20
+ }, {}>;
21
21
  export type Flight = Type.InstanceType<typeof Flight>;
22
- type StoryProps = {
22
+ type StoryArgs = {
23
23
  schema: Schema.Schema<any>;
24
24
  template?: string;
25
25
  };
26
26
  declare const meta: {
27
27
  title: string;
28
- render: ({ schema, template }: StoryProps) => React.JSX.Element;
28
+ render: ({ schema, template }: StoryArgs) => React.JSX.Element;
29
29
  decorators: import("@storybook/react").Decorator[];
30
30
  parameters: {
31
31
  layout: string;
@@ -106,7 +106,7 @@ declare const meta: {
106
106
  };
107
107
  };
108
108
  export default meta;
109
- type Story = StoryObj<StoryProps>;
109
+ type Story = StoryObj<StoryArgs>;
110
110
  /** Baseline: no annotation, no override — `Form.FieldSet` renders linearly (one field per row). */
111
111
  export declare const Linear: Story;
112
112
  /** `Form.Layout` invoked directly with a `template` prop, bypassing any annotation. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormLayout.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormLayout/FormLayout.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAoD,MAAM,OAAO,CAAC;AAEzE,OAAO,EAA2B,IAAI,EAAE,MAAM,YAAY,CAAC;AAiB3D;;;;;GAKG;AACH,QAAA,MAAM,MAAM;;;;;;;;;MAS0D,CAAC;AAEvE,MAAM,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAoFtD,KAAK,SAAS,GAAG;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAwBF,QAAA,MAAM,IAAI;;mCAtBkC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC1B,CAAC;eAEb,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEjC,mGAAmG;AACnG,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,EAAE,KAI9B,CAAC;AAwCF,eAAO,MAAM,eAAe,EAAE,KAE7B,CAAC;AAqCF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AA0IF,eAAO,MAAM,cAAc,EAAE,KAE5B,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,cAAc,EAAE,KAE5B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormLayout.stories.test.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormLayout/FormLayout.stories.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormLayout.test.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormLayout/FormLayout.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { FormLayout, type FormLayoutProps } from './FormLayout';
2
+ export { type LayoutNode, LayoutParseError, parseLayout } from './parser';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormLayout/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormLayout/parser.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,4CAA4C;AAC5C,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,GAC1F;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E,qBAAa,gBAAiB,SAAQ,KAAK;IAIvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM;IAH5B,QAAQ,CAAC,IAAI,sBAAsB;IACnC,YACE,OAAO,EAAE,MAAM,EACN,QAAQ,CAAC,EAAE,MAAM,YAAA,EAG3B;CACF;AAuED,0FAA0F;AAC1F,eAAO,MAAM,WAAW,aAAc,MAAM,KAAG,UA+D9C,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.test.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/FormLayout/parser.test.ts"],"names":[],"mappings":""}
@@ -1,7 +1,5 @@
1
- export * from './fields';
2
- export * from './Form';
3
- export * from './FormFieldComponent';
4
- export * from './FormTooltipsContext';
5
1
  export * from './meta-tags';
6
- export * from './Layout';
2
+ export * from './Form';
3
+ export * from './FormField';
4
+ export * from './FormFieldSet';
7
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAEzB,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAE5B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import * as Schema from 'effect/Schema';
2
- import { Ref } from '@dxos/echo';
3
2
  /**
4
3
  * Form-field key for the synthetic meta-tags array spliced into property/create forms.
5
4
  *
@@ -16,15 +15,5 @@ export declare const META_TAGS_KEY = "_tags";
16
15
  * a schema for editing and drops `id`. Keyed by {@link META_TAGS_KEY} so it never collides with a
17
16
  * `tags` field the schema declares itself.
18
17
  */
19
- export declare const withMetaTags: (schema: Schema.Schema.AnyNoContext) => Schema.Schema<import("./Form").ExcludeId<Schema.extend<Schema.Struct<{
20
- _tags: Schema.optional<Schema.Array$<Ref.RefSchema<{
21
- readonly label: string;
22
- readonly hue?: string | undefined;
23
- } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>>>;
24
- }>, Schema.Schema.AnyNoContext>>, import("./Form").ExcludeId<Schema.extend<Schema.Struct<{
25
- _tags: Schema.optional<Schema.Array$<Ref.RefSchema<{
26
- readonly label: string;
27
- readonly hue?: string | undefined;
28
- } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>>>;
29
- }>, Schema.Schema.AnyNoContext>>, never>;
18
+ export declare const withMetaTags: (schema: Schema.Schema.AnyNoContext) => Schema.Schema<Omit<any, "id">, Omit<any, "id">, never>;
30
19
  //# sourceMappingURL=meta-tags.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta-tags.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/meta-tags.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,EAAO,MAAM,YAAY,CAAC;AAItC;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,YAAY,WAAY,MAAM,CAAC,MAAM,CAAC,YAAY;;;;;;;;;;wCAK5D,CAAC"}
1
+ {"version":3,"file":"meta-tags.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/meta-tags.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,YAAY,WAAY,MAAM,CAAC,MAAM,CAAC,YAAY,2DAK5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectForm/ObjectForm.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,GAAG,EAAY,IAAI,EAAE,MAAM,YAAY,CAAC;AASjD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;CACrB,CAAC;AAeF,eAAO,MAAM,UAAU,qBAAsB,eAAe,sBA6E3D,CAAC"}
1
+ {"version":3,"file":"ObjectForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectForm/ObjectForm.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,GAAG,EAAY,IAAI,EAAE,MAAM,YAAY,CAAC;AAUjD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,UAAU,qBAAsB,eAAe,sBA6E3D,CAAC"}
@@ -1,22 +1,11 @@
1
1
  import type * as Schema from 'effect/Schema';
2
2
  import React from 'react';
3
- import { type Palette, type ThemedClassName } from '@dxos/react-ui';
4
- import { type FormFieldMap } from '../Form/FormFieldComponent';
5
- export type RefOption = {
6
- id: string;
7
- label: string;
8
- hue?: Palette;
9
- };
10
- export type ObjectPickerContentProps = ThemedClassName<{
3
+ import { type ThemedClassName } from '@dxos/react-ui';
4
+ import { type CreateOptions, type RefOption } from '#types';
5
+ export type ObjectPickerContentProps = ThemedClassName<CreateOptions & {
11
6
  options: RefOption[];
12
7
  selectedIds?: string[];
13
- createOptionLabel?: [string, {
14
- ns: string | readonly string[];
15
- }];
16
- createOptionIcon?: string;
17
8
  createSchema?: Schema.Schema.AnyNoContext;
18
- createInitialValuePath?: string;
19
- createFieldMap?: FormFieldMap;
20
9
  /**
21
10
  * Persist a newly-created object given the form values. May be async (e.g.
22
11
  * to write to a database). The Promise is awaited before the inline create
@@ -25,7 +14,7 @@ export type ObjectPickerContentProps = ThemedClassName<{
25
14
  * before the picker UI re-renders.
26
15
  */
27
16
  onCreate?: (values: any) => unknown | Promise<unknown>;
28
- onSelect: (id: string) => void;
17
+ onSelect?: (id: string) => void;
29
18
  }>;
30
19
  export declare const ObjectPicker: {
31
20
  Root: ({ children, modal, modalId: modalIdProp, open: openProp, defaultOpen, onOpenChange: propsOnOpenChange, value: valueProp, defaultValue, onValueChange: propsOnValueChange, placeholder, }: import("@dxos/react-ui-list").ComboboxRootProps) => React.JSX.Element;
@@ -42,16 +31,10 @@ export declare const ObjectPicker: {
42
31
  }): React.JSX.Element;
43
32
  displayName: string;
44
33
  };
45
- Content: React.ForwardRefExoticComponent<Omit<{
34
+ Content: React.ForwardRefExoticComponent<Omit<CreateOptions & {
46
35
  options: RefOption[];
47
36
  selectedIds?: string[];
48
- createOptionLabel?: [string, {
49
- ns: string | readonly string[];
50
- }];
51
- createOptionIcon?: string;
52
37
  createSchema?: Schema.Schema.AnyNoContext;
53
- createInitialValuePath?: string;
54
- createFieldMap?: FormFieldMap;
55
38
  /**
56
39
  * Persist a newly-created object given the form values. May be async (e.g.
57
40
  * to write to a database). The Promise is awaited before the inline create
@@ -60,7 +43,7 @@ export declare const ObjectPicker: {
60
43
  * before the picker UI re-renders.
61
44
  */
62
45
  onCreate?: (values: any) => unknown | Promise<unknown>;
63
- onSelect: (id: string) => void;
46
+ onSelect?: (id: string) => void;
64
47
  }, "className"> & {
65
48
  classNames?: import("@dxos/ui-types").ClassNameValue;
66
49
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectPicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectPicker/ObjectPicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAgE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,KAAK,OAAO,EAAW,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAO7F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC;IACrD,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAA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AAM,wBAAwB,GAAG,eAAe,CACpD,aAAa,GAAG;IACd,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvD,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CACF,CAAC;AA6JF,eAAO,MAAM,YAAY;IACvB,IAAI;IACJ,MAAM;;;;;;IACN,OAAO;IACP,cAAc;;;;;;IACd,OAAO;iBA/KI,SAAS,EAAE;sBACN,MAAM,EAAE;uBACP,MAAM,CAAC,MAAM,CAAC,YAAY;QACzC;;;;;;WAMG;mBACQ,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAC3C,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;;;;CAqKlC,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
2
  import { Obj } from '@dxos/echo';
3
+ import { type RefFieldDataProps } from '#types';
3
4
  export type ObjectPropertiesProps = PropsWithChildren<{
4
5
  object: Obj.Unknown;
5
- }>;
6
+ } & Pick<RefFieldDataProps, 'getCreateDefaults' | 'resolveCreateEntry'>>;
6
7
  export declare const ObjectProperties: React.ForwardRefExoticComponent<Omit<ObjectPropertiesProps, "className"> & {
7
8
  classNames?: import("@dxos/ui-types").ClassNameValue;
8
9
  } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectProperties.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectProperties/ObjectProperties.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,GAAG,EAAkB,MAAM,YAAY,CAAC;AAYjD,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;IAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAA;CAAE,CAAC,CAAC;AAG/E,eAAO,MAAM,gBAAgB;;2HA6G5B,CAAC"}
1
+ {"version":3,"file":"ObjectProperties.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectProperties/ObjectProperties.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,GAAG,EAAkB,MAAM,YAAY,CAAC;AASjD,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAInE,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CACnD;IAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC,iBAAiB,EAAE,mBAAmB,GAAG,oBAAoB,CAAC,CAC9F,CAAC;AAGF,eAAO,MAAM,gBAAgB;;2HA+G5B,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
3
  import { type RefEditorProps } from './RefEditor';
4
- type StoryProps = Partial<Pick<RefEditorProps, 'value' | 'mode' | 'activateOnTyping' | 'autoFocus'>>;
4
+ type StoryArgs = Partial<Pick<RefEditorProps, 'value' | 'mode' | 'activateOnTyping' | 'autoFocus'>>;
5
5
  declare const meta: {
6
6
  title: string;
7
- render: ({ value: initialValue, ...args }: StoryProps) => React.JSX.Element;
7
+ render: ({ value: initialValue, ...args }: StoryArgs) => React.JSX.Element;
8
8
  decorators: import("@storybook/react").Decorator[];
9
9
  parameters: {
10
10
  translations: [{
@@ -1 +1 @@
1
- {"version":3,"file":"RefEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/RefEditor/RefEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA6B,MAAM,OAAO,CAAC;AAclD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAoD7D,KAAK,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,kBAAkB,GAAG,WAAW,CAAC,CAAC,CAAC;AA2BrG,QAAA,MAAM,IAAI;;+CAvB8C,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC7B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC"}
1
+ {"version":3,"file":"RefEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/RefEditor/RefEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA6B,MAAM,OAAO,CAAC;AAclD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAoD7D,KAAK,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,GAAG,kBAAkB,GAAG,WAAW,CAAC,CAAC,CAAC;AA0BpG,QAAA,MAAM,IAAI;;+CAtB8C,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC5B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC"}
@@ -14,7 +14,7 @@ export type ViewEditorProps = ThemedClassName<{
14
14
  onDelete?: (fieldId: string) => void;
15
15
  } & Pick<QueryFormProps, 'types' | 'tags'> & Pick<FormRootProps<any>, 'readonly' | 'db'>>;
16
16
  /**
17
- * Schema-based object form.
17
+ * View editor form.
18
18
  */
19
19
  export declare const ViewEditor: React.ForwardRefExoticComponent<Omit<{
20
20
  type?: Type.AnyEntity;
@@ -1 +1 @@
1
- {"version":3,"file":"ViewEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAsF,MAAM,OAAO,CAAC;AAE3G,OAAO,EAEL,GAAG,EAOH,QAAQ,EAER,KAAK,QAAQ,EACb,IAAI,EACJ,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAA8B,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3E,OAAO,EAEL,eAAe,EAIhB,MAAM,cAAc,CAAC;AAMtB,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,eAAe,GAAG,eAAe,CAC3C;IACE,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC,QA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,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC,GACxC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC,CAC9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;WAdZ,IAAI,CAAC,SAAS;UACf,IAAI,CAAC,IAAI;WACR,QAAQ,GAAG,KAAK;eACZ,QAAQ,CAAC,QAAQ;kBACd,OAAO;qBACJ,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI;eACvD,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;;;gDA2LvC,CAAC"}
@@ -8,10 +8,10 @@ export type ViewEditorDebugObjects = {
8
8
  view: View.View;
9
9
  projection: ProjectionModel;
10
10
  };
11
- type DefaultStoryProps = Pick<ViewEditorProps, 'readonly' | 'mode'>;
11
+ type StoryArgs = Pick<ViewEditorProps, 'readonly' | 'mode'>;
12
12
  declare const meta: {
13
13
  title: string;
14
- render: (props: DefaultStoryProps) => React.JSX.Element;
14
+ render: (props: StoryArgs) => React.JSX.Element;
15
15
  decorators: import("@storybook/react").Decorator[];
16
16
  parameters: {
17
17
  layout: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ViewEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAuE,IAAI,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAOlH,OAAO,EAAE,KAAK,eAAe,EAAkC,MAAM,cAAc,CAAC;AAMpF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAWhE,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,UAAU,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,KAAK,iBAAiB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;AAsHpE,QAAA,MAAM,IAAI;;oBApHmB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwIT,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC"}
1
+ {"version":3,"file":"ViewEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAuE,IAAI,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAOlH,OAAO,EAAE,KAAK,eAAe,EAAkC,MAAM,cAAc,CAAC;AAMpF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAUhE,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,UAAU,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,KAAK,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;AAsH5D,QAAA,MAAM,IAAI;;oBApHmB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwID,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC"}
@@ -5,6 +5,5 @@ export * from './ObjectPicker';
5
5
  export * from './ObjectProperties';
6
6
  export * from './ObjectTree';
7
7
  export * from './RefEditor';
8
- export * from './Settings';
9
8
  export * from './ViewEditor';
10
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -1,3 +1,5 @@
1
+ export * from './useAsyncFieldEffect';
2
+ export * from './useFormContext';
1
3
  export * from './useFormHandler';
2
4
  export * from './useKeyHandler';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { type AnyProperties } from '@dxos/echo/internal';
3
+ /** Picks the declared dependency fields from the form values — the subset a dynamic field subscribes to. */
4
+ export declare const pickValues: (values: AnyProperties | undefined, deps: readonly string[]) => Record<string, unknown>;
5
+ export type AsyncFieldEffectState<A> = {
6
+ loading: boolean;
7
+ error: unknown;
8
+ data: A | undefined;
9
+ };
10
+ export type UseAsyncFieldEffectOptions = {
11
+ /** Debounce applied before running, so per-keystroke value changes coalesce into one run. */
12
+ debounceMs?: number;
13
+ /** When false, the effect is not run and prior data/error is cleared. */
14
+ enabled?: boolean;
15
+ };
16
+ /**
17
+ * Runs a self-contained Effect (`R = never`) whenever `key` changes, debounced and abortable. Used by
18
+ * dynamic form fields to load select options, derive values, or validate against an external source from
19
+ * the current form values. The latest `factory` is always used, but a run is only (re)triggered when
20
+ * `key` changes — derive `key` from the inputs the factory actually reads. Re-running interrupts the
21
+ * prior run (cancelling any in-flight request).
22
+ */
23
+ export declare const useAsyncFieldEffect: <A>(factory: () => Effect.Effect<A, unknown>, key: string, { debounceMs, enabled }?: UseAsyncFieldEffectOptions) => AsyncFieldEffectState<A>;
24
+ //# sourceMappingURL=useAsyncFieldEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAsyncFieldEffect.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAsyncFieldEffect.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,4GAA4G;AAC5G,eAAO,MAAM,UAAU,WAAY,aAAa,GAAG,SAAS,QAAQ,SAAS,MAAM,EAAE,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAM7G,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,WAC1B,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,OACnC,MAAM,4BAC2B,0BAA0B,KAC/D,qBAAqB,CAAC,CAAC,CAoCzB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { type AnyProperties } from '@dxos/echo/internal';
2
+ import { type FieldContext, type FormFieldStateProps } from '#types';
3
+ import { type FormVariant } from '../components/Form/Form.theme';
4
+ import { type FormHandler } from './useFormHandler';
5
+ export type FormContextValue<T extends AnyProperties = any> = {
6
+ /**
7
+ * Form handler.
8
+ */
9
+ form: FormHandler<T>;
10
+ /**
11
+ * Testing.
12
+ */
13
+ testId?: string;
14
+ /** Visual variant applied across the form's parts (see Form.theme). */
15
+ variant?: FormVariant;
16
+ } & FieldContext;
17
+ export declare const FormContextProvider: import("react").FC<{
18
+ /**
19
+ * Form handler.
20
+ */
21
+ form: FormHandler<any>;
22
+ /**
23
+ * Testing.
24
+ */
25
+ testId?: string;
26
+ /** Visual variant applied across the form's parts (see Form.theme). */
27
+ variant?: FormVariant;
28
+ } & import("#types").FormFieldOptions & import("#types").CreateOptions & import("#types").RefThreadedProps & {
29
+ children: React.ReactNode;
30
+ }>, useFormContext: (consumerName: string) => FormContextValue<any>;
31
+ /**
32
+ * Get the current form values.
33
+ */
34
+ export declare const useFormValues: {
35
+ <T extends AnyProperties>(componentName: string, path?: (string | number)[]): T;
36
+ <T extends AnyProperties>(componentName: string, path: (string | number)[] | undefined, defaultValue: () => T): T | undefined;
37
+ };
38
+ /**
39
+ * Get the state props for the given field.
40
+ */
41
+ export declare const useFormFieldState: (componentName: string, path?: (string | number)[]) => FormFieldStateProps;
42
+ //# sourceMappingURL=useFormContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormContext.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useFormContext.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAMpD,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,aAAa,GAAG,GAAG,IAAI;IAC5D;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uEAAuE;IACvE,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,GAAG,YAAY,CAAC;AAEjB,eAAO,MAAO,mBAAmB;IAd/B;;OAEG;;IAGH;;OAEG;aACM,MAAM;IAEf,uEAAuE;cAC7D,WAAW;;;IAGY,cAAc,iDAA2C,CAAC;AAE7F;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE;IAC1B,CAAC,CAAC,SAAS,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;IAChF,CAAC,CAAC,SAAS,aAAa,EACtB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,SAAS,EACrC,YAAY,EAAE,MAAM,CAAC,GACpB,CAAC,GAAG,SAAS,CAAC;CAsBlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,kBAAmB,MAAM,SAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAQ,mBAezF,CAAC"}
@@ -4,10 +4,7 @@ import { type AnyProperties } from '@dxos/echo/internal';
4
4
  import { SchemaEx } from '@dxos/effect';
5
5
  import { type ValidationError } from '@dxos/schema';
6
6
  import { type MaybePromise } from '@dxos/util';
7
- export type FormFieldStatus = {
8
- status?: 'error';
9
- error?: string;
10
- };
7
+ import { type FormFieldStatus } from '#types';
11
8
  /**
12
9
  * Form properties.
13
10
  */
@@ -59,13 +56,19 @@ export type FormUpdateMeta<T extends AnyProperties> = {
59
56
  export type FormHandler<T extends AnyProperties> = Pick<FormHandlerProps<T>, 'schema' | 'autoSave'> & {
60
57
  /** Initial values (which may not pass validation). */
61
58
  values: Partial<T>;
62
- /** Map of changed fields. */
59
+ /** Fields whose value has been edited (set by `onValueChange`). Gates autosave-on-blur. */
63
60
  changed: Record<SchemaEx.JsonPath, boolean>;
61
+ /** Fields the user has interacted with (set by `onBlur`). Gates error *visibility* — errors only surface once touched. */
64
62
  touched: Record<SchemaEx.JsonPath, boolean>;
65
63
  /** Map of error strings. */
66
64
  errors: Record<SchemaEx.JsonPath, string>;
67
- /** Whether the form can be saved (i.e., data is valid). */
65
+ /** Whether the values pass validation (no errors at all). */
68
66
  isValid: boolean;
67
+ /**
68
+ * Whether the submit affordance should be enabled. Stricter than `isValid`: it also requires no save
69
+ * in flight (`saving`) and only blocks on errors for *touched* fields, so a pristine form with
70
+ * not-yet-touched required fields can still show an enabled control.
71
+ */
69
72
  canSave: boolean;
70
73
  onSave: () => void;
71
74
  onCancel: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useFormHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useFormHandler.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,aAAa;IACvD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAE/B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAE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IAC5B,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAE1C,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IAMrB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,eAAe,CAAC;IACnE,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC;IAC1D,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;IAC5C,aAAa,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CACtF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,aAAa,uIAUnD,gBAAgB,CAAC,CAAC,CAAC,KAAG,WAAW,CAAC,CAAC,CA+NrC,CAAC"}
@@ -1,4 +1,6 @@
1
+ export * from './annotations';
1
2
  export * from './components';
2
3
  export * from './hooks';
4
+ export * from './types';
3
5
  export * from './util';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
2
  type TestLayoutProps = PropsWithChildren<{
3
- json?: any;
3
+ json?: unknown;
4
4
  }>;
5
5
  export declare const TestLayout: ({ children, json }: TestLayoutProps) => React.JSX.Element;
6
6
  export declare const TestPanel: React.ForwardRefExoticComponent<Omit<Omit<{
@@ -16,4 +16,4 @@ export declare const VIEW_EDITOR_DEBUG_SYMBOL: unique symbol;
16
16
  export declare const FIELD_EDITOR_DEBUG_SYMBOL: unique symbol;
17
17
  export declare const OBJECT_PROPERTIES_DEBUG_SYMBOL: unique symbol;
18
18
  export {};
19
- //# sourceMappingURL=testing.d.ts.map
19
+ //# sourceMappingURL=TestLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestLayout.d.ts","sourceRoot":"","sources":["../../../../src/testing/TestLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAOtD,KAAK,eAAe,GAAG,iBAAiB,CAAC;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE7D,eAAO,MAAM,UAAU,uBAAwB,eAAe,sBAkB7D,CAAC;AAIF,eAAO,MAAM,SAAS;;;;;;;;2HAMpB,CAAC;AAGH,eAAO,MAAM,wBAAwB,eAA4B,CAAC;AAClE,eAAO,MAAM,yBAAyB,eAA6B,CAAC;AACpE,eAAO,MAAM,8BAA8B,eAAkC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './schema';
2
+ export * from './TestLayout';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAEzB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Tag, Type } from '@dxos/echo';
2
+ declare const Organization_base: Type.ObjClass<Organization, {
3
+ readonly name: string;
4
+ }, {}>;
5
+ /**
6
+ * Shared test schemas for form stories. Intentionally small, hand-written types
7
+ * (not `@dxos/types`) exercising the range of field renderers: scalars, nested
8
+ * structs, refs, ref arrays, enums, and the various formats.
9
+ */
10
+ export declare class Organization extends Organization_base {
11
+ }
12
+ declare const Person_base: Type.ObjClass<Person, {
13
+ readonly name: string;
14
+ readonly ignore?: string | undefined;
15
+ readonly active?: boolean | undefined;
16
+ readonly address?: {
17
+ readonly street: string;
18
+ readonly city: string;
19
+ readonly state: string;
20
+ readonly zip: number;
21
+ } | undefined;
22
+ readonly employer?: import("@dxos/echo/internal").Ref<Organization & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown> | undefined;
23
+ readonly tags?: readonly import("@dxos/echo/internal").Ref<Tag.Tag & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>[] | undefined;
24
+ readonly status?: "active" | "inactive" | undefined;
25
+ readonly notes?: string | undefined;
26
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
27
+ readonly birthday?: string | undefined;
28
+ readonly meetingAt?: string | undefined;
29
+ readonly reminderAt?: string | undefined;
30
+ readonly tasks?: readonly string[] | undefined;
31
+ readonly locations?: readonly (readonly [number, number, (number | undefined)?])[] | undefined;
32
+ readonly identities?: readonly {
33
+ readonly type: string;
34
+ readonly value: string;
35
+ }[] | undefined;
36
+ }, {}>;
37
+ export declare class Person extends Person_base {
38
+ }
39
+ export {};
40
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/testing/schema.ts"],"names":[],"mappings":"AAMA,OAAO,EAAgC,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;;;;AAErE;;;;GAIG;AAEH,qBAAa,YAAa,SAAQ,iBAIjC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEJ,qBAAa,MAAO,SAAQ,WAsC3B;CAAG"}