@dxos/react-ui-form 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5

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 (229) hide show
  1. package/README.md +0 -1
  2. package/dist/lib/browser/index.mjs +2758 -2113
  3. package/dist/lib/browser/index.mjs.map +4 -4
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/node-esm/index.mjs +2758 -2113
  6. package/dist/lib/node-esm/index.mjs.map +4 -4
  7. package/dist/lib/node-esm/meta.json +1 -1
  8. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts +9 -9
  9. package/dist/types/src/components/FieldEditor/FieldEditor.d.ts.map +1 -1
  10. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts +85 -7
  11. package/dist/types/src/components/FieldEditor/FieldEditor.stories.d.ts.map +1 -1
  12. package/dist/types/src/components/Form/Form.d.ts +86 -25
  13. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  14. package/dist/types/src/components/Form/Form.stories.d.ts +129 -56
  15. package/dist/types/src/components/Form/Form.stories.d.ts.map +1 -1
  16. package/dist/types/src/components/Form/FormField.d.ts +43 -0
  17. package/dist/types/src/components/Form/FormField.d.ts.map +1 -0
  18. package/dist/types/src/components/Form/FormFieldComponent.d.ts +77 -0
  19. package/dist/types/src/components/Form/FormFieldComponent.d.ts.map +1 -0
  20. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts +9 -0
  21. package/dist/types/src/components/Form/FormFieldComponent.stories.d.ts.map +1 -0
  22. package/dist/types/src/components/Form/FormFieldSet.d.ts +18 -0
  23. package/dist/types/src/components/Form/FormFieldSet.d.ts.map +1 -0
  24. package/dist/types/src/components/Form/fields/ArrayField.d.ts +18 -0
  25. package/dist/types/src/components/Form/fields/ArrayField.d.ts.map +1 -0
  26. package/dist/types/src/components/Form/fields/BooleanField.d.ts +4 -0
  27. package/dist/types/src/components/Form/fields/BooleanField.d.ts.map +1 -0
  28. package/dist/types/src/components/Form/fields/GeoPointField.d.ts +5 -0
  29. package/dist/types/src/components/Form/fields/GeoPointField.d.ts.map +1 -0
  30. package/dist/types/src/components/Form/fields/MarkdownField.d.ts +4 -0
  31. package/dist/types/src/components/Form/fields/MarkdownField.d.ts.map +1 -0
  32. package/dist/types/src/components/Form/fields/NumberField.d.ts +4 -0
  33. package/dist/types/src/components/Form/fields/NumberField.d.ts.map +1 -0
  34. package/dist/types/src/components/Form/fields/RefField.d.ts +16 -0
  35. package/dist/types/src/components/Form/fields/RefField.d.ts.map +1 -0
  36. package/dist/types/src/components/Form/fields/SelectField.d.ts +10 -0
  37. package/dist/types/src/components/Form/fields/SelectField.d.ts.map +1 -0
  38. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts +5 -0
  39. package/dist/types/src/components/Form/fields/SelectOptionField.d.ts.map +1 -0
  40. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts +83 -0
  41. package/dist/types/src/components/Form/fields/SelectOptionField.stories.d.ts.map +1 -0
  42. package/dist/types/src/components/Form/fields/TextAreaField.d.ts +4 -0
  43. package/dist/types/src/components/Form/fields/TextAreaField.d.ts.map +1 -0
  44. package/dist/types/src/components/Form/fields/TextField.d.ts +4 -0
  45. package/dist/types/src/components/Form/fields/TextField.d.ts.map +1 -0
  46. package/dist/types/src/components/Form/fields/TupleField.d.ts +6 -0
  47. package/dist/types/src/components/Form/fields/TupleField.d.ts.map +1 -0
  48. package/dist/types/src/components/Form/fields/index.d.ts +12 -0
  49. package/dist/types/src/components/Form/fields/index.d.ts.map +1 -0
  50. package/dist/types/src/components/Form/index.d.ts +2 -4
  51. package/dist/types/src/components/Form/index.d.ts.map +1 -1
  52. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts +9 -0
  53. package/dist/types/src/components/ObjectForm/ObjectForm.d.ts.map +1 -0
  54. package/dist/types/src/components/ObjectForm/index.d.ts +2 -0
  55. package/dist/types/src/components/ObjectForm/index.d.ts.map +1 -0
  56. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts +54 -0
  57. package/dist/types/src/components/ObjectPicker/ObjectPicker.d.ts.map +1 -0
  58. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts +86 -0
  59. package/dist/types/src/components/ObjectPicker/ObjectPicker.stories.d.ts.map +1 -0
  60. package/dist/types/src/components/ObjectPicker/index.d.ts +2 -0
  61. package/dist/types/src/components/ObjectPicker/index.d.ts.map +1 -0
  62. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts +9 -0
  63. package/dist/types/src/components/ObjectProperties/ObjectProperties.d.ts.map +1 -0
  64. package/dist/types/src/components/ObjectProperties/ObjectProperties.stories.d.ts +83 -0
  65. package/dist/types/src/components/ObjectProperties/ObjectProperties.stories.d.ts.map +1 -0
  66. package/dist/types/src/components/ObjectProperties/index.d.ts +2 -0
  67. package/dist/types/src/components/ObjectProperties/index.d.ts.map +1 -0
  68. package/dist/types/src/components/Settings/Settings.d.ts +43 -0
  69. package/dist/types/src/components/Settings/Settings.d.ts.map +1 -0
  70. package/dist/types/src/components/Settings/Settings.stories.d.ts +83 -0
  71. package/dist/types/src/components/Settings/Settings.stories.d.ts.map +1 -0
  72. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts +38 -0
  73. package/dist/types/src/components/Settings/SettingsFieldSet.d.ts.map +1 -0
  74. package/dist/types/src/components/Settings/SettingsItem.d.ts +17 -0
  75. package/dist/types/src/components/Settings/SettingsItem.d.ts.map +1 -0
  76. package/dist/types/src/components/Settings/index.d.ts +3 -0
  77. package/dist/types/src/components/Settings/index.d.ts.map +1 -0
  78. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts +22 -10
  79. package/dist/types/src/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  80. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts +86 -9
  81. package/dist/types/src/components/ViewEditor/ViewEditor.stories.d.ts.map +1 -1
  82. package/dist/types/src/components/index.d.ts +4 -2
  83. package/dist/types/src/components/index.d.ts.map +1 -1
  84. package/dist/types/src/components/testing.d.ts +4 -4
  85. package/dist/types/src/components/testing.d.ts.map +1 -1
  86. package/dist/types/src/hooks/index.d.ts +2 -3
  87. package/dist/types/src/hooks/index.d.ts.map +1 -1
  88. package/dist/types/src/hooks/useFormHandler.d.ts +82 -0
  89. package/dist/types/src/hooks/useFormHandler.d.ts.map +1 -0
  90. package/dist/types/src/hooks/useKeyHandler.d.ts +7 -0
  91. package/dist/types/src/hooks/useKeyHandler.d.ts.map +1 -0
  92. package/dist/types/src/translations.d.ts +64 -54
  93. package/dist/types/src/translations.d.ts.map +1 -1
  94. package/dist/types/src/util/field-type.d.ts +19 -0
  95. package/dist/types/src/util/field-type.d.ts.map +1 -0
  96. package/dist/types/src/util/field.d.ts +3 -3
  97. package/dist/types/src/util/field.d.ts.map +1 -1
  98. package/dist/types/src/util/formatting.d.ts +2 -2
  99. package/dist/types/src/util/formatting.d.ts.map +1 -1
  100. package/dist/types/src/util/index.d.ts +2 -1
  101. package/dist/types/src/util/index.d.ts.map +1 -1
  102. package/dist/types/src/util/properties.d.ts +7 -0
  103. package/dist/types/src/util/properties.d.ts.map +1 -0
  104. package/dist/types/src/util/refs.d.ts +3 -3
  105. package/dist/types/src/util/refs.d.ts.map +1 -1
  106. package/dist/types/tsconfig.tsbuildinfo +1 -1
  107. package/package.json +46 -43
  108. package/src/components/FieldEditor/FieldEditor.stories.tsx +51 -31
  109. package/src/components/FieldEditor/FieldEditor.test.tsx +13 -13
  110. package/src/components/FieldEditor/FieldEditor.tsx +88 -94
  111. package/src/components/Form/AUDIT.md +17 -0
  112. package/src/components/Form/Form.stories.tsx +144 -221
  113. package/src/components/Form/Form.tsx +359 -95
  114. package/src/components/Form/FormField.tsx +304 -0
  115. package/src/components/Form/FormFieldComponent.stories.tsx +65 -0
  116. package/src/components/Form/FormFieldComponent.tsx +171 -0
  117. package/src/components/Form/FormFieldSet.tsx +144 -0
  118. package/src/components/Form/README.md +3 -0
  119. package/src/components/Form/fields/ArrayField.tsx +154 -0
  120. package/src/components/Form/fields/BooleanField.tsx +22 -0
  121. package/src/components/Form/fields/GeoPointField.tsx +120 -0
  122. package/src/components/Form/fields/MarkdownField.tsx +78 -0
  123. package/src/components/Form/fields/NumberField.tsx +39 -0
  124. package/src/components/Form/fields/RefField.tsx +198 -0
  125. package/src/components/Form/fields/SelectField.tsx +65 -0
  126. package/src/components/Form/fields/SelectOptionField.stories.tsx +65 -0
  127. package/src/components/Form/{custom/SelectOptionsInput.tsx → fields/SelectOptionField.tsx} +49 -45
  128. package/src/components/Form/fields/TextAreaField.tsx +38 -0
  129. package/src/components/Form/fields/TextField.tsx +38 -0
  130. package/src/components/Form/{custom/TupleInput.tsx → fields/TupleField.tsx} +17 -10
  131. package/src/components/Form/fields/index.ts +15 -0
  132. package/src/components/Form/index.ts +3 -4
  133. package/src/components/ObjectForm/ObjectForm.tsx +113 -0
  134. package/src/components/{ControlSection → ObjectForm}/index.ts +1 -1
  135. package/src/components/ObjectPicker/ObjectPicker.stories.tsx +209 -0
  136. package/src/components/ObjectPicker/ObjectPicker.tsx +186 -0
  137. package/src/components/ObjectPicker/index.ts +5 -0
  138. package/src/components/ObjectProperties/ObjectProperties.stories.tsx +63 -0
  139. package/src/components/ObjectProperties/ObjectProperties.tsx +129 -0
  140. package/src/components/ObjectProperties/index.ts +5 -0
  141. package/src/components/Settings/Settings.stories.tsx +103 -0
  142. package/src/components/Settings/Settings.tsx +81 -0
  143. package/src/components/Settings/SettingsFieldSet.tsx +211 -0
  144. package/src/components/Settings/SettingsItem.tsx +62 -0
  145. package/src/components/Settings/index.ts +6 -0
  146. package/src/components/ViewEditor/ViewEditor.stories.tsx +144 -61
  147. package/src/components/ViewEditor/ViewEditor.test.tsx +22 -22
  148. package/src/components/ViewEditor/ViewEditor.tsx +353 -218
  149. package/src/components/index.ts +4 -3
  150. package/src/components/testing.tsx +28 -12
  151. package/src/hooks/index.ts +2 -3
  152. package/src/hooks/useFormHandler.ts +380 -0
  153. package/src/hooks/useKeyHandler.tsx +37 -0
  154. package/src/translations.ts +67 -58
  155. package/src/util/field-type.ts +57 -0
  156. package/src/util/field.ts +33 -43
  157. package/src/util/formatting.ts +22 -22
  158. package/src/util/index.ts +2 -1
  159. package/src/util/properties.ts +18 -0
  160. package/src/util/refs.ts +17 -19
  161. package/dist/types/src/components/ControlSection/ControlSection.d.ts +0 -23
  162. package/dist/types/src/components/ControlSection/ControlSection.d.ts.map +0 -1
  163. package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts +0 -8
  164. package/dist/types/src/components/ControlSection/ControlSection.stories.d.ts.map +0 -1
  165. package/dist/types/src/components/ControlSection/index.d.ts +0 -2
  166. package/dist/types/src/components/ControlSection/index.d.ts.map +0 -1
  167. package/dist/types/src/components/Form/ArrayField.d.ts +0 -16
  168. package/dist/types/src/components/Form/ArrayField.d.ts.map +0 -1
  169. package/dist/types/src/components/Form/Defaults.d.ts +0 -14
  170. package/dist/types/src/components/Form/Defaults.d.ts.map +0 -1
  171. package/dist/types/src/components/Form/FormActions.d.ts +0 -9
  172. package/dist/types/src/components/Form/FormActions.d.ts.map +0 -1
  173. package/dist/types/src/components/Form/FormContent.d.ts +0 -57
  174. package/dist/types/src/components/Form/FormContent.d.ts.map +0 -1
  175. package/dist/types/src/components/Form/FormContext.d.ts +0 -23
  176. package/dist/types/src/components/Form/FormContext.d.ts.map +0 -1
  177. package/dist/types/src/components/Form/Input.d.ts +0 -26
  178. package/dist/types/src/components/Form/Input.d.ts.map +0 -1
  179. package/dist/types/src/components/Form/RefField.d.ts +0 -12
  180. package/dist/types/src/components/Form/RefField.d.ts.map +0 -1
  181. package/dist/types/src/components/Form/custom/GeoPointInput.d.ts +0 -4
  182. package/dist/types/src/components/Form/custom/GeoPointInput.d.ts.map +0 -1
  183. package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts +0 -4
  184. package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts.map +0 -1
  185. package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts +0 -7
  186. package/dist/types/src/components/Form/custom/SelectOptionsInput.stories.d.ts.map +0 -1
  187. package/dist/types/src/components/Form/custom/TupleInput.d.ts +0 -6
  188. package/dist/types/src/components/Form/custom/TupleInput.d.ts.map +0 -1
  189. package/dist/types/src/components/Form/custom/index.d.ts +0 -4
  190. package/dist/types/src/components/Form/custom/index.d.ts.map +0 -1
  191. package/dist/types/src/components/Form/factory.d.ts +0 -8
  192. package/dist/types/src/components/Form/factory.d.ts.map +0 -1
  193. package/dist/types/src/components/deprecated/Form.d.ts +0 -15
  194. package/dist/types/src/components/deprecated/Form.d.ts.map +0 -1
  195. package/dist/types/src/components/deprecated/Form.stories.d.ts +0 -13
  196. package/dist/types/src/components/deprecated/Form.stories.d.ts.map +0 -1
  197. package/dist/types/src/components/deprecated/FormInput.d.ts +0 -16
  198. package/dist/types/src/components/deprecated/FormInput.d.ts.map +0 -1
  199. package/dist/types/src/components/deprecated/index.d.ts +0 -2
  200. package/dist/types/src/components/deprecated/index.d.ts.map +0 -1
  201. package/dist/types/src/hooks/useForm.d.ts +0 -67
  202. package/dist/types/src/hooks/useForm.d.ts.map +0 -1
  203. package/dist/types/src/hooks/useQueryRefOptions.d.ts +0 -23
  204. package/dist/types/src/hooks/useQueryRefOptions.d.ts.map +0 -1
  205. package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts +0 -8
  206. package/dist/types/src/hooks/useRefQueryLookupHandler.d.ts.map +0 -1
  207. package/dist/types/src/util/schema.d.ts +0 -3
  208. package/dist/types/src/util/schema.d.ts.map +0 -1
  209. package/src/components/ControlSection/ControlSection.stories.tsx +0 -41
  210. package/src/components/ControlSection/ControlSection.tsx +0 -139
  211. package/src/components/Form/ArrayField.tsx +0 -124
  212. package/src/components/Form/Defaults.tsx +0 -203
  213. package/src/components/Form/FormActions.tsx +0 -53
  214. package/src/components/Form/FormContent.tsx +0 -240
  215. package/src/components/Form/FormContext.tsx +0 -110
  216. package/src/components/Form/Input.tsx +0 -51
  217. package/src/components/Form/RefField.tsx +0 -213
  218. package/src/components/Form/custom/GeoPointInput.tsx +0 -72
  219. package/src/components/Form/custom/SelectOptionsInput.stories.tsx +0 -61
  220. package/src/components/Form/custom/index.ts +0 -7
  221. package/src/components/Form/factory.tsx +0 -31
  222. package/src/components/deprecated/Form.stories.tsx +0 -62
  223. package/src/components/deprecated/Form.tsx +0 -119
  224. package/src/components/deprecated/FormInput.tsx +0 -71
  225. package/src/components/deprecated/index.ts +0 -5
  226. package/src/hooks/useForm.ts +0 -291
  227. package/src/hooks/useQueryRefOptions.ts +0 -53
  228. package/src/hooks/useRefQueryLookupHandler.ts +0 -39
  229. package/src/util/schema.ts +0 -14
@@ -0,0 +1,12 @@
1
+ export * from './ArrayField';
2
+ export * from './BooleanField';
3
+ export * from './GeoPointField';
4
+ export * from './MarkdownField';
5
+ export * from './NumberField';
6
+ export * from './RefField';
7
+ export * from './SelectField';
8
+ export * from './SelectOptionField';
9
+ export * from './TextField';
10
+ export * from './TextAreaField';
11
+ export * from './TupleField';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/fields/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
@@ -1,6 +1,4 @@
1
- export * from './custom';
2
- export * from './Defaults';
1
+ export * from './fields';
3
2
  export * from './Form';
4
- export * from './FormContext';
5
- export * from './Input';
3
+ export * from './FormFieldComponent';
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAEzB,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import * as Schema from 'effect/Schema';
2
+ import React from 'react';
3
+ import { Obj } from '@dxos/echo';
4
+ export type ObjectFormProps = {
5
+ schema: Schema.Schema.AnyNoContext;
6
+ object: Obj.Unknown;
7
+ };
8
+ export declare const ObjectForm: ({ object, schema }: ObjectFormProps) => React.JSX.Element;
9
+ //# sourceMappingURL=ObjectForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectForm/ObjectForm.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAO,GAAG,EAAkB,MAAM,YAAY,CAAC;AAStD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC;CACrB,CAAC;AAeF,eAAO,MAAM,UAAU,GAAI,oBAAoB,eAAe,sBA8E7D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ObjectForm';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectForm/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,54 @@
1
+ import type * as Schema from 'effect/Schema';
2
+ import React from 'react';
3
+ import { type Palette, type ThemedClassName } from '@dxos/react-ui';
4
+ import { type FormFieldMap } from '../Form/FormFieldComponent';
5
+ export type RefOption = {
6
+ id: string;
7
+ label: string;
8
+ hue?: Palette;
9
+ };
10
+ export type ObjectPickerContentProps = ThemedClassName<{
11
+ options: RefOption[];
12
+ selectedIds?: string[];
13
+ createOptionLabel?: [string, {
14
+ ns: string;
15
+ }];
16
+ createOptionIcon?: string;
17
+ createSchema?: Schema.Schema.AnyNoContext;
18
+ createInitialValuePath?: string;
19
+ createFieldMap?: FormFieldMap;
20
+ onCreate?: (values: any) => void;
21
+ onSelect: (id: string) => void;
22
+ }>;
23
+ export declare const ObjectPicker: {
24
+ Root: ({ modal, modalId: propsModalId, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, value: propsValue, defaultValue, onValueChange: propsOnValueChange, placeholder, children, }: import("@dxos/react-ui-search").ComboboxRootProps) => React.JSX.Element;
25
+ Portal: {
26
+ (props: import("@dxos/react-ui").PopoverPortalProps & {
27
+ __scopePopover?: import("@radix-ui/react-context").Scope;
28
+ }): React.JSX.Element;
29
+ displayName: string;
30
+ };
31
+ Trigger: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui").ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
32
+ VirtualTrigger: {
33
+ (props: import("@dxos/react-ui").PopoverVirtualTriggerProps & {
34
+ __scopePopover?: import("@radix-ui/react-context").Scope;
35
+ }): React.JSX.Element;
36
+ displayName: string;
37
+ };
38
+ Content: React.ForwardRefExoticComponent<Omit<{
39
+ options: RefOption[];
40
+ selectedIds?: string[];
41
+ createOptionLabel?: [string, {
42
+ ns: string;
43
+ }];
44
+ createOptionIcon?: string;
45
+ createSchema?: Schema.Schema.AnyNoContext;
46
+ createInitialValuePath?: string;
47
+ createFieldMap?: FormFieldMap;
48
+ onCreate?: (values: any) => void;
49
+ onSelect: (id: string) => void;
50
+ }, "className"> & {
51
+ classNames?: import("@dxos/ui-types").ClassNameValue;
52
+ } & React.RefAttributes<HTMLDivElement>>;
53
+ };
54
+ //# sourceMappingURL=ObjectPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectPicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectPicker/ObjectPicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAgE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,KAAK,OAAO,EAAW,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAK7F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC;IACrD,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IAC1C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,CAAC,CAAC;AAqJH,eAAO,MAAM,YAAY;;;;0BAjHb,CAAC;;;;;;;0BAgB0F,CAAC;;;;;iBA7D7F,SAAS,EAAE;sBACN,MAAM,EAAE;4BACF,CAAC,MAAM,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;2BACzB,MAAM;uBACV,MAAM,CAAC,MAAM,CAAC,YAAY;iCAChB,MAAM;yBACd,YAAY;mBAClB,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI;kBACtB,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;;;;CA4J/B,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ render: () => React.JSX.Element;
6
+ decorators: import("@storybook/react").Decorator[];
7
+ parameters: {
8
+ layout: string;
9
+ controls: {
10
+ disable: boolean;
11
+ };
12
+ translations: [{
13
+ readonly 'en-US': {
14
+ readonly "@dxos/react-ui-form": {
15
+ readonly 'fields.label': "Fields";
16
+ readonly 'hidden-fields.label': "Hidden Fields";
17
+ readonly 'empty-readonly-ref-field.label': "(none)";
18
+ readonly 'add-property-button.label': "Add property";
19
+ readonly 'field-property.label': "Property";
20
+ readonly 'field-property.placeholder': "Property name";
21
+ readonly 'field-format.label': "Type";
22
+ readonly 'field-path.label': "Field path";
23
+ readonly 'add-field.button': "Add field";
24
+ readonly 'boolean-input-true.value': "Yes";
25
+ readonly 'boolean-input-false.value': "No";
26
+ readonly 'show-field.label': "Show field";
27
+ readonly 'hide-field.label': "Hide field";
28
+ readonly 'delete-field.label': "Delete field";
29
+ readonly 'ref-field-combobox-input.placeholder': "Search…";
30
+ readonly 'ref-field.placeholder': "Select…";
31
+ readonly 'ref-field.placeholder_one': "Select…";
32
+ readonly 'ref-field.placeholder_other': "Select items…";
33
+ readonly 'create-option.label': "Create";
34
+ readonly 'add-tag.label': "Add tag";
35
+ readonly 'example.placeholder': "Example";
36
+ readonly 'latitude.placeholder': "Latitude (e.g., 40.7128)";
37
+ readonly 'longitude.placeholder': "Longitude (e.g., -74.0060)";
38
+ readonly 'cancel-button.label': "Cancel";
39
+ readonly 'save-button.label': "Save";
40
+ readonly 'format.boolean.label': "Boolean";
41
+ readonly 'format.currency.label': "Currency";
42
+ readonly 'format.date.label': "Date";
43
+ readonly 'format.date-time.label': "DateTime";
44
+ readonly 'format.did.label': "DID";
45
+ readonly 'format.duration.label': "Duration";
46
+ readonly 'format.dxn.label': "DXN";
47
+ readonly 'format.email.label': "Email";
48
+ readonly 'format.formula.label': "Formula";
49
+ readonly 'format.hostname.label': "Hostname";
50
+ readonly 'format.integer.label': "Integer";
51
+ readonly 'format.json.label': "JSON";
52
+ readonly 'format.lnglat.label': "Geopoint";
53
+ readonly 'format.markdown.label': "Markdown";
54
+ readonly 'format.percent.label': "Percent";
55
+ readonly 'format.ref.label': "Reference";
56
+ readonly 'format.regex.label': "RegExp";
57
+ readonly 'format.string.label': "String";
58
+ readonly 'format.single-select.label': "Select";
59
+ readonly 'format.multi-select.label': "Multi-select";
60
+ readonly 'format.text.label': "Long text";
61
+ readonly 'format.time.label': "Time";
62
+ readonly 'format.timestamp.label': "Timestamp";
63
+ readonly 'format.user.label': "User";
64
+ readonly 'format.number.label': "Number";
65
+ readonly 'format.uri.label': "URI";
66
+ readonly 'format.url.label': "URL";
67
+ readonly 'format.uuid.label': "UUID";
68
+ readonly 'latitude.label': "Latitude";
69
+ readonly 'longitude.label': "Longitude";
70
+ readonly 'select-option.label': "Label";
71
+ readonly 'select-option-label.placeholder': "Option label";
72
+ readonly 'select-option-delete.button': "Delete";
73
+ readonly 'select-option-add.button': "Add option";
74
+ readonly 'system-schema.title': "System type";
75
+ readonly 'system-schema.description': "System type: cannot add or remove fields.";
76
+ readonly 'remove.button': "Remove";
77
+ };
78
+ };
79
+ }];
80
+ };
81
+ };
82
+ export default meta;
83
+ type Story = StoryObj<typeof meta>;
84
+ export declare const Default: Story;
85
+ export declare const WithTest: Story;
86
+ //# sourceMappingURL=ObjectPicker.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectPicker.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectPicker/ObjectPicker.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAoD,MAAM,OAAO,CAAC;AA2FzE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAuFtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ObjectPicker';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectPicker/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { Obj } from '@dxos/echo';
3
+ export type ObjectPropertiesProps = PropsWithChildren<{
4
+ object: Obj.Unknown;
5
+ }>;
6
+ export declare const ObjectProperties: React.ForwardRefExoticComponent<Omit<ObjectPropertiesProps, "className"> & {
7
+ classNames?: import("@dxos/ui-types").ClassNameValue;
8
+ } & Pick<React.HTMLAttributes<Element>, "style" | "children" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
9
+ //# sourceMappingURL=ObjectProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectProperties.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectProperties/ObjectProperties.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAO,GAAG,EAAkB,MAAM,YAAY,CAAC;AAUtD,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;IAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAA;CAAE,CAAC,CAAC;AAG/E,eAAO,MAAM,gBAAgB;;2HAwF5B,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: any;
6
+ render: () => React.JSX.Element;
7
+ decorators: import("@storybook/react").Decorator[];
8
+ parameters: {
9
+ layout: string;
10
+ translations: [{
11
+ readonly 'en-US': {
12
+ readonly "@dxos/react-ui-form": {
13
+ readonly 'fields.label': "Fields";
14
+ readonly 'hidden-fields.label': "Hidden Fields";
15
+ readonly 'empty-readonly-ref-field.label': "(none)";
16
+ readonly 'add-property-button.label': "Add property";
17
+ readonly 'field-property.label': "Property";
18
+ readonly 'field-property.placeholder': "Property name";
19
+ readonly 'field-format.label': "Type";
20
+ readonly 'field-path.label': "Field path";
21
+ readonly 'add-field.button': "Add field";
22
+ readonly 'boolean-input-true.value': "Yes";
23
+ readonly 'boolean-input-false.value': "No";
24
+ readonly 'show-field.label': "Show field";
25
+ readonly 'hide-field.label': "Hide field";
26
+ readonly 'delete-field.label': "Delete field";
27
+ readonly 'ref-field-combobox-input.placeholder': "Search…";
28
+ readonly 'ref-field.placeholder': "Select…";
29
+ readonly 'ref-field.placeholder_one': "Select…";
30
+ readonly 'ref-field.placeholder_other': "Select items…";
31
+ readonly 'create-option.label': "Create";
32
+ readonly 'add-tag.label': "Add tag";
33
+ readonly 'example.placeholder': "Example";
34
+ readonly 'latitude.placeholder': "Latitude (e.g., 40.7128)";
35
+ readonly 'longitude.placeholder': "Longitude (e.g., -74.0060)";
36
+ readonly 'cancel-button.label': "Cancel";
37
+ readonly 'save-button.label': "Save";
38
+ readonly 'format.boolean.label': "Boolean";
39
+ readonly 'format.currency.label': "Currency";
40
+ readonly 'format.date.label': "Date";
41
+ readonly 'format.date-time.label': "DateTime";
42
+ readonly 'format.did.label': "DID";
43
+ readonly 'format.duration.label': "Duration";
44
+ readonly 'format.dxn.label': "DXN";
45
+ readonly 'format.email.label': "Email";
46
+ readonly 'format.formula.label': "Formula";
47
+ readonly 'format.hostname.label': "Hostname";
48
+ readonly 'format.integer.label': "Integer";
49
+ readonly 'format.json.label': "JSON";
50
+ readonly 'format.lnglat.label': "Geopoint";
51
+ readonly 'format.markdown.label': "Markdown";
52
+ readonly 'format.percent.label': "Percent";
53
+ readonly 'format.ref.label': "Reference";
54
+ readonly 'format.regex.label': "RegExp";
55
+ readonly 'format.string.label': "String";
56
+ readonly 'format.single-select.label': "Select";
57
+ readonly 'format.multi-select.label': "Multi-select";
58
+ readonly 'format.text.label': "Long text";
59
+ readonly 'format.time.label': "Time";
60
+ readonly 'format.timestamp.label': "Timestamp";
61
+ readonly 'format.user.label': "User";
62
+ readonly 'format.number.label': "Number";
63
+ readonly 'format.uri.label': "URI";
64
+ readonly 'format.url.label': "URL";
65
+ readonly 'format.uuid.label': "UUID";
66
+ readonly 'latitude.label': "Latitude";
67
+ readonly 'longitude.label': "Longitude";
68
+ readonly 'select-option.label': "Label";
69
+ readonly 'select-option-label.placeholder': "Option label";
70
+ readonly 'select-option-delete.button': "Delete";
71
+ readonly 'select-option-add.button': "Add option";
72
+ readonly 'system-schema.title': "System type";
73
+ readonly 'system-schema.description': "System type: cannot add or remove fields.";
74
+ readonly 'remove.button': "Remove";
75
+ };
76
+ };
77
+ }];
78
+ };
79
+ };
80
+ export default meta;
81
+ type Story = StoryObj<typeof meta>;
82
+ export declare const Default: Story;
83
+ //# sourceMappingURL=ObjectProperties.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectProperties.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectProperties/ObjectProperties.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA4B1B,QAAA,MAAM,IAAI;;eAEuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBC,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ObjectProperties';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ObjectProperties/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type Label, type ThemedClassName } from '@dxos/react-ui';
3
+ type SettingsRootProps = ThemedClassName<PropsWithChildren>;
4
+ type SettingsSectionProps = PropsWithChildren<{
5
+ title: Label;
6
+ description?: Label;
7
+ }>;
8
+ export declare const Settings: {
9
+ Root: {
10
+ ({ children, classNames }: SettingsRootProps): React.JSX.Element;
11
+ displayName: string;
12
+ };
13
+ Viewport: React.ForwardRefExoticComponent<Omit<{}, "className"> & {
14
+ classNames?: import("@dxos/ui-types").ClassNameValue;
15
+ } & Pick<React.HTMLAttributes<Element>, "style" | "children" | "className" | "role"> & React.RefAttributes<HTMLDivElement>>;
16
+ Section: {
17
+ ({ title, description, children }: SettingsSectionProps): React.JSX.Element;
18
+ displayName: string;
19
+ };
20
+ Panel: {
21
+ ({ classNames, children }: Omit<{
22
+ children?: React.ReactNode | undefined;
23
+ }, "className"> & {
24
+ classNames?: import("@dxos/ui-types").ClassNameValue;
25
+ }): React.JSX.Element;
26
+ displayName: string;
27
+ };
28
+ Item: {
29
+ ({ title, description, children }: {
30
+ title: Label;
31
+ description?: Label;
32
+ } & {
33
+ children?: React.ReactNode | undefined;
34
+ }): React.JSX.Element;
35
+ displayName: string;
36
+ };
37
+ FieldSet: {
38
+ <T extends Record<string, any>>({ schema, values, onValuesChanged, readonly, fieldMap, visible, sort, }: import("./SettingsFieldSet").SettingsFieldSetProps<T>): React.JSX.Element;
39
+ displayName: string;
40
+ };
41
+ };
42
+ export {};
43
+ //# sourceMappingURL=Settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../../../../src/components/Settings/Settings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,KAAK,KAAK,EAAc,KAAK,eAAe,EAAqC,MAAM,gBAAgB,CAAC;AAejH,KAAK,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AA8B5D,KAAK,oBAAoB,GAAG,iBAAiB,CAAC;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC,CAAC;AAmBH,eAAO,MAAM,QAAQ;;mCAlD2B,iBAAiB;;;;;;;2CAiCN,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;CAwB9E,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ render: () => React.JSX.Element;
6
+ decorators: import("@storybook/react").Decorator[];
7
+ parameters: {
8
+ layout: string;
9
+ translations: [{
10
+ readonly 'en-US': {
11
+ readonly "@dxos/react-ui-form": {
12
+ readonly 'fields.label': "Fields";
13
+ readonly 'hidden-fields.label': "Hidden Fields";
14
+ readonly 'empty-readonly-ref-field.label': "(none)";
15
+ readonly 'add-property-button.label': "Add property";
16
+ readonly 'field-property.label': "Property";
17
+ readonly 'field-property.placeholder': "Property name";
18
+ readonly 'field-format.label': "Type";
19
+ readonly 'field-path.label': "Field path";
20
+ readonly 'add-field.button': "Add field";
21
+ readonly 'boolean-input-true.value': "Yes";
22
+ readonly 'boolean-input-false.value': "No";
23
+ readonly 'show-field.label': "Show field";
24
+ readonly 'hide-field.label': "Hide field";
25
+ readonly 'delete-field.label': "Delete field";
26
+ readonly 'ref-field-combobox-input.placeholder': "Search…";
27
+ readonly 'ref-field.placeholder': "Select…";
28
+ readonly 'ref-field.placeholder_one': "Select…";
29
+ readonly 'ref-field.placeholder_other': "Select items…";
30
+ readonly 'create-option.label': "Create";
31
+ readonly 'add-tag.label': "Add tag";
32
+ readonly 'example.placeholder': "Example";
33
+ readonly 'latitude.placeholder': "Latitude (e.g., 40.7128)";
34
+ readonly 'longitude.placeholder': "Longitude (e.g., -74.0060)";
35
+ readonly 'cancel-button.label': "Cancel";
36
+ readonly 'save-button.label': "Save";
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': "Remove";
74
+ };
75
+ };
76
+ }];
77
+ };
78
+ };
79
+ export default meta;
80
+ type Story = StoryObj<typeof meta>;
81
+ export declare const Default: Story;
82
+ export declare const FieldSet: Story;
83
+ //# sourceMappingURL=Settings.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Settings.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Settings/Settings.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAmC1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AA6CjC,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import * as SchemaAST from 'effect/SchemaAST';
2
+ import React from 'react';
3
+ /**
4
+ * Props for a custom field renderer.
5
+ * The renderer provides the control only; SettingsItem wrapper is handled by FieldSet.
6
+ */
7
+ export type SettingsFieldProps<T = any> = {
8
+ value: T;
9
+ onChange: (value: T) => void;
10
+ readonly?: boolean;
11
+ };
12
+ /**
13
+ * Map of property names to custom field renderers.
14
+ */
15
+ export type SettingsFieldMap = Record<string, React.FC<SettingsFieldProps>>;
16
+ export type SettingsFieldSetProps<T extends Record<string, any> = Record<string, any>> = {
17
+ /** Effect Schema for the settings object. */
18
+ schema: {
19
+ ast: SchemaAST.AST;
20
+ };
21
+ /** Current settings values. */
22
+ values: T;
23
+ /** Callback when any value changes. Receives a new complete object. */
24
+ onValuesChanged?: (values: T) => void;
25
+ /** When true, all controls are disabled. */
26
+ readonly?: boolean;
27
+ /** Map of property names to custom field renderers. */
28
+ fieldMap?: SettingsFieldMap;
29
+ /** Control field visibility. Return false to hide a field. */
30
+ visible?: (path: string, values: T) => boolean;
31
+ /** Override the order of fields. Fields not listed are appended in schema order. */
32
+ sort?: string[];
33
+ };
34
+ export declare const SettingsFieldSet: {
35
+ <T extends Record<string, any>>({ schema, values, onValuesChanged, readonly, fieldMap, visible, sort, }: SettingsFieldSetProps<T>): React.JSX.Element;
36
+ displayName: string;
37
+ };
38
+ //# sourceMappingURL=SettingsFieldSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/components/Settings/SettingsFieldSet.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAA+B,MAAM,OAAO,CAAC;AAYpD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,GAAG,IAAI;IACxC,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAE5E,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IACvF,6CAA6C;IAC7C,MAAM,EAAE;QAAE,GAAG,EAAE,SAAS,CAAC,GAAG,CAAA;KAAE,CAAC;IAE/B,+BAA+B;IAC/B,MAAM,EAAE,CAAC,CAAC;IAEV,uEAAuE;IACvE,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAEtC,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAE5B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC;IAE/C,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAMF,eAAO,MAAM,gBAAgB;KAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,2EAQ3D,qBAAqB,CAAC,CAAC,CAAC;;CAyC1B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type Label, type ThemedClassName } from '@dxos/react-ui';
3
+ type SettingsPanelProps = ThemedClassName<PropsWithChildren>;
4
+ export declare const SettingsPanel: {
5
+ ({ classNames, children }: SettingsPanelProps): React.JSX.Element;
6
+ displayName: string;
7
+ };
8
+ type SettingsItemProps = PropsWithChildren<{
9
+ title: Label;
10
+ description?: Label;
11
+ }>;
12
+ export declare const SettingsItem: {
13
+ ({ title, description, children }: SettingsItemProps): React.JSX.Element;
14
+ displayName: string;
15
+ };
16
+ export {};
17
+ //# sourceMappingURL=SettingsItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Settings/SettingsItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAS,KAAK,KAAK,EAAE,KAAK,eAAe,EAAqC,MAAM,gBAAgB,CAAC;AAY5G,KAAK,kBAAkB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,aAAa;+BAA8B,kBAAkB;;CAMzE,CAAC;AAQF,KAAK,iBAAiB,GAAG,iBAAiB,CAAC;IACzC,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC,CAAC;AAEH,eAAO,MAAM,YAAY;uCAA2C,iBAAiB;;CAoBpF,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './Settings';
2
+ export { type SettingsFieldMap, type SettingsFieldProps, type SettingsFieldSetProps } from './SettingsFieldSet';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Settings/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,20 +1,32 @@
1
- import { Schema } from 'effect';
1
+ import * as Schema from 'effect/Schema';
2
2
  import React from 'react';
3
- import { type SchemaRegistry } from '@dxos/echo-db';
3
+ import { QueryAST, type SchemaRegistry } from '@dxos/echo';
4
+ import { View } from '@dxos/echo';
4
5
  import { type ThemedClassName } from '@dxos/react-ui';
5
- import { type ViewType } from '@dxos/schema';
6
- import { type FormProps } from '../Form';
6
+ import { type QueryFormProps } from '@dxos/react-ui-components';
7
+ import { ProjectionModel } from '@dxos/schema';
8
+ import { type FormRootProps } from '../Form';
7
9
  export type ViewEditorProps = ThemedClassName<{
8
10
  schema: Schema.Schema.AnyNoContext;
9
- view: ViewType;
10
- registry?: SchemaRegistry;
11
- readonly?: boolean;
11
+ view: View.View;
12
+ mode?: 'schema' | 'tag';
13
+ registry?: SchemaRegistry.SchemaRegistry;
12
14
  showHeading?: boolean;
13
- onTypenameChanged?: (typename: string) => void;
15
+ onQueryChanged?: (query: QueryAST.Query, target?: string) => void;
14
16
  onDelete?: (fieldId: string) => void;
15
- } & Pick<FormProps<any>, 'outerSpacing'>>;
17
+ } & Pick<QueryFormProps, 'types' | 'tags'> & Pick<FormRootProps<any>, 'readonly' | 'db'>>;
16
18
  /**
17
19
  * Schema-based object form.
18
20
  */
19
- export declare const ViewEditor: ({ classNames, schema, view, registry, readonly: _readonly, showHeading, onTypenameChanged, onDelete, outerSpacing, }: ViewEditorProps) => React.JSX.Element;
21
+ export declare const ViewEditor: React.ForwardRefExoticComponent<Omit<{
22
+ schema: Schema.Schema.AnyNoContext;
23
+ view: View.View;
24
+ mode?: "schema" | "tag";
25
+ registry?: SchemaRegistry.SchemaRegistry;
26
+ showHeading?: boolean;
27
+ onQueryChanged?: (query: QueryAST.Query, target?: string) => void;
28
+ onDelete?: (fieldId: string) => void;
29
+ } & Pick<QueryFormProps, "tags" | "types"> & Pick<FormRootProps<any>, "readonly" | "db">, "className"> & {
30
+ classNames?: import("@dxos/ui-types").ClassNameValue;
31
+ } & React.RefAttributes<ProjectionModel>>;
20
32
  //# sourceMappingURL=ViewEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAuB,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAI3F,OAAO,EAA+B,KAAK,QAAQ,EAAoC,MAAM,cAAc,CAAC;AAI5G,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAe/C,MAAM,MAAM,eAAe,GAAG,eAAe,CAC3C;IACE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC,CACzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,sHAUxB,eAAe,sBAkOjB,CAAC"}
1
+ {"version":3,"file":"ViewEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewEditor/ViewEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAsF,MAAM,OAAO,CAAC;AAE3G,OAAO,EAA4C,QAAQ,EAAO,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1G,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,OAAO,EAA8B,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3E,OAAO,EAEL,eAAe,EAIhB,MAAM,cAAc,CAAC;AAKtB,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,eAAe,GAAG,eAAe,CAC3C;IACE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IACnC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACxB,QAAQ,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC,GACxC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC,CAC9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;YAdX,MAAM,CAAC,MAAM,CAAC,YAAY;UAC5B,IAAI,CAAC,IAAI;WACR,QAAQ,GAAG,KAAK;eACZ,cAAc,CAAC,cAAc;kBAC1B,OAAO;qBACJ,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI;eACtD,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;;;yCAyKvC,CAAC"}