@dxos/react-ui-form 0.8.4-main.ead640a → 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 +3252 -2315
  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 +3252 -2315
  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 -60
  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 -26
  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 -138
  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 -59
  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 +16 -20
  110. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  111. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +72 -66
  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 -60
  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 -51
  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 -107
  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} +31 -24
  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 +30 -25
  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 +65 -73
  196. package/src/components/ViewEditor/ViewEditor.test.tsx +11 -11
  197. package/src/components/ViewEditor/ViewEditor.tsx +308 -214
  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 -65
  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 +16 -18
  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 -84
  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 -79
  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 -322
  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,95 @@
1
+ import type * as Schema from 'effect/Schema';
2
+ import type * as SchemaAST from 'effect/SchemaAST';
3
+ import React, { Component, type FC, type FocusEvent, type PropsWithChildren, type ReactElement, type ReactNode } from 'react';
4
+ import { type Database } from '@dxos/echo';
5
+ import { type Format } from '@dxos/echo/internal';
6
+ import { type FormFieldStatus } from '../../hooks';
7
+ /**
8
+ * Dynamic props passed to input components.
9
+ */
10
+ export type FormFieldStateProps<T = any> = {
11
+ getStatus: () => FormFieldStatus;
12
+ getValue: () => T | undefined;
13
+ onBlur: (event: FocusEvent<HTMLElement>) => void;
14
+ onValueChange: (type: SchemaAST.AST, value: T) => void;
15
+ };
16
+ /**
17
+ * Presentation mode.
18
+ * - full: Show label, control, and status.
19
+ * - compact: Show label and control.
20
+ * - inline: Control only.
21
+ * - static: Plain DOM; omit all undefined values.
22
+ */
23
+ export type Presentation = 'full' | 'compact' | 'inline' | 'static';
24
+ /**
25
+ * Props passed to input components.
26
+ */
27
+ export type FormFieldComponentProps<T = any> = {
28
+ type: SchemaAST.AST;
29
+ format?: Format.TypeFormat;
30
+ readonly?: boolean;
31
+ label: string;
32
+ /**
33
+ * Dotted JSON path of this field within the form values (e.g.
34
+ * `runtime.client.storage.persistent`). Forwarded to `FormFieldLabel` so
35
+ * that it can render the path as a debug hint when the enclosing
36
+ * `Form.Root` has `debug` enabled.
37
+ */
38
+ jsonPath?: string;
39
+ placeholder?: string;
40
+ autoFocus?: boolean;
41
+ layout?: Presentation;
42
+ /** Database the form is editing against; populated for fields whose value is an ECHO object/Ref. */
43
+ db?: Database.Database;
44
+ } & FormFieldStateProps<T>;
45
+ /**
46
+ * Form field component.
47
+ */
48
+ export type FormFieldComponent = FC<FormFieldComponentProps>;
49
+ export type FormFieldMap = Record<string, FormFieldComponent>;
50
+ export type FormFieldProvider = (props: {
51
+ prop: string;
52
+ schema: Schema.Schema<any>;
53
+ fieldProps: FormFieldComponentProps;
54
+ }) => ReactElement | undefined;
55
+ export type FormFieldLabelProps = {
56
+ asChild?: boolean;
57
+ error?: string;
58
+ /**
59
+ * JSON path of the field this label describes (e.g. `runtime.client.storage.persistent`).
60
+ * Surfaced as a hover tooltip on the label when the enclosing `Form.Root`
61
+ * has `tooltips` enabled (the default) -- useful for spotting which field
62
+ * maps to which path when authoring schemas or filing bugs against a form.
63
+ * Callers can supply the path unconditionally; the label suppresses the
64
+ * tooltip when `Form.Root tooltips={false}`.
65
+ */
66
+ path?: string;
67
+ } & Pick<FormFieldComponentProps, 'label' | 'readonly'>;
68
+ export declare function FormFieldLabel({ label, error, readonly, asChild, path }: FormFieldLabelProps): React.JSX.Element;
69
+ export declare namespace FormFieldLabel {
70
+ var displayName: string;
71
+ }
72
+ export type FormFieldWrapperProps<T = any> = Pick<FormFieldComponentProps, 'readonly' | 'label' | 'layout' | 'getStatus' | 'getValue' | 'jsonPath'> & {
73
+ children?: (props: {
74
+ value: T;
75
+ }) => ReactNode;
76
+ };
77
+ export declare const FormFieldWrapper: <T>(props: FormFieldWrapperProps<T>) => React.JSX.Element | null;
78
+ type FormFieldErrorState = {
79
+ error: Error | undefined;
80
+ };
81
+ type FormFieldErrorBoundaryProps = PropsWithChildren<{
82
+ path?: (string | number)[];
83
+ }>;
84
+ export declare class FormFieldErrorBoundary extends Component<FormFieldErrorBoundaryProps, FormFieldErrorState> {
85
+ static getDerivedStateFromError(error: Error): {
86
+ error: Error;
87
+ };
88
+ state: {
89
+ error: undefined;
90
+ };
91
+ componentDidUpdate(prevProps: FormFieldErrorBoundaryProps): void;
92
+ render(): string | number | bigint | boolean | React.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | null | undefined;
93
+ private resetError;
94
+ }
95
+ //# sourceMappingURL=FormFieldComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormFieldComponent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldComponent.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ import { type FormFieldComponentProps } from './FormFieldComponent';
4
+ declare const DefaultStory: ({ type, placeholder, readonly, onBlur, onValueChange, ...props }: FormFieldComponentProps<string>) => React.JSX.Element;
5
+ declare const meta: Meta<typeof DefaultStory>;
6
+ export default meta;
7
+ type Story = StoryObj<typeof meta>;
8
+ export declare const Default: Story;
9
+ //# sourceMappingURL=FormFieldComponent.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormFieldComponent.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldComponent.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAwC,MAAM,OAAO,CAAC;AAK7D,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,sBAAsB,CAAC;AAEtF,QAAA,MAAM,YAAY,qEAOf,uBAAuB,CAAC,MAAM,CAAC,sBAsBjC,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAOnC,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { type AnyProperties } from '@dxos/echo/internal';
3
+ import { type SchemaProperty } from '@dxos/effect';
4
+ import { type FormHandlerProps } from '../../hooks';
5
+ import { type FormFieldProps } from './FormField';
6
+ export type FormFieldSetProps<T extends AnyProperties> = {
7
+ label?: string;
8
+ sort?: string[];
9
+ exclude?: (props: SchemaProperty[]) => SchemaProperty[];
10
+ /**
11
+ * Picks a named layout out of `FormLayoutAnnotation` when present.
12
+ * Falls back to `'default'`. Ignored when the schema has no annotation
13
+ * (linear rendering then takes over).
14
+ */
15
+ layoutName?: string;
16
+ } & Pick<FormHandlerProps<T>, 'schema'> & Pick<FormFieldProps, 'path' | 'autoFocus' | 'readonly' | 'layout' | 'projection' | 'fieldMap' | 'fieldProvider' | 'createTypename' | 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'createFieldMap' | 'db' | 'useType' | 'getOptions' | 'onCreate'>;
17
+ export declare function FormFieldSet({ label, schema, readonly, path, sort, exclude, projection, layout, layoutName, ...props }: FormFieldSetProps<any>): React.JSX.Element | null;
18
+ export declare namespace FormFieldSet {
19
+ var displayName: string;
20
+ }
21
+ //# sourceMappingURL=FormFieldSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldSet.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAM7D,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,aAAa,IAAI;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,CAAC;IACxD;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GACrC,IAAI,CACF,cAAc,EACZ,MAAM,GACN,WAAW,GACX,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,wBAAwB,GACxB,gBAAgB,GAChB,IAAI,GACJ,SAAS,GACT,YAAY,GACZ,UAAU,CACb,CAAC;qCAKyB,EAC3B,KAAK,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,UAAU,EACV,MAAM,EACN,UAAgC,EAChC,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,GAAG,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A standalone context for the `tooltips` flag (Form.Root's only label
3
+ * decoration today: a JSON-path hover tooltip rendered by
4
+ * `FormFieldLabel`).
5
+ *
6
+ * Lives in its own module so that `FormFieldComponent.tsx` -- imported at
7
+ * the top of `Form.tsx` -- can read the flag without re-importing from
8
+ * `Form.tsx`. That round-trip used to create a circular module-eval
9
+ * dependency that intermittently hit a TDZ ("Cannot access 'FormFieldLabel'
10
+ * before initialization") in browser-mode storybook tests.
11
+ *
12
+ * Defaults to `true` both when `Form.Root` doesn't pass an explicit value
13
+ * AND when there is no enclosing `Form.Root` (e.g. `FormFieldWrapper`
14
+ * stories that render an input without a Form provider).
15
+ */
16
+ export declare const FormTooltipsContext: import("react").Context<boolean>;
17
+ /** Returns whether the enclosing `Form.Root` has field tooltips enabled. */
18
+ export declare const useFormTooltips: () => boolean;
19
+ //# sourceMappingURL=FormTooltipsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormTooltipsContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormTooltipsContext.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,kCAA+B,CAAC;AAEhE,4EAA4E;AAC5E,eAAO,MAAM,eAAe,QAAO,OAA0C,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type * as Schema from 'effect/Schema';
2
+ import React from 'react';
3
+ import { type AnyProperties } from '@dxos/echo/internal';
4
+ import { type FormFieldProps } from '../FormField';
5
+ export type FormLayoutProps = {
6
+ /**
7
+ * Template string in the FormLayout DSL (`<grid cols=…><field name=…/></grid>`).
8
+ * If omitted, the layout is read from the schema's `FormLayoutAnnotation` —
9
+ * the entry named by `name` (default: `'default'`).
10
+ */
11
+ template?: string;
12
+ /**
13
+ * Picks a named layout out of `FormLayoutAnnotation`'s map when no
14
+ * explicit `template` is supplied. Defaults to `'default'`.
15
+ */
16
+ name?: string;
17
+ } & Pick<FormFieldSetSubset, 'schema' | 'path' | 'readonly' | 'layout' | 'projection' | 'fieldMap' | 'fieldProvider'>;
18
+ type FormFieldSetSubset = Pick<FormFieldProps, 'path' | 'readonly' | 'layout' | 'projection' | 'fieldMap' | 'fieldProvider'> & {
19
+ schema: Schema.Schema<AnyProperties>;
20
+ };
21
+ export declare function FormLayout({ schema, template, name, path, readonly, layout, projection, ...props }: FormLayoutProps): React.JSX.Element;
22
+ export declare namespace FormLayout {
23
+ var displayName: string;
24
+ }
25
+ //# sourceMappingURL=FormLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Layout/FormLayout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAO9D,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,eAAe,CAAC,CAAC;AAEtH,KAAK,kBAAkB,GAAG,IAAI,CAC5B,cAAc,EACd,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,eAAe,CAC7E,GAAG;IACF,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;CACtC,CAAC;mCAQyB,EACzB,MAAM,EACN,QAAQ,EACR,IAA0B,EAC1B,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,UAAU,EACV,GAAG,KAAK,EACT,EAAE,eAAe"}
@@ -0,0 +1,116 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import * as Schema from 'effect/Schema';
3
+ import React from 'react';
4
+ import { Type } from '@dxos/echo';
5
+ /**
6
+ * Sample schema: a Flight booking carries airline, flight number, route, dates,
7
+ * cabin class. Without an annotation `<Form.FieldSet/>` renders one field per
8
+ * row (see the `Linear` story). The `FormLayoutAnnotation` on this schema
9
+ * arranges the same fields in a 2-column grid with selective spans.
10
+ */
11
+ declare const Flight: Type.Obj<{
12
+ readonly airline?: string | undefined;
13
+ readonly flightNumber?: string | undefined;
14
+ readonly origin?: string | undefined;
15
+ readonly destination?: string | undefined;
16
+ readonly departAt?: string | undefined;
17
+ readonly arriveAt?: string | undefined;
18
+ readonly cabin?: "business" | "economy" | "first" | "premium" | undefined;
19
+ readonly notes?: string | undefined;
20
+ }, Schema.Struct.Fields>;
21
+ export type Flight = Type.InstanceType<typeof Flight>;
22
+ type StoryProps = {
23
+ schema: Schema.Schema<any>;
24
+ template?: string;
25
+ };
26
+ declare const meta: {
27
+ title: string;
28
+ render: ({ schema, template }: StoryProps) => React.JSX.Element;
29
+ decorators: import("@storybook/react").Decorator[];
30
+ parameters: {
31
+ layout: string;
32
+ translations: [{
33
+ readonly 'en-US': {
34
+ readonly "@dxos/react-ui-form": {
35
+ readonly 'fields.label': 'Fields';
36
+ readonly 'hidden-fields.label': 'Hidden Fields';
37
+ readonly 'empty-readonly-ref-field.label': '(none)';
38
+ readonly 'field-property.label': 'Property';
39
+ readonly 'field-property.placeholder': 'Property name';
40
+ readonly 'field-format.label': 'Type';
41
+ readonly 'field-path.label': 'Field path';
42
+ readonly 'remove-item.button': 'Delete item';
43
+ readonly 'add-item.button': 'Add item';
44
+ readonly 'add-property-button.label': 'Add property';
45
+ readonly 'boolean-input-true.value': 'Yes';
46
+ readonly 'boolean-input-false.value': 'No';
47
+ readonly 'show-field.label': 'Show field';
48
+ readonly 'hide-field.label': 'Hide field';
49
+ readonly 'delete-field.label': 'Delete field';
50
+ readonly 'create-option.label': 'Create';
51
+ readonly 'add-tag.label': 'Add tag';
52
+ readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
53
+ readonly 'ref-field.placeholder': 'Select\u2026';
54
+ readonly 'ref-field.placeholder_one': 'Select\u2026';
55
+ readonly 'ref-field.placeholder_other': 'Select items\u2026';
56
+ readonly 'example.placeholder': 'Example';
57
+ readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
58
+ readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
59
+ readonly 'cancel-button.label': 'Cancel';
60
+ readonly 'save-button.label': 'Save';
61
+ readonly 'create-text.label': 'Create text';
62
+ readonly 'format.boolean.label': 'Boolean';
63
+ readonly 'format.currency.label': 'Currency';
64
+ readonly 'format.date.label': 'Date';
65
+ readonly 'format.date-time.label': 'DateTime';
66
+ readonly 'format.did.label': 'DID';
67
+ readonly 'format.duration.label': 'Duration';
68
+ readonly 'format.dxn.label': 'DXN';
69
+ readonly 'format.email.label': 'Email';
70
+ readonly 'format.formula.label': 'Formula';
71
+ readonly 'format.hostname.label': 'Hostname';
72
+ readonly 'format.integer.label': 'Integer';
73
+ readonly 'format.json.label': 'JSON';
74
+ readonly 'format.lnglat.label': 'Geopoint';
75
+ readonly 'format.markdown.label': 'Markdown';
76
+ readonly 'format.percent.label': 'Percent';
77
+ readonly 'format.ref.label': 'Reference';
78
+ readonly 'format.regex.label': 'RegExp';
79
+ readonly 'format.string.label': 'String';
80
+ readonly 'format.single-select.label': 'Select';
81
+ readonly 'format.multi-select.label': 'Multi-select';
82
+ readonly 'format.text.label': 'Long text';
83
+ readonly 'format.time.label': 'Time';
84
+ readonly 'format.timestamp.label': 'Timestamp';
85
+ readonly 'format.user.label': 'User';
86
+ readonly 'format.number.label': 'Number';
87
+ readonly 'format.uri.label': 'URI';
88
+ readonly 'format.url.label': 'URL';
89
+ readonly 'format.uuid.label': 'UUID';
90
+ readonly 'latitude.label': 'Latitude';
91
+ readonly 'longitude.label': 'Longitude';
92
+ readonly 'select-option.label': 'Label';
93
+ readonly 'select-option-label.placeholder': 'Option label';
94
+ readonly 'select-option-delete.button': 'Delete';
95
+ readonly 'select-option-add.button': 'Add option';
96
+ readonly 'system-schema.title': 'System type';
97
+ readonly 'system-schema.description': 'System type: cannot add or remove fields.';
98
+ readonly 'remove.button': 'Delete';
99
+ };
100
+ };
101
+ }];
102
+ };
103
+ };
104
+ export default meta;
105
+ type Story = StoryObj<StoryProps>;
106
+ /** Baseline: no annotation, no override — `Form.FieldSet` renders linearly (one field per row). */
107
+ export declare const Linear: Story;
108
+ /** `Form.Layout` invoked directly with a `template` prop, bypassing any annotation. */
109
+ export declare const TemplateProp: Story;
110
+ /** Schema carries `FormLayoutAnnotation`; `Form.FieldSet` auto-detects and delegates. */
111
+ export declare const SchemaAnnotation: Story;
112
+ export declare const NamedAnnotation: Story;
113
+ export declare const FormPlayground: Story;
114
+ /** Same playground, but the form is rendered inside a `Card.Root` / `Card.Body`. */
115
+ export declare const CardPlayground: Story;
116
+ //# sourceMappingURL=FormLayout.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormLayout.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Layout/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,EAAe,IAAI,EAAE,MAAM,YAAY,CAAC;AAiB/C;;;;;GAKG;AACH,QAAA,MAAM,MAAM;;;;;;;;;wBAS0D,CAAC;AAEvE,MAAM,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AA6CtD,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAwBF,QAAA,MAAM,IAAI;;mCAtBkC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC1B,CAAC;eAEd,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAElC,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;AAwIF,eAAO,MAAM,cAAc,EAAE,KAE5B,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,cAAc,EAAE,KAE5B,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Annotation carrying one or more named `FormLayout` DSL templates that
3
+ * control how `Form.FieldSet` / `Form.Layout` arrange a schema's fields.
4
+ * Callers select a variant via the `name` prop; the implicit name is
5
+ * `DEFAULT_LAYOUT_NAME` (`'default'`).
6
+ *
7
+ * Templates use a minimal XML grammar — see `parser.ts`. Example:
8
+ *
9
+ * FormLayoutAnnotation.set({
10
+ * default: `
11
+ * <grid cols="2">
12
+ * <field name="origin"/>
13
+ * <field name="destination"/>
14
+ * <field name="provider" span="2"/>
15
+ * </grid>
16
+ * `,
17
+ * card: `
18
+ * <grid cols="1">
19
+ * <field name="provider"/>
20
+ * <field name="number"/>
21
+ * </grid>
22
+ * `,
23
+ * })
24
+ */
25
+ export declare const FormLayoutAnnotationId: unique symbol;
26
+ export type FormLayoutMap = Record<string, string>;
27
+ export declare const FormLayoutAnnotation: import("@dxos/echo/internal").AnnotationHelper<FormLayoutMap>;
28
+ /** Name used when no explicit variant is requested. */
29
+ export declare const DEFAULT_LAYOUT_NAME = "default";
30
+ //# sourceMappingURL=annotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Layout/annotation.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sBAAsB,eAAsD,CAAC;AAE1F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,oBAAoB,+DAAgE,CAAC;AAElG,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './annotation';
2
+ export { FormLayout } from './FormLayout';
3
+ export { LayoutParseError, parseLayout, type LayoutNode } from './parser';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Layout/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Minimal XML-style DSL for laying out schema fields in a grid.
3
+ *
4
+ * Grammar:
5
+ * <grid cols="N"> ...children... </grid>
6
+ * <field name="x" span="N"/>
7
+ *
8
+ * - Attributes accept `"…"`, `'…'`, or unquoted integers.
9
+ * - Whitespace between tags is ignored. Text content (between tags) is forbidden.
10
+ * - Self-closing form (`<field … />`) is required for `field`; `grid` must use a closing tag.
11
+ *
12
+ * The parser is hand-rolled (no HTML parser) because the grammar is tiny.
13
+ */
14
+ /** Node type for the parsed layout tree. */
15
+ export type LayoutNode = {
16
+ readonly kind: 'grid';
17
+ readonly cols: number;
18
+ readonly children: readonly LayoutNode[];
19
+ } | {
20
+ readonly kind: 'field';
21
+ readonly name: string;
22
+ readonly span?: number;
23
+ };
24
+ export declare class LayoutParseError extends Error {
25
+ readonly position?: number | undefined;
26
+ readonly _tag = "LayoutParseError";
27
+ constructor(message: string, position?: number | undefined);
28
+ }
29
+ /** Parses a layout template string into a single root node. The root must be `<grid>`. */
30
+ export declare const parseLayout: (template: string) => LayoutNode;
31
+ //# sourceMappingURL=parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Layout/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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parser.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.test.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/Layout/parser.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import * as SchemaAST from 'effect/SchemaAST';
2
+ import React from 'react';
3
+ import { type FormFieldProps } from '../FormField';
4
+ import { type FormFieldStateProps } from '../FormFieldComponent';
5
+ export type ArrayFieldProps = {
6
+ label: string;
7
+ fieldProps: FormFieldStateProps;
8
+ } & FormFieldProps;
9
+ export declare function ArrayField({ type, path, label, readonly, layout, fieldProps: inputProps, ...props }: ArrayFieldProps): React.JSX.Element | null;
10
+ export declare namespace ArrayField {
11
+ var displayName: string;
12
+ }
13
+ /**
14
+ * Returns the default empty value for a given AST.
15
+ * Used for initializing new array values etc.
16
+ */
17
+ export declare const getDefaultValue: (ast?: SchemaAST.AST) => any;
18
+ //# sourceMappingURL=ArrayField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/ArrayField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAsB,MAAM,OAAO,CAAC;AAiB3C,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,mBAAmB,CAAC;CACjC,GAAG,cAAc,CAAC;mCAEQ,EACzB,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EAAE,UAAU,EACtB,GAAG,KAAK,EACT,EAAE,eAAe;;;;AAsHlB;;;GAGG;AAEH,eAAO,MAAM,eAAe,SAAU,SAAS,CAAC,GAAG,KAAG,GAsBrD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type FormFieldComponentProps } from '../FormFieldComponent';
3
+ export declare const BooleanField: ({ type, readonly, onValueChange, ...props }: FormFieldComponentProps<boolean>) => React.JSX.Element;
4
+ //# sourceMappingURL=BooleanField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BooleanField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/BooleanField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,uBAAuB,CAAC;AAEvF,eAAO,MAAM,YAAY,gDAAiD,uBAAuB,CAAC,OAAO,CAAC,sBAWzG,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type FormFieldComponentProps } from '../FormFieldComponent';
3
+ export declare const DateField: ({ type, format, readonly, placeholder: _placeholder, onValueChange, onBlur: _onBlur, ...props }: FormFieldComponentProps<string>) => React.JSX.Element;
4
+ //# sourceMappingURL=DateField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/DateField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,uBAAuB,CAAC;AAoCvF,eAAO,MAAM,SAAS,oGAQnB,uBAAuB,CAAC,MAAM,CAAC,sBAwCjC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { type GeoPoint } from '@dxos/echo/internal';
3
+ import { type FormFieldComponentProps } from '../FormFieldComponent';
4
+ export declare const GeoPointField: ({ type, label, jsonPath, readonly, layout, getStatus, getValue, onValueChange, onBlur, }: FormFieldComponentProps<GeoPoint>) => React.JSX.Element | null;
5
+ //# sourceMappingURL=GeoPointField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeoPointField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/GeoPointField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAE3F,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMjE,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,uBAAuB,CAAC;AAErF,eAAO,MAAM,aAAa,6FAUvB,uBAAuB,CAAC,QAAQ,CAAC,6BAiFnC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { type FormFieldComponentProps } from '../FormFieldComponent';
3
+ /**
4
+ * Form field that edits a markdown value in a CodeMirror editor.
5
+ * Supports two backings:
6
+ * - `Schema.String` annotated with `Format.TypeFormat.Markdown`: edited as plain text via `getValue`/`onValueChange`.
7
+ * - `Ref<Text>` annotated with `Format.TypeFormat.Markdown`: edited in-place via an Automerge doc accessor.
8
+ * When the ref is empty and a database is available, a create button is shown to allocate a new Text.
9
+ */
10
+ export declare const MarkdownField: ({ type, readonly, label, jsonPath, placeholder, layout, db, getStatus, getValue, onValueChange, }: FormFieldComponentProps) => React.JSX.Element | null;
11
+ //# sourceMappingURL=MarkdownField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/MarkdownField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAYpD,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,uBAAuB,CAAC;AAKrF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,sGAWvB,uBAAuB,6BAgDzB,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ decorators: import("@storybook/react").Decorator[];
5
+ parameters: {
6
+ layout: string;
7
+ translations: [{
8
+ readonly 'en-US': {
9
+ readonly "@dxos/react-ui-form": {
10
+ readonly 'fields.label': 'Fields';
11
+ readonly 'hidden-fields.label': 'Hidden Fields';
12
+ readonly 'empty-readonly-ref-field.label': '(none)';
13
+ readonly 'field-property.label': 'Property';
14
+ readonly 'field-property.placeholder': 'Property name';
15
+ readonly 'field-format.label': 'Type';
16
+ readonly 'field-path.label': 'Field path';
17
+ readonly 'remove-item.button': 'Delete item';
18
+ readonly 'add-item.button': 'Add item';
19
+ readonly 'add-property-button.label': 'Add property';
20
+ readonly 'boolean-input-true.value': 'Yes';
21
+ readonly 'boolean-input-false.value': 'No';
22
+ readonly 'show-field.label': 'Show field';
23
+ readonly 'hide-field.label': 'Hide field';
24
+ readonly 'delete-field.label': 'Delete field';
25
+ readonly 'create-option.label': 'Create';
26
+ readonly 'add-tag.label': 'Add tag';
27
+ readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
28
+ readonly 'ref-field.placeholder': 'Select\u2026';
29
+ readonly 'ref-field.placeholder_one': 'Select\u2026';
30
+ readonly 'ref-field.placeholder_other': 'Select items\u2026';
31
+ readonly 'example.placeholder': 'Example';
32
+ readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
33
+ readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
34
+ readonly 'cancel-button.label': 'Cancel';
35
+ readonly 'save-button.label': 'Save';
36
+ readonly 'create-text.label': 'Create text';
37
+ readonly 'format.boolean.label': 'Boolean';
38
+ readonly 'format.currency.label': 'Currency';
39
+ readonly 'format.date.label': 'Date';
40
+ readonly 'format.date-time.label': 'DateTime';
41
+ readonly 'format.did.label': 'DID';
42
+ readonly 'format.duration.label': 'Duration';
43
+ readonly 'format.dxn.label': 'DXN';
44
+ readonly 'format.email.label': 'Email';
45
+ readonly 'format.formula.label': 'Formula';
46
+ readonly 'format.hostname.label': 'Hostname';
47
+ readonly 'format.integer.label': 'Integer';
48
+ readonly 'format.json.label': 'JSON';
49
+ readonly 'format.lnglat.label': 'Geopoint';
50
+ readonly 'format.markdown.label': 'Markdown';
51
+ readonly 'format.percent.label': 'Percent';
52
+ readonly 'format.ref.label': 'Reference';
53
+ readonly 'format.regex.label': 'RegExp';
54
+ readonly 'format.string.label': 'String';
55
+ readonly 'format.single-select.label': 'Select';
56
+ readonly 'format.multi-select.label': 'Multi-select';
57
+ readonly 'format.text.label': 'Long text';
58
+ readonly 'format.time.label': 'Time';
59
+ readonly 'format.timestamp.label': 'Timestamp';
60
+ readonly 'format.user.label': 'User';
61
+ readonly 'format.number.label': 'Number';
62
+ readonly 'format.uri.label': 'URI';
63
+ readonly 'format.url.label': 'URL';
64
+ readonly 'format.uuid.label': 'UUID';
65
+ readonly 'latitude.label': 'Latitude';
66
+ readonly 'longitude.label': 'Longitude';
67
+ readonly 'select-option.label': 'Label';
68
+ readonly 'select-option-label.placeholder': 'Option label';
69
+ readonly 'select-option-delete.button': 'Delete';
70
+ readonly 'select-option-add.button': 'Add option';
71
+ readonly 'system-schema.title': 'System type';
72
+ readonly 'system-schema.description': 'System type: cannot add or remove fields.';
73
+ readonly 'remove.button': 'Delete';
74
+ };
75
+ };
76
+ }];
77
+ };
78
+ };
79
+ export default meta;
80
+ type Story = StoryObj<typeof meta>;
81
+ export declare const StringBacked: Story;
82
+ export declare const StringBackedKeepsFocus: Story;
83
+ export declare const RefPopulated: Story;
84
+ export declare const RefEmpty: Story;
85
+ //# sourceMappingURL=MarkdownField.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownField.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/MarkdownField.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA4GjE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOM,CAAC;eAEF,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAMF,eAAO,MAAM,sBAAsB,EAAE,KA+CpC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type FormFieldComponentProps } from '../FormFieldComponent';
3
+ export declare const NumberField: ({ type, readonly, placeholder, onValueChange, onBlur, ...props }: FormFieldComponentProps<number>) => React.JSX.Element;
4
+ //# sourceMappingURL=NumberField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/NumberField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,uBAAuB,CAAC;AAEvF,eAAO,MAAM,WAAW,qEAOrB,uBAAuB,CAAC,MAAM,CAAC,sBAoBjC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import '@dxos/lit-ui/dx-tag-picker.pcss';
3
+ import { type Database, Entity, Obj, Type } from '@dxos/echo';
4
+ import { type ObjectPickerContentProps, type RefOption } from '../../ObjectPicker';
5
+ import { type FormFieldComponentProps } from '../FormFieldComponent';
6
+ export type RefFieldProps = FormFieldComponentProps & Pick<ObjectPickerContentProps, 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'createFieldMap'> & {
7
+ db?: Database.Database;
8
+ useType?: (db?: Database.Database, typename?: string) => Type.AnyEntity;
9
+ useResults?: (db?: Database.Database, typename?: string) => Entity.Any[];
10
+ getOptions?: (objects: Entity.Any[], options?: {
11
+ parentLabel?: boolean;
12
+ }) => RefOption[];
13
+ /**
14
+ * Persist a newly-created object. Called after the user fills out the
15
+ * inline create form and clicks Save. Should add the object to the
16
+ * database and return it (sync or async). The returned object is then
17
+ * wired into this slot's form value as a Ref.
18
+ */
19
+ onCreate?: (schema: Type.AnyEntity, values: any) => Obj.Unknown | Promise<Obj.Unknown> | undefined | void;
20
+ };
21
+ export declare const RefField: (props: RefFieldProps) => React.JSX.Element | null;
22
+ //# sourceMappingURL=RefField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/RefField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,EAAU,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAW3E,OAAO,EAAgB,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEjG,OAAO,EAAE,KAAK,uBAAuB,EAAkB,MAAM,uBAAuB,CAAC;AA0BrF,MAAM,MAAM,aAAa,GAAG,uBAAuB,GACjD,IAAI,CACF,wBAAwB,EACxB,mBAAmB,GAAG,kBAAkB,GAAG,wBAAwB,GAAG,gBAAgB,CACvF,GAAG;IACF,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAEvB,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC;IACxE,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC;IACzE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,EAAE,CAAC;IACzF;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;CAC3G,CAAC;AAEJ,eAAO,MAAM,QAAQ,UAAW,aAAa,6BAsK5C,CAAC"}