@burdenoff/microfe-healthybowl 2026.903.21 → 2026.904.1

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 (66) hide show
  1. package/dist/components/assistant/AIAssistantPanel.js +25 -21
  2. package/dist/components/assistant/AIAssistantPanel.js.map +1 -1
  3. package/dist/components/assistant/AssistantApiCallsConsentDialog.js +8 -8
  4. package/dist/components/assistant/AssistantApiCallsConsentDialog.js.map +1 -1
  5. package/dist/components/assistant/AssistantAutoSpeakToggle.js +1 -1
  6. package/dist/components/assistant/AssistantChatArea.js +248 -249
  7. package/dist/components/assistant/AssistantChatArea.js.map +1 -1
  8. package/dist/components/assistant/AssistantConversationList.js +31 -31
  9. package/dist/components/assistant/AssistantConversationList.js.map +1 -1
  10. package/dist/components/assistant/AssistantEmptyState.js +9 -9
  11. package/dist/components/assistant/AssistantEmptyState.js.map +1 -1
  12. package/dist/components/assistant/AssistantHeader.js +17 -17
  13. package/dist/components/assistant/AssistantHeader.js.map +1 -1
  14. package/dist/components/assistant/AssistantMarkdownImage.js +14 -14
  15. package/dist/components/assistant/AssistantMarkdownImage.js.map +1 -1
  16. package/dist/components/assistant/AssistantMarkdownRenderer.js +25 -25
  17. package/dist/components/assistant/AssistantMarkdownRenderer.js.map +1 -1
  18. package/dist/components/assistant/AssistantMessageAttachments.js +29 -29
  19. package/dist/components/assistant/AssistantMessageAttachments.js.map +1 -1
  20. package/dist/components/assistant/AssistantMessageItem.js +28 -28
  21. package/dist/components/assistant/AssistantMessageItem.js.map +1 -1
  22. package/dist/components/assistant/AssistantMessageList.js +14 -14
  23. package/dist/components/assistant/AssistantMessageList.js.map +1 -1
  24. package/dist/components/assistant/AssistantMoreMenu.js +25 -25
  25. package/dist/components/assistant/AssistantMoreMenu.js.map +1 -1
  26. package/dist/components/assistant/AssistantPendingWriteCard.js +8 -8
  27. package/dist/components/assistant/AssistantPendingWriteCard.js.map +1 -1
  28. package/dist/components/assistant/AssistantReplyLanguageSelector.js +11 -11
  29. package/dist/components/assistant/AssistantReplyLanguageSelector.js.map +1 -1
  30. package/dist/components/assistant/AssistantSpeakButton.js +4 -4
  31. package/dist/components/assistant/AssistantSpeakButton.js.map +1 -1
  32. package/dist/components/assistant/AssistantSpeechProvider.js +188 -188
  33. package/dist/components/assistant/AssistantSpeechProvider.js.map +1 -1
  34. package/dist/components/assistant/AssistantSpokenTurnsNotice.js +5 -5
  35. package/dist/components/assistant/AssistantSpokenTurnsNotice.js.map +1 -1
  36. package/dist/components/assistant/AssistantToolActivity.js +16 -16
  37. package/dist/components/assistant/AssistantToolActivity.js.map +1 -1
  38. package/dist/components/assistant/composer/AssistantAttachmentButton.js +20 -20
  39. package/dist/components/assistant/composer/AssistantAttachmentButton.js.map +1 -1
  40. package/dist/components/assistant/composer/AssistantAttachmentChips.js +23 -23
  41. package/dist/components/assistant/composer/AssistantAttachmentChips.js.map +1 -1
  42. package/dist/components/assistant/composer/AssistantComposer.js +44 -44
  43. package/dist/components/assistant/composer/AssistantComposer.js.map +1 -1
  44. package/dist/components/assistant/composer/AssistantLanguageSelector.js +7 -7
  45. package/dist/components/assistant/composer/AssistantLanguageSelector.js.map +1 -1
  46. package/dist/components/assistant/composer/AssistantModeSelector.js +28 -28
  47. package/dist/components/assistant/composer/AssistantModeSelector.js.map +1 -1
  48. package/dist/components/assistant/composer/AssistantVoiceButton.js +6 -6
  49. package/dist/components/assistant/composer/AssistantVoiceButton.js.map +1 -1
  50. package/dist/components/assistant/composer/AssistantVoiceSelector.js +7 -7
  51. package/dist/components/assistant/composer/AssistantVoiceSelector.js.map +1 -1
  52. package/dist/components/assistant/voice/AssistantVoiceSession.js +77 -77
  53. package/dist/components/assistant/voice/AssistantVoiceSession.js.map +1 -1
  54. package/dist/components/assistant/voice/AssistantVoiceSessionButton.js +6 -6
  55. package/dist/components/assistant/voice/AssistantVoiceSessionButton.js.map +1 -1
  56. package/dist/components/assistant/voice/VoiceConversationView.js +11 -11
  57. package/dist/components/assistant/voice/VoiceConversationView.js.map +1 -1
  58. package/dist/components/assistant/voice/VoiceTranscriptDrawer.js +13 -13
  59. package/dist/components/assistant/voice/VoiceTranscriptDrawer.js.map +1 -1
  60. package/dist/hooks/useAssistantAttachments.js +94 -94
  61. package/dist/hooks/useAssistantAttachments.js.map +1 -1
  62. package/dist/services/assistantApi.js +1 -1
  63. package/dist/services/assistantApi.js.map +1 -1
  64. package/dist/utils/attachmentSources.js +4 -4
  65. package/dist/utils/attachmentSources.js.map +1 -1
  66. package/package.json +2 -2
@@ -1,22 +1,22 @@
1
1
  import { getSpeechEngine as e } from "../../services/speech/index.js";
2
2
  import { useAssistantStore as t } from "../../store/assistantStore.js";
3
- import { useTr as n } from "../../shared/hooks/useTr.js";
4
- import { isVoiceTurn as r } from "../../utils/voiceTurnVisibility.js";
5
- import { voicePreviewText as i } from "../../utils/voicePreview.js";
6
- import { chunkForSpeech as a, toSpeakableText as o } from "../../utils/speakableText.js";
7
- import { speechLabelsFor as s } from "../../config/speechLabels.js";
8
- import { VOICE_LIST_TIMEOUT_MS as c, languageDisplayName as ee, selectVoiceForLocale as l, speechGate as te, speechLangForLocale as u, voiceAvailability as d, voicesForLocale as ne } from "../../utils/speechVoices.js";
9
- import { resolveSpeechLocale as re } from "../../utils/replyLanguage.js";
10
- import { DEFAULT_SPEECH_RATE as ie, findAssistantLanguage as ae } from "../../config/assistantLanguages.js";
11
- import { resolveLanguagePair as oe } from "../../config/assistantLanguagePair.js";
12
- import { IDLE_PLAYBACK as se, isSpeakingMessage as f, speechPlaybackReducer as ce } from "../../utils/speechPlayback.js";
13
- import { isTurnInFlight as le } from "../../utils/assistantTurnState.js";
14
- import { parseToolActivity as ue } from "./AssistantToolActivity.js";
15
- import { createContext as p, useCallback as m, useContext as h, useEffect as g, useMemo as _, useReducer as de, useRef as v, useState as y } from "react";
16
- import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
- import { jsx as pe } from "react/jsx-runtime";
3
+ import { isVoiceTurn as n } from "../../utils/voiceTurnVisibility.js";
4
+ import { voicePreviewText as r } from "../../utils/voicePreview.js";
5
+ import { chunkForSpeech as i, toSpeakableText as a } from "../../utils/speakableText.js";
6
+ import { speechLabelsFor as o } from "../../config/speechLabels.js";
7
+ import { VOICE_LIST_TIMEOUT_MS as s, languageDisplayName as c, selectVoiceForLocale as l, speechGate as ee, speechLangForLocale as u, voiceAvailability as d, voicesForLocale as f } from "../../utils/speechVoices.js";
8
+ import { resolveSpeechLocale as te } from "../../utils/replyLanguage.js";
9
+ import { DEFAULT_SPEECH_RATE as ne, findAssistantLanguage as p } from "../../config/assistantLanguages.js";
10
+ import { resolveLanguagePair as re } from "../../config/assistantLanguagePair.js";
11
+ import { IDLE_PLAYBACK as ie, isSpeakingMessage as ae, speechPlaybackReducer as oe } from "../../utils/speechPlayback.js";
12
+ import { isTurnInFlight as se } from "../../utils/assistantTurnState.js";
13
+ import { parseToolActivity as ce } from "./AssistantToolActivity.js";
14
+ import { createContext as m, useCallback as h, useContext as g, useEffect as _, useMemo as v, useReducer as le, useRef as y, useState as b } from "react";
15
+ import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
+ import { useAssistantTr as de } from "@burdenoff/fe-libs/shared/assistant";
17
+ import { jsx as fe } from "react/jsx-runtime";
18
18
  //#region src/components/assistant/AssistantSpeechProvider.tsx
19
- var me = {
19
+ var pe = {
20
20
  codeBlock: "",
21
21
  image: "",
22
22
  link: "",
@@ -25,7 +25,7 @@ var me = {
25
25
  emailAt: "at",
26
26
  emailDot: "dot",
27
27
  nestedItem: ""
28
- }, he = p({
28
+ }, me = m({
29
29
  isSupported: !1,
30
30
  availability: "unsupported",
31
31
  isBlocked: !0,
@@ -46,250 +46,250 @@ var me = {
46
46
  setSessionSpeaking: () => {},
47
47
  previewVoice: () => {}
48
48
  });
49
- function b() {
50
- return h(he);
49
+ function x() {
50
+ return g(me);
51
51
  }
52
- var x = ({ children: p, visible: h = !0, engine: b = e() }) => {
53
- let x = n(), { locale: S } = fe(), [C, w] = de(ce, se), [T, E] = y(() => b.listVoices()), [D, O] = y(!1), [k, A] = y(() => /* @__PURE__ */ new Map()), j = v(0), [M, N] = y(null), P = v(null), F = v(() => {}), I = m(() => {
54
- P.current?.(), P.current = null;
55
- }, []), L = t((e) => e.autoSpeakEnabled), R = t((e) => e.setAutoSpeak), [z, ge] = y(!1), _e = t((e) => e.activeConversationId), B = _(() => b.isSupported(), [b]);
56
- g(() => {
57
- if (!B) return;
52
+ var S = ({ children: m, visible: g = !0, engine: x = e() }) => {
53
+ let S = de(), { locale: C } = ue(), [w, T] = le(oe, ie), [E, D] = b(() => x.listVoices()), [O, k] = b(!1), [A, j] = b(() => /* @__PURE__ */ new Map()), M = y(0), [N, P] = b(null), F = y(null), I = y(() => {}), L = h(() => {
54
+ F.current?.(), F.current = null;
55
+ }, []), R = t((e) => e.autoSpeakEnabled), z = t((e) => e.setAutoSpeak), [B, he] = b(!1), ge = t((e) => e.activeConversationId), V = v(() => x.isSupported(), [x]);
56
+ _(() => {
57
+ if (!V) return;
58
58
  let e = () => {
59
- E(b.listVoices()), A((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
59
+ D(x.listVoices()), j((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
60
60
  };
61
- return e(), b.subscribeVoices(e);
62
- }, [b, B]);
63
- let V = t((e) => e.assistantLanguage), ve = t((e) => e.replyLanguage), H = t((e) => e.preferredVoices), U = t((e) => e.setPreferredVoice), W = _(() => oe(V, ve, S).reply, [
61
+ return e(), x.subscribeVoices(e);
62
+ }, [x, V]);
63
+ let H = t((e) => e.assistantLanguage), U = t((e) => e.replyLanguage), W = t((e) => e.preferredVoices), G = t((e) => e.setPreferredVoice), K = v(() => re(H, U, C).reply, [
64
+ H,
65
+ U,
66
+ C
67
+ ]), q = K.code, J = h((e) => p(e)?.tag ?? u(e), []), _e = h((e) => p(e)?.rate ?? ne, []), Y = v(() => d(V, E, K.tag, O), [
64
68
  V,
65
- ve,
66
- S
67
- ]), G = W.code, K = m((e) => ae(e)?.tag ?? u(e), []), q = m((e) => ae(e)?.rate ?? ie, []), J = _(() => d(B, T, W.tag, D), [
68
- B,
69
- T,
70
- W,
71
- D
72
- ]), ye = _(() => ({
73
- codeBlock: x("healthybowl.assistant.speech.codeBlock", "Code block"),
74
- image: x("healthybowl.assistant.speech.image", "image"),
75
- link: x("healthybowl.assistant.speech.link", "link"),
76
- largeTable: x("healthybowl.assistant.speech.largeTable", "Table with {{rows}} rows and {{columns}} columns"),
77
- truncated: x("healthybowl.assistant.speech.truncated", "The rest of this message is not read aloud"),
78
- nestedItem: x("healthybowl.assistant.speech.nestedItem", "Sub-item {{ordinal}}"),
79
- emailAt: x("healthybowl.assistant.speech.emailAt", "at"),
80
- emailDot: x("healthybowl.assistant.speech.emailDot", "dot")
81
- }), [x]), Y = m(() => {
82
- I(), b.cancel(), w({ type: "stop" });
83
- }, [I, b]), be = m((e) => {
84
- let t = b.listVoices().find((t) => t.name === e) ?? null;
85
- t && (Y(), b.speak([i(G)], {
69
+ E,
70
+ K,
71
+ O
72
+ ]), ve = v(() => ({
73
+ codeBlock: S("speech.codeBlock", "Code block"),
74
+ image: S("speech.image", "image"),
75
+ link: S("speech.link", "link"),
76
+ largeTable: S("speech.largeTable", "Table with {{rows}} rows and {{columns}} columns"),
77
+ truncated: S("speech.truncated", "The rest of this message is not read aloud"),
78
+ nestedItem: S("speech.nestedItem", "Sub-item {{ordinal}}"),
79
+ emailAt: S("speech.emailAt", "at"),
80
+ emailDot: S("speech.emailDot", "dot")
81
+ }), [S]), X = h(() => {
82
+ L(), x.cancel(), T({ type: "stop" });
83
+ }, [L, x]), ye = h((e) => {
84
+ let t = x.listVoices().find((t) => t.name === e) ?? null;
85
+ t && (X(), x.speak([r(q)], {
86
86
  voice: t,
87
- lang: K(G)
87
+ lang: J(q)
88
88
  }));
89
89
  }, [
90
- b,
91
- G,
92
- Y,
93
- K
94
- ]), xe = m((e) => k.get(e) ?? null, [k]), Se = m((e, t, n) => {
95
- I();
90
+ x,
91
+ q,
92
+ X,
93
+ J
94
+ ]), be = h((e) => A.get(e) ?? null, [A]), xe = h((e, t, n) => {
95
+ L();
96
96
  let r = !1, i = () => {}, a = (a) => {
97
97
  if (!r) {
98
- if (r = !0, P.current = null, clearTimeout(o), i(), a.length === 0) {
99
- O(!0);
98
+ if (r = !0, F.current = null, clearTimeout(o), i(), a.length === 0) {
99
+ k(!0);
100
100
  return;
101
101
  }
102
- E(a), F.current(e, t, a, n);
102
+ D(a), I.current(e, t, a, n);
103
103
  }
104
- }, o = setTimeout(() => a(b.listVoices()), c);
105
- i = b.subscribeVoices(() => a(b.listVoices())), P.current = () => {
106
- r || (r = !0, clearTimeout(o), i(), P.current = null);
104
+ }, o = setTimeout(() => a(x.listVoices()), s);
105
+ i = x.subscribeVoices(() => a(x.listVoices())), F.current = () => {
106
+ r || (r = !0, clearTimeout(o), i(), F.current = null);
107
107
  };
108
- }, [I, b]), X = m((e, t, n, r) => {
109
- let i = n;
110
- if (i.length === 0) {
111
- let e = b.listVoices();
112
- e.length > 0 && (i = e, E(e));
108
+ }, [L, x]), Z = h((e, t, n, r) => {
109
+ let a = n;
110
+ if (a.length === 0) {
111
+ let e = x.listVoices();
112
+ e.length > 0 && (a = e, D(e));
113
113
  }
114
- let o = K(r), s = te(d(!0, i, r, D));
114
+ let o = J(r), s = ee(d(!0, a, r, O));
115
115
  if (s === "block") {
116
- let t = x("healthybowl.assistant.speech.noVoiceForReply", "This reply is in {{language}}, and no {{language}} voice is installed on this device.", { language: ee(o, S) });
117
- A((n) => new Map(n).set(e, t));
116
+ let t = S("speech.noVoiceForReply", "This reply is in {{language}}, and no {{language}} voice is installed on this device.", { language: c(o, C) });
117
+ j((n) => new Map(n).set(e, t));
118
118
  return;
119
119
  }
120
120
  if (s === "wait-for-voices") {
121
- Se(e, t, r);
121
+ xe(e, t, r);
122
122
  return;
123
123
  }
124
- A((t) => {
124
+ j((t) => {
125
125
  if (!t.has(e)) return t;
126
126
  let n = new Map(t);
127
127
  return n.delete(e), n;
128
128
  });
129
- let c = j.current + 1;
130
- j.current = c, w({
129
+ let u = M.current + 1;
130
+ M.current = u, T({
131
131
  type: "start",
132
132
  messageId: e,
133
- requestId: c
133
+ requestId: u
134
134
  });
135
- let u = a(t);
136
- N({
137
- requestId: c,
138
- chunks: u,
135
+ let f = i(t);
136
+ P({
137
+ requestId: u,
138
+ chunks: f,
139
139
  index: -1
140
- }), b.speak(u, {
141
- voice: l(i, o, H[r]),
140
+ }), x.speak(f, {
141
+ voice: l(a, o, W[r]),
142
142
  lang: o,
143
- rate: q(r)
143
+ rate: _e(r)
144
144
  }, {
145
- onChunkStart: (e) => N((t) => t?.requestId === c ? {
145
+ onChunkStart: (e) => P((t) => t?.requestId === u ? {
146
146
  ...t,
147
147
  index: e
148
148
  } : t),
149
- onEnd: () => w({
149
+ onEnd: () => T({
150
150
  type: "finished",
151
- requestId: c
151
+ requestId: u
152
152
  }),
153
- onError: () => w({
153
+ onError: () => T({
154
154
  type: "failed",
155
- requestId: c
155
+ requestId: u
156
156
  })
157
157
  });
158
158
  }, [
159
- b,
160
- S,
161
- H,
162
- q,
163
- K,
164
159
  x,
165
- D,
166
- Se
160
+ C,
161
+ W,
162
+ _e,
163
+ J,
164
+ S,
165
+ O,
166
+ xe
167
167
  ]);
168
- g(() => {
169
- F.current = X;
170
- }, [X]);
171
- let Z = m((e, t, n) => {
172
- if (!B) return;
173
- let r = re(o(t, { labels: me }), n ?? G), i = o(t, { labels: s(r, ye) });
174
- i && X(e, i, T, r);
168
+ _(() => {
169
+ I.current = Z;
170
+ }, [Z]);
171
+ let Q = h((e, t, n) => {
172
+ if (!V) return;
173
+ let r = te(a(t, { labels: pe }), n ?? q), i = a(t, { labels: o(r, ve) });
174
+ i && Z(e, i, E, r);
175
175
  }, [
176
- B,
177
- ye,
178
- G,
179
- X,
180
- T
181
- ]), Ce = m((e, t, n) => {
182
- if (f(C, e)) {
183
- Y();
176
+ V,
177
+ ve,
178
+ q,
179
+ Z,
180
+ E
181
+ ]), Se = h((e, t, n) => {
182
+ if (ae(w, e)) {
183
+ X();
184
184
  return;
185
185
  }
186
- Z(e, t, n);
186
+ Q(e, t, n);
187
187
  }, [
188
- C,
189
- Z,
190
- Y
188
+ w,
189
+ Q,
190
+ X
191
191
  ]);
192
- g(() => {
193
- h || Y();
194
- }, [h, Y]), g(() => {
195
- Y(), A(/* @__PURE__ */ new Map());
196
- }, [_e, Y]), g(() => {
197
- A((e) => e.size === 0 ? e : /* @__PURE__ */ new Map()), Y();
198
- }, [G, Y]), g(() => () => {
199
- P.current?.(), P.current = null, b.cancel();
200
- }, [b]), g(() => {
192
+ _(() => {
193
+ g || X();
194
+ }, [g, X]), _(() => {
195
+ X(), j(/* @__PURE__ */ new Map());
196
+ }, [ge, X]), _(() => {
197
+ j((e) => e.size === 0 ? e : /* @__PURE__ */ new Map()), X();
198
+ }, [q, X]), _(() => () => {
199
+ F.current?.(), F.current = null, x.cancel();
200
+ }, [x]), _(() => {
201
201
  if (typeof window > "u") return;
202
- let e = () => b.cancel();
202
+ let e = () => x.cancel();
203
203
  return window.addEventListener("pagehide", e), () => window.removeEventListener("pagehide", e);
204
- }, [b]), g(() => {
205
- if (typeof document > "u" || !B) return;
204
+ }, [x]), _(() => {
205
+ if (typeof document > "u" || !V) return;
206
206
  let e = () => {
207
207
  if (document.visibilityState !== "visible") return;
208
- let e = b.listVoices();
209
- e.length > 0 && I(), E(e), O(!1), A((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
208
+ let e = x.listVoices();
209
+ e.length > 0 && L(), D(e), k(!1), j((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
210
210
  };
211
211
  return document.addEventListener("visibilitychange", e), window.addEventListener("focus", e), () => {
212
212
  document.removeEventListener("visibilitychange", e), window.removeEventListener("focus", e);
213
213
  };
214
214
  }, [
215
- I,
216
- b,
217
- B
215
+ L,
216
+ x,
217
+ V
218
218
  ]);
219
- let we = v(Z);
220
- g(() => {
221
- we.current = Z;
222
- }, [Z]), g(() => {
223
- if (!(!L && !z || !h || !B)) return t.subscribe((e, t) => {
224
- let n = e.activeConversationId;
225
- if (!n || n !== t.activeConversationId) return;
226
- let i = e.processingByConversationId[n], a = t.processingByConversationId[n];
227
- if (i?.status !== "complete" || !le(a?.status)) return;
219
+ let Ce = y(Q);
220
+ _(() => {
221
+ Ce.current = Q;
222
+ }, [Q]), _(() => {
223
+ if (!(!R && !B || !g || !V)) return t.subscribe((e, t) => {
224
+ let r = e.activeConversationId;
225
+ if (!r || r !== t.activeConversationId) return;
226
+ let i = e.processingByConversationId[r], a = t.processingByConversationId[r];
227
+ if (i?.status !== "complete" || !se(a?.status)) return;
228
228
  let o = i.messageId ?? a?.messageId ?? null;
229
229
  if (!o) return;
230
- let s = e.conversations.find((e) => e.id === n)?.messages.find((e) => e.id === o);
231
- if (!s || s.role !== "assistant" || r(s) !== z) return;
232
- let { text: c } = ue(s.content);
233
- c.trim() && we.current(o, c, s.metadata?.lang);
230
+ let s = e.conversations.find((e) => e.id === r)?.messages.find((e) => e.id === o);
231
+ if (!s || s.role !== "assistant" || n(s) !== B) return;
232
+ let { text: c } = ce(s.content);
233
+ c.trim() && Ce.current(o, c, s.metadata?.lang);
234
234
  });
235
235
  }, [
236
- L,
237
- z,
236
+ R,
238
237
  B,
239
- h
238
+ V,
239
+ g
240
240
  ]);
241
- let Q = _(() => ne(T, W.tag), [T, W]), $ = _(() => l(T, W.tag, H[G]), [
242
- T,
241
+ let $ = v(() => f(E, K.tag), [E, K]), we = v(() => l(E, K.tag, W[q]), [
242
+ E,
243
+ K,
243
244
  W,
244
- H,
245
- G
246
- ]), Te = _(() => ({
247
- isSupported: B,
248
- availability: J,
249
- isBlocked: J === "no-voices",
250
- disabledReason: J === "no-voices" ? x("healthybowl.assistant.speech.noVoicesOnDevice", "This device has no speech voices installed. Add one in your device speech or accessibility settings.") : null,
251
- blockedFor: xe,
252
- voiceChoices: Q,
253
- spokenChunks: M ? {
254
- chunks: M.chunks,
255
- index: M.index
245
+ q
246
+ ]), Te = v(() => ({
247
+ isSupported: V,
248
+ availability: Y,
249
+ isBlocked: Y === "no-voices",
250
+ disabledReason: Y === "no-voices" ? S("speech.noVoicesOnDevice", "This device has no speech voices installed. Add one in your device speech or accessibility settings.") : null,
251
+ blockedFor: be,
252
+ voiceChoices: $,
253
+ spokenChunks: N ? {
254
+ chunks: N.chunks,
255
+ index: N.index
256
256
  } : null,
257
- activeVoiceName: $?.name ?? null,
258
- preferredVoiceName: H[G] ?? null,
259
- setVoice: (e) => U(G, e),
260
- speakingMessageId: C.status === "speaking" ? C.messageId : null,
261
- isSpeaking: (e) => f(C, e),
262
- toggle: Ce,
263
- stop: Y,
264
- autoSpeakEnabled: L,
265
- setAutoSpeak: R,
266
- sessionSpeaking: z,
267
- setSessionSpeaking: ge,
268
- previewVoice: be
257
+ activeVoiceName: we?.name ?? null,
258
+ preferredVoiceName: W[q] ?? null,
259
+ setVoice: (e) => G(q, e),
260
+ speakingMessageId: w.status === "speaking" ? w.messageId : null,
261
+ isSpeaking: (e) => ae(w, e),
262
+ toggle: Se,
263
+ stop: X,
264
+ autoSpeakEnabled: R,
265
+ setAutoSpeak: z,
266
+ sessionSpeaking: B,
267
+ setSessionSpeaking: he,
268
+ previewVoice: ye
269
269
  }), [
270
- B,
271
- J,
272
- xe,
273
- Q,
270
+ V,
271
+ Y,
272
+ be,
274
273
  $,
275
- H,
276
- U,
274
+ we,
275
+ W,
277
276
  G,
278
- C,
279
- Ce,
280
- Y,
281
- L,
277
+ q,
278
+ w,
279
+ Se,
280
+ X,
282
281
  R,
283
282
  z,
284
- be,
285
- x
283
+ B,
284
+ ye,
285
+ S
286
286
  ]);
287
- return /* @__PURE__ */ pe(he.Provider, {
287
+ return /* @__PURE__ */ fe(me.Provider, {
288
288
  value: Te,
289
- children: p
289
+ children: m
290
290
  });
291
291
  };
292
292
  //#endregion
293
- export { x as AssistantSpeechProvider, b as useAssistantSpeech };
293
+ export { S as AssistantSpeechProvider, x as useAssistantSpeech };
294
294
 
295
295
  //# sourceMappingURL=AssistantSpeechProvider.js.map