@dxos/react-ui-form 0.8.4-main.d05673bc65 → 0.8.4-main.d9fc60f731

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 (209) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/browser/index.mjs +2008 -840
  3. package/dist/lib/browser/index.mjs.map +4 -4
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/translations.mjs +83 -0
  6. package/dist/lib/browser/translations.mjs.map +7 -0
  7. package/dist/lib/node-esm/index.mjs +2008 -840
  8. package/dist/lib/node-esm/index.mjs.map +4 -4
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/lib/node-esm/translations.mjs +85 -0
  11. package/dist/lib/node-esm/translations.mjs.map +7 -0
  12. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +2 -2
  13. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
  14. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts +64 -61
  15. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts.map +1 -1
  16. package/dist/types/src/components/Form/Form.d.ts +71 -17
  17. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  18. package/dist/types/src/components/Form/Form.stories.d.ts +148 -86
  19. package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
  20. package/dist/types/src/components/Form/FormField.d.ts +24 -8
  21. package/dist/types/src/components/Form/FormField.d.ts.map +1 -1
  22. package/dist/types/src/components/Form/FormFieldComponent.d.ts +26 -13
  23. package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +1 -1
  24. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +1 -1
  25. package/dist/types/src/components/Form/FormFieldSet.d.ts +11 -9
  26. package/dist/types/src/components/Form/FormFieldSet.d.ts.map +1 -1
  27. package/dist/types/src/components/Form/FormTooltipsContext.d.ts +19 -0
  28. package/dist/types/src/components/Form/FormTooltipsContext.d.ts.map +1 -0
  29. package/dist/types/src/components/Form/Layout/FormLayout.d.ts +50 -0
  30. package/dist/types/src/components/Form/Layout/FormLayout.d.ts.map +1 -0
  31. package/dist/types/src/components/Form/Layout/FormLayout.stories.d.ts +119 -0
  32. package/dist/types/src/components/Form/Layout/FormLayout.stories.d.ts.map +1 -0
  33. package/dist/types/src/components/Form/Layout/FormLayout.stories.test.d.ts +2 -0
  34. package/dist/types/src/components/Form/Layout/FormLayout.stories.test.d.ts.map +1 -0
  35. package/dist/types/src/components/Form/Layout/FormLayout.test.d.ts +2 -0
  36. package/dist/types/src/components/Form/Layout/FormLayout.test.d.ts.map +1 -0
  37. package/dist/types/src/components/Form/Layout/annotation.d.ts +30 -0
  38. package/dist/types/src/components/Form/Layout/annotation.d.ts.map +1 -0
  39. package/dist/types/src/components/Form/Layout/index.d.ts +4 -0
  40. package/dist/types/src/components/Form/Layout/index.d.ts.map +1 -0
  41. package/dist/types/src/components/Form/Layout/parser.d.ts +31 -0
  42. package/dist/types/src/components/Form/Layout/parser.d.ts.map +1 -0
  43. package/dist/types/src/components/Form/Layout/parser.test.d.ts +2 -0
  44. package/dist/types/src/components/Form/Layout/parser.test.d.ts.map +1 -0
  45. package/dist/types/src/components/Form/fields/ArrayField.d.ts +4 -4
  46. package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +1 -1
  47. package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +1 -1
  48. package/dist/types/src/components/Form/fields/DateField.d.ts +4 -0
  49. package/dist/types/src/components/Form/fields/DateField.d.ts.map +1 -0
  50. package/dist/types/src/components/Form/fields/GeoPointField.d.ts +1 -1
  51. package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +1 -1
  52. package/dist/types/src/components/Form/fields/InlineRefField.d.ts +13 -0
  53. package/dist/types/src/components/Form/fields/InlineRefField.d.ts.map +1 -0
  54. package/dist/types/src/components/Form/fields/MarkdownField.d.ts +8 -1
  55. package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +1 -1
  56. package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts +85 -0
  57. package/dist/types/src/components/Form/fields/MarkdownField.stories.d.ts.map +1 -0
  58. package/dist/types/src/components/Form/fields/NumberField.d.ts.map +1 -1
  59. package/dist/types/src/components/Form/fields/RefField.d.ts +12 -6
  60. package/dist/types/src/components/Form/fields/RefField.d.ts.map +1 -1
  61. package/dist/types/src/components/Form/fields/SelectField.d.ts +4 -1
  62. package/dist/types/src/components/Form/fields/SelectField.d.ts.map +1 -1
  63. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +1 -1
  64. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +1 -1
  65. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts +64 -61
  66. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +1 -1
  67. package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +1 -1
  68. package/dist/types/src/components/Form/fields/TextField.d.ts +1 -1
  69. package/dist/types/src/components/Form/fields/TextField.d.ts.map +1 -1
  70. package/dist/types/src/components/Form/fields/TupleField.d.ts +1 -1
  71. package/dist/types/src/components/Form/fields/TupleField.d.ts.map +1 -1
  72. package/dist/types/src/components/Form/fields/index.d.ts +2 -0
  73. package/dist/types/src/components/Form/fields/index.d.ts.map +1 -1
  74. package/dist/types/src/components/Form/index.d.ts +3 -0
  75. package/dist/types/src/components/Form/index.d.ts.map +1 -1
  76. package/dist/types/src/components/Form/meta-tags.d.ts +30 -0
  77. package/dist/types/src/components/Form/meta-tags.d.ts.map +1 -0
  78. package/dist/types/src/components/Form/meta-tags.test.d.ts +2 -0
  79. package/dist/types/src/components/Form/meta-tags.test.d.ts.map +1 -0
  80. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts +8 -0
  81. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -0
  82. package/dist/types/src/components/ObjectForm/index.d.ts +2 -0
  83. package/dist/types/src/components/ObjectForm/index.d.ts.map +1 -0
  84. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +28 -6
  85. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -1
  86. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts +64 -61
  87. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts.map +1 -1
  88. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts +9 -0
  89. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts.map +1 -0
  90. package/dist/types/src/components/ObjectProperties/ObjectProperties.stories.d.ts +128 -0
  91. package/dist/types/src/components/ObjectProperties/ObjectProperties.stories.d.ts.map +1 -0
  92. package/dist/types/src/components/ObjectProperties/ObjectProperties.test.d.ts +2 -0
  93. package/dist/types/src/components/ObjectProperties/ObjectProperties.test.d.ts.map +1 -0
  94. package/dist/types/src/components/ObjectProperties/index.d.ts +2 -0
  95. package/dist/types/src/components/ObjectProperties/index.d.ts.map +1 -0
  96. package/dist/types/src/components/ObjectTree/ObjectTree.d.ts +9 -0
  97. package/dist/types/src/components/ObjectTree/ObjectTree.d.ts.map +1 -0
  98. package/dist/types/src/components/ObjectTree/ObjectTree.stories.d.ts +87 -0
  99. package/dist/types/src/components/ObjectTree/ObjectTree.stories.d.ts.map +1 -0
  100. package/dist/types/src/components/ObjectTree/index.d.ts +2 -0
  101. package/dist/types/src/components/ObjectTree/index.d.ts.map +1 -0
  102. package/dist/types/src/components/Settings/Settings.d.ts +28 -33
  103. package/dist/types/src/components/Settings/Settings.d.ts.map +1 -1
  104. package/dist/types/src/components/Settings/Settings.stories.d.ts +65 -61
  105. package/dist/types/src/components/Settings/Settings.stories.d.ts.map +1 -1
  106. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts +43 -0
  107. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts.map +1 -0
  108. package/dist/types/src/components/Settings/SettingsItem.d.ts +16 -0
  109. package/dist/types/src/components/Settings/SettingsItem.d.ts.map +1 -0
  110. package/dist/types/src/components/Settings/SettingsSelectField.d.ts +18 -0
  111. package/dist/types/src/components/Settings/SettingsSelectField.d.ts.map +1 -0
  112. package/dist/types/src/components/Settings/index.d.ts +2 -0
  113. package/dist/types/src/components/Settings/index.d.ts.map +1 -1
  114. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +9 -11
  115. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  116. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +68 -66
  117. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
  118. package/dist/types/src/components/index.d.ts +3 -0
  119. package/dist/types/src/components/index.d.ts.map +1 -1
  120. package/dist/types/src/components/testing.d.ts +13 -4
  121. package/dist/types/src/components/testing.d.ts.map +1 -1
  122. package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -1
  123. package/dist/types/src/hooks/useKeyHandler.d.ts +2 -1
  124. package/dist/types/src/hooks/useKeyHandler.d.ts.map +1 -1
  125. package/dist/types/src/index.d.ts +0 -2
  126. package/dist/types/src/index.d.ts.map +1 -1
  127. package/dist/types/src/translations.d.ts +64 -61
  128. package/dist/types/src/translations.d.ts.map +1 -1
  129. package/dist/types/src/util/field-type.d.ts +19 -0
  130. package/dist/types/src/util/field-type.d.ts.map +1 -0
  131. package/dist/types/src/util/field.d.ts.map +1 -1
  132. package/dist/types/src/util/formatting.d.ts.map +1 -1
  133. package/dist/types/src/util/index.d.ts +1 -0
  134. package/dist/types/src/util/index.d.ts.map +1 -1
  135. package/dist/types/src/util/properties.d.ts +18 -1
  136. package/dist/types/src/util/properties.d.ts.map +1 -1
  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 +1 -0
  140. package/dist/types/src/util/refs.d.ts.map +1 -1
  141. package/dist/types/tsconfig.tsbuildinfo +1 -1
  142. package/package.json +48 -41
  143. package/src/components/FieldEditor/FieldEditor.stories.tsx +4 -4
  144. package/src/components/FieldEditor/FieldEditor.test.tsx +4 -2
  145. package/src/components/FieldEditor/FieldEditor.tsx +23 -17
  146. package/src/components/Form/AUDIT.md +17 -0
  147. package/src/components/Form/Form.stories.tsx +46 -65
  148. package/src/components/Form/Form.tsx +176 -60
  149. package/src/components/Form/FormField.tsx +107 -38
  150. package/src/components/Form/FormFieldComponent.tsx +77 -20
  151. package/src/components/Form/FormFieldSet.tsx +128 -78
  152. package/src/components/Form/FormTooltipsContext.ts +25 -0
  153. package/src/components/Form/Layout/FormLayout.stories.test.tsx +51 -0
  154. package/src/components/Form/Layout/FormLayout.stories.tsx +422 -0
  155. package/src/components/Form/Layout/FormLayout.test.ts +59 -0
  156. package/src/components/Form/Layout/FormLayout.tsx +251 -0
  157. package/src/components/Form/Layout/annotation.ts +38 -0
  158. package/src/components/Form/Layout/index.ts +7 -0
  159. package/src/components/Form/Layout/parser.test.ts +120 -0
  160. package/src/components/Form/Layout/parser.ts +167 -0
  161. package/src/components/Form/fields/ArrayField.tsx +64 -35
  162. package/src/components/Form/fields/DateField.tsx +101 -0
  163. package/src/components/Form/fields/GeoPointField.tsx +12 -8
  164. package/src/components/Form/fields/InlineRefField.tsx +146 -0
  165. package/src/components/Form/fields/MarkdownField.stories.tsx +206 -0
  166. package/src/components/Form/fields/MarkdownField.tsx +135 -45
  167. package/src/components/Form/fields/RefField.tsx +83 -42
  168. package/src/components/Form/fields/SelectField.tsx +17 -5
  169. package/src/components/Form/fields/SelectOptionField.stories.tsx +8 -6
  170. package/src/components/Form/fields/SelectOptionField.tsx +14 -13
  171. package/src/components/Form/fields/TextAreaField.tsx +1 -1
  172. package/src/components/Form/fields/TextField.tsx +2 -2
  173. package/src/components/Form/fields/TupleField.tsx +3 -2
  174. package/src/components/Form/fields/index.ts +2 -0
  175. package/src/components/Form/index.ts +3 -0
  176. package/src/components/Form/meta-tags.test.ts +47 -0
  177. package/src/components/Form/meta-tags.ts +33 -0
  178. package/src/components/ObjectForm/ObjectForm.tsx +109 -0
  179. package/src/components/ObjectForm/index.ts +5 -0
  180. package/src/components/ObjectPicker/ObjectPicker.stories.tsx +13 -11
  181. package/src/components/ObjectPicker/ObjectPicker.tsx +93 -66
  182. package/src/components/ObjectProperties/ObjectProperties.stories.tsx +350 -0
  183. package/src/components/ObjectProperties/ObjectProperties.test.tsx +111 -0
  184. package/src/components/ObjectProperties/ObjectProperties.tsx +144 -0
  185. package/src/components/ObjectProperties/index.ts +5 -0
  186. package/src/components/ObjectTree/ObjectTree.stories.tsx +134 -0
  187. package/src/components/ObjectTree/ObjectTree.tsx +190 -0
  188. package/src/components/ObjectTree/index.ts +5 -0
  189. package/src/components/Settings/AUDIT.md +51 -0
  190. package/src/components/Settings/Settings.stories.tsx +69 -21
  191. package/src/components/Settings/Settings.tsx +32 -181
  192. package/src/components/Settings/SettingsFieldSet.tsx +257 -0
  193. package/src/components/Settings/SettingsItem.tsx +58 -0
  194. package/src/components/Settings/SettingsSelectField.tsx +59 -0
  195. package/src/components/Settings/index.ts +2 -0
  196. package/src/components/ViewEditor/ViewEditor.stories.tsx +45 -51
  197. package/src/components/ViewEditor/ViewEditor.test.tsx +11 -9
  198. package/src/components/ViewEditor/ViewEditor.tsx +45 -55
  199. package/src/components/index.ts +3 -0
  200. package/src/components/testing.tsx +19 -11
  201. package/src/hooks/useKeyHandler.tsx +7 -7
  202. package/src/index.ts +0 -4
  203. package/src/translations.ts +67 -63
  204. package/src/util/field-type.ts +60 -0
  205. package/src/util/index.ts +1 -0
  206. package/src/util/properties.test.ts +121 -0
  207. package/src/util/properties.ts +47 -4
  208. package/src/util/refs.ts +7 -3
  209. package/src/vite-env.d.ts +10 -0
@@ -1,26 +1,36 @@
1
1
  import * as Schema from 'effect/Schema';
2
2
  import React, { type PropsWithChildren } from 'react';
3
+ import { Type } from '@dxos/echo';
3
4
  import { type AnyProperties } from '@dxos/echo/internal';
4
- import { type IconButtonProps, type ScrollAreaRootProps, type ThemedClassName } from '@dxos/react-ui';
5
+ import { type ColumnRootProps, type IconButtonProps, type ThemedClassName } from '@dxos/react-ui';
5
6
  import { type FormHandler, type FormHandlerProps, type FormUpdateMeta } from '../../hooks';
6
7
  import { type FormFieldLabelProps, type FormFieldStateProps } from './FormFieldComponent';
7
8
  import { type FormFieldSetProps as NaturalFormFieldSetProps } from './FormFieldSet';
8
- export type ExcludeId<S extends Schema.Schema.AnyNoContext> = Omit<Schema.Schema.Type<S>, 'id'>;
9
- export declare const omitId: <S extends Schema.Schema.AnyNoContext>(schema: S) => Schema.Schema<ExcludeId<S>, ExcludeId<S>>;
9
+ import { type FormLayoutProps as NaturalFormLayoutProps } from './Layout/FormLayout';
10
+ export type ExcludeId<S extends Schema.Schema.AnyNoContext | Type.AnyEntity> = Omit<S extends Type.AnyEntity ? Type.InstanceType<S> : S extends Schema.Schema.AnyNoContext ? Schema.Schema.Type<S> : never, 'id'>;
11
+ export declare const omitId: <S extends Schema.Schema.AnyNoContext | Type.AnyEntity>(schemaOrType: S) => Schema.Schema<ExcludeId<S>, ExcludeId<S>>;
12
+ /**
13
+ * Drop fields annotated with `FormInputAnnotation.set(false)` from a schema so
14
+ * the form's validator doesn't trip on required-but-hidden fields. Used by
15
+ * the picker's inline create form, where a `FactoryAnnotation` typically
16
+ * supplies the hidden values (e.g. a backing-object Ref) outside the form.
17
+ */
18
+ export declare const omitHiddenFormFields: <S extends Schema.Schema.AnyNoContext>(schema: S) => S;
10
19
  type FormContextValue<T extends AnyProperties = any> = {
11
20
  /**
12
21
  * Form handler.
13
22
  */
14
23
  form: FormHandler<T>;
15
24
  /**
16
- * Show debug info.
25
+ * Show field tooltips (currently: JSON path on each label). Defaults to
26
+ * `true`; pass `false` to suppress.
17
27
  */
18
- debug?: boolean;
28
+ tooltips?: boolean;
19
29
  /**
20
30
  * Testing.
21
31
  */
22
32
  testId?: string;
23
- } & Pick<NaturalFormFieldSetProps<T>, 'readonly' | 'layout' | 'fieldMap' | 'fieldProvider' | 'projection'>;
33
+ } & Pick<NaturalFormFieldSetProps<T>, 'readonly' | 'layout' | 'fieldMap' | 'fieldProvider' | 'projection' | 'createTypename' | 'createFieldMap' | 'db'>;
24
34
  declare const useFormContext: (consumerName: string) => FormContextValue<any>;
25
35
  /**
26
36
  * Get the current form values.
@@ -43,30 +53,70 @@ type FormRootProps<T extends AnyProperties = AnyProperties> = PropsWithChildren<
43
53
  */
44
54
  onCancel?: () => void;
45
55
  } & Omit<FormContextValue<T>, 'form'> & Pick<FormHandlerProps<T>, 'schema' | 'autoSave' | 'values' | 'defaultValues' | 'onValidate' | 'onValuesChanged'> & Omit<NaturalFormFieldSetProps<T>, 'schema' | 'path'>>;
46
- type FormViewportProps = PropsWithChildren<ScrollAreaRootProps>;
56
+ declare function FormRoot<T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
57
+ declare namespace FormRoot {
58
+ var displayName: string;
59
+ }
60
+ type FormViewportProps = {
61
+ scroll?: boolean;
62
+ gutter?: ColumnRootProps['gutter'];
63
+ };
47
64
  type FormContentProps = ThemedClassName<PropsWithChildren<{}>>;
48
65
  type FormFieldSetProps = ThemedClassName<NaturalFormFieldSetProps<any>>;
66
+ declare function FormFieldSet(props: FormFieldSetProps): React.JSX.Element;
67
+ declare namespace FormFieldSet {
68
+ var displayName: string;
69
+ }
70
+ type FormLayoutProps = Omit<NaturalFormLayoutProps, 'schema'> & {
71
+ schema?: NaturalFormLayoutProps['schema'];
72
+ };
73
+ declare function FormLayout({ schema, ...props }: FormLayoutProps): React.JSX.Element | null;
74
+ declare namespace FormLayout {
75
+ var displayName: string;
76
+ }
49
77
  type FormActionsProps = ThemedClassName<{}>;
78
+ declare function FormActions({ classNames }: FormActionsProps): React.JSX.Element | null;
79
+ declare namespace FormActions {
80
+ var displayName: string;
81
+ }
82
+ type FormSectionProps = ThemedClassName<{
83
+ label?: string;
84
+ description?: string;
85
+ }>;
50
86
  type FormSubmitProps = ThemedClassName<Partial<Pick<IconButtonProps, 'icon' | 'label' | 'disabled'>>>;
87
+ declare function FormSubmit({ classNames, label, icon, disabled }: FormSubmitProps): React.JSX.Element | null;
88
+ declare namespace FormSubmit {
89
+ var displayName: string;
90
+ }
91
+ type FormErrorProps = ThemedClassName<PropsWithChildren>;
92
+ declare function FormError({ children, classNames }: FormErrorProps): React.JSX.Element | null;
93
+ declare namespace FormError {
94
+ var displayName: string;
95
+ }
51
96
  export declare const Form: {
52
97
  Root: {
53
98
  <T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
54
99
  displayName: string;
55
100
  };
56
- Viewport: {
57
- ({ children, classNames, margin, padding, thin, ...props }: FormViewportProps): React.JSX.Element;
58
- displayName: string;
59
- };
60
- Content: {
61
- ({ classNames, children }: FormContentProps): React.JSX.Element;
62
- displayName: string;
63
- };
101
+ Viewport: React.ForwardRefExoticComponent<Omit<FormViewportProps, "className"> & {
102
+ classNames?: import("@dxos/ui-types").ClassNameValue;
103
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
104
+ Content: React.ForwardRefExoticComponent<Omit<FormContentProps, "className"> & {
105
+ classNames?: import("@dxos/ui-types").ClassNameValue;
106
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
107
+ Section: React.ForwardRefExoticComponent<Omit<FormSectionProps, "className"> & {
108
+ classNames?: import("@dxos/ui-types").ClassNameValue;
109
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
64
110
  FieldSet: {
65
111
  (props: FormFieldSetProps): React.JSX.Element;
66
112
  displayName: string;
67
113
  };
114
+ Layout: {
115
+ ({ schema, ...props }: FormLayoutProps): React.JSX.Element | null;
116
+ displayName: string;
117
+ };
68
118
  Label: {
69
- ({ label, error, readonly, asChild }: FormFieldLabelProps): React.JSX.Element;
119
+ ({ label, error, readonly, asChild, path }: FormFieldLabelProps): React.JSX.Element;
70
120
  displayName: string;
71
121
  };
72
122
  Actions: {
@@ -77,7 +127,11 @@ export declare const Form: {
77
127
  ({ classNames, label, icon, disabled }: FormSubmitProps): React.JSX.Element | null;
78
128
  displayName: string;
79
129
  };
130
+ Error: {
131
+ ({ children, classNames }: FormErrorProps): React.JSX.Element | null;
132
+ displayName: string;
133
+ };
80
134
  };
81
135
  export { useFormContext, useFormValues, useFormFieldState };
82
- export type { FormRootProps, FormViewportProps, FormContentProps, FormFieldSetProps, FormFieldLabelProps, FormActionsProps, FormSubmitProps, };
136
+ export type { FormRootProps, FormViewportProps, FormContentProps, FormSectionProps, FormFieldSetProps, FormLayoutProps, FormFieldLabelProps, FormActionsProps, FormSubmitProps, };
83
137
  //# sourceMappingURL=Form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAErB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAGpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAkB,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAEL,KAAK,iBAAiB,IAAI,wBAAwB,EACnD,MAAM,gBAAgB,CAAC;AAkBxB,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAA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,CAAA;CAAE,CAAC,CAAC;AAyBlF,KAAK,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;4BAElF,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,eAAe;;;;AAoC1E,KAAK,cAAc,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;2BAGtC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,cAAc;;;;AAmB3D,eAAO,MAAM,IAAI;IACf,IAAI;SA7QY,CAAC,SAAS,aAAa,4EAOtC,aAAa,CAAC,CAAC,CAAC;;;IAuQjB,QAAQ;;;IACR,OAAO;;;IACP,OAAO;;;IACP,QAAQ;gBAlLmB,iBAAiB;;;IAmL5C,MAAM;+BAnKkC,eAAe;;;IAoKvD,KAAK;;;;IACL,OAAO;yBAjJ4B,gBAAgB;;;IAkJnD,MAAM;gDAnEmD,eAAe;;;IAoExE,KAAK;mCA7BsC,cAAc;;;CA8B1D,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC;AAE5D,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,CAAC"}
@@ -1,34 +1,36 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import * as Schema from 'effect/Schema';
3
3
  import React from 'react';
4
- import { Type } from '@dxos/echo';
4
+ import { Obj, Type } from '@dxos/echo';
5
5
  import { type AnyProperties } from '@dxos/echo/internal';
6
6
  import { type ExcludeId, type FormRootProps } from './Form';
7
7
  declare const Organization: Type.Obj<{
8
8
  readonly name: string;
9
9
  }, Schema.Struct.Fields>;
10
- export interface Organization extends Schema.Schema.Type<typeof Organization> {
11
- }
10
+ export type Organization = Type.InstanceType<typeof Organization>;
12
11
  declare const Person: Type.Obj<{
13
12
  readonly name: string;
13
+ readonly ignore?: string | undefined;
14
+ readonly active?: boolean | undefined;
14
15
  readonly address?: {
15
- readonly state: string;
16
16
  readonly street: string;
17
17
  readonly city: string;
18
+ readonly state: string;
18
19
  readonly zip: number;
19
20
  } | undefined;
20
- readonly status?: "active" | "inactive" | undefined;
21
- readonly location?: readonly [number, number, (number | undefined)?] | undefined;
22
- readonly tags?: readonly import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
23
- readonly hue?: string | undefined;
24
- readonly label: string;
25
- }>[] | undefined;
26
- readonly ignore?: string | undefined;
27
- readonly active?: boolean | undefined;
28
- readonly employer?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
21
+ readonly employer?: import("@dxos/echo/internal").Ref<{
29
22
  readonly name: string;
30
- }> | undefined;
23
+ } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
24
+ readonly tags?: readonly import("@dxos/echo/internal").Ref<{
25
+ readonly label: string;
26
+ readonly hue?: string | undefined;
27
+ } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>[] | undefined;
28
+ readonly status?: "active" | "inactive" | undefined;
31
29
  readonly notes?: string | undefined;
30
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
31
+ readonly birthday?: string | undefined;
32
+ readonly meetingAt?: string | undefined;
33
+ readonly reminderAt?: string | undefined;
32
34
  readonly tasks?: readonly string[] | undefined;
33
35
  readonly locations?: readonly (readonly [number, number, (number | undefined)?])[] | undefined;
34
36
  readonly identities?: readonly {
@@ -36,11 +38,9 @@ declare const Person: Type.Obj<{
36
38
  readonly value: string;
37
39
  }[] | undefined;
38
40
  }, Schema.Struct.Fields>;
39
- export interface Person extends Schema.Schema.Type<typeof Person> {
40
- }
41
- type StoryProps<T extends AnyProperties> = {
42
- debug?: boolean;
43
- schema: Schema.Schema<T>;
41
+ export type Person = Type.InstanceType<typeof Person>;
42
+ type DefaultStoryProps<T extends AnyProperties> = {
43
+ schema?: Schema.Schema<T>;
44
44
  } & FormRootProps<T>;
45
45
  declare const meta: {
46
46
  title: string;
@@ -48,83 +48,145 @@ declare const meta: {
48
48
  <T extends AnyProperties = AnyProperties>({ children, schema, values, onSave, onCancel, ...props }: FormRootProps<T>): React.JSX.Element;
49
49
  displayName: string;
50
50
  };
51
- render: <T extends AnyProperties = AnyProperties>({ debug, schema, values: valuesProp, ...props }: StoryProps<T>) => React.JSX.Element;
51
+ render: <T extends AnyProperties = AnyProperties>({ schema, values: valuesProp, ...props }: DefaultStoryProps<T>) => React.JSX.Element;
52
52
  decorators: import("@storybook/react").Decorator[];
53
53
  parameters: {
54
54
  layout: string;
55
55
  translations: [{
56
56
  readonly 'en-US': {
57
57
  readonly "@dxos/react-ui-form": {
58
- readonly 'fields label': "Fields";
59
- readonly 'hidden fields label': "Hidden Fields";
60
- readonly 'empty readonly ref field label': "(none)";
61
- readonly 'add property button label': "Add property";
62
- readonly 'field property label': "Property";
63
- readonly 'field property placeholder': "Property name";
64
- readonly 'field format label': "Type";
65
- readonly 'field path label': "Field path";
66
- readonly 'add field': "Add field";
67
- readonly 'delete field': "Delete field";
68
- readonly 'field limit reached': "Maximum number of fields reached";
69
- readonly 'boolean input true value': "Yes";
70
- readonly 'boolean input false value': "No";
71
- readonly 'show field label': "Show field";
72
- readonly 'hide field label': "Hide field";
73
- readonly 'delete field label': "Delete field";
74
- readonly 'ref field combobox input placeholder': "Search…";
75
- readonly 'ref field placeholder_one': "Select…";
76
- readonly 'ref field placeholder_other': "Select items…";
77
- readonly 'example placeholder': "Example";
78
- readonly 'latitude placeholder': "Latitude (e.g., 40.7128)";
79
- readonly 'longitude placeholder': "Longitude (e.g., -74.0060)";
80
- readonly 'cancel button label': "Cancel";
81
- readonly 'save button label': "Save";
82
- readonly 'format boolean': "Boolean";
83
- readonly 'format currency': "Currency";
84
- readonly 'format date': "Date";
85
- readonly 'format date-time': "DateTime";
86
- readonly 'format did': "DID";
87
- readonly 'format duration': "Duration";
88
- readonly 'format dxn': "DXN";
89
- readonly 'format email': "Email";
90
- readonly 'format formula': "Formula";
91
- readonly 'format hostname': "Hostname";
92
- readonly 'format integer': "Integer";
93
- readonly 'format json': "JSON";
94
- readonly 'format lnglat': "Geopoint";
95
- readonly 'format markdown': "Markdown";
96
- readonly 'format percent': "Percent";
97
- readonly 'format ref': "Reference";
98
- readonly 'format regex': "RegExp";
99
- readonly 'format string': "String";
100
- readonly 'format single-select': "Select";
101
- readonly 'format multi-select': "Multi-select";
102
- readonly 'format text': "Long text";
103
- readonly 'format time': "Time";
104
- readonly 'format timestamp': "Timestamp";
105
- readonly 'format user': "User";
106
- readonly 'format number': "Number";
107
- readonly 'format uri': "URI";
108
- readonly 'format url': "URL";
109
- readonly 'format uuid': "UUID";
110
- readonly 'latitude label': "Latitude";
111
- readonly 'longitude label': "Longitude";
112
- readonly 'select option label': "Label";
113
- readonly 'select option label placeholder': "Option label";
114
- readonly 'select option color': "Color";
115
- readonly 'select option delete': "Delete";
116
- readonly 'select option add': "Add option";
117
- readonly 'system schema title': "System type";
118
- readonly 'system schema description': "System type: cannot add or remove fields.";
58
+ readonly 'fields.label': 'Fields';
59
+ readonly 'hidden-fields.label': 'Hidden Fields';
60
+ readonly 'empty-readonly-ref-field.label': '(none)';
61
+ readonly 'field-property.label': 'Property';
62
+ readonly 'field-property.placeholder': 'Property name';
63
+ readonly 'field-format.label': 'Type';
64
+ readonly 'field-path.label': 'Field path';
65
+ readonly 'remove-item.button': 'Delete item';
66
+ readonly 'add-item.button': 'Add item';
67
+ readonly 'add-property-button.label': 'Add property';
68
+ readonly 'boolean-input-true.value': 'Yes';
69
+ readonly 'boolean-input-false.value': 'No';
70
+ readonly 'show-field.label': 'Show field';
71
+ readonly 'hide-field.label': 'Hide field';
72
+ readonly 'delete-field.label': 'Delete field';
73
+ readonly 'create-option.label': 'Create';
74
+ readonly 'add-tag.label': 'Add tag';
75
+ readonly 'ref-field-combobox-input.placeholder': 'Search\u2026';
76
+ readonly 'ref-field.placeholder': 'Select\u2026';
77
+ readonly 'ref-field.placeholder_one': 'Select\u2026';
78
+ readonly 'ref-field.placeholder_other': 'Select items\u2026';
79
+ readonly 'example.placeholder': 'Example';
80
+ readonly 'latitude.placeholder': 'Latitude (e.g., 40.7128)';
81
+ readonly 'longitude.placeholder': 'Longitude (e.g., -74.0060)';
82
+ readonly 'cancel-button.label': 'Cancel';
83
+ readonly 'save-button.label': 'Save';
84
+ readonly 'create-text.label': 'Create text';
85
+ readonly 'format.boolean.label': 'Boolean';
86
+ readonly 'format.currency.label': 'Currency';
87
+ readonly 'format.date.label': 'Date';
88
+ readonly 'format.date-time.label': 'DateTime';
89
+ readonly 'format.did.label': 'DID';
90
+ readonly 'format.duration.label': 'Duration';
91
+ readonly 'format.dxn.label': 'DXN';
92
+ readonly 'format.email.label': 'Email';
93
+ readonly 'format.formula.label': 'Formula';
94
+ readonly 'format.hostname.label': 'Hostname';
95
+ readonly 'format.integer.label': 'Integer';
96
+ readonly 'format.json.label': 'JSON';
97
+ readonly 'format.lnglat.label': 'Geopoint';
98
+ readonly 'format.markdown.label': 'Markdown';
99
+ readonly 'format.percent.label': 'Percent';
100
+ readonly 'format.ref.label': 'Reference';
101
+ readonly 'format.regex.label': 'RegExp';
102
+ readonly 'format.string.label': 'String';
103
+ readonly 'format.single-select.label': 'Select';
104
+ readonly 'format.multi-select.label': 'Multi-select';
105
+ readonly 'format.text.label': 'Long text';
106
+ readonly 'format.time.label': 'Time';
107
+ readonly 'format.timestamp.label': 'Timestamp';
108
+ readonly 'format.user.label': 'User';
109
+ readonly 'format.number.label': 'Number';
110
+ readonly 'format.uri.label': 'URI';
111
+ readonly 'format.url.label': 'URL';
112
+ readonly 'format.uuid.label': 'UUID';
113
+ readonly 'latitude.label': 'Latitude';
114
+ readonly 'longitude.label': 'Longitude';
115
+ readonly 'select-option.label': 'Label';
116
+ readonly 'select-option-label.placeholder': 'Option label';
117
+ readonly 'select-option-delete.button': 'Delete';
118
+ readonly 'select-option-add.button': 'Add option';
119
+ readonly 'system-schema.title': 'System type';
120
+ readonly 'system-schema.description': 'System type: cannot add or remove fields.';
121
+ readonly 'remove.button': 'Delete';
119
122
  };
120
123
  };
121
124
  }];
122
125
  };
123
126
  };
124
127
  export default meta;
125
- type Story<T extends AnyProperties> = StoryObj<StoryProps<T>>;
126
- export declare const Default: Story<ExcludeId<typeof Person>>;
127
- export declare const Readonly: Story<ExcludeId<typeof Person>>;
128
- export declare const Static: Story<ExcludeId<typeof Person>>;
129
- export declare const Empty: Story<ExcludeId<typeof Person>>;
128
+ type Story<T extends AnyProperties> = StoryObj<DefaultStoryProps<T>>;
129
+ declare const PersonSchema: Schema.Schema<{
130
+ readonly name: string;
131
+ readonly ignore?: string | undefined;
132
+ readonly active?: boolean | undefined;
133
+ readonly address?: {
134
+ readonly street: string;
135
+ readonly city: string;
136
+ readonly state: string;
137
+ readonly zip: number;
138
+ } | undefined;
139
+ readonly employer?: import("@dxos/echo/internal").Ref<{
140
+ readonly name: string;
141
+ } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
142
+ readonly tags?: readonly import("@dxos/echo/internal").Ref<{
143
+ readonly label: string;
144
+ readonly hue?: string | undefined;
145
+ } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>[] | undefined;
146
+ readonly status?: "active" | "inactive" | undefined;
147
+ readonly notes?: string | undefined;
148
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
149
+ readonly birthday?: string | undefined;
150
+ readonly meetingAt?: string | undefined;
151
+ readonly reminderAt?: string | undefined;
152
+ readonly tasks?: readonly string[] | undefined;
153
+ readonly locations?: readonly (readonly [number, number, (number | undefined)?])[] | undefined;
154
+ readonly identities?: readonly {
155
+ readonly type: string;
156
+ readonly value: string;
157
+ }[] | undefined;
158
+ } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>, {
159
+ readonly name: string;
160
+ readonly ignore?: string | undefined;
161
+ readonly active?: boolean | undefined;
162
+ readonly address?: {
163
+ readonly street: string;
164
+ readonly city: string;
165
+ readonly state: string;
166
+ readonly zip: number;
167
+ } | undefined;
168
+ readonly employer?: import("@dxos/echo/internal").Ref<{
169
+ readonly name: string;
170
+ } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
171
+ readonly tags?: readonly import("@dxos/echo/internal").Ref<{
172
+ readonly label: string;
173
+ readonly hue?: string | undefined;
174
+ } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>[] | undefined;
175
+ readonly status?: "active" | "inactive" | undefined;
176
+ readonly notes?: string | undefined;
177
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
178
+ readonly birthday?: string | undefined;
179
+ readonly meetingAt?: string | undefined;
180
+ readonly reminderAt?: string | undefined;
181
+ readonly tasks?: readonly string[] | undefined;
182
+ readonly locations?: readonly (readonly [number, number, (number | undefined)?])[] | undefined;
183
+ readonly identities?: readonly {
184
+ readonly type: string;
185
+ readonly value: string;
186
+ }[] | undefined;
187
+ } & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>, never>;
188
+ export declare const Default: Story<ExcludeId<typeof PersonSchema>>;
189
+ export declare const Readonly: Story<ExcludeId<typeof PersonSchema>>;
190
+ export declare const Static: Story<ExcludeId<typeof PersonSchema>>;
191
+ export declare const Empty: Story<ExcludeId<typeof PersonSchema>>;
130
192
  //# sourceMappingURL=Form.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Form.stories.tsx"],"names":[],"mappings":"AAIA,OAA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;;;;;;;;;;;;;;;;;;CAiEiB,CAAC;eAE1B,IAAI;AAEnB,KAAK,KAAK,CAAC,CAAC,SAAS,aAAa,IAAI,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAErE,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+FAAyB,CAAC;AAW5C,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAMzD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAM1D,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAMxD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAEvD,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import * as SchemaAST from 'effect/SchemaAST';
2
- import React from 'react';
2
+ import React, { PropsWithChildren } from 'react';
3
+ import { IconButtonProps } from '@dxos/react-ui';
3
4
  import { type ProjectionModel } from '@dxos/schema';
4
5
  import { type RefFieldProps } from './fields';
5
6
  import { type FormFieldComponentProps, type FormFieldMap, type FormFieldProvider } from './FormFieldComponent';
@@ -9,9 +10,14 @@ export type FormFieldProps = {
9
10
  */
10
11
  type: SchemaAST.AST;
11
12
  /**
12
- * Name of the property.
13
+ * Name of the property. Used to derive a default label
14
+ * (`title ?? capitalize(name)`) and as the projection lookup key. Pass
15
+ * `null` to suppress the header label entirely -- the form still renders
16
+ * the field/struct, but `FormFieldSet`'s top-level `<FormFieldLabel>` is
17
+ * skipped. Used by `ArrayField` for object-array items, where every item
18
+ * would otherwise repeat the array's parent name.
13
19
  */
14
- name: string;
20
+ name: string | null;
15
21
  /**
16
22
  * Path to the current object from the root. Used with nested forms.
17
23
  */
@@ -29,9 +35,19 @@ export type FormFieldProps = {
29
35
  * Function to lookup custom renderers for specific properties.
30
36
  */
31
37
  fieldProvider?: FormFieldProvider;
32
- } & Pick<FormFieldComponentProps, 'autoFocus' | 'readonly' | 'layout'> & Pick<RefFieldProps, 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'db' | 'schemaHook' | 'getOptions' | 'onCreate'>;
33
- export declare const FormField: {
34
- (props: FormFieldProps): React.JSX.Element | null;
35
- displayName: string;
36
- };
38
+ /**
39
+ * Typename of the ref type that the create props apply to.
40
+ * When set, createOptionLabel/createOptionIcon/createInitialValuePath/createFieldMap/onCreate
41
+ * are only passed to ref fields whose typename matches.
42
+ */
43
+ createTypename?: string;
44
+ } & Pick<FormFieldComponentProps, 'autoFocus' | 'readonly' | 'layout'> & Pick<RefFieldProps, 'createOptionLabel' | 'createOptionIcon' | 'createInitialValuePath' | 'createFieldMap' | 'db' | 'useType' | 'getOptions' | 'onCreate'>;
45
+ export declare function FormField(props: FormFieldProps): React.JSX.Element | null;
46
+ export declare namespace FormField {
47
+ var displayName: string;
48
+ }
49
+ export declare const Nesting: ({ children }: PropsWithChildren) => React.JSX.Element;
50
+ export declare const IconBlock: ({ inline, ...props }: IconButtonProps & {
51
+ inline?: boolean;
52
+ }) => React.JSX.Element;
37
53
  //# sourceMappingURL=FormField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormField.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAcvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAKpD,OAAO,EAOL,KAAK,aAAa,EAInB,MAAM,UAAU,CAAC;AAElB,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,MA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AE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,uBAAuB,EAAE,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC,GACpE,IAAI,CACF,aAAa,EACX,mBAAmB,GACnB,kBAAkB,GAClB,wBAAwB,GACxB,gBAAgB,GAChB,IAAI,GACJ,SAAS,GACT,YAAY,GACZ,UAAU,CACb,CAAC;kCAEsB,KAAK,EAAE,cAAc;;;;AAoM/C,eAAO,MAAM,OAAO,iBAAkB,iBAAiB,sBAItD,CAAC;AAEF,eAAO,MAAM,SAAS,yBAA0B,eAAe,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,sBAMrF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type * as Schema from 'effect/Schema';
2
2
  import type * as SchemaAST from 'effect/SchemaAST';
3
3
  import React, { Component, type FC, type FocusEvent, type PropsWithChildren, type ReactElement, type ReactNode } from 'react';
4
- import { type Format } from '@dxos/echo/internal';
4
+ import { type Database, Format } from '@dxos/echo';
5
5
  import { type FormFieldStatus } from '../../hooks';
6
6
  /**
7
7
  * Dynamic props passed to input components.
@@ -14,7 +14,6 @@ export type FormFieldStateProps<T = any> = {
14
14
  };
15
15
  /**
16
16
  * Presentation mode.
17
- *
18
17
  * - full: Show label, control, and status.
19
18
  * - compact: Show label and control.
20
19
  * - inline: Control only.
@@ -25,33 +24,48 @@ export type Presentation = 'full' | 'compact' | 'inline' | 'static';
25
24
  * Props passed to input components.
26
25
  */
27
26
  export type FormFieldComponentProps<T = any> = {
27
+ /** Database the form is editing against; populated for fields whose value is an ECHO object/Ref. */
28
+ db?: Database.Database;
28
29
  type: SchemaAST.AST;
29
30
  format?: Format.TypeFormat;
30
31
  readonly?: boolean;
31
32
  label: string;
33
+ /**
34
+ * Dotted JSON path of this field within the form values (e.g.
35
+ * `runtime.client.storage.persistent`). Forwarded to `FormFieldLabel` so
36
+ * that it can render the path as a debug hint when the enclosing
37
+ * `Form.Root` has `debug` enabled.
38
+ */
39
+ jsonPath?: string;
32
40
  placeholder?: string;
33
41
  autoFocus?: boolean;
34
42
  layout?: Presentation;
35
43
  } & FormFieldStateProps<T>;
36
- /**
37
- * Form field component.
38
- */
39
44
  export type FormFieldComponent = FC<FormFieldComponentProps>;
40
45
  export type FormFieldMap = Record<string, FormFieldComponent>;
41
46
  export type FormFieldProvider = (props: {
42
47
  prop: string;
43
48
  schema: Schema.Schema<any>;
44
49
  fieldProps: FormFieldComponentProps;
45
- }) => ReactElement | undefined;
50
+ }) => ReactElement | null | undefined;
46
51
  export type FormFieldLabelProps = {
47
52
  asChild?: boolean;
48
53
  error?: string;
54
+ /**
55
+ * JSON path of the field this label describes (e.g. `runtime.client.storage.persistent`).
56
+ * Surfaced as a hover tooltip on the label when the enclosing `Form.Root`
57
+ * has `tooltips` enabled (the default) -- useful for spotting which field
58
+ * maps to which path when authoring schemas or filing bugs against a form.
59
+ * Callers can supply the path unconditionally; the label suppresses the
60
+ * tooltip when `Form.Root tooltips={false}`.
61
+ */
62
+ path?: string;
49
63
  } & Pick<FormFieldComponentProps, 'label' | 'readonly'>;
50
- export declare const FormFieldLabel: {
51
- ({ label, error, readonly, asChild }: FormFieldLabelProps): React.JSX.Element;
52
- displayName: string;
53
- };
54
- export type FormFieldWrapperProps<T = any> = Pick<FormFieldComponentProps, 'readonly' | 'label' | 'layout' | 'getStatus' | 'getValue'> & {
64
+ export declare function FormFieldLabel({ label, error, readonly, asChild, path }: FormFieldLabelProps): React.JSX.Element;
65
+ export declare namespace FormFieldLabel {
66
+ var displayName: string;
67
+ }
68
+ export type FormFieldWrapperProps<T = any> = Pick<FormFieldComponentProps, 'readonly' | 'label' | 'layout' | 'getStatus' | 'getValue' | 'jsonPath' | 'format'> & {
55
69
  children?: (props: {
56
70
  value: T;
57
71
  }) => ReactNode;
@@ -71,8 +85,7 @@ export declare class FormFieldErrorBoundary extends Component<FormFieldErrorBoun
71
85
  error: undefined;
72
86
  };
73
87
  componentDidUpdate(prevProps: FormFieldErrorBoundaryProps): void;
74
- render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
88
+ 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;
75
89
  private resetError;
76
90
  }
77
- export {};
78
91
  //# sourceMappingURL=FormFieldComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldComponent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormFieldComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,EACZ,SAAS,EACT,KAAK,EAAE,EACP,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,GAAG,GAAG,IAAI;IACzC,SAAS,EAAE,MAAM,eAAe,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAC9B,MAA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9D;IAEQ,KAAK;QAAK,KAAK;MAAc;IAE7B,kBAAkB,CAAC,SAAS,EAAE,2BAA2B,QAIjE;IAEQ,MAAM,kRAWd;IAED,OAAO,CAAC,UAAU;CAGnB"}
@@ -1 +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,GAAI,kEAOnB,uBAAuB,CAAC,MAAM,CAAC,sBAsBjC,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAOnC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC"}
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"}