@burdenoff/fe-libs 2026.1118.13 → 2026.1119.2
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/chrome/globalSearch/AdvancedFiltersPanel.js +128 -127
- package/dist/chrome/notificationCenter/NotificationFilters.js +45 -44
- package/dist/connections/CredentialStorageSelector.js +135 -134
- package/dist/connections/SharePanels.js +70 -69
- package/dist/credentials/AuthMethodSelector.js +33 -32
- package/dist/credentials/SchemaForm.js +96 -95
- package/dist/shared/assistant/avatar/live/LiveAvatarSettingsFields.js +74 -73
- package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +2 -0
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +41 -40
- package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.js +26 -25
- package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.js +22 -21
- package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.d.ts +2 -1
- package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.js +17 -16
- package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.js +22 -21
- package/dist/shared/pages/searchPage/FiltersPanel.js +129 -128
- package/dist/shared/pages/searchPage/SearchToolbar.js +24 -23
- package/dist/shared/providers/AppShellProvider.d.ts +8 -0
- package/dist/shared/providers/AppShellProvider.js +199 -193
- package/dist/shared/providers/shell/ThemeProvider.d.ts +6 -1
- package/dist/shared/providers/shell/ThemeProvider.js +65 -62
- package/dist/shared/providers/shell/themedNativeControls.d.ts +25 -0
- package/dist/shared/providers/shell/themedNativeControls.js +13 -0
- package/dist/sharing/ShareDialog.js +33 -32
- package/dist/storage/StorageFolderPicker.js +50 -49
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/themed-select-context.d.ts +9 -0
- package/dist/ui/themed-select-context.js +15 -0
- package/dist/ui/themed-select-menu.d.ts +10 -0
- package/dist/ui/themed-select-menu.js +70 -0
- package/dist/ui/themed-select-options.d.ts +42 -0
- package/dist/ui/themed-select-options.js +88 -0
- package/dist/ui/themed-select-state.d.ts +43 -0
- package/dist/ui/themed-select-state.js +73 -0
- package/dist/ui/themed-select.d.ts +7 -0
- package/dist/ui/themed-select.js +176 -0
- package/dist/ui.js +31 -29
- package/package.json +1 -1
- package/src/shared/tokens/tokens.css +100 -0
|
@@ -4,59 +4,60 @@ import { resolveAvatarVoiceMode as r } from "../avatarPreferences.js";
|
|
|
4
4
|
import { useAvatarCopy as i } from "../useAvatarCopy.js";
|
|
5
5
|
import { AvatarFace as a } from "./AvatarFace.js";
|
|
6
6
|
import { hostedAvatarVoice as o } from "./avatarVoice.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { ThemedSelect as s } from "../../../../ui/themed-select.js";
|
|
8
|
+
import { LiveAvatarMinutes as c } from "./LiveAvatarMinutes.js";
|
|
9
|
+
import { useSyncExternalStore as l } from "react";
|
|
10
|
+
import { Volume2 as u } from "lucide-react";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
12
|
// src/shared/assistant/avatar/live/LiveAvatarSettingsFields.tsx
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
let n =
|
|
13
|
+
var p = "mine", m = "paired", h = "speaker:", g = /-Chirp3-HD-([A-Za-z]+)$/;
|
|
14
|
+
function _(e) {
|
|
15
|
+
let n = g.exec(e)?.[1];
|
|
15
16
|
return n !== void 0 && t(n) ? n : e;
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function v(e, t) {
|
|
18
19
|
let n = t.find((e) => e.source === "hosted")?.lang;
|
|
19
20
|
return n === void 0 ? null : o(e, n, t);
|
|
20
21
|
}
|
|
21
|
-
var
|
|
22
|
-
function
|
|
22
|
+
var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted", x = "focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong", S = "relative inline-flex min-h-11 min-w-0 max-w-full cursor-pointer items-center gap-2 rounded-full border ps-1.5 pe-4 text-sm font-medium transition-colors focus-within:ring-2 focus-within:ring-border-strong", C = "absolute inset-0 m-0 size-full cursor-pointer appearance-none rounded-full opacity-0";
|
|
23
|
+
function w(e) {
|
|
23
24
|
return e.phase === "starting" || e.phase === "connecting" || e.phase === "ready" || e.phase === "ending";
|
|
24
25
|
}
|
|
25
|
-
var
|
|
26
|
-
let m = i(), h =
|
|
27
|
-
return t.avatars.length > 1 && !h ? /* @__PURE__ */
|
|
26
|
+
var T = ({ controller: e, snapshot: t, chooserName: n, nameOf: r, imageOf: o, markBroken: s, persistSelection: c = !1, selectedId: l, showEmpty: u, lockedHint: p = !0 }) => {
|
|
27
|
+
let m = i(), h = w(t), g = l === void 0 ? t.selectedAvatarId : l, { phase: _ } = t;
|
|
28
|
+
return t.avatars.length > 1 && !h ? /* @__PURE__ */ f("fieldset", {
|
|
28
29
|
className: "flex min-w-0 flex-col gap-1.5",
|
|
29
30
|
"data-testid": "assistant-avatar-tab-chooser",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
-
className:
|
|
31
|
+
children: [/* @__PURE__ */ d("legend", {
|
|
32
|
+
className: y,
|
|
32
33
|
children: m.chooserTitle
|
|
33
|
-
}), /* @__PURE__ */
|
|
34
|
+
}), /* @__PURE__ */ d("div", {
|
|
34
35
|
className: "flex flex-wrap gap-2",
|
|
35
36
|
children: t.avatars.map((t) => {
|
|
36
37
|
let i = t === g, l = r(t);
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
className: `${
|
|
38
|
+
return /* @__PURE__ */ f("label", {
|
|
39
|
+
className: `${S} ${i ? "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-raised hover:text-text-primary"}`,
|
|
39
40
|
title: i ? m.chooserSelected(l) : m.chooserOption(l),
|
|
40
41
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ d("input", {
|
|
42
43
|
type: "radio",
|
|
43
44
|
name: n,
|
|
44
45
|
value: t,
|
|
45
46
|
checked: i,
|
|
46
47
|
onChange: () => {
|
|
47
|
-
c ?
|
|
48
|
+
c ? w(e.getSnapshot()) || e.selectAvatar(t, { persist: !0 }) : e.selectAvatar(t);
|
|
48
49
|
},
|
|
49
|
-
className:
|
|
50
|
+
className: C,
|
|
50
51
|
"data-avatar-id": t
|
|
51
52
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ d(a, {
|
|
53
54
|
size: "pill",
|
|
54
55
|
name: l,
|
|
55
56
|
src: o(t),
|
|
56
57
|
selected: i,
|
|
57
58
|
onError: s
|
|
58
59
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ d("span", {
|
|
60
61
|
className: "truncate",
|
|
61
62
|
children: l
|
|
62
63
|
})
|
|
@@ -64,99 +65,99 @@ var w = ({ controller: e, snapshot: t, chooserName: n, nameOf: r, imageOf: o, ma
|
|
|
64
65
|
}, t);
|
|
65
66
|
})
|
|
66
67
|
})]
|
|
67
|
-
}) : t.avatars.length > 0 && g !== null ? /* @__PURE__ */
|
|
68
|
+
}) : t.avatars.length > 0 && g !== null ? /* @__PURE__ */ f("div", {
|
|
68
69
|
className: "flex flex-col gap-0.5",
|
|
69
70
|
"data-testid": "assistant-avatar-tab-chosen",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ f("p", {
|
|
71
72
|
className: "flex min-w-0 items-baseline gap-2 text-sm",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
73
|
-
className:
|
|
73
|
+
children: [/* @__PURE__ */ d("span", {
|
|
74
|
+
className: y,
|
|
74
75
|
children: m.chooserLabel
|
|
75
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ d("span", {
|
|
76
77
|
className: "truncate text-text-primary",
|
|
77
78
|
children: r(g)
|
|
78
79
|
})]
|
|
79
|
-
}), h && t.avatars.length > 1 && p ? /* @__PURE__ */
|
|
80
|
-
className:
|
|
80
|
+
}), h && t.avatars.length > 1 && p ? /* @__PURE__ */ d("p", {
|
|
81
|
+
className: b,
|
|
81
82
|
children: m.chooserLocked
|
|
82
83
|
}) : null]
|
|
83
|
-
}) :
|
|
84
|
-
className:
|
|
84
|
+
}) : u ?? _ === "choosing" ? /* @__PURE__ */ d("p", {
|
|
85
|
+
className: b,
|
|
85
86
|
"data-testid": "assistant-avatar-tab-empty",
|
|
86
87
|
children: m.chooserEmpty
|
|
87
88
|
}) : null;
|
|
88
|
-
},
|
|
89
|
-
let
|
|
90
|
-
if (
|
|
91
|
-
if (e ===
|
|
92
|
-
|
|
89
|
+
}, E = ({ controller: a, selected: o, avatarVoices: c, defaultAvatarVoiceMode: g, voiceStore: S, selectId: C, voiceHintId: T, voiceLive: E, lockWhileOn: D = !1 }) => {
|
|
90
|
+
let O = i(), k = n(), A = l(a.subscribe, a.getSnapshot, a.getSnapshot), j = D && w(A), M = l(S.subscribe, S.getState, S.getState), N = r(M, g), P = o === null ? null : c.get(o) ?? null, F = N === "speaker" && M.avatarSpeaker !== null ? `${h}${M.avatarSpeaker}` : N === "paired" && P !== null ? m : p, I = F === m ? P : F.startsWith(h) ? M.avatarSpeaker : null, L = F === p ? k.activeVoiceName : I === null ? null : v(I, k.voiceChoices)?.name ?? null, R = k.speakingMessageId !== null || k.spokenChunks !== null, z = L !== null && !E && !R && !j, B = k.activeVoiceName ? O.voiceModeMineNamed(_(k.activeVoiceName)) : O.voiceModeMine, V = (e) => {
|
|
91
|
+
if (D && w(a.getSnapshot())) return;
|
|
92
|
+
if (e === p || e === m) {
|
|
93
|
+
S.setVoiceMode(e);
|
|
93
94
|
return;
|
|
94
95
|
}
|
|
95
96
|
let n = e.slice(8);
|
|
96
|
-
e.startsWith(
|
|
97
|
+
e.startsWith(h) && t(n) && S.setAvatarSpeaker(n);
|
|
97
98
|
};
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ f("div", {
|
|
99
100
|
className: "flex flex-col gap-1",
|
|
100
101
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
htmlFor:
|
|
103
|
-
className:
|
|
104
|
-
children:
|
|
102
|
+
/* @__PURE__ */ d("label", {
|
|
103
|
+
htmlFor: C,
|
|
104
|
+
className: y,
|
|
105
|
+
children: O.voiceModeLabel
|
|
105
106
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ f("div", {
|
|
107
108
|
className: "flex items-center gap-2",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
109
|
-
id:
|
|
110
|
-
value:
|
|
111
|
-
onChange: (e) =>
|
|
112
|
-
"aria-describedby":
|
|
113
|
-
disabled:
|
|
114
|
-
className: `min-h-11 min-w-0 flex-1 rounded-xl border border-border-default bg-bg-elevated px-3 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary ${
|
|
109
|
+
children: [/* @__PURE__ */ f(s, {
|
|
110
|
+
id: C,
|
|
111
|
+
value: F,
|
|
112
|
+
onChange: (e) => V(e.target.value),
|
|
113
|
+
"aria-describedby": T,
|
|
114
|
+
disabled: j || void 0,
|
|
115
|
+
className: `min-h-11 min-w-0 flex-1 rounded-xl border border-border-default bg-bg-elevated px-3 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary ${x}`,
|
|
115
116
|
"data-testid": "assistant-avatar-tab-voice",
|
|
116
117
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
value: f,
|
|
119
|
-
children: z
|
|
120
|
-
}),
|
|
121
|
-
N === null ? null : /* @__PURE__ */ u("option", {
|
|
118
|
+
/* @__PURE__ */ d("option", {
|
|
122
119
|
value: p,
|
|
123
|
-
children:
|
|
120
|
+
children: B
|
|
121
|
+
}),
|
|
122
|
+
P === null ? null : /* @__PURE__ */ d("option", {
|
|
123
|
+
value: m,
|
|
124
|
+
children: O.voiceModeDefaultNamed(P)
|
|
124
125
|
}),
|
|
125
|
-
e.map((e) => /* @__PURE__ */
|
|
126
|
-
value: `${
|
|
126
|
+
e.map((e) => /* @__PURE__ */ d("option", {
|
|
127
|
+
value: `${h}${e}`,
|
|
127
128
|
children: e
|
|
128
129
|
}, e))
|
|
129
130
|
]
|
|
130
|
-
}), /* @__PURE__ */
|
|
131
|
+
}), /* @__PURE__ */ d("button", {
|
|
131
132
|
type: "button",
|
|
132
133
|
onClick: () => {
|
|
133
|
-
|
|
134
|
+
z && L !== null && k.previewVoice(L);
|
|
134
135
|
},
|
|
135
|
-
"aria-disabled": !
|
|
136
|
-
"aria-label":
|
|
137
|
-
title:
|
|
138
|
-
className: `inline-flex size-11 shrink-0 items-center justify-center rounded-xl border border-border-default bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary aria-disabled:cursor-default aria-disabled:opacity-60 ${
|
|
136
|
+
"aria-disabled": !z,
|
|
137
|
+
"aria-label": O.hearVoice,
|
|
138
|
+
title: O.hearVoice,
|
|
139
|
+
className: `inline-flex size-11 shrink-0 items-center justify-center rounded-xl border border-border-default bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary aria-disabled:cursor-default aria-disabled:opacity-60 ${x}`,
|
|
139
140
|
"data-testid": "assistant-avatar-tab-hear",
|
|
140
|
-
children: /* @__PURE__ */ u
|
|
141
|
+
children: /* @__PURE__ */ d(u, {
|
|
141
142
|
className: "size-5",
|
|
142
143
|
"aria-hidden": "true"
|
|
143
144
|
})
|
|
144
145
|
})]
|
|
145
146
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
id:
|
|
148
|
-
className:
|
|
149
|
-
children:
|
|
147
|
+
/* @__PURE__ */ d("p", {
|
|
148
|
+
id: T,
|
|
149
|
+
className: b,
|
|
150
|
+
children: O.voiceModeHint
|
|
150
151
|
})
|
|
151
152
|
]
|
|
152
153
|
});
|
|
153
|
-
},
|
|
154
|
+
}, D = ({ id: e }) => {
|
|
154
155
|
let t = i();
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
+
return /* @__PURE__ */ d("p", {
|
|
156
157
|
id: e,
|
|
157
158
|
className: "text-xs text-text-secondary",
|
|
158
159
|
"data-testid": "assistant-avatar-tab-disclosure",
|
|
159
160
|
children: t.consent
|
|
160
161
|
});
|
|
161
162
|
};
|
|
162
|
-
export {
|
|
163
|
+
export { T as LiveAvatarSettingsChooser, c as LiveAvatarSettingsCredits, D as LiveAvatarSettingsDisclosure, E as LiveAvatarSettingsVoice, v as avatarPreviewVoice, w as avatarSettingsLocked, _ as avatarVoiceDisplayName };
|
|
@@ -22,6 +22,8 @@ import { FC } from 'react';
|
|
|
22
22
|
* ★ Both stay native `<select>`s. On a phone that opens the OS picker, which
|
|
23
23
|
* already scrolls, searches and localises itself — worth far more across nine
|
|
24
24
|
* Indic languages than a custom dropdown that reimplements all three badly.
|
|
25
|
+
* They are `ThemedSelect`s: only an app that opts in to themed native controls
|
|
26
|
+
* (FluidGrids, BOFF-15413) swaps the system menu for its own styled one.
|
|
25
27
|
*/
|
|
26
28
|
export interface AssistantLanguageMenuProps {
|
|
27
29
|
/**
|
|
@@ -3,82 +3,83 @@ import { ASSISTANT_LANGUAGES as t } from "../voice/languages.js";
|
|
|
3
3
|
import { resolveLanguagePair as n } from "../voice/languagePair.js";
|
|
4
4
|
import { useAssistantStore as r } from "../store.js";
|
|
5
5
|
import { useAssistantTr as i } from "../i18n.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { ThemedSelect as a } from "../../../ui/themed-select.js";
|
|
7
|
+
import { useMemo as o } from "react";
|
|
8
|
+
import { Languages as s } from "lucide-react";
|
|
9
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
10
|
// src/shared/assistant/ui/AssistantLanguageMenu.tsx
|
|
10
|
-
var
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
]),
|
|
16
|
-
return /* @__PURE__ */
|
|
11
|
+
var u = "__match__", d = ({ inputOnly: d = !1 }) => {
|
|
12
|
+
let f = i(), { locale: p } = e(), m = r((e) => e.assistantLanguage), h = r((e) => e.setAssistantLanguage), g = r((e) => e.replyLanguage), _ = r((e) => e.setReplyLanguage), v = o(() => n(m, g, p), [
|
|
13
|
+
m,
|
|
14
|
+
g,
|
|
15
|
+
p
|
|
16
|
+
]), y = f("language.inputLabel", "Language"), b = f("language.replyLabel", "Assistant replies in"), x = m ?? "";
|
|
17
|
+
return /* @__PURE__ */ l("div", {
|
|
17
18
|
"data-testid": "assistant-language-menu",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
19
|
+
children: [/* @__PURE__ */ l("label", {
|
|
19
20
|
className: "relative flex cursor-pointer items-center gap-2.5 px-3 py-2 text-xs text-text-primary transition-colors hover:bg-bg-elevated focus-within:ring-2 focus-within:ring-border-strong",
|
|
20
|
-
title: `${
|
|
21
|
+
title: `${y}: ${v.input.label}`,
|
|
21
22
|
"data-testid": "assistant-input-language",
|
|
22
23
|
children: [
|
|
23
|
-
/* @__PURE__ */ s
|
|
24
|
+
/* @__PURE__ */ c(s, {
|
|
24
25
|
className: "size-3.5 flex-shrink-0 text-text-secondary",
|
|
25
26
|
"aria-hidden": "true"
|
|
26
27
|
}),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ c("span", {
|
|
28
29
|
className: "flex-1",
|
|
29
|
-
children:
|
|
30
|
+
children: y
|
|
30
31
|
}),
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ c("span", {
|
|
32
33
|
className: "text-text-muted",
|
|
33
|
-
children:
|
|
34
|
+
children: v.input.label
|
|
34
35
|
}),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
"aria-label":
|
|
37
|
-
value:
|
|
36
|
+
/* @__PURE__ */ l(a, {
|
|
37
|
+
"aria-label": y,
|
|
38
|
+
value: x,
|
|
38
39
|
onChange: (e) => {
|
|
39
40
|
let t = e.target.value;
|
|
40
|
-
|
|
41
|
+
h(t === "" ? null : t);
|
|
41
42
|
},
|
|
42
43
|
className: "absolute inset-0 cursor-pointer opacity-0 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ c("option", {
|
|
44
45
|
value: "",
|
|
45
|
-
children:
|
|
46
|
-
}), t.map((e) => /* @__PURE__ */
|
|
46
|
+
children: f("voice.languageFollowApp", "Same as interface")
|
|
47
|
+
}), t.map((e) => /* @__PURE__ */ c("option", {
|
|
47
48
|
value: e.code,
|
|
48
49
|
children: e.label
|
|
49
50
|
}, e.code))]
|
|
50
51
|
})
|
|
51
52
|
]
|
|
52
|
-
}),
|
|
53
|
+
}), d ? null : /* @__PURE__ */ l("label", {
|
|
53
54
|
className: "relative flex cursor-pointer items-center gap-2.5 py-2 ps-9 pe-3 text-xs text-text-secondary transition-colors hover:bg-bg-elevated focus-within:ring-2 focus-within:ring-border-strong",
|
|
54
|
-
title: `${
|
|
55
|
+
title: `${b}: ${v.reply.english}`,
|
|
55
56
|
"data-testid": "assistant-reply-language",
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ c("span", {
|
|
58
59
|
className: "flex-1",
|
|
59
|
-
children:
|
|
60
|
+
children: b
|
|
60
61
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ c("span", {
|
|
62
63
|
className: "text-text-muted",
|
|
63
|
-
children:
|
|
64
|
+
children: g === null ? `${f("language.replyMatch", "Match my language")} (${v.reply.label})` : v.reply.label
|
|
64
65
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
"aria-label":
|
|
67
|
-
value:
|
|
66
|
+
/* @__PURE__ */ l(a, {
|
|
67
|
+
"aria-label": b,
|
|
68
|
+
value: g ?? u,
|
|
68
69
|
onChange: (e) => {
|
|
69
70
|
let t = e.target.value;
|
|
70
|
-
|
|
71
|
+
_(t === u ? null : t);
|
|
71
72
|
},
|
|
72
73
|
className: "absolute inset-0 cursor-pointer opacity-0 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
-
value:
|
|
74
|
+
children: [/* @__PURE__ */ l("option", {
|
|
75
|
+
value: u,
|
|
75
76
|
children: [
|
|
76
|
-
|
|
77
|
+
f("language.replyMatch", "Match my language"),
|
|
77
78
|
" (",
|
|
78
|
-
|
|
79
|
+
v.input.label,
|
|
79
80
|
")"
|
|
80
81
|
]
|
|
81
|
-
}), t.map((e) => /* @__PURE__ */
|
|
82
|
+
}), t.map((e) => /* @__PURE__ */ c("option", {
|
|
82
83
|
value: e.code,
|
|
83
84
|
children: e.label
|
|
84
85
|
}, e.code))]
|
|
@@ -87,4 +88,4 @@ var l = "__match__", u = ({ inputOnly: u = !1 }) => {
|
|
|
87
88
|
})]
|
|
88
89
|
});
|
|
89
90
|
};
|
|
90
|
-
export {
|
|
91
|
+
export { d as AssistantLanguageMenu };
|
|
@@ -16,6 +16,8 @@ import { FC } from 'react';
|
|
|
16
16
|
* exactly full at 390px, and this is a setting rather than a per-turn control.
|
|
17
17
|
*
|
|
18
18
|
* A native `<select>` for the same reason as the language chip — on a phone it
|
|
19
|
-
* opens the OS picker, which already scrolls and localises itself.
|
|
19
|
+
* opens the OS picker, which already scrolls and localises itself. A `ThemedSelect`,
|
|
20
|
+
* so an app that opts in to themed native controls (FluidGrids, BOFF-15413) gets its
|
|
21
|
+
* own styled menu instead.
|
|
20
22
|
*/
|
|
21
23
|
export declare const AssistantReplyLanguageSelector: FC;
|
|
@@ -3,50 +3,51 @@ import { ASSISTANT_LANGUAGES as t } from "../voice/languages.js";
|
|
|
3
3
|
import { resolveLanguagePair as n } from "../voice/languagePair.js";
|
|
4
4
|
import { useAssistantStore as r } from "../store.js";
|
|
5
5
|
import { useAssistantTr as i } from "../i18n.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { ThemedSelect as a } from "../../../ui/themed-select.js";
|
|
7
|
+
import { useMemo as o } from "react";
|
|
8
|
+
import { Languages as s } from "lucide-react";
|
|
9
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
10
|
// src/shared/assistant/ui/AssistantReplyLanguageSelector.tsx
|
|
10
|
-
var
|
|
11
|
-
let
|
|
12
|
-
f,
|
|
11
|
+
var u = "__match__", d = () => {
|
|
12
|
+
let d = i(), { locale: f } = e(), p = r((e) => e.assistantLanguage), m = r((e) => e.replyLanguage), h = r((e) => e.setReplyLanguage), g = o(() => n(p, m, f), [
|
|
13
13
|
p,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
m,
|
|
15
|
+
f
|
|
16
|
+
]), _ = d("language.replyLabel", "Assistant replies in");
|
|
17
|
+
return /* @__PURE__ */ l("label", {
|
|
17
18
|
className: "relative flex cursor-pointer items-center gap-2.5 px-3 py-2 text-xs text-text-primary transition-colors hover:bg-bg-elevated focus-within:ring-2 focus-within:ring-border-strong",
|
|
18
|
-
title: `${
|
|
19
|
+
title: `${_}: ${g.reply.english}`,
|
|
19
20
|
"data-testid": "assistant-reply-language",
|
|
20
21
|
children: [
|
|
21
|
-
/* @__PURE__ */ s
|
|
22
|
+
/* @__PURE__ */ c(s, {
|
|
22
23
|
className: "size-3.5 flex-shrink-0 text-text-secondary",
|
|
23
24
|
"aria-hidden": "true"
|
|
24
25
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ c("span", {
|
|
26
27
|
className: "flex-1",
|
|
27
|
-
children:
|
|
28
|
+
children: _
|
|
28
29
|
}),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ c("span", {
|
|
30
31
|
className: "text-text-muted",
|
|
31
|
-
children:
|
|
32
|
+
children: g.reply.label
|
|
32
33
|
}),
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
"aria-label":
|
|
35
|
-
value:
|
|
34
|
+
/* @__PURE__ */ l(a, {
|
|
35
|
+
"aria-label": _,
|
|
36
|
+
value: m ?? u,
|
|
36
37
|
onChange: (e) => {
|
|
37
38
|
let t = e.target.value;
|
|
38
|
-
|
|
39
|
+
h(t === u ? null : t);
|
|
39
40
|
},
|
|
40
41
|
className: "absolute inset-0 cursor-pointer opacity-0 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
42
|
-
value:
|
|
42
|
+
children: [/* @__PURE__ */ l("option", {
|
|
43
|
+
value: u,
|
|
43
44
|
children: [
|
|
44
|
-
|
|
45
|
+
d("language.replyMatch", "Match my language"),
|
|
45
46
|
" (",
|
|
46
|
-
|
|
47
|
+
g.input.label,
|
|
47
48
|
")"
|
|
48
49
|
]
|
|
49
|
-
}), t.map((e) => /* @__PURE__ */
|
|
50
|
+
}), t.map((e) => /* @__PURE__ */ c("option", {
|
|
50
51
|
value: e.code,
|
|
51
52
|
children: e.label
|
|
52
53
|
}, e.code))]
|
|
@@ -54,4 +55,4 @@ var l = "__match__", u = () => {
|
|
|
54
55
|
]
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
|
-
export {
|
|
58
|
+
export { d as AssistantReplyLanguageSelector };
|
|
@@ -25,7 +25,9 @@ interface Props {
|
|
|
25
25
|
* in Tamil actually is — this opens the OS picker, which is already localised,
|
|
26
26
|
* already scrolls properly, and already handles 17 languages across five scripts
|
|
27
27
|
* without us reimplementing any of it. A custom dropdown would look tidier in a
|
|
28
|
-
* desktop screenshot and be worse everywhere that matters.
|
|
28
|
+
* desktop screenshot and be worse everywhere that matters. It is a `ThemedSelect`:
|
|
29
|
+
* native in every product except one that opts in to themed native controls
|
|
30
|
+
* (FluidGrids, BOFF-15413), whose own styled menu replaces the system one.
|
|
29
31
|
*
|
|
30
32
|
* Each option is labelled with its ENDONYM (`தமிழ்`, not `Tamil`): a user who
|
|
31
33
|
* reads only Tamil cannot find "Tamil" in a list. The visible trigger shows the
|
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import { ASSISTANT_LANGUAGES as e } from "../../voice/languages.js";
|
|
2
2
|
import { useAssistantTr as t } from "../../i18n.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ThemedSelect as n } from "../../../../ui/themed-select.js";
|
|
4
|
+
import { Languages as r } from "lucide-react";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
6
|
// src/shared/assistant/ui/composer/AssistantLanguageSelector.tsx
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
className: `relative flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-colors focus-within:ring-2 focus-within:ring-border-strong ${
|
|
10
|
-
title: `${
|
|
7
|
+
var o = ({ current: o, selected: c, onChange: l, disabled: u = !1 }) => {
|
|
8
|
+
let d = t(), f = d("voice.languageLabel", "Language you speak to the assistant");
|
|
9
|
+
return /* @__PURE__ */ a("label", {
|
|
10
|
+
className: `relative flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-colors focus-within:ring-2 focus-within:ring-border-strong ${u ? "cursor-not-allowed opacity-50" : "cursor-pointer text-text-muted hover:bg-bg-elevated hover:text-text-secondary"}`,
|
|
11
|
+
title: `${f}: ${o.label}`,
|
|
11
12
|
"data-testid": "assistant-language-selector",
|
|
12
13
|
children: [
|
|
13
|
-
/* @__PURE__ */ r
|
|
14
|
+
/* @__PURE__ */ i(r, {
|
|
14
15
|
className: "size-3.5",
|
|
15
16
|
"aria-hidden": "true"
|
|
16
17
|
}),
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ i("span", {
|
|
18
19
|
"aria-hidden": "true",
|
|
19
|
-
children:
|
|
20
|
+
children: o.code.toUpperCase()
|
|
20
21
|
}),
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
"aria-label":
|
|
23
|
-
value:
|
|
24
|
-
disabled:
|
|
22
|
+
/* @__PURE__ */ a(n, {
|
|
23
|
+
"aria-label": f,
|
|
24
|
+
value: c ?? "__app__",
|
|
25
|
+
disabled: u,
|
|
25
26
|
onChange: (e) => {
|
|
26
27
|
let t = e.target.value;
|
|
27
|
-
|
|
28
|
+
l(t === "__app__" ? null : t);
|
|
28
29
|
},
|
|
29
30
|
className: "absolute inset-0 cursor-pointer opacity-0 scheme-normal dark:scheme-dark disabled:cursor-not-allowed [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
-
value:
|
|
32
|
-
children:
|
|
33
|
-
}), e.map((e) => /* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ i("option", {
|
|
32
|
+
value: s,
|
|
33
|
+
children: d("voice.languageFollowApp", "Same as interface")
|
|
34
|
+
}), e.map((e) => /* @__PURE__ */ i("option", {
|
|
34
35
|
value: e.code,
|
|
35
36
|
children: e.label
|
|
36
37
|
}, e.code))]
|
|
37
38
|
})
|
|
38
39
|
]
|
|
39
40
|
});
|
|
40
|
-
},
|
|
41
|
-
export {
|
|
41
|
+
}, s = "__app__";
|
|
42
|
+
export { o as AssistantLanguageSelector, s as FOLLOW_APP_LOCALE };
|
|
@@ -14,6 +14,7 @@ import { FC } from 'react';
|
|
|
14
14
|
* A native `<select>`, like the voice and language pickers: on a phone it opens
|
|
15
15
|
* the OS picker, which already scrolls, localises itself and is reachable by
|
|
16
16
|
* speech-control users. Wrapped in its `<label>`, so the visible words are the
|
|
17
|
-
* accessible name (WCAG 2.5.3).
|
|
17
|
+
* accessible name (WCAG 2.5.3). A `ThemedSelect`: an app that opts in to themed
|
|
18
|
+
* native controls (FluidGrids, BOFF-15413) gets its own styled menu instead.
|
|
18
19
|
*/
|
|
19
20
|
export declare const AssistantVoiceGraceSelector: FC;
|
|
@@ -2,37 +2,38 @@ import { useAssistantTr as e } from "../../i18n.js";
|
|
|
2
2
|
import { useAssistantStore as t } from "../../store.js";
|
|
3
3
|
import { VOICE_GRACE_CHOICES_MS as n, resolveVoiceGraceMs as r } from "../../voice/handsFree.js";
|
|
4
4
|
import { isSpeechRecognitionSupported as i } from "../../voice/useVoiceInput.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { ThemedSelect as a } from "../../../../ui/themed-select.js";
|
|
6
|
+
import { Timer as o } from "lucide-react";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
8
|
// src/shared/assistant/ui/composer/AssistantVoiceGraceSelector.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
9
|
+
var l = () => {
|
|
10
|
+
let l = e(), u = t((e) => e.voiceGraceMs), d = t((e) => e.setVoiceGraceMs);
|
|
10
11
|
if (!i()) return null;
|
|
11
|
-
let
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
let f = r(u), p = (e) => e / 1e3;
|
|
13
|
+
return /* @__PURE__ */ c("label", {
|
|
13
14
|
className: "flex items-center gap-2.5 px-3 py-2 text-xs text-text-primary focus-within:ring-2 focus-within:ring-inset focus-within:ring-border-strong",
|
|
14
|
-
title:
|
|
15
|
+
title: l("voice.graceHint", "How long the assistant waits in silence before it sends what you said. Start talking again and it carries on with the same message."),
|
|
15
16
|
"data-testid": "assistant-voice-grace",
|
|
16
17
|
children: [
|
|
17
|
-
/* @__PURE__ */ o
|
|
18
|
+
/* @__PURE__ */ s(o, {
|
|
18
19
|
className: "size-3.5 flex-shrink-0 text-text-secondary",
|
|
19
20
|
"aria-hidden": "true"
|
|
20
21
|
}),
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ s("span", {
|
|
22
23
|
className: "flex-1",
|
|
23
|
-
children:
|
|
24
|
+
children: l("voice.graceLabel", "Wait after I stop talking")
|
|
24
25
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
value:
|
|
27
|
-
onChange: (e) =>
|
|
26
|
+
/* @__PURE__ */ s(a, {
|
|
27
|
+
value: f,
|
|
28
|
+
onChange: (e) => d(Number(e.target.value)),
|
|
28
29
|
className: "rounded-md border border-border-default bg-bg-surface px-1.5 py-1 text-xs text-text-primary focus:outline-none scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
29
30
|
"data-testid": "assistant-voice-grace-select",
|
|
30
|
-
children: n.map((e) => /* @__PURE__ */
|
|
31
|
+
children: n.map((e) => /* @__PURE__ */ s("option", {
|
|
31
32
|
value: e,
|
|
32
|
-
children: e === 2e3 ?
|
|
33
|
+
children: e === 2e3 ? l("voice.graceOptionDefault", "{{seconds}} seconds (default)", { seconds: p(e) }) : l("voice.graceOption", "{{seconds}} seconds", { seconds: p(e) })
|
|
33
34
|
}, e))
|
|
34
35
|
})
|
|
35
36
|
]
|
|
36
37
|
});
|
|
37
38
|
};
|
|
38
|
-
export {
|
|
39
|
+
export { l as AssistantVoiceGraceSelector };
|
|
@@ -15,7 +15,9 @@ import { FC } from 'react';
|
|
|
15
15
|
* message rather than here.
|
|
16
16
|
*
|
|
17
17
|
* A native `<select>` for the same reason as the language chip: on a phone it
|
|
18
|
-
* opens the OS picker, which already scrolls and localises itself.
|
|
18
|
+
* opens the OS picker, which already scrolls and localises itself. A `ThemedSelect`,
|
|
19
|
+
* so an app that opts in to themed native controls (FluidGrids, BOFF-15413) gets its
|
|
20
|
+
* own styled menu instead.
|
|
19
21
|
*/
|
|
20
22
|
export declare const AssistantVoiceSelector: FC<{
|
|
21
23
|
disabled?: boolean;
|