@speechos/client 0.2.7 → 0.2.8

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.
@@ -27214,14 +27214,16 @@
27214
27214
  });
27215
27215
  }
27216
27216
  /**
27217
- * Complete the recording flow and return to idle
27217
+ * Complete the recording flow and return to idle.
27218
+ * Keeps widget visible but collapsed (just mic button, no action bubbles).
27218
27219
  */
27219
27220
  completeRecording() {
27220
27221
  this.setState({
27221
27222
  recordingState: "idle",
27222
27223
  activeAction: null,
27223
27224
  isConnected: false,
27224
- isMicEnabled: false
27225
+ isMicEnabled: false,
27226
+ isExpanded: false
27225
27227
  });
27226
27228
  }
27227
27229
  /**
@@ -35895,6 +35897,8 @@
35895
35897
  const originalContent = this.getElementContent(target) || "";
35896
35898
  if (tagName === "input" || tagName === "textarea") {
35897
35899
  const inputEl = target;
35900
+ // Ensure DOM focus is on the input before inserting
35901
+ inputEl.focus();
35898
35902
  // Restore cursor position before inserting
35899
35903
  const start = this.dictationCursorStart ?? inputEl.value.length;
35900
35904
  const end = this.dictationCursorEnd ?? inputEl.value.length;
@@ -36231,8 +36235,6 @@
36231
36235
  // Note: command:complete event is already emitted by the backend
36232
36236
  // when the command_result message is received, so we don't emit here
36233
36237
  state.completeRecording();
36234
- // Keep widget visible but collapsed (just mic button, no action bubbles)
36235
- state.setState({ isExpanded: false });
36236
36238
  // Show command feedback
36237
36239
  this.showActionFeedback(result ? "command-success" : "command-none");
36238
36240
  backend.disconnect().catch(() => { });
@@ -36390,6 +36392,8 @@
36390
36392
  if (tagName === "input" || tagName === "textarea") {
36391
36393
  const inputEl = target;
36392
36394
  originalContent = inputEl.value;
36395
+ // Ensure DOM focus is on the input before editing
36396
+ inputEl.focus();
36393
36397
  // Restore the original selection/cursor position
36394
36398
  const selectionStart = this.editSelectionStart ?? 0;
36395
36399
  const selectionEnd = this.editSelectionEnd ?? inputEl.value.length;