@dxos/react-ui-form 0.8.4-main.e8ec1fe → 0.8.4-main.effb148878

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 (268) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +0 -1
  3. package/dist/lib/browser/index.mjs +3240 -2345
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/translations.mjs +83 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/lib/node-esm/index.mjs +3240 -2345
  9. package/dist/lib/node-esm/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/meta.json +1 -1
  11. package/dist/lib/node-esm/translations.mjs +85 -0
  12. package/dist/lib/node-esm/translations.mjs.map +7 -0
  13. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +8 -7
  14. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
  15. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts +69 -59
  16. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts.map +1 -1
  17. package/dist/types/src/components/Form/Form.d.ts +123 -27
  18. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  19. package/dist/types/src/components/Form/Form.stories.d.ts +175 -137
  20. package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
  21. package/dist/types/src/components/Form/FormField.d.ts +48 -0
  22. package/dist/types/src/components/Form/FormField.d.ts.map +1 -0
  23. package/dist/types/src/components/Form/FormFieldComponent.d.ts +95 -0
  24. package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +1 -0
  25. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts +9 -0
  26. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +1 -0
  27. package/dist/types/src/components/Form/FormFieldSet.d.ts +21 -0
  28. package/dist/types/src/components/Form/FormFieldSet.d.ts.map +1 -0
  29. package/dist/types/src/components/Form/FormTooltipsContext.d.ts +19 -0
  30. package/dist/types/src/components/Form/FormTooltipsContext.d.ts.map +1 -0
  31. package/dist/types/src/components/Form/Layout/FormLayout.d.ts +25 -0
  32. package/dist/types/src/components/Form/Layout/FormLayout.d.ts.map +1 -0
  33. package/dist/types/src/components/Form/Layout/FormLayout.stories.d.ts +116 -0
  34. package/dist/types/src/components/Form/Layout/FormLayout.stories.d.ts.map +1 -0
  35. package/dist/types/src/components/Form/Layout/annotation.d.ts +30 -0
  36. package/dist/types/src/components/Form/Layout/annotation.d.ts.map +1 -0
  37. package/dist/types/src/components/Form/Layout/index.d.ts +4 -0
  38. package/dist/types/src/components/Form/Layout/index.d.ts.map +1 -0
  39. package/dist/types/src/components/Form/Layout/parser.d.ts +31 -0
  40. package/dist/types/src/components/Form/Layout/parser.d.ts.map +1 -0
  41. package/dist/types/src/components/Form/Layout/parser.test.d.ts +2 -0
  42. package/dist/types/src/components/Form/Layout/parser.test.d.ts.map +1 -0
  43. package/dist/types/src/components/Form/fields/ArrayField.d.ts +18 -0
  44. package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +1 -0
  45. package/dist/types/src/components/Form/fields/BooleanField.d.ts +4 -0
  46. package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +1 -0
  47. package/dist/types/src/components/Form/fields/DateField.d.ts +4 -0
  48. package/dist/types/src/components/Form/fields/DateField.d.ts.map +1 -0
  49. package/dist/types/src/components/Form/fields/GeoPointField.d.ts +5 -0
  50. package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +1 -0
  51. package/dist/types/src/components/Form/fields/MarkdownField.d.ts +11 -0
  52. package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +1 -0
  53. package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts +85 -0
  54. package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts.map +1 -0
  55. package/dist/types/src/components/Form/fields/NumberField.d.ts +4 -0
  56. package/dist/types/src/components/Form/fields/NumberField.d.ts.map +1 -0
  57. package/dist/types/src/components/Form/fields/RefField.d.ts +22 -0
  58. package/dist/types/src/components/Form/fields/RefField.d.ts.map +1 -0
  59. package/dist/types/src/components/Form/fields/SelectField.d.ts +13 -0
  60. package/dist/types/src/components/Form/fields/SelectField.d.ts.map +1 -0
  61. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +5 -0
  62. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +1 -0
  63. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts +85 -0
  64. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +1 -0
  65. package/dist/types/src/components/Form/fields/TextAreaField.d.ts +4 -0
  66. package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +1 -0
  67. package/dist/types/src/components/Form/fields/TextField.d.ts +4 -0
  68. package/dist/types/src/components/Form/fields/TextField.d.ts.map +1 -0
  69. package/dist/types/src/components/Form/fields/TupleField.d.ts +6 -0
  70. package/dist/types/src/components/Form/fields/TupleField.d.ts.map +1 -0
  71. package/dist/types/src/components/Form/fields/index.d.ts +13 -0
  72. package/dist/types/src/components/Form/fields/index.d.ts.map +1 -0
  73. package/dist/types/src/components/Form/index.d.ts +4 -4
  74. package/dist/types/src/components/Form/index.d.ts.map +1 -1
  75. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts +8 -0
  76. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -0
  77. package/dist/types/src/components/ObjectForm/index.d.ts +2 -0
  78. package/dist/types/src/components/ObjectForm/index.d.ts.map +1 -0
  79. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +37 -10
  80. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -1
  81. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts +65 -58
  82. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts.map +1 -1
  83. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts +9 -0
  84. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts.map +1 -0
  85. package/dist/types/src/components/ObjectProperties/ObjectProperties.stories.d.ts +128 -0
  86. package/dist/types/src/components/ObjectProperties/ObjectProperties.stories.d.ts.map +1 -0
  87. package/dist/types/src/components/ObjectProperties/ObjectProperties.test.d.ts +2 -0
  88. package/dist/types/src/components/ObjectProperties/ObjectProperties.test.d.ts.map +1 -0
  89. package/dist/types/src/components/ObjectProperties/index.d.ts +2 -0
  90. package/dist/types/src/components/ObjectProperties/index.d.ts.map +1 -0
  91. package/dist/types/src/components/ObjectTree/ObjectTree.d.ts +9 -0
  92. package/dist/types/src/components/ObjectTree/ObjectTree.d.ts.map +1 -0
  93. package/dist/types/src/components/ObjectTree/ObjectTree.stories.d.ts +87 -0
  94. package/dist/types/src/components/ObjectTree/ObjectTree.stories.d.ts.map +1 -0
  95. package/dist/types/src/components/ObjectTree/index.d.ts +2 -0
  96. package/dist/types/src/components/ObjectTree/index.d.ts.map +1 -0
  97. package/dist/types/src/components/Settings/Settings.d.ts +51 -0
  98. package/dist/types/src/components/Settings/Settings.d.ts.map +1 -0
  99. package/dist/types/src/components/Settings/Settings.stories.d.ts +85 -0
  100. package/dist/types/src/components/Settings/Settings.stories.d.ts.map +1 -0
  101. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts +43 -0
  102. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts.map +1 -0
  103. package/dist/types/src/components/Settings/SettingsItem.d.ts +16 -0
  104. package/dist/types/src/components/Settings/SettingsItem.d.ts.map +1 -0
  105. package/dist/types/src/components/Settings/SettingsSelectField.d.ts +18 -0
  106. package/dist/types/src/components/Settings/SettingsSelectField.d.ts.map +1 -0
  107. package/dist/types/src/components/Settings/index.d.ts +4 -0
  108. package/dist/types/src/components/Settings/index.d.ts.map +1 -0
  109. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +14 -18
  110. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  111. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +71 -64
  112. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
  113. package/dist/types/src/components/index.d.ts +4 -1
  114. package/dist/types/src/components/index.d.ts.map +1 -1
  115. package/dist/types/src/components/testing.d.ts +13 -6
  116. package/dist/types/src/components/testing.d.ts.map +1 -1
  117. package/dist/types/src/hooks/index.d.ts +2 -3
  118. package/dist/types/src/hooks/index.d.ts.map +1 -1
  119. package/dist/types/src/hooks/useFormHandler.d.ts +82 -0
  120. package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -0
  121. package/dist/types/src/hooks/useKeyHandler.d.ts +7 -0
  122. package/dist/types/src/hooks/useKeyHandler.d.ts.map +1 -0
  123. package/dist/types/src/index.d.ts +0 -2
  124. package/dist/types/src/index.d.ts.map +1 -1
  125. package/dist/types/src/translations.d.ts +66 -59
  126. package/dist/types/src/translations.d.ts.map +1 -1
  127. package/dist/types/src/util/field-type.d.ts +19 -0
  128. package/dist/types/src/util/field-type.d.ts.map +1 -0
  129. package/dist/types/src/util/field.d.ts +3 -3
  130. package/dist/types/src/util/field.d.ts.map +1 -1
  131. package/dist/types/src/util/formatting.d.ts +2 -2
  132. package/dist/types/src/util/formatting.d.ts.map +1 -1
  133. package/dist/types/src/util/index.d.ts +2 -1
  134. package/dist/types/src/util/index.d.ts.map +1 -1
  135. package/dist/types/src/util/properties.d.ts +17 -0
  136. package/dist/types/src/util/properties.d.ts.map +1 -0
  137. package/dist/types/src/util/properties.test.d.ts +2 -0
  138. package/dist/types/src/util/properties.test.d.ts.map +1 -0
  139. package/dist/types/src/util/refs.d.ts +2 -2
  140. package/dist/types/src/util/refs.d.ts.map +1 -1
  141. package/dist/types/tsconfig.tsbuildinfo +1 -1
  142. package/package.json +61 -52
  143. package/src/components/FieldEditor/FieldEditor.stories.tsx +44 -25
  144. package/src/components/FieldEditor/FieldEditor.test.tsx +0 -1
  145. package/src/components/FieldEditor/FieldEditor.tsx +84 -84
  146. package/src/components/Form/AUDIT.md +17 -0
  147. package/src/components/Form/Form.stories.tsx +134 -252
  148. package/src/components/Form/Form.tsx +417 -109
  149. package/src/components/Form/FormField.tsx +332 -0
  150. package/src/components/Form/FormFieldComponent.stories.tsx +65 -0
  151. package/src/components/Form/FormFieldComponent.tsx +206 -0
  152. package/src/components/Form/FormFieldSet.tsx +173 -0
  153. package/src/components/Form/FormTooltipsContext.ts +25 -0
  154. package/src/components/Form/Layout/FormLayout.stories.tsx +339 -0
  155. package/src/components/Form/Layout/FormLayout.tsx +123 -0
  156. package/src/components/Form/Layout/annotation.ts +38 -0
  157. package/src/components/Form/Layout/index.ts +7 -0
  158. package/src/components/Form/Layout/parser.test.ts +120 -0
  159. package/src/components/Form/Layout/parser.ts +167 -0
  160. package/src/components/Form/README.md +3 -0
  161. package/src/components/Form/fields/ArrayField.tsx +185 -0
  162. package/src/components/Form/fields/BooleanField.tsx +22 -0
  163. package/src/components/Form/fields/DateField.tsx +95 -0
  164. package/src/components/Form/fields/GeoPointField.tsx +124 -0
  165. package/src/components/Form/fields/MarkdownField.stories.tsx +206 -0
  166. package/src/components/Form/fields/MarkdownField.tsx +168 -0
  167. package/src/components/Form/fields/NumberField.tsx +39 -0
  168. package/src/components/Form/fields/RefField.tsx +232 -0
  169. package/src/components/Form/fields/SelectField.tsx +77 -0
  170. package/src/components/Form/{custom/SelectOptionsInput.stories.tsx → fields/SelectOptionField.stories.tsx} +23 -18
  171. package/src/components/Form/{custom/SelectOptionsInput.tsx → fields/SelectOptionField.tsx} +32 -25
  172. package/src/components/Form/fields/TextAreaField.tsx +38 -0
  173. package/src/components/Form/fields/TextField.tsx +38 -0
  174. package/src/components/Form/{custom/TupleInput.tsx → fields/TupleField.tsx} +17 -9
  175. package/src/components/Form/fields/index.ts +16 -0
  176. package/src/components/Form/index.ts +5 -4
  177. package/src/components/ObjectForm/ObjectForm.tsx +115 -0
  178. package/src/components/{ControlSection → ObjectForm}/index.ts +1 -1
  179. package/src/components/ObjectPicker/ObjectPicker.stories.tsx +26 -21
  180. package/src/components/ObjectPicker/ObjectPicker.tsx +122 -81
  181. package/src/components/ObjectProperties/ObjectProperties.stories.tsx +350 -0
  182. package/src/components/ObjectProperties/ObjectProperties.test.tsx +108 -0
  183. package/src/components/ObjectProperties/ObjectProperties.tsx +147 -0
  184. package/src/components/ObjectProperties/index.ts +5 -0
  185. package/src/components/ObjectTree/ObjectTree.stories.tsx +134 -0
  186. package/src/components/ObjectTree/ObjectTree.tsx +190 -0
  187. package/src/components/ObjectTree/index.ts +5 -0
  188. package/src/components/Settings/AUDIT.md +51 -0
  189. package/src/components/Settings/Settings.stories.tsx +104 -0
  190. package/src/components/Settings/Settings.tsx +81 -0
  191. package/src/components/Settings/SettingsFieldSet.tsx +257 -0
  192. package/src/components/Settings/SettingsItem.tsx +58 -0
  193. package/src/components/Settings/SettingsSelectField.tsx +59 -0
  194. package/src/components/Settings/index.ts +7 -0
  195. package/src/components/ViewEditor/ViewEditor.stories.tsx +62 -71
  196. package/src/components/ViewEditor/ViewEditor.test.tsx +10 -10
  197. package/src/components/ViewEditor/ViewEditor.tsx +308 -217
  198. package/src/components/index.ts +4 -1
  199. package/src/components/testing.tsx +24 -11
  200. package/src/hooks/index.ts +2 -3
  201. package/src/hooks/useFormHandler.ts +380 -0
  202. package/src/hooks/useKeyHandler.tsx +37 -0
  203. package/src/index.ts +0 -4
  204. package/src/translations.ts +71 -64
  205. package/src/util/field-type.ts +60 -0
  206. package/src/util/field.ts +25 -25
  207. package/src/util/formatting.ts +22 -22
  208. package/src/util/index.ts +2 -1
  209. package/src/util/properties.test.ts +78 -0
  210. package/src/util/properties.ts +38 -0
  211. package/src/util/refs.ts +13 -15
  212. package/src/vite-env.d.ts +10 -0
  213. package/dist/types/src/components/ControlSection/ControlSection.d.ts +0 -23
  214. package/dist/types/src/components/ControlSection/ControlSection.d.ts.map +0 -1
  215. package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts +0 -83
  216. package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts.map +0 -1
  217. package/dist/types/src/components/ControlSection/index.d.ts +0 -2
  218. package/dist/types/src/components/ControlSection/index.d.ts.map +0 -1
  219. package/dist/types/src/components/Form/ArrayField.d.ts +0 -16
  220. package/dist/types/src/components/Form/ArrayField.d.ts.map +0 -1
  221. package/dist/types/src/components/Form/Defaults.d.ts +0 -14
  222. package/dist/types/src/components/Form/Defaults.d.ts.map +0 -1
  223. package/dist/types/src/components/Form/FormActions.d.ts +0 -9
  224. package/dist/types/src/components/Form/FormActions.d.ts.map +0 -1
  225. package/dist/types/src/components/Form/FormContent.d.ts +0 -63
  226. package/dist/types/src/components/Form/FormContent.d.ts.map +0 -1
  227. package/dist/types/src/components/Form/FormContext.d.ts +0 -23
  228. package/dist/types/src/components/Form/FormContext.d.ts.map +0 -1
  229. package/dist/types/src/components/Form/Input.d.ts +0 -29
  230. package/dist/types/src/components/Form/Input.d.ts.map +0 -1
  231. package/dist/types/src/components/Form/RefField.d.ts +0 -22
  232. package/dist/types/src/components/Form/RefField.d.ts.map +0 -1
  233. package/dist/types/src/components/Form/custom/GeoPointInput.d.ts +0 -4
  234. package/dist/types/src/components/Form/custom/GeoPointInput.d.ts.map +0 -1
  235. package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts +0 -4
  236. package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts.map +0 -1
  237. package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts +0 -78
  238. package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts.map +0 -1
  239. package/dist/types/src/components/Form/custom/TupleInput.d.ts +0 -6
  240. package/dist/types/src/components/Form/custom/TupleInput.d.ts.map +0 -1
  241. package/dist/types/src/components/Form/custom/index.d.ts +0 -4
  242. package/dist/types/src/components/Form/custom/index.d.ts.map +0 -1
  243. package/dist/types/src/components/Form/factory.d.ts +0 -8
  244. package/dist/types/src/components/Form/factory.d.ts.map +0 -1
  245. package/dist/types/src/hooks/useForm.d.ts +0 -67
  246. package/dist/types/src/hooks/useForm.d.ts.map +0 -1
  247. package/dist/types/src/hooks/useQueryRefOptions.d.ts +0 -29
  248. package/dist/types/src/hooks/useQueryRefOptions.d.ts.map +0 -1
  249. package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts +0 -8
  250. package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts.map +0 -1
  251. package/dist/types/src/util/schema.d.ts +0 -3
  252. package/dist/types/src/util/schema.d.ts.map +0 -1
  253. package/src/components/ControlSection/ControlSection.stories.tsx +0 -38
  254. package/src/components/ControlSection/ControlSection.tsx +0 -153
  255. package/src/components/Form/ArrayField.tsx +0 -125
  256. package/src/components/Form/Defaults.tsx +0 -205
  257. package/src/components/Form/FormActions.tsx +0 -54
  258. package/src/components/Form/FormContent.tsx +0 -362
  259. package/src/components/Form/FormContext.tsx +0 -110
  260. package/src/components/Form/Input.tsx +0 -54
  261. package/src/components/Form/RefField.tsx +0 -283
  262. package/src/components/Form/custom/GeoPointInput.tsx +0 -80
  263. package/src/components/Form/custom/index.ts +0 -7
  264. package/src/components/Form/factory.tsx +0 -31
  265. package/src/hooks/useForm.ts +0 -296
  266. package/src/hooks/useQueryRefOptions.ts +0 -62
  267. package/src/hooks/useRefQueryLookupHandler.ts +0 -39
  268. package/src/util/schema.ts +0 -12
@@ -0,0 +1,350 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Schema from 'effect/Schema';
7
+ import React, { useEffect } from 'react';
8
+ import { expect, userEvent, within } from 'storybook/test';
9
+
10
+ import { DXN, Annotation, Filter, Obj, Ref, Tag, Type } from '@dxos/echo';
11
+ import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';
12
+ import { useQuery } from '@dxos/react-client/echo';
13
+ import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
14
+ import { Panel } from '@dxos/react-ui';
15
+ import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
16
+ import { FactoryAnnotation, type FactoryFn } from '@dxos/schema';
17
+ import { Pipeline } from '@dxos/types';
18
+
19
+ import { translations } from '#translations';
20
+
21
+ import { OBJECT_PROPERTIES_DEBUG_SYMBOL } from '../testing';
22
+ import { ObjectProperties } from './ObjectProperties';
23
+
24
+ //
25
+ // Test-only schemas exercising a non-Tag ref-array. `Article.authors` is the
26
+ // case the generic create flow currently fails on: the picker creates an
27
+ // Author in the DB but never wires the new Ref into the array slot.
28
+ //
29
+
30
+ const Author = Schema.Struct({
31
+ name: Schema.String,
32
+ }).pipe(
33
+ LabelAnnotation.set(['name']),
34
+ Annotation.IconAnnotation.set({ icon: 'ph--user--regular', hue: 'blue' }),
35
+ Type.makeObject(DXN.make('org.dxos.test.author', '0.1.0')),
36
+ );
37
+ type Author = Type.InstanceType<typeof Author>;
38
+
39
+ const Article = Schema.Struct({
40
+ title: Schema.String.pipe(Schema.optional),
41
+ authors: Schema.Array(Ref.Ref(Author)),
42
+ }).pipe(
43
+ LabelAnnotation.set(['title']),
44
+ Annotation.IconAnnotation.set({ icon: 'ph--article--regular', hue: 'green' }),
45
+ Type.makeObject(DXN.make('org.dxos.test.article', '0.1.0')),
46
+ );
47
+ type Article = Type.InstanceType<typeof Article>;
48
+
49
+ //
50
+ // `Note` mirrors the `Subscription.Feed` shape: a required `Ref` field
51
+ // (`backing`) is hidden from the form via `FormInputAnnotation.set(false)`,
52
+ // so `Obj.make(Note, values)` from the picker would reject because the form
53
+ // values can't satisfy the schema. A `FactoryAnnotation` constructs the
54
+ // backing object and links it at create time. `cursor` is an optional hidden
55
+ // field included to exercise the same path for non-required hidden fields.
56
+ //
57
+ const NoteBacking = Schema.Struct({}).pipe(Type.makeObject(DXN.make('org.dxos.test.noteBacking', '0.1.0')));
58
+ type NoteBacking = Type.InstanceType<typeof NoteBacking>;
59
+
60
+ const Note = Schema.Struct({
61
+ title: Schema.String,
62
+ cursor: Schema.String.pipe(FormInputAnnotation.set(false), Schema.optional),
63
+ backing: Ref.Ref(NoteBacking).pipe(FormInputAnnotation.set(false)),
64
+ }).pipe(
65
+ LabelAnnotation.set(['title']),
66
+ Annotation.IconAnnotation.set({ icon: 'ph--note--regular', hue: 'amber' }),
67
+ FactoryAnnotation.set(((values: any) =>
68
+ Obj.make(Note, { ...values, backing: Ref.make(Obj.make(NoteBacking, {})) })) as FactoryFn),
69
+ Type.makeObject(DXN.make('org.dxos.test.note', '0.1.0')),
70
+ );
71
+ type Note = Type.InstanceType<typeof Note>;
72
+
73
+ const Notebook = Schema.Struct({
74
+ name: Schema.String.pipe(Schema.optional),
75
+ notes: Schema.Array(Ref.Ref(Note)),
76
+ }).pipe(
77
+ LabelAnnotation.set(['name']),
78
+ Annotation.IconAnnotation.set({ icon: 'ph--notebook--regular', hue: 'amber' }),
79
+ Type.makeObject(DXN.make('org.dxos.test.notebook', '0.1.0')),
80
+ );
81
+ type Notebook = Type.InstanceType<typeof Notebook>;
82
+
83
+ //
84
+ // Stories.
85
+ //
86
+
87
+ export type ObjectPropertiesDebug = {
88
+ /** Live database the story is rendering against. */
89
+ db: ReturnType<typeof useClientStory>['space'] extends infer S ? (S extends { db: infer D } ? D : never) : never;
90
+ /** Object whose properties are being edited. */
91
+ object: Obj.Unknown;
92
+ };
93
+
94
+ const PipelineStory = () => {
95
+ const { space } = useClientStory();
96
+ const [object] = useQuery(space?.db, Filter.type(Pipeline.Pipeline));
97
+
98
+ useEffect(() => {
99
+ if (typeof window !== 'undefined' && space?.db && object) {
100
+ (window as any)[OBJECT_PROPERTIES_DEBUG_SYMBOL] = { db: space.db, object } satisfies ObjectPropertiesDebug;
101
+ }
102
+ }, [space, object]);
103
+
104
+ if (!object) {
105
+ return <Loading />;
106
+ }
107
+ return (
108
+ <Panel.Root>
109
+ <Panel.Content asChild>
110
+ <ObjectProperties object={object} />
111
+ </Panel.Content>
112
+ </Panel.Root>
113
+ );
114
+ };
115
+
116
+ const ArticleStory = () => {
117
+ const { space } = useClientStory();
118
+ const [object] = useQuery(space?.db, Filter.type(Article));
119
+
120
+ useEffect(() => {
121
+ if (typeof window !== 'undefined' && space?.db && object) {
122
+ (window as any)[OBJECT_PROPERTIES_DEBUG_SYMBOL] = { db: space.db, object } satisfies ObjectPropertiesDebug;
123
+ }
124
+ }, [space, object]);
125
+
126
+ if (!object) {
127
+ return <Loading />;
128
+ }
129
+ return (
130
+ <Panel.Root>
131
+ <Panel.Content asChild>
132
+ <ObjectProperties object={object} />
133
+ </Panel.Content>
134
+ </Panel.Root>
135
+ );
136
+ };
137
+
138
+ const meta = {
139
+ title: 'ui/react-ui-form/ObjectProperties',
140
+ component: ObjectProperties as any,
141
+ decorators: [withTheme(), withLayout({ layout: 'column' })],
142
+ parameters: {
143
+ layout: 'fullscreen',
144
+ translations,
145
+ },
146
+ } satisfies Meta<typeof PipelineStory>;
147
+
148
+ export default meta;
149
+
150
+ type Story = StoryObj<typeof meta>;
151
+
152
+ const pipelineDecorators = [
153
+ withClientProvider({
154
+ createIdentity: true,
155
+ createSpace: true,
156
+ types: [Pipeline.Pipeline, Tag.Tag],
157
+ onCreateSpace: async ({ space }) => {
158
+ space.db.add(Pipeline.make());
159
+ space.db.add(Tag.make({ label: 'Tag 1' }));
160
+ space.db.add(Tag.make({ label: 'Tag 2' }));
161
+ space.db.add(Tag.make({ label: 'Tag 3' }));
162
+ },
163
+ }),
164
+ ];
165
+
166
+ const articleDecorators = [
167
+ withClientProvider({
168
+ createIdentity: true,
169
+ createSpace: true,
170
+ types: [Article, Author, Tag.Tag],
171
+ onCreateSpace: async ({ space }) => {
172
+ space.db.add(Obj.make(Article, { title: 'Untitled article', authors: [] }));
173
+ },
174
+ }),
175
+ ];
176
+
177
+ const NotebookStory = () => {
178
+ const { space } = useClientStory();
179
+ const [object] = useQuery(space?.db, Filter.type(Notebook));
180
+
181
+ useEffect(() => {
182
+ if (typeof window !== 'undefined' && space?.db && object) {
183
+ (window as any)[OBJECT_PROPERTIES_DEBUG_SYMBOL] = { db: space.db, object } satisfies ObjectPropertiesDebug;
184
+ }
185
+ }, [space, object]);
186
+
187
+ if (!object) {
188
+ return <Loading />;
189
+ }
190
+ return (
191
+ <Panel.Root>
192
+ <Panel.Content asChild>
193
+ <ObjectProperties object={object} />
194
+ </Panel.Content>
195
+ </Panel.Root>
196
+ );
197
+ };
198
+
199
+ const notebookDecorators = [
200
+ withClientProvider({
201
+ createIdentity: true,
202
+ createSpace: true,
203
+ types: [Notebook, Note, NoteBacking, Tag.Tag],
204
+ onCreateSpace: async ({ space }) => {
205
+ space.db.add(Obj.make(Notebook, { name: 'Untitled notebook', notes: [] }));
206
+ },
207
+ }),
208
+ ];
209
+
210
+ /**
211
+ * Default Pipeline form — manual exploration. Includes the Tags picker (which
212
+ * is the only ref-array path that currently works end-to-end, by virtue of
213
+ * `Tag.Tag` being special-cased in `ObjectProperties.handleCreate`).
214
+ */
215
+ export const Default: Story = {
216
+ render: PipelineStory,
217
+ decorators: pipelineDecorators,
218
+ };
219
+
220
+ /**
221
+ * Tag-creation play. Walks the inline create flow against the Tags picker and
222
+ * leaves the magazine in the post-Save state for assertions to inspect via
223
+ * `OBJECT_PROPERTIES_DEBUG_SYMBOL`.
224
+ *
225
+ * Expected end-state (currently passes):
226
+ * - new Tag.Tag exists in the DB with `label === "PinnedTag"`
227
+ * - `Obj.getMeta(object).tags` includes its DXN.
228
+ */
229
+ export const CreateTagPlay: Story = {
230
+ render: PipelineStory,
231
+ decorators: pipelineDecorators,
232
+ play: async ({ canvasElement }) => {
233
+ const canvas = within(canvasElement);
234
+ const body = within(document.body);
235
+
236
+ // Tags is `Schema.Array(Ref.Ref(Tag.Tag))` and starts empty, so it renders
237
+ // as an "Add item" button — same shape as any other ref-array. Click it
238
+ // to materialise an empty slot, then open the slot's picker.
239
+ const addButton = await canvas.findByRole('button', { name: /add/i }, { timeout: 10_000 });
240
+ await userEvent.click(addButton);
241
+ await new Promise((resolve) => setTimeout(resolve, 250));
242
+
243
+ const comboboxes = await canvas.findAllByRole('combobox', undefined, { timeout: 10_000 });
244
+ await expect(comboboxes.length).toBeGreaterThan(0);
245
+ await userEvent.click(comboboxes[0]);
246
+
247
+ const search = await body.findByPlaceholderText(/search/i, undefined, { timeout: 5000 });
248
+ await userEvent.type(search, 'PinnedTag');
249
+
250
+ // The Tag picker localises the create option as "Add tag" (no text suffix
251
+ // — the translation has no `{{text}}` placeholder), so match on /add/.
252
+ const createOption = await body.findByRole('option', { name: /add/i }, { timeout: 3000 });
253
+ await userEvent.click(createOption);
254
+
255
+ const form = await body.findByTestId('create-referenced-object-form', undefined, { timeout: 5000 });
256
+ const labelInput = await within(form).findByLabelText(/^label$/i);
257
+ await userEvent.clear(labelInput);
258
+ await userEvent.type(labelInput, 'PinnedTag');
259
+ await userEvent.click(await within(form).findByTestId('save-button'));
260
+
261
+ // Allow async state updates to flush before the test asserts.
262
+ await new Promise((resolve) => setTimeout(resolve, 250));
263
+ },
264
+ };
265
+
266
+ /**
267
+ * Ref-array creation play. Walks Add → Open → Create → Save against
268
+ * `Article.authors`. After the fix, the new Author should be persisted AND
269
+ * wired into `article.authors[0]`. Today it persists to the DB but the array
270
+ * slot stays empty.
271
+ */
272
+ export const CreateRefArrayPlay: Story = {
273
+ render: ArticleStory,
274
+ decorators: articleDecorators,
275
+ play: async ({ canvasElement }) => {
276
+ const canvas = within(canvasElement);
277
+ const body = within(document.body);
278
+
279
+ // ObjectProperties extends Article with the BaseSchema's `tags` array, so
280
+ // the form has two "Add item" buttons (Tags + Authors). Pick the last one
281
+ // — Authors comes after Tags in the rendered order.
282
+ const addButtons = await canvas.findAllByRole('button', { name: /add/i }, { timeout: 10_000 });
283
+ await userEvent.click(addButtons[addButtons.length - 1]);
284
+ await new Promise((resolve) => setTimeout(resolve, 250));
285
+
286
+ // Open the empty slot's combobox.
287
+ const comboboxes = await canvas.findAllByRole('combobox', undefined, { timeout: 10_000 });
288
+ await expect(comboboxes.length).toBeGreaterThan(0);
289
+ await userEvent.click(comboboxes[0]);
290
+
291
+ const search = await body.findByPlaceholderText(/search/i, undefined, { timeout: 5000 });
292
+ await userEvent.type(search, 'Ada Lovelace');
293
+
294
+ // Author has no `createOptionLabel` → option falls back to "Create".
295
+ const createOption = await body.findByRole('option', { name: /create/i }, { timeout: 3000 });
296
+ await userEvent.click(createOption);
297
+
298
+ const form = await body.findByTestId('create-referenced-object-form', undefined, { timeout: 5000 });
299
+ const nameInput = await within(form).findByLabelText(/^name$/i);
300
+ await userEvent.clear(nameInput);
301
+ await userEvent.type(nameInput, 'Ada Lovelace');
302
+ await userEvent.click(await within(form).findByTestId('save-button'));
303
+
304
+ await new Promise((resolve) => setTimeout(resolve, 250));
305
+ },
306
+ };
307
+
308
+ /**
309
+ * Ref-array creation against a schema with a hidden required field. `Note`
310
+ * mirrors the shape of `Subscription.Feed`: the form omits `backing` (a
311
+ * required `Ref` annotated `FormInputAnnotation.set(false)`) but the schema
312
+ * requires it. Without `omitHiddenFormFields` + `FactoryAnnotation`, the
313
+ * form's validator would reject Save and the popover would never close.
314
+ *
315
+ * Expected end-state after the fix:
316
+ * - new Note exists in DB with a synthesised `backing` ref
317
+ * - `notebook.notes[0]` references the new Note
318
+ * - the create form is gone
319
+ */
320
+ export const CreateHiddenFieldPlay: Story = {
321
+ render: NotebookStory,
322
+ decorators: notebookDecorators,
323
+ play: async ({ canvasElement }) => {
324
+ const canvas = within(canvasElement);
325
+ const body = within(document.body);
326
+
327
+ // Two "Add item" buttons (Tags + Notes) — Notes comes second.
328
+ const addButtons = await canvas.findAllByRole('button', { name: /add/i }, { timeout: 10_000 });
329
+ await userEvent.click(addButtons[addButtons.length - 1]);
330
+ await new Promise((resolve) => setTimeout(resolve, 250));
331
+
332
+ const comboboxes = await canvas.findAllByRole('combobox', undefined, { timeout: 10_000 });
333
+ await expect(comboboxes.length).toBeGreaterThan(0);
334
+ await userEvent.click(comboboxes[0]);
335
+
336
+ const search = await body.findByPlaceholderText(/search/i, undefined, { timeout: 5000 });
337
+ await userEvent.type(search, 'Ideas');
338
+
339
+ const createOption = await body.findByRole('option', { name: /create/i }, { timeout: 3000 });
340
+ await userEvent.click(createOption);
341
+
342
+ const form = await body.findByTestId('create-referenced-object-form', undefined, { timeout: 5000 });
343
+ const titleInput = await within(form).findByLabelText(/^title$/i);
344
+ await userEvent.clear(titleInput);
345
+ await userEvent.type(titleInput, 'Ideas');
346
+ await userEvent.click(await within(form).findByTestId('save-button'));
347
+
348
+ await new Promise((resolve) => setTimeout(resolve, 250));
349
+ },
350
+ };
@@ -0,0 +1,108 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { composeStories } from '@storybook/react';
6
+ import { cleanup } from '@testing-library/react';
7
+ import { afterEach, describe, expect, test } from 'vitest';
8
+
9
+ import { Filter, Obj, Tag } from '@dxos/echo';
10
+ import { EchoURI } from '@dxos/keys';
11
+
12
+ import { OBJECT_PROPERTIES_DEBUG_SYMBOL } from '../testing';
13
+ import * as stories from './ObjectProperties.stories';
14
+ import { type ObjectPropertiesDebug } from './ObjectProperties.stories';
15
+
16
+ const { CreateTagPlay, CreateRefArrayPlay, CreateHiddenFieldPlay } = composeStories(stories);
17
+
18
+ const getDebug = (): ObjectPropertiesDebug => {
19
+ const debug = (window as any)[OBJECT_PROPERTIES_DEBUG_SYMBOL] as ObjectPropertiesDebug | undefined;
20
+ expect(debug).toBeDefined();
21
+ return debug!;
22
+ };
23
+
24
+ /**
25
+ * Refs may be stored as legacy (`dxn:echo:@:<id>`, `dxn:echo:<space>:<id>`) or
26
+ * new (`echo:/<id>`, `echo://<space>/<id>`) form — extract and compare object id.
27
+ */
28
+ const refTargetsObject = (uri: string, objectId: string): boolean => {
29
+ const parsed = EchoURI.tryParse(uri);
30
+ return parsed !== undefined && EchoURI.getObjectId(parsed) === objectId;
31
+ };
32
+
33
+ describe('ObjectProperties — inline create flow', () => {
34
+ afterEach(() => {
35
+ cleanup();
36
+ delete (window as any)[OBJECT_PROPERTIES_DEBUG_SYMBOL];
37
+ });
38
+
39
+ test('Tag.Tag: Create + Save persists tag and assigns it to the object', { timeout: 30_000 }, async () => {
40
+ await CreateTagPlay.run();
41
+ const { db, object } = getDebug();
42
+
43
+ // The new Tag should exist in the DB.
44
+ const tags = (await db.query(Filter.type(Tag.Tag)).run()) as Tag.Tag[];
45
+ const created = tags.find((tag) => tag.label === 'PinnedTag');
46
+ expect(created, 'new Tag.Tag with label "PinnedTag" should be in the database').toBeDefined();
47
+
48
+ // And `object.meta.tags` should contain a DXN that resolves to that tag.
49
+ const meta = Obj.getMeta(object);
50
+ const createdId = (created as any).id as string;
51
+ const matched = (meta.tags ?? []).some((dxn) => refTargetsObject(dxn, createdId));
52
+ expect(matched, "meta.tags should contain a DXN targeting the new tag's id").toBe(true);
53
+ });
54
+
55
+ test('non-Tag ref-array: Create + Save assigns the new ref to the array slot', { timeout: 30_000 }, async () => {
56
+ await CreateRefArrayPlay.run();
57
+ const { db, object } = getDebug();
58
+
59
+ // The new Author should exist in the DB.
60
+ const authors = (await db.query(Filter.typename('org.dxos.test.author' as any)).run()) as any[];
61
+ const created = authors.find((author: any) => author.name === 'Ada Lovelace');
62
+ expect(created, 'new Author with name "Ada Lovelace" should be in the database').toBeDefined();
63
+
64
+ // And the article's authors array should contain a Ref to it. This is the
65
+ // assertion that fails before the fix — handleCreate persists the object
66
+ // but never wires the new ref into the array slot.
67
+ const article = object as any;
68
+ expect(article.authors ?? [], 'article.authors should contain a single Ref').toHaveLength(1);
69
+ const createdId = (created as any).id as string;
70
+ expect(
71
+ refTargetsObject(article.authors[0]?.uri ?? '', createdId),
72
+ 'article.authors[0] should reference the newly-created Author',
73
+ ).toBe(true);
74
+ });
75
+
76
+ test(
77
+ 'hidden required field via FactoryAnnotation: Create + Save closes form and assigns ref',
78
+ { timeout: 30_000 },
79
+ async () => {
80
+ await CreateHiddenFieldPlay.run();
81
+ const { db, object } = getDebug();
82
+
83
+ // The new Note should exist in the DB with the synthesised backing ref.
84
+ const notes = (await db.query(Filter.typename('org.dxos.test.note' as any)).run()) as any[];
85
+ const created = notes.find((note: any) => note.title === 'Ideas');
86
+ expect(created, 'new Note with title "Ideas" should be in the database').toBeDefined();
87
+ expect(
88
+ (created as any).backing,
89
+ 'FactoryAnnotation should have populated the hidden `backing` ref',
90
+ ).toBeDefined();
91
+
92
+ // The notebook's notes array should reference the new Note.
93
+ const notebook = object as any;
94
+ expect(notebook.notes ?? [], 'notebook.notes should contain a single Ref').toHaveLength(1);
95
+ const createdId = (created as any).id as string;
96
+ expect(
97
+ refTargetsObject(notebook.notes[0]?.uri ?? '', createdId),
98
+ 'notebook.notes[0] should reference the newly-created Note',
99
+ ).toBe(true);
100
+
101
+ // The picker's create form should be gone.
102
+ expect(
103
+ document.querySelector('[data-testid="create-referenced-object-form"]'),
104
+ 'create form should be dismissed after a successful save',
105
+ ).toBeNull();
106
+ },
107
+ );
108
+ });
@@ -0,0 +1,147 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import * as Function from 'effect/Function';
6
+ import * as Option from 'effect/Option';
7
+ import * as Schema from 'effect/Schema';
8
+ import React, { type PropsWithChildren, useCallback, useMemo } from 'react';
9
+
10
+ import { Obj, Ref, Tag, Type } from '@dxos/echo';
11
+ import { useType } from '@dxos/echo-react';
12
+ import { type JsonPath, splitJsonPath } from '@dxos/echo/internal';
13
+ import { invariant } from '@dxos/invariant';
14
+ import { URI } from '@dxos/keys';
15
+ import { composable, composableProps } from '@dxos/react-ui';
16
+ import { HuePicker } from '@dxos/react-ui-pickers';
17
+ import { FactoryAnnotation } from '@dxos/schema';
18
+ import { isNonNullable } from '@dxos/util';
19
+
20
+ import { translationKey } from '#translations';
21
+
22
+ import { Form, type FormFieldMap, omitId } from '../Form';
23
+
24
+ export type ObjectPropertiesProps = PropsWithChildren<{ object: Obj.Unknown }>;
25
+
26
+ // TODO(wittjosiah): Reconcile w/ ObjectForm.
27
+ export const ObjectProperties = composable<HTMLDivElement, ObjectPropertiesProps>(
28
+ ({ children, object, ...props }, forwardedRef) => {
29
+ const db = Obj.getDatabase(object);
30
+ const meta = Obj.getMeta(object);
31
+ const tags = (meta.tags ?? []).map((tag) => db?.makeRef(URI.make(tag))).filter(isNonNullable);
32
+ const values = useMemo(() => ({ tags, ...object }), [object, tags]);
33
+
34
+ // Obj.getType fails for database-registered (dynamic) schemas due to DXN mismatch;
35
+ // useType queries by typename which correctly resolves both static and dynamic schemas.
36
+ const typename = Obj.getTypename(object) ?? undefined;
37
+ const typeFromRegistry = useType(db, typename);
38
+ const type = Obj.getType(object) ?? typeFromRegistry;
39
+
40
+ const formSchema = useMemo(() => {
41
+ return Function.pipe(
42
+ type,
43
+ Option.fromNullable,
44
+ Option.map((type) => Type.getSchema(type)),
45
+ Option.map((schema) => omitId(BaseSchema.pipe(Schema.extend(schema)))),
46
+ Option.getOrUndefined,
47
+ );
48
+ }, [type]);
49
+
50
+ // Persist a newly-created object referenced by one of the form's ref
51
+ // fields and return it. The calling RefField wires the new Ref into its
52
+ // own slot's form value; for the BaseSchema `tags` array, the resulting
53
+ // form change is then synced back to `Obj.getMeta(object).tags` by
54
+ // `handleChange` below — so Tag.Tag follows the same generic path as any
55
+ // other ref-array field, no type-specific branching required here.
56
+ //
57
+ // Schemas whose required structure can't be produced by `Obj.make(schema,
58
+ // values)` alone (e.g. types with a required ref to a backing object) can
59
+ // declare a `FactoryAnnotation` to take over construction.
60
+ const handleCreate = useCallback(
61
+ (type: Type.AnyEntity, values: any): Obj.Unknown => {
62
+ invariant(db);
63
+ invariant(Type.isObject(type));
64
+ const factory = Option.getOrUndefined(FactoryAnnotation.get(Type.getSchema(type)));
65
+ const newObject = factory ? (factory(values) as Obj.Unknown) : Obj.make(type, values);
66
+ return db.add(newObject) as Obj.Unknown;
67
+ },
68
+ [db],
69
+ );
70
+
71
+ // TODO(wittjosiah): Use FormRootProps type.
72
+ const handleChange = useCallback(
73
+ ({ tags, ...values }: any, { isValid, changed }: { isValid: boolean; changed: Record<JsonPath, boolean> }) => {
74
+ if (!isValid) {
75
+ return;
76
+ }
77
+
78
+ const changedPaths = Object.keys(changed).filter((path) => changed[path as JsonPath]) as JsonPath[];
79
+
80
+ // Handle tags separately using Obj.update.
81
+ const hasTagsChange = changedPaths.some((path) => splitJsonPath(path)[0] === 'tags');
82
+ if (hasTagsChange) {
83
+ Obj.update(object, (object) => {
84
+ Obj.getMeta(object).tags = tags?.map((tag: Ref.Ref<Tag.Tag>) => tag.uri) ?? [];
85
+ });
86
+ }
87
+
88
+ // Handle other property changes.
89
+ const nonTagPaths = changedPaths.filter((path) => splitJsonPath(path)[0] !== 'tags');
90
+ if (nonTagPaths.length > 0) {
91
+ Obj.update(object, () => {
92
+ for (const path of nonTagPaths) {
93
+ const parts = splitJsonPath(path);
94
+ const value = Obj.getValue(values as any, parts);
95
+ Obj.setValue(object, parts, value);
96
+ }
97
+ });
98
+ }
99
+ },
100
+ [object],
101
+ );
102
+
103
+ if (!formSchema) {
104
+ return null;
105
+ }
106
+
107
+ return (
108
+ <Form.Root
109
+ schema={formSchema}
110
+ defaultValues={values as any}
111
+ createTypename={Type.getTypename(Tag.Tag)}
112
+ createOptionIcon='ph--plus--regular'
113
+ createOptionLabel={['add-tag.label', { ns: translationKey }]}
114
+ createInitialValuePath='label'
115
+ createFieldMap={createFieldMap}
116
+ db={db}
117
+ onValuesChanged={handleChange}
118
+ onCreate={handleCreate}
119
+ >
120
+ <Form.Viewport {...composableProps(props)} ref={forwardedRef}>
121
+ <Form.Content>
122
+ <Form.FieldSet />
123
+ {children}
124
+ </Form.Content>
125
+ </Form.Viewport>
126
+ </Form.Root>
127
+ );
128
+ },
129
+ );
130
+
131
+ const createFieldMap: FormFieldMap = {
132
+ hue: ({ type, label, layout, getValue, onValueChange }) => {
133
+ const handleChange = useCallback((nextHue: string) => onValueChange(type, nextHue), [onValueChange, type]);
134
+ const handleReset = useCallback(() => onValueChange(type, undefined), [onValueChange, type]);
135
+ return (
136
+ <>
137
+ {layout !== 'inline' && <Form.Label label={label} />}
138
+ <HuePicker value={getValue()} onChange={handleChange} onReset={handleReset} />
139
+ </>
140
+ );
141
+ },
142
+ };
143
+
144
+ // TODO(wittjosiah): Would be nice to control order when extending so this isn't always first/last.
145
+ const BaseSchema = Schema.Struct({
146
+ tags: Schema.Array(Ref.Ref(Tag.Tag)).pipe(Schema.optional),
147
+ });
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './ObjectProperties';