@modelform/react-native 0.14.0 → 0.16.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 +7 -3
- package/dist/{chunk-XWSPLZNC.js → chunk-PVLALJT5.js} +740 -416
- package/dist/{chunk-72OFPTDE.mjs → chunk-Q5GMOQT7.mjs} +652 -328
- package/dist/core/authoring.d.ts +2 -2
- package/dist/core/formFill.d.ts +1 -9
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +4 -2
- package/dist/core/index.mjs +3 -1
- package/dist/core/ruleFill.d.ts +12 -0
- package/dist/core/schema.d.ts +7 -1
- package/dist/index.js +164 -162
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/schema/dashboard.schema.json +5 -1
package/README.md
CHANGED
|
@@ -157,9 +157,13 @@ back as it was before the fill. Listening is `continuous`, so pauses don't cut i
|
|
|
157
157
|
(expo-speech-recognition takes `continuous: true`) and deliver the whole transcript as one final `onText` when it
|
|
158
158
|
stops.
|
|
159
159
|
|
|
160
|
-
What was said goes to a `FormFiller`, `(form, said) => Promise<FillResult>`. The default, `ruleFiller`, needs no model
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
What was said goes to a `FormFiller`, `(form, said) => Promise<FillResult>`. The default, `ruleFiller`, needs no model.
|
|
161
|
+
A named field takes the value said next to it, and it finds names in the forms people say them in ("slept", "weighed",
|
|
162
|
+
"meditation") plus a few everyday synonyms ("drink" for Alcohol, "jog" for Run, "feeling" for Mood). That covers
|
|
163
|
+
"slept badly, maybe five hours", "didn't drink", "no meditation", "mood pretty low" and "in a good mood". If a field
|
|
164
|
+
is named twice, the last value wins ("mood 3, no wait, 4"). Fields not named are found by what only they could take: a
|
|
165
|
+
number with their unit ("72.5 kilos", "5k"), a time when only one field takes times ("for an hour and a half" fills a
|
|
166
|
+
minutes field with 90), or a choice only one field has ("went for a jog"). It leaves a field empty rather than guess. To use a model, wrap whatever generates text in `modelFiller`; it prompts with `fillPrompt`, passes
|
|
163
167
|
`fillSchema` for guided generation, reads the reply with `readFill` (so a model can only enter what typing could), and
|
|
164
168
|
with a fallback fills what the model left out:
|
|
165
169
|
|