@dxos/react-ui-form 0.7.5-labs.8a82073 → 0.7.5-labs.c0e040f

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 (31) hide show
  1. package/dist/lib/browser/index.mjs +398 -323
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +381 -302
  5. package/dist/lib/node/index.cjs.map +4 -4
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/lib/node-esm/index.mjs +398 -323
  8. package/dist/lib/node-esm/index.mjs.map +4 -4
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/types/src/components/Form/Defaults.d.ts +1 -0
  11. package/dist/types/src/components/Form/Defaults.d.ts.map +1 -1
  12. package/dist/types/src/components/Form/Form.d.ts.map +1 -1
  13. package/dist/types/src/components/Form/FormContent.d.ts.map +1 -1
  14. package/dist/types/src/components/Form/FormContext.d.ts +4 -1
  15. package/dist/types/src/components/Form/FormContext.d.ts.map +1 -1
  16. package/dist/types/src/components/Form/custom/SelectOptionsInput.d.ts.map +1 -1
  17. package/dist/types/src/components/Form/factory.d.ts.map +1 -1
  18. package/dist/types/src/components/Form/index.d.ts +2 -0
  19. package/dist/types/src/components/Form/index.d.ts.map +1 -1
  20. package/dist/types/src/hooks/useForm.d.ts +1 -0
  21. package/dist/types/src/hooks/useForm.d.ts.map +1 -1
  22. package/package.json +24 -24
  23. package/src/components/Form/Defaults.tsx +59 -3
  24. package/src/components/Form/Form.tsx +8 -5
  25. package/src/components/Form/FormContent.tsx +9 -12
  26. package/src/components/Form/FormContext.tsx +48 -4
  27. package/src/components/Form/custom/SelectOptionsInput.tsx +5 -7
  28. package/src/components/Form/factory.tsx +3 -1
  29. package/src/components/Form/index.ts +3 -0
  30. package/src/components/ViewEditor/ViewEditor.tsx +2 -2
  31. package/src/hooks/useForm.ts +6 -0
@@ -1 +1 @@
1
- {"inputs":{"packages/ui/react-ui-form/src/translations.ts":{"bytes":6579,"imports":[],"format":"esm"},"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx":{"bytes":5961,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/components/deprecated/index.ts":{"bytes":520,"imports":[{"path":"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx","kind":"import-statement","original":"./FormInput"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Input.tsx":{"bytes":3673,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx":{"bytes":5514,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx":{"bytes":25861,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-pickers","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx":{"bytes":5029,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/index.ts":{"bytes":745,"imports":[{"path":"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx","kind":"import-statement","original":"./GeoPointInput"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx","kind":"import-statement","original":"./SelectOptionsInput"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx","kind":"import-statement","original":"./TupleInput"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Defaults.tsx":{"bytes":12837,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"}],"format":"esm"},"packages/ui/react-ui-form/src/hooks/useForm.ts":{"bytes":21657,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/hooks/index.ts":{"bytes":502,"imports":[{"path":"packages/ui/react-ui-form/src/hooks/useForm.ts","kind":"import-statement","original":"./useForm"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormContext.tsx":{"bytes":5567,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormActions.tsx":{"bytes":4249,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx":{"bytes":14112,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormContent.tsx","kind":"import-statement","original":"./FormContent"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/factory.tsx":{"bytes":2421,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/index.ts","kind":"import-statement","original":"./custom"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormContent.tsx":{"bytes":17139,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx","kind":"import-statement","original":"./ArrayField"},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/components/Form/factory.tsx","kind":"import-statement","original":"./factory"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Form.tsx":{"bytes":7851,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormActions.tsx","kind":"import-statement","original":"./FormActions"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContent.tsx","kind":"import-statement","original":"./FormContent"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/index.ts":{"bytes":764,"imports":[{"path":"packages/ui/react-ui-form/src/components/Form/custom/index.ts","kind":"import-statement","original":"./custom"},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/Form.tsx","kind":"import-statement","original":"./Form"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx":{"bytes":20607,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"../Form"}],"format":"esm"},"packages/ui/react-ui-form/src/components/FieldEditor/index.ts":{"bytes":531,"imports":[{"path":"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx","kind":"import-statement","original":"./FieldEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx":{"bytes":17927,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"packages/ui/react-ui-form/src/components/FieldEditor/index.ts","kind":"import-statement","original":"../FieldEditor"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"../Form"}],"format":"esm"},"packages/ui/react-ui-form/src/components/ViewEditor/index.ts":{"bytes":525,"imports":[{"path":"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx","kind":"import-statement","original":"./ViewEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/components/index.ts":{"bytes":787,"imports":[{"path":"packages/ui/react-ui-form/src/components/deprecated/index.ts","kind":"import-statement","original":"./deprecated"},{"path":"packages/ui/react-ui-form/src/components/FieldEditor/index.ts","kind":"import-statement","original":"./FieldEditor"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"./Form"},{"path":"packages/ui/react-ui-form/src/components/ViewEditor/index.ts","kind":"import-statement","original":"./ViewEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/util/field.ts":{"bytes":12238,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/util/formatting.ts":{"bytes":12559,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/util/index.ts":{"bytes":589,"imports":[{"path":"packages/ui/react-ui-form/src/util/field.ts","kind":"import-statement","original":"./field"},{"path":"packages/ui/react-ui-form/src/util/formatting.ts","kind":"import-statement","original":"./formatting"}],"format":"esm"},"packages/ui/react-ui-form/src/index.ts":{"bytes":916,"imports":[{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/ui/react-ui-form/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-form/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/ui/react-ui-form/src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-form/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":104046},"packages/ui/react-ui-form/dist/lib/node-esm/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-pickers","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["BooleanInput","DeprecatedFormContainer","DeprecatedFormInput","FieldEditor","Form","GeoPointInput","InputHeader","NumberInput","SelectInput","SelectOptionInput","TextInput","TupleInput","ViewEditor","cellClassesForFieldType","cellClassesForRowSelection","formatForDisplay","formatForEditing","parseValue","pathNotUniqueError","translations","useForm"],"entryPoint":"packages/ui/react-ui-form/src/index.ts","inputs":{"packages/ui/react-ui-form/src/translations.ts":{"bytesInOutput":1962},"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx":{"bytesInOutput":1565},"packages/ui/react-ui-form/src/components/deprecated/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx":{"bytesInOutput":4746},"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx":{"bytesInOutput":1266},"packages/ui/react-ui-form/src/components/Form/Input.tsx":{"bytesInOutput":737},"packages/ui/react-ui-form/src/components/Form/custom/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx":{"bytesInOutput":6413},"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx":{"bytesInOutput":1114},"packages/ui/react-ui-form/src/components/Form/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/Defaults.tsx":{"bytesInOutput":3394},"packages/ui/react-ui-form/src/components/Form/Form.tsx":{"bytesInOutput":1172},"packages/ui/react-ui-form/src/components/Form/FormActions.tsx":{"bytesInOutput":1021},"packages/ui/react-ui-form/src/components/Form/FormContext.tsx":{"bytesInOutput":1103},"packages/ui/react-ui-form/src/hooks/useForm.ts":{"bytesInOutput":4607},"packages/ui/react-ui-form/src/hooks/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/FormContent.tsx":{"bytesInOutput":4219},"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx":{"bytesInOutput":3675},"packages/ui/react-ui-form/src/components/Form/factory.tsx":{"bytesInOutput":332},"packages/ui/react-ui-form/src/components/FieldEditor/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx":{"bytesInOutput":4518},"packages/ui/react-ui-form/src/components/ViewEditor/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/util/field.ts":{"bytesInOutput":2809},"packages/ui/react-ui-form/src/util/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/util/formatting.ts":{"bytesInOutput":2779}},"bytes":49522}}}
1
+ {"inputs":{"packages/ui/react-ui-form/src/translations.ts":{"bytes":6579,"imports":[],"format":"esm"},"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx":{"bytes":5961,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/components/deprecated/index.ts":{"bytes":520,"imports":[{"path":"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx","kind":"import-statement","original":"./FormInput"}],"format":"esm"},"packages/ui/react-ui-form/src/hooks/useForm.ts":{"bytes":22149,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/hooks/index.ts":{"bytes":502,"imports":[{"path":"packages/ui/react-ui-form/src/hooks/useForm.ts","kind":"import-statement","original":"./useForm"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormContext.tsx":{"bytes":10510,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Input.tsx":{"bytes":3673,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx":{"bytes":5514,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx":{"bytes":25682,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-pickers","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx":{"bytes":5029,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"../Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/custom/index.ts":{"bytes":745,"imports":[{"path":"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx","kind":"import-statement","original":"./GeoPointInput"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx","kind":"import-statement","original":"./SelectOptionsInput"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx","kind":"import-statement","original":"./TupleInput"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Defaults.tsx":{"bytes":18051,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormActions.tsx":{"bytes":4249,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx":{"bytes":14112,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormContent.tsx","kind":"import-statement","original":"./FormContent"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/factory.tsx":{"bytes":2704,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/index.ts","kind":"import-statement","original":"./custom"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/FormContent.tsx":{"bytes":16769,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx","kind":"import-statement","original":"./ArrayField"},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/components/Form/factory.tsx","kind":"import-statement","original":"./factory"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/Form.tsx":{"bytes":8385,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/components/Form/FormActions.tsx","kind":"import-statement","original":"./FormActions"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContent.tsx","kind":"import-statement","original":"./FormContent"},{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"}],"format":"esm"},"packages/ui/react-ui-form/src/components/Form/index.ts":{"bytes":1029,"imports":[{"path":"packages/ui/react-ui-form/src/components/Form/FormContext.tsx","kind":"import-statement","original":"./FormContext"},{"path":"packages/ui/react-ui-form/src/components/Form/custom/index.ts","kind":"import-statement","original":"./custom"},{"path":"packages/ui/react-ui-form/src/components/Form/Defaults.tsx","kind":"import-statement","original":"./Defaults"},{"path":"packages/ui/react-ui-form/src/components/Form/Form.tsx","kind":"import-statement","original":"./Form"},{"path":"packages/ui/react-ui-form/src/components/Form/Input.tsx","kind":"import-statement","original":"./Input"}],"format":"esm"},"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx":{"bytes":20607,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"../Form"}],"format":"esm"},"packages/ui/react-ui-form/src/components/FieldEditor/index.ts":{"bytes":531,"imports":[{"path":"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx","kind":"import-statement","original":"./FieldEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx":{"bytes":17854,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"packages/ui/react-ui-form/src/components/FieldEditor/index.ts","kind":"import-statement","original":"../FieldEditor"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"../Form"}],"format":"esm"},"packages/ui/react-ui-form/src/components/ViewEditor/index.ts":{"bytes":525,"imports":[{"path":"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx","kind":"import-statement","original":"./ViewEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/components/index.ts":{"bytes":787,"imports":[{"path":"packages/ui/react-ui-form/src/components/deprecated/index.ts","kind":"import-statement","original":"./deprecated"},{"path":"packages/ui/react-ui-form/src/components/FieldEditor/index.ts","kind":"import-statement","original":"./FieldEditor"},{"path":"packages/ui/react-ui-form/src/components/Form/index.ts","kind":"import-statement","original":"./Form"},{"path":"packages/ui/react-ui-form/src/components/ViewEditor/index.ts","kind":"import-statement","original":"./ViewEditor"}],"format":"esm"},"packages/ui/react-ui-form/src/util/field.ts":{"bytes":12238,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/util/formatting.ts":{"bytes":12559,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-form/src/util/index.ts":{"bytes":589,"imports":[{"path":"packages/ui/react-ui-form/src/util/field.ts","kind":"import-statement","original":"./field"},{"path":"packages/ui/react-ui-form/src/util/formatting.ts","kind":"import-statement","original":"./formatting"}],"format":"esm"},"packages/ui/react-ui-form/src/index.ts":{"bytes":916,"imports":[{"path":"packages/ui/react-ui-form/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/ui/react-ui-form/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-form/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/ui/react-ui-form/src/util/index.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-form/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":109601},"packages/ui/react-ui-form/dist/lib/node-esm/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-pickers","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect/String","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["BooleanInput","DeprecatedFormContainer","DeprecatedFormInput","FieldEditor","Form","GeoPointInput","InputHeader","MarkdownInput","NumberInput","SelectInput","SelectOptionInput","TextInput","TupleInput","ViewEditor","cellClassesForFieldType","cellClassesForRowSelection","formatForDisplay","formatForEditing","parseValue","pathNotUniqueError","translations","useForm","useFormValues"],"entryPoint":"packages/ui/react-ui-form/src/index.ts","inputs":{"packages/ui/react-ui-form/src/translations.ts":{"bytesInOutput":1962},"packages/ui/react-ui-form/src/components/deprecated/FormInput.tsx":{"bytesInOutput":1565},"packages/ui/react-ui-form/src/components/deprecated/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/FieldEditor/FieldEditor.tsx":{"bytesInOutput":4746},"packages/ui/react-ui-form/src/components/Form/FormContext.tsx":{"bytesInOutput":2243},"packages/ui/react-ui-form/src/hooks/useForm.ts":{"bytesInOutput":4675},"packages/ui/react-ui-form/src/hooks/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/custom/GeoPointInput.tsx":{"bytesInOutput":1266},"packages/ui/react-ui-form/src/components/Form/Input.tsx":{"bytesInOutput":737},"packages/ui/react-ui-form/src/components/Form/custom/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/custom/SelectOptionsInput.tsx":{"bytesInOutput":6424},"packages/ui/react-ui-form/src/components/Form/custom/TupleInput.tsx":{"bytesInOutput":1114},"packages/ui/react-ui-form/src/components/Form/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/Form/Defaults.tsx":{"bytesInOutput":4733},"packages/ui/react-ui-form/src/components/Form/Form.tsx":{"bytesInOutput":1295},"packages/ui/react-ui-form/src/components/Form/FormActions.tsx":{"bytesInOutput":1021},"packages/ui/react-ui-form/src/components/Form/FormContent.tsx":{"bytesInOutput":4044},"packages/ui/react-ui-form/src/components/Form/ArrayField.tsx":{"bytesInOutput":3675},"packages/ui/react-ui-form/src/components/Form/factory.tsx":{"bytesInOutput":390},"packages/ui/react-ui-form/src/components/FieldEditor/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/components/ViewEditor/ViewEditor.tsx":{"bytesInOutput":4497},"packages/ui/react-ui-form/src/components/ViewEditor/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/util/field.ts":{"bytesInOutput":2809},"packages/ui/react-ui-form/src/util/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-form/src/util/formatting.ts":{"bytesInOutput":2779}},"bytes":52033}}}
@@ -10,4 +10,5 @@ export type SelectInputOptions = InputProps & {
10
10
  }>;
11
11
  };
12
12
  export declare const SelectInput: ({ type, label, inputOnly, disabled, placeholder, options, getStatus, getValue, onValueChange, }: SelectInputOptions) => React.JSX.Element;
13
+ export declare const MarkdownInput: ({ type, label, inputOnly, disabled, placeholder, getStatus, getValue, onValueChange, onBlur, }: InputProps) => React.JSX.Element;
13
14
  //# sourceMappingURL=Defaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Defaults.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Defaults.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,SAAS,mGAUnB,UAAU,sBAoBZ,CAAC;AAEF,eAAO,MAAM,WAAW,mGAUrB,UAAU,sBAqBZ,CAAC;AAEF,eAAO,MAAM,YAAY,mEAAoE,UAAU,sBAiBtG,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D,CAAC;AAEF,eAAO,MAAM,WAAW,oGAUrB,kBAAkB,sBA6BpB,CAAC"}
1
+ {"version":3,"file":"Defaults.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Defaults.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,SAAS,CAAC;AAEvD,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C,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,SAAS,kEAAmE,cAAc,6BAkGtG,CAAC;AAEF,eAAO,MAAM,UAAU,sEAAuE,gBAAgB,sBA4B7G,CAAC"}
@@ -15,6 +15,9 @@ export type FormInputStateProps = {
15
15
  onBlur: (event: FocusEvent<HTMLElement>) => void;
16
16
  };
17
17
  export declare const useInputProps: (path?: (string | number)[]) => FormInputStateProps;
18
- export declare const FormProvider: ({ children, ...formOptions }: PropsWithChildren<FormOptions<any>>) => React.JSX.Element;
18
+ export declare const FormProvider: ({ children, formRef, autoSave, ...formOptions }: PropsWithChildren<FormOptions<any> & {
19
+ formRef?: React.RefObject<HTMLDivElement>;
20
+ autoSave?: boolean;
21
+ }>) => React.JSX.Element;
19
22
  export {};
20
23
  //# sourceMappingURL=FormContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FormContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAA6B,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGlG,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAW,MAAM,aAAa,CAAC;AAE1E,KAAK,gBAAgB,CAAC,CAAC,SAAS,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAI7D,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,UAAU,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,aAAa,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAQ,GAI9D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACtD,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,aAAa,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAQ,mBAS9D,CAAC;AAEF,eAAO,MAAM,YAAY,oDAKtB,iBAAiB,CAClB,WAAW,CAAC,GAAG,CAAC,GAAG;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACF,sBAqCA,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectOptionsInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/SelectOptionsInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqE,MAAM,OAAO,CAAC;AAU1F,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAGxD,eAAO,MAAM,iBAAiB,kEAAmE,UAAU,sBA8K1G,CAAC"}
1
+ {"version":3,"file":"SelectOptionsInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Form/custom/SelectOptionsInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqE,MAAM,OAAO,CAAC;AAU1F,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAGxD,eAAO,MAAM,iBAAiB,kEAAmE,UAAU,sBA4K1G,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/factory.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;GAEG;AACH,eAAO,MAAM,iBAAiB,SAAU,UAAU,WAAW,UAAU,KAAG,cAAc,GAAG,SAc1F,CAAC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/factory.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;GAEG;AACH,eAAO,MAAM,iBAAiB,SAAU,UAAU,WAAW,UAAU,KAAG,cAAc,GAAG,SAgB1F,CAAC"}
@@ -1,5 +1,7 @@
1
+ import { useFormValues } from './FormContext';
1
2
  export * from './custom';
2
3
  export * from './Defaults';
3
4
  export * from './Form';
4
5
  export * from './Input';
6
+ export { useFormValues };
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAEzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,cAAc,UAAU,CAAC;AAEzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -11,6 +11,7 @@ export type FormHandler<T extends BaseObject> = {
11
11
  touched: Record<JsonPath, boolean>;
12
12
  changed: Record<JsonPath, boolean>;
13
13
  canSave: boolean;
14
+ formIsValid: boolean;
14
15
  handleSave: () => void;
15
16
  getStatus: (path: string | (string | number)[]) => {
16
17
  status?: 'error';
@@ -1 +1 @@
1
- {"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useForm.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAO,KAAK,CAAC,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAA4C,MAAM,cAAc,CAAC;AAGrH,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,UAAU,IAAI;IAK9C,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,IAAI,CAAC;IAMvB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxF,QAAQ,EAAE,CAAC,CAAC,EAAE,I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CAAC,EAAE,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,UAAU;IAC/C;;OAEG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAEpB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAE1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAE/C;;;;OAIG;IAEH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,eAAe,EAAE,GAAG,SAAS,CAAC;IAE1D;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;IAE5E;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;KAAE,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CAC1F;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,UAAU,4EAOzC,WAAW,CAAC,CAAC,CAAC,KAAG,WAAW,CAAC,CAAC,CAmJhC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-form",
3
- "version": "0.7.5-labs.8a82073",
3
+ "version": "0.7.5-labs.c0e040f",
4
4
  "description": "Data components.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -28,21 +28,21 @@
28
28
  "@radix-ui/react-context": "1.1.1",
29
29
  "date-fns": "^3.3.1",
30
30
  "jsonpath": "^1.1.1",
31
- "@dxos/async": "0.7.5-labs.8a82073",
32
- "@dxos/echo-schema": "0.7.5-labs.8a82073",
33
- "@dxos/effect": "0.7.5-labs.8a82073",
34
- "@dxos/invariant": "0.7.5-labs.8a82073",
35
- "@dxos/echo-db": "0.7.5-labs.8a82073",
36
- "@dxos/keys": "0.7.5-labs.8a82073",
37
- "@dxos/live-object": "0.7.5-labs.8a82073",
38
- "@dxos/react-client": "0.7.5-labs.8a82073",
39
- "@dxos/log": "0.7.5-labs.8a82073",
40
- "@dxos/react-ui-pickers": "0.7.5-labs.8a82073",
41
- "@dxos/react-ui-list": "0.7.5-labs.8a82073",
42
- "@dxos/react-ui-types": "0.7.5-labs.8a82073",
43
- "@dxos/schema": "0.7.5-labs.8a82073",
44
- "@dxos/util": "0.7.5-labs.8a82073",
45
- "@dxos/debug": "0.7.5-labs.8a82073"
31
+ "@dxos/async": "0.7.5-labs.c0e040f",
32
+ "@dxos/debug": "0.7.5-labs.c0e040f",
33
+ "@dxos/echo-schema": "0.7.5-labs.c0e040f",
34
+ "@dxos/echo-db": "0.7.5-labs.c0e040f",
35
+ "@dxos/effect": "0.7.5-labs.c0e040f",
36
+ "@dxos/keys": "0.7.5-labs.c0e040f",
37
+ "@dxos/invariant": "0.7.5-labs.c0e040f",
38
+ "@dxos/live-object": "0.7.5-labs.c0e040f",
39
+ "@dxos/log": "0.7.5-labs.c0e040f",
40
+ "@dxos/react-client": "0.7.5-labs.c0e040f",
41
+ "@dxos/react-ui-list": "0.7.5-labs.c0e040f",
42
+ "@dxos/react-ui-pickers": "0.7.5-labs.c0e040f",
43
+ "@dxos/react-ui-types": "0.7.5-labs.c0e040f",
44
+ "@dxos/schema": "0.7.5-labs.c0e040f",
45
+ "@dxos/util": "0.7.5-labs.c0e040f"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@phosphor-icons/react": "^2.1.5",
@@ -54,12 +54,12 @@
54
54
  "react": "~18.2.0",
55
55
  "react-dom": "~18.2.0",
56
56
  "vite": "5.4.7",
57
- "@dxos/echo-signals": "0.7.5-labs.8a82073",
58
- "@dxos/random": "0.7.5-labs.8a82073",
59
- "@dxos/react-ui": "0.7.5-labs.8a82073",
60
- "@dxos/react-ui-syntax-highlighter": "0.7.5-labs.8a82073",
61
- "@dxos/react-ui-theme": "0.7.5-labs.8a82073",
62
- "@dxos/storybook-utils": "0.7.5-labs.8a82073"
57
+ "@dxos/random": "0.7.5-labs.c0e040f",
58
+ "@dxos/echo-signals": "0.7.5-labs.c0e040f",
59
+ "@dxos/react-ui": "0.7.5-labs.c0e040f",
60
+ "@dxos/react-ui-syntax-highlighter": "0.7.5-labs.c0e040f",
61
+ "@dxos/react-ui-theme": "0.7.5-labs.c0e040f",
62
+ "@dxos/storybook-utils": "0.7.5-labs.c0e040f"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@effect/schema": "^0.75.5",
@@ -67,8 +67,8 @@
67
67
  "effect": "^3.12.3",
68
68
  "react": "~18.2.0",
69
69
  "react-dom": "~18.2.0",
70
- "@dxos/react-ui": "0.7.5-labs.8a82073",
71
- "@dxos/react-ui-theme": "0.7.5-labs.8a82073"
70
+ "@dxos/react-ui": "0.7.5-labs.c0e040f",
71
+ "@dxos/react-ui-theme": "0.7.5-labs.c0e040f"
72
72
  },
73
73
  "publishConfig": {
74
74
  "access": "public"
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import React from 'react';
5
+ import React, { useCallback, useEffect, useRef } from 'react';
6
6
 
7
7
  import { Input, Select } from '@dxos/react-ui';
8
8
 
@@ -77,8 +77,6 @@ export const BooleanInput = ({ type, label, inputOnly, getStatus, getValue, onVa
77
77
  const { status, error } = getStatus();
78
78
  const checked = Boolean(getValue());
79
79
 
80
- // TODO(burdon): Runtime error:
81
- // Warning: Unknown event handler property `onCheckedChange`. It will be ignored.
82
80
  return (
83
81
  <Input.Root validationValence={status}>
84
82
  {!inputOnly && (
@@ -136,3 +134,61 @@ export const SelectInput = ({
136
134
  </Input.Root>
137
135
  );
138
136
  };
137
+
138
+ export const MarkdownInput = ({
139
+ type,
140
+ label,
141
+ inputOnly,
142
+ disabled,
143
+ placeholder,
144
+ getStatus,
145
+ getValue,
146
+ onValueChange,
147
+ onBlur,
148
+ }: InputProps) => {
149
+ const { status, error } = getStatus();
150
+ const textareaRef = useRef<HTMLTextAreaElement>(null);
151
+
152
+ // TODO(ZaymonFC): If we start using `Enter` for form submission, we should prevent default behavior here
153
+ // since we're using a textarea element and the user needs to be able to enter new lines.
154
+
155
+ const adjustHeight = useCallback(() => {
156
+ const textarea = textareaRef.current;
157
+ if (textarea) {
158
+ textarea.style.blockSize = 'auto'; // For measurement.
159
+ textarea.style.blockSize = `${textarea.scrollHeight + 2}px`;
160
+ }
161
+ }, []);
162
+
163
+ // Adjust height on initial render.
164
+ useEffect(() => {
165
+ adjustHeight();
166
+ }, [adjustHeight]);
167
+
168
+ // Adjust height when the content changes.
169
+ useEffect(() => {
170
+ adjustHeight();
171
+ }, [getValue(), adjustHeight]);
172
+
173
+ return (
174
+ <Input.Root validationValence={status}>
175
+ {!inputOnly && (
176
+ <InputHeader error={error}>
177
+ <Input.Label>{label}</Input.Label>
178
+ </InputHeader>
179
+ )}
180
+ <Input.TextArea
181
+ ref={textareaRef}
182
+ disabled={disabled}
183
+ placeholder={placeholder}
184
+ value={getValue() ?? ''}
185
+ classNames={'min-bs-auto overflow-hidden'}
186
+ onChange={(event) => onValueChange(type, event.target.value)}
187
+ onBlur={onBlur}
188
+ style={{ resize: 'none' }}
189
+ spellCheck={false}
190
+ />
191
+ {inputOnly && <Input.Validation>{error}</Input.Validation>}
192
+ </Input.Root>
193
+ );
194
+ };
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import React, { type ReactElement, useEffect, useMemo } from 'react';
5
+ import React, { type ReactElement, useEffect, useMemo, useRef } from 'react';
6
6
 
7
7
  import { type BaseObject, type S, type PropertyKey } from '@dxos/echo-schema';
8
8
  import { type ThemedClassName } from '@dxos/react-ui';
@@ -68,12 +68,13 @@ export const Form = <T extends BaseObject>({
68
68
  lookupComponent,
69
69
  Custom,
70
70
  }: FormProps<T>) => {
71
+ const formRef = useRef<HTMLDivElement>(null);
71
72
  const onValid = useMemo(() => (autoSave ? onSave : undefined), [autoSave, onSave]);
72
73
 
73
- // TODO(burdon): Hack to select first input.
74
+ // Focus the first input element within this form.
74
75
  useEffect(() => {
75
- if (autoFocus) {
76
- const input = document.querySelector('input');
76
+ if (autoFocus && formRef.current) {
77
+ const input = formRef.current.querySelector('input');
77
78
  if (input) {
78
79
  input.focus();
79
80
  }
@@ -82,7 +83,9 @@ export const Form = <T extends BaseObject>({
82
83
 
83
84
  return (
84
85
  <FormProvider
86
+ formRef={formRef}
85
87
  schema={schema}
88
+ autoSave={autoSave}
86
89
  initialValues={initialValues}
87
90
  onValuesChanged={onValuesChanged}
88
91
  onValidate={onValidate}
@@ -90,7 +93,7 @@ export const Form = <T extends BaseObject>({
90
93
  onSave={onSave}
91
94
  >
92
95
  {/* TODO(burdon): Remove padding. */}
93
- <div role='none' className={mx('p-2', classNames)} data-testid={testId}>
96
+ <div ref={formRef} role='none' className={mx('p-2', classNames)} data-testid={testId}>
94
97
  <FormFields
95
98
  schema={schema}
96
99
  path={path}
@@ -70,18 +70,15 @@ export const FormField = ({ property, path, readonly, inline, lookupComponent, C
70
70
  const CustomComponent = Custom?.[jsonPath];
71
71
  if (CustomComponent) {
72
72
  return (
73
- // TODO(ZaymonFC): We should try to remove this div wrapper.
74
- <div role='none'>
75
- <CustomComponent
76
- type={type}
77
- format={format}
78
- label={label}
79
- inputOnly={inline}
80
- placeholder={placeholder}
81
- disabled={readonly}
82
- {...inputProps}
83
- />
84
- </div>
73
+ <CustomComponent
74
+ type={type}
75
+ format={format}
76
+ label={label}
77
+ inputOnly={inline}
78
+ placeholder={placeholder}
79
+ disabled={readonly}
80
+ {...inputProps}
81
+ />
85
82
  );
86
83
  }
87
84
 
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import React, { createContext, useContext, type FocusEvent, type PropsWithChildren } from 'react';
5
+ import React, { createContext, useContext, useEffect, type FocusEvent, type PropsWithChildren } from 'react';
6
6
 
7
7
  import { raise } from '@dxos/debug';
8
8
  import { type BaseObject, getValue } from '@dxos/echo-schema';
@@ -42,7 +42,51 @@ export const useInputProps = (path: (string | number)[] = []): FormInputStatePro
42
42
  };
43
43
  };
44
44
 
45
- export const FormProvider = ({ children, ...formOptions }: PropsWithChildren<FormOptions<any>>) => {
46
- const formHandler = useForm(formOptions);
47
- return <FormContext.Provider value={formHandler}>{children}</FormContext.Provider>;
45
+ export const FormProvider = ({
46
+ children,
47
+ formRef,
48
+ autoSave,
49
+ ...formOptions
50
+ }: PropsWithChildren<
51
+ FormOptions<any> & {
52
+ formRef?: React.RefObject<HTMLDivElement>;
53
+ autoSave?: boolean;
54
+ }
55
+ >) => {
56
+ const form = useForm(formOptions);
57
+
58
+ useEffect(() => {
59
+ if (!formRef?.current) {
60
+ return;
61
+ }
62
+
63
+ const handleKeyDown = (event: KeyboardEvent) => {
64
+ const keyIsEnter = event.key === 'Enter';
65
+ const modifierUsed = event.ctrlKey || event.altKey || event.metaKey || event.shiftKey;
66
+ const inputIsTextarea = (event.target as HTMLElement).tagName.toLowerCase() === 'textarea';
67
+ const inputOptOut = (event.target as HTMLElement).hasAttribute('data-no-submit');
68
+
69
+ // Regular inputs: Submit on Enter (no modifiers).
70
+ const shouldSubmitRegularInput = !inputIsTextarea && keyIsEnter && !modifierUsed;
71
+
72
+ // Textareas: Submit only on Meta+Enter.
73
+ const shouldSubmitTextarea = inputIsTextarea && keyIsEnter && event.metaKey;
74
+
75
+ if ((shouldSubmitRegularInput || shouldSubmitTextarea) && !inputOptOut) {
76
+ if (!autoSave && form.canSave) {
77
+ form.handleSave();
78
+ }
79
+ if (autoSave && form.formIsValid) {
80
+ (event.target as HTMLElement).blur();
81
+ }
82
+ }
83
+ };
84
+
85
+ const formElement = formRef.current;
86
+
87
+ formElement.addEventListener('keydown', handleKeyDown);
88
+ return () => formElement.removeEventListener('keydown', handleKeyDown);
89
+ }, [formRef, form.canSave, form.formIsValid, form.handleSave, autoSave]);
90
+
91
+ return <FormContext.Provider value={form}>{children}</FormContext.Provider>;
48
92
  };
@@ -9,7 +9,7 @@ import { PublicKey } from '@dxos/keys';
9
9
  import { type ChromaticPalette, Icon, IconButton, Input, Tag, Toolbar, useTranslation } from '@dxos/react-ui';
10
10
  import { List } from '@dxos/react-ui-list';
11
11
  import { HuePickerToolbarButton } from '@dxos/react-ui-pickers';
12
- import { hueTokenThemes, mx } from '@dxos/react-ui-theme';
12
+ import { hues, mx } from '@dxos/react-ui-theme';
13
13
 
14
14
  import { translationKey } from '../../../translations';
15
15
  import { InputHeader, type InputProps } from '../Input';
@@ -32,20 +32,17 @@ export const SelectOptionInput = ({ type, label, disabled, getStatus, getValue,
32
32
 
33
33
  const randomHue = () => {
34
34
  const usedHues = new Set(options?.map((option) => option.color) ?? []);
35
- const hueKeys = Object.keys(hueTokenThemes) as Array<keyof typeof hueTokenThemes>;
36
-
37
35
  // Pick a random unused option from hueTokenThemes.
38
- const unusedHues = hueKeys.filter((hue) => !usedHues.has(hue));
36
+ const unusedHues = hues.filter((hue) => !usedHues.has(hue));
39
37
  if (unusedHues.length > 0) {
40
38
  return unusedHues[Math.floor(Math.random() * unusedHues.length)];
41
39
  }
42
40
 
43
41
  // Pick a random one that hasn't been used in the last three options
44
42
  const lastThree = new Set(options?.slice(-3).map((option) => option.color) ?? []);
45
- const availableHues = hueKeys.filter((hue) => !lastThree.has(hue));
43
+ const availableHues = hues.filter((hue) => !lastThree.has(hue));
46
44
  return (
47
- availableHues[Math.floor(Math.random() * availableHues.length)] ??
48
- hueKeys[Math.floor(Math.random() * hueKeys.length)]
45
+ availableHues[Math.floor(Math.random() * availableHues.length)] ?? hues[Math.floor(Math.random() * hues.length)]
49
46
  );
50
47
  };
51
48
 
@@ -154,6 +151,7 @@ export const SelectOptionInput = ({ type, label, disabled, getStatus, getValue,
154
151
  onChange={handleTitleChange(item.id)}
155
152
  onKeyDown={handleKeyDown}
156
153
  classNames='flex-1'
154
+ data-no-submit
157
155
  />
158
156
  <Toolbar.Root classNames='p-0 m-0 !is-auto'>
159
157
  <HuePickerToolbarButton hue={item.color} onChangeHue={handleColorChange(item.id)} />
@@ -5,7 +5,7 @@
5
5
  import { FormatEnum } from '@dxos/echo-schema';
6
6
  import { type SimpleType } from '@dxos/effect';
7
7
 
8
- import { BooleanInput, NumberInput, TextInput } from './Defaults';
8
+ import { BooleanInput, MarkdownInput, NumberInput, TextInput } from './Defaults';
9
9
  import { type InputComponent } from './Input';
10
10
  import { GeoPointInput } from './custom';
11
11
 
@@ -16,6 +16,8 @@ export const getInputComponent = (type: SimpleType, format?: FormatEnum): InputC
16
16
  switch (format) {
17
17
  case FormatEnum.LatLng:
18
18
  return GeoPointInput;
19
+ case FormatEnum.Markdown:
20
+ return MarkdownInput;
19
21
  }
20
22
 
21
23
  switch (type) {