formanitor 0.0.30 → 0.0.31
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/dist/index.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -847,7 +847,7 @@ function VoiceMicButton({ fieldId, onTranscriptReady }) {
|
|
|
847
847
|
setActiveFieldId(fieldId);
|
|
848
848
|
setStatus("recording");
|
|
849
849
|
try {
|
|
850
|
-
await voice.startRecording();
|
|
850
|
+
await voice.startRecording(fieldId);
|
|
851
851
|
} catch {
|
|
852
852
|
setStatus("idle");
|
|
853
853
|
setActiveFieldId(null);
|
|
@@ -1229,6 +1229,19 @@ var RichTextWidget = ({ fieldId }) => {
|
|
|
1229
1229
|
const el = editor.view.dom;
|
|
1230
1230
|
el.style.minHeight = `${minHeight}px`;
|
|
1231
1231
|
}, [editor, minHeight]);
|
|
1232
|
+
React15.useEffect(() => {
|
|
1233
|
+
if (!editor || editor.isDestroyed) return;
|
|
1234
|
+
const el = editor.view.dom;
|
|
1235
|
+
const handler = (e) => {
|
|
1236
|
+
const { text } = e.detail;
|
|
1237
|
+
if (!text) return;
|
|
1238
|
+
const currentText = editor.getText();
|
|
1239
|
+
const prefix = currentText.length > 0 && !/\s$/.test(currentText) ? " " : "";
|
|
1240
|
+
editor.chain().focus().insertContent(prefix + text).run();
|
|
1241
|
+
};
|
|
1242
|
+
el.addEventListener("insertTranscript", handler);
|
|
1243
|
+
return () => el.removeEventListener("insertTranscript", handler);
|
|
1244
|
+
}, [editor]);
|
|
1232
1245
|
React15.useEffect(() => {
|
|
1233
1246
|
if (!editor || editor.isDestroyed) return;
|
|
1234
1247
|
const fromForm = stringValue;
|