@factorialco/rjsf-f0 2.2.0 → 2.3.0
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.
- package/README.md +6 -1
- package/dist/rjsf-f0.cjs.js +21 -21
- package/dist/rjsf-f0.cjs.js.map +1 -1
- package/dist/rjsf-f0.es.js +1114 -1088
- package/dist/rjsf-f0.es.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/oauth/connect-control.d.ts +9 -0
- package/dist/src/oauth/index.d.ts +4 -0
- package/dist/src/oauth/oauth.test.d.ts +1 -0
- package/dist/src/oauth/types.d.ts +17 -0
- package/dist/src/templates/misc-templates.d.ts +6 -4
- package/dist/src/theme.d.ts +4 -1
- package/dist/src/widgets/f0-field.d.ts +7 -5
- package/dist/styles.css +32 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,12 +61,13 @@ The host app must render f0's `F0Provider` above the form and import `@factorial
|
|
|
61
61
|
| `radio` | `F0FormField` `cardSelect` (f0 has no radio control) |
|
|
62
62
|
| `file` / `data-url` | f0-styled dropzone + file chips (see below) |
|
|
63
63
|
| submit, add/move/copy/remove | `F0Button` |
|
|
64
|
+
| `oauth` connect control | `F0Button` (see below) |
|
|
64
65
|
| error summary | `F0Alert` |
|
|
65
66
|
| section title | `F0Heading` |
|
|
66
67
|
|
|
67
68
|
Two deliberate consequences of that mapping:
|
|
68
69
|
|
|
69
|
-
- **RJSF keeps ownership of validation.** f0 fields normally validate with zod; here they are told
|
|
70
|
+
- **RJSF keeps ownership of validation.** f0 fields normally validate with zod; here they are told they are in an error state (`error`) rather than deriving one, so the schema stays the single source of truth. The messages are rendered by the theme's `FieldErrorTemplate`, not by the control: half of this mapping is not an `F0FormField` at all — checkboxes, the file dropzone, and the object and array levels a global form error lands on — so a control-rendered message would be dropped for exactly those.
|
|
70
71
|
- **Labels are rendered by the theme, not by f0.** Factorial Code form labels may contain markdown, which f0 takes as a plain string. The theme renders the markdown label itself and hands f0 the plain text so the control keeps an accessible name.
|
|
71
72
|
|
|
72
73
|
### File fields
|
|
@@ -189,6 +190,10 @@ The toolbar is RJSF's, so it is the schema that decides what a row can do:
|
|
|
189
190
|
|
|
190
191
|
`orderable` (default `true`) draws move up/down — turn it off when order carries no meaning, which is most scalar lists. `copyable` defaults to `false` already, `removable` and `addable` to `true`.
|
|
191
192
|
|
|
193
|
+
### OAuth connect fields
|
|
194
|
+
|
|
195
|
+
The Forms SDK's `"ui:widget": "oauth"` field opens the provider in a popup and reacts when the flow finishes; the widget logic ships in `@factorialco/fcode-react-forms`. This theme only contributes the control it draws, as `Theme.oauth.ConnectControl`: an `F0Button` (`default` while idle or waiting, `outline` with a check icon once connected) plus the flow's error message underneath. `FcodeJsonSchemaForm` finds it through `rjsfTheme.oauth`, the same way it finds `rjsfTheme.multistep`.
|
|
196
|
+
|
|
192
197
|
### Not yet f0
|
|
193
198
|
|
|
194
199
|
- **`range`** renders as a number input rather than `F0Slider`.
|