dsh-xiaomi-tts 4.2.3 → 4.2.4
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 +6 -2
- package/lib/client/history/audio-history-page.d.ts.map +1 -1
- package/lib/client/localization.d.ts +1 -1
- package/lib/client/settings/minimal-mode.d.ts +1 -0
- package/lib/client/settings/minimal-mode.d.ts.map +1 -1
- package/lib/client/settings/voice-reading-section.d.ts.map +1 -1
- package/lib/client/settings/voice-reading-select.d.ts +26 -0
- package/lib/client/settings/voice-reading-select.d.ts.map +1 -0
- package/lib/client.js +179 -87
- package/lib/constants.d.ts +2 -1
- package/lib/constants.d.ts.map +1 -1
- package/lib/host/doubao.d.ts +2 -2
- package/lib/host/doubao.d.ts.map +1 -1
- package/lib/index.js +29 -17
- package/lib/pcm-stream.js +1 -1
- package/lib/{shared-CRBu_ymc.js → shared-D5yyzz9m.js} +1 -1
- package/lib/shared.js +3 -3
- package/lib/{utils-CxcKs8ke.js → utils-CVl7B1KW.js} +3 -2
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
## 📋 环境要求
|
|
43
43
|
|
|
44
|
-
- DSH `0.1.7-x` 至 `0.2.x`,当前目标版本为 `0.2.1-rc.
|
|
44
|
+
- DSH `0.1.7-x` 至 `0.2.x`,当前目标版本为 `0.2.1-rc.3`;Node.js 22.13+。
|
|
45
45
|
- 云端语音需要对应 API Key;豆包还需开通所选语音资源。
|
|
46
46
|
- 豆包持续文本输入要求 DSH Host 支持 WebSocket upgrade 注册;桌面端使用 DSH 提供的 Host 流连接地址,Web 端使用页面部署地址,反向代理需转发 Upgrade。
|
|
47
47
|
|
|
@@ -86,6 +86,8 @@ dsh plugin --profile web remove dsh-xiaomi-tts
|
|
|
86
86
|
|
|
87
87
|
语音指令支持情绪、风格和方言,可选标签或自行编辑;效果因模型、音色和文本而异。本地语音与豆包复刻不应用指令。
|
|
88
88
|
|
|
89
|
+
豆包按密钥自动选择线路:`ark-` 开头的火山方舟 Ark API Key 直接连接 [Agent Plan 个人版语音](https://docs.volcengine.com/docs/6561/2532486?lang=zh)线路;其他格式先连接标准线路,握手返回 401 或 403 时再尝试 Agent Plan。使用 Agent Plan 时填写套餐专属 API Key,个人版文档列出的语音合成模型为 `seed-tts-2.0`。Coding Plan 不包含语音模型。
|
|
90
|
+
|
|
89
91
|
豆包自定义和复刻音色 ID 各保留最近 10 条历史,失焦或按 Enter 记住,点击标签回填。
|
|
90
92
|
|
|
91
93
|
豆包语速调整对下一次合成生效,历史录音保留原语速;小米流式调速可能改变音调。
|
|
@@ -163,6 +165,8 @@ pnpm install --frozen-lockfile
|
|
|
163
165
|
pnpm dev
|
|
164
166
|
```
|
|
165
167
|
|
|
168
|
+
预览服务会监听局域网接口,可在同一网络的其他设备上访问终端输出的 Network 地址。
|
|
169
|
+
|
|
166
170
|
常用检查:
|
|
167
171
|
|
|
168
172
|
```bash
|
|
@@ -177,7 +181,7 @@ pnpm pack:check
|
|
|
177
181
|
Windows 本地开发链接切换为 npm 包:先停止 DSH Web,再运行:
|
|
178
182
|
|
|
179
183
|
```powershell
|
|
180
|
-
.\tools\start\dsh-plugin-reinstall.bat 4.2.
|
|
184
|
+
.\tools\start\dsh-plugin-reinstall.bat 4.2.4
|
|
181
185
|
```
|
|
182
186
|
|
|
183
187
|
清理 Desktop 残留的本地链接:退出 Desktop 后运行:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-history-page.d.ts","sourceRoot":"","sources":["../../../src/client/history/audio-history-page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAKnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"audio-history-page.d.ts","sourceRoot":"","sources":["../../../src/client/history/audio-history-page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAGxD,OAAO,KAAK,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAKnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAMzE,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,YAAY,CAAA;IACrB,CAAC,EAAE,SAAS,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IAC3C,cAAc,EAAE,MAAM,IAAI,CAAA;IAC1B,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,qBAAqB,GAAG,YAAY,CA0I5J"}
|
|
@@ -136,7 +136,7 @@ export declare const zh: {
|
|
|
136
136
|
readonly 'history.error.decode': "浏览器无法解码这条音频,可重试或下载文件。";
|
|
137
137
|
readonly 'history.error.failed': "音频播放失败,请重试或下载文件。";
|
|
138
138
|
readonly 'history.hint': "最多 100 条 / 100 MB";
|
|
139
|
-
readonly 'history.empty': "
|
|
139
|
+
readonly 'history.empty': "还没有生成的音频";
|
|
140
140
|
readonly 'history.loading': "正在读取音频历史…";
|
|
141
141
|
readonly 'history.memory': "浏览器存储不可用或已满;当前列表仅在本次打开期间保留,建议及时下载。";
|
|
142
142
|
readonly 'history.skipped': "有音频超过 100 MB,未保留到历史列表。";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const MINIMAL_MODE_STORAGE_KEY = "dsh-xiaomi-mimo-tts:minimal-mode";
|
|
2
|
+
export declare function subscribeMinimalMode(listener: () => void): () => void;
|
|
2
3
|
export declare function readMinimalMode(): boolean;
|
|
3
4
|
export declare function writeMinimalMode(enabled: boolean): void;
|
|
4
5
|
//# sourceMappingURL=minimal-mode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimal-mode.d.ts","sourceRoot":"","sources":["../../../src/client/settings/minimal-mode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"minimal-mode.d.ts","sourceRoot":"","sources":["../../../src/client/settings/minimal-mode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,qCAAqC,CAAA;AAK1E,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAUrE;AAUD,wBAAgB,eAAe,IAAI,OAAO,CAQzC;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAWvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice-reading-section.d.ts","sourceRoot":"","sources":["../../../src/client/settings/voice-reading-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAIxD,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAA;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"voice-reading-section.d.ts","sourceRoot":"","sources":["../../../src/client/settings/voice-reading-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAA;AAIxD,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAA;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AA0BnD,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;IAC9B,CAAC,EAAE,SAAS,CAAA;IACZ,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B;AAED,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAE1H,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,YAAY,GAAG,IAAI,CAOxF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
interface VoiceReadingSelectProps {
|
|
3
|
+
/** Accessible name of the control (the row title). */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Currently selected option id. */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Shown when the value matches no option (a stored custom id). */
|
|
8
|
+
fallbackLabel?: string;
|
|
9
|
+
options: readonly {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
onSelect: (id: string) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Capsule selector pill plus anchored menu, mirroring the Host settings rows
|
|
18
|
+
* (`packages/client/ui-chat/src/client/settings/PreferenceRow.tsx` and
|
|
19
|
+
* `packages/client/locale/src/client/LanguageRow.tsx` in the harness source): a
|
|
20
|
+
* borderless 36px pill on the module surface that opens the shared `Menu` with
|
|
21
|
+
* a check on the selected row. Choosing returns focus to the pill before the
|
|
22
|
+
* value is published, exactly like the Host rows.
|
|
23
|
+
*/
|
|
24
|
+
export declare function VoiceReadingSelect({ label, value, fallbackLabel, options, disabled, onSelect }: VoiceReadingSelectProps): ReactElement;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=voice-reading-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice-reading-select.d.ts","sourceRoot":"","sources":["../../../src/client/settings/voice-reading-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAIzC,UAAU,uBAAuB;IAC/B,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACjD,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,uBAAuB,GAAG,YAAY,CA0CtI"}
|
package/lib/client.js
CHANGED
|
@@ -1069,6 +1069,48 @@ function RiKey2Line(props) {
|
|
|
1069
1069
|
}]
|
|
1070
1070
|
})(props);
|
|
1071
1071
|
}
|
|
1072
|
+
function RiDownloadLine(props) {
|
|
1073
|
+
return GenIcon({
|
|
1074
|
+
"tag": "svg",
|
|
1075
|
+
"attr": {
|
|
1076
|
+
"viewBox": "0 0 24 24",
|
|
1077
|
+
"fill": "currentColor"
|
|
1078
|
+
},
|
|
1079
|
+
"child": [{
|
|
1080
|
+
"tag": "path",
|
|
1081
|
+
"attr": { "d": "M3 19H21V21H3V19ZM13 13.1716L19.0711 7.1005L20.4853 8.51472L12 17L3.51472 8.51472L4.92893 7.1005L11 13.1716V2H13V13.1716Z" },
|
|
1082
|
+
"child": []
|
|
1083
|
+
}]
|
|
1084
|
+
})(props);
|
|
1085
|
+
}
|
|
1086
|
+
function RiDeleteBinLine(props) {
|
|
1087
|
+
return GenIcon({
|
|
1088
|
+
"tag": "svg",
|
|
1089
|
+
"attr": {
|
|
1090
|
+
"viewBox": "0 0 24 24",
|
|
1091
|
+
"fill": "currentColor"
|
|
1092
|
+
},
|
|
1093
|
+
"child": [{
|
|
1094
|
+
"tag": "path",
|
|
1095
|
+
"attr": { "d": "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z" },
|
|
1096
|
+
"child": []
|
|
1097
|
+
}]
|
|
1098
|
+
})(props);
|
|
1099
|
+
}
|
|
1100
|
+
function RiCheckLine(props) {
|
|
1101
|
+
return GenIcon({
|
|
1102
|
+
"tag": "svg",
|
|
1103
|
+
"attr": {
|
|
1104
|
+
"viewBox": "0 0 24 24",
|
|
1105
|
+
"fill": "currentColor"
|
|
1106
|
+
},
|
|
1107
|
+
"child": [{
|
|
1108
|
+
"tag": "path",
|
|
1109
|
+
"attr": { "d": "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" },
|
|
1110
|
+
"child": []
|
|
1111
|
+
}]
|
|
1112
|
+
})(props);
|
|
1113
|
+
}
|
|
1072
1114
|
function RiVoiceAiFill(props) {
|
|
1073
1115
|
return GenIcon({
|
|
1074
1116
|
"tag": "svg",
|
|
@@ -11055,16 +11097,16 @@ function hostWebSocketUrl(path) {
|
|
|
11055
11097
|
//#endregion
|
|
11056
11098
|
//#region src/client/conversation/api-key-status.ts
|
|
11057
11099
|
const cache = /* @__PURE__ */ new Map();
|
|
11058
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
11100
|
+
const listeners$1 = /* @__PURE__ */ new Set();
|
|
11059
11101
|
function onTtsCredentialsSaved(listener) {
|
|
11060
|
-
listeners.add(listener);
|
|
11102
|
+
listeners$1.add(listener);
|
|
11061
11103
|
return () => {
|
|
11062
|
-
listeners.delete(listener);
|
|
11104
|
+
listeners$1.delete(listener);
|
|
11063
11105
|
};
|
|
11064
11106
|
}
|
|
11065
11107
|
function invalidateApiKeyStatus() {
|
|
11066
11108
|
cache.clear();
|
|
11067
|
-
for (const listener of listeners) listener();
|
|
11109
|
+
for (const listener of listeners$1) listener();
|
|
11068
11110
|
}
|
|
11069
11111
|
function useApiKeySupported(active, provider = "xiaomi", revision) {
|
|
11070
11112
|
const [supported, setSupported] = (0, react.useState)(null);
|
|
@@ -11819,7 +11861,7 @@ const zh = {
|
|
|
11819
11861
|
"history.error.decode": "浏览器无法解码这条音频,可重试或下载文件。",
|
|
11820
11862
|
"history.error.failed": "音频播放失败,请重试或下载文件。",
|
|
11821
11863
|
"history.hint": "最多 100 条 / 100 MB",
|
|
11822
|
-
"history.empty": "
|
|
11864
|
+
"history.empty": "还没有生成的音频",
|
|
11823
11865
|
"history.loading": "正在读取音频历史…",
|
|
11824
11866
|
"history.memory": "浏览器存储不可用或已满;当前列表仅在本次打开期间保留,建议及时下载。",
|
|
11825
11867
|
"history.skipped": "有音频超过 100 MB,未保留到历史列表。",
|
|
@@ -12177,7 +12219,7 @@ const en = {
|
|
|
12177
12219
|
"history.error.decode": "The browser cannot decode this audio. Retry or download the file.",
|
|
12178
12220
|
"history.error.failed": "Audio playback failed. Retry or download the file.",
|
|
12179
12221
|
"history.hint": "Up to 100 entries / 100 MB",
|
|
12180
|
-
"history.empty": "No generated audio yet.
|
|
12222
|
+
"history.empty": "No generated audio yet.",
|
|
12181
12223
|
"history.loading": "Loading audio history…",
|
|
12182
12224
|
"history.memory": "Browser storage is unavailable or full. This list lasts only for this visit; download audio to keep it.",
|
|
12183
12225
|
"history.skipped": "An audio file exceeded 100 MB and was not kept in history.",
|
|
@@ -15038,7 +15080,7 @@ function ModuleShell({ className, title, summary, interactiveSummary = false, ac
|
|
|
15038
15080
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15039
15081
|
className: `xmimo-ui-module-head xmimo-ui-module-heading ${headingClassName}`.trim(),
|
|
15040
15082
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
15041
|
-
className: "xmimo-ui-accordion-heading",
|
|
15083
|
+
className: "xmimo-ui-accordion-heading xmimo-ui-interactive-heading",
|
|
15042
15084
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
15043
15085
|
...toggleProps,
|
|
15044
15086
|
className: "xmimo-ui-module-title-toggle",
|
|
@@ -17856,6 +17898,20 @@ function SwitchModule({ t, provider, enabled, autoPlay, soundEnabled, minimal, w
|
|
|
17856
17898
|
//#endregion
|
|
17857
17899
|
//#region src/client/settings/minimal-mode.ts
|
|
17858
17900
|
const MINIMAL_MODE_STORAGE_KEY = "dsh-xiaomi-mimo-tts:minimal-mode";
|
|
17901
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
17902
|
+
let fallbackMode = false;
|
|
17903
|
+
let useFallback = false;
|
|
17904
|
+
function subscribeMinimalMode(listener) {
|
|
17905
|
+
listeners.add(listener);
|
|
17906
|
+
const onStorage = (event) => {
|
|
17907
|
+
if (event.key === MINIMAL_MODE_STORAGE_KEY || event.key === null) listener();
|
|
17908
|
+
};
|
|
17909
|
+
if (typeof window !== "undefined") window.addEventListener("storage", onStorage);
|
|
17910
|
+
return () => {
|
|
17911
|
+
listeners.delete(listener);
|
|
17912
|
+
if (typeof window !== "undefined") window.removeEventListener("storage", onStorage);
|
|
17913
|
+
};
|
|
17914
|
+
}
|
|
17859
17915
|
function getStorage() {
|
|
17860
17916
|
try {
|
|
17861
17917
|
return typeof window === "undefined" ? void 0 : window.localStorage;
|
|
@@ -17865,15 +17921,23 @@ function getStorage() {
|
|
|
17865
17921
|
}
|
|
17866
17922
|
function readMinimalMode() {
|
|
17867
17923
|
try {
|
|
17868
|
-
|
|
17924
|
+
if (useFallback) return fallbackMode;
|
|
17925
|
+
const storage = getStorage();
|
|
17926
|
+
return storage ? storage.getItem(MINIMAL_MODE_STORAGE_KEY) === "true" : fallbackMode;
|
|
17869
17927
|
} catch {
|
|
17870
|
-
return
|
|
17928
|
+
return fallbackMode;
|
|
17871
17929
|
}
|
|
17872
17930
|
}
|
|
17873
17931
|
function writeMinimalMode(enabled) {
|
|
17932
|
+
fallbackMode = enabled;
|
|
17874
17933
|
try {
|
|
17875
|
-
getStorage()
|
|
17876
|
-
|
|
17934
|
+
const storage = getStorage();
|
|
17935
|
+
storage?.setItem(MINIMAL_MODE_STORAGE_KEY, String(enabled));
|
|
17936
|
+
useFallback = !storage;
|
|
17937
|
+
} catch {
|
|
17938
|
+
useFallback = true;
|
|
17939
|
+
}
|
|
17940
|
+
for (const listener of listeners) listener();
|
|
17877
17941
|
}
|
|
17878
17942
|
|
|
17879
17943
|
//#endregion
|
|
@@ -18137,6 +18201,56 @@ var SpeechActivity = class {
|
|
|
18137
18201
|
isBusy = () => [...this.queries].some((query) => query());
|
|
18138
18202
|
};
|
|
18139
18203
|
|
|
18204
|
+
//#endregion
|
|
18205
|
+
//#region src/client/settings/voice-reading-select.tsx
|
|
18206
|
+
/**
|
|
18207
|
+
* Capsule selector pill plus anchored menu, mirroring the Host settings rows
|
|
18208
|
+
* (`packages/client/ui-chat/src/client/settings/PreferenceRow.tsx` and
|
|
18209
|
+
* `packages/client/locale/src/client/LanguageRow.tsx` in the harness source): a
|
|
18210
|
+
* borderless 36px pill on the module surface that opens the shared `Menu` with
|
|
18211
|
+
* a check on the selected row. Choosing returns focus to the pill before the
|
|
18212
|
+
* value is published, exactly like the Host rows.
|
|
18213
|
+
*/
|
|
18214
|
+
function VoiceReadingSelect({ label, value, fallbackLabel, options, disabled, onSelect }) {
|
|
18215
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
18216
|
+
const selectorRef = (0, react.useRef)(null);
|
|
18217
|
+
const closeMenu = () => {
|
|
18218
|
+
setOpen(false);
|
|
18219
|
+
};
|
|
18220
|
+
const choose = (id$2) => {
|
|
18221
|
+
selectorRef.current?.focus({ preventScroll: true });
|
|
18222
|
+
closeMenu();
|
|
18223
|
+
onSelect(id$2);
|
|
18224
|
+
};
|
|
18225
|
+
const selectedLabel = options.find((option) => option.id === value)?.label ?? fallbackLabel ?? value;
|
|
18226
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
18227
|
+
open: open && !disabled,
|
|
18228
|
+
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
18229
|
+
ref: selectorRef,
|
|
18230
|
+
type: "button",
|
|
18231
|
+
className: "xmimo-voice-reading-selector",
|
|
18232
|
+
"aria-label": label,
|
|
18233
|
+
"aria-haspopup": "menu",
|
|
18234
|
+
"aria-expanded": open,
|
|
18235
|
+
disabled,
|
|
18236
|
+
onClick: () => {
|
|
18237
|
+
setOpen((current) => !current);
|
|
18238
|
+
},
|
|
18239
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
18240
|
+
className: "xmimo-voice-reading-selector-label",
|
|
18241
|
+
children: selectedLabel
|
|
18242
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: "xmimo-voice-reading-chevron" })]
|
|
18243
|
+
}),
|
|
18244
|
+
items: options,
|
|
18245
|
+
selectedId: value,
|
|
18246
|
+
onSelect: choose,
|
|
18247
|
+
onClose: closeMenu,
|
|
18248
|
+
align: "end",
|
|
18249
|
+
portal: true,
|
|
18250
|
+
listClassName: "xmimo-voice-reading-menu"
|
|
18251
|
+
});
|
|
18252
|
+
}
|
|
18253
|
+
|
|
18140
18254
|
//#endregion
|
|
18141
18255
|
//#region src/client/history/audio-history-page.tsx
|
|
18142
18256
|
function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechActivity, beforePlayback, onBack }) {
|
|
@@ -18154,6 +18268,7 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18154
18268
|
const [actionError, setActionError] = (0, react.useState)(false);
|
|
18155
18269
|
const backRef = (0, react.useRef)(null);
|
|
18156
18270
|
const searchRef = (0, react.useRef)(null);
|
|
18271
|
+
const pageRef = (0, react.useRef)(null);
|
|
18157
18272
|
(0, react.useEffect)(() => {
|
|
18158
18273
|
replay.activate();
|
|
18159
18274
|
backRef.current?.focus({ preventScroll: true });
|
|
@@ -18170,6 +18285,17 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18170
18285
|
voiceRate,
|
|
18171
18286
|
beforePlayback
|
|
18172
18287
|
]);
|
|
18288
|
+
(0, react.useEffect)(() => {
|
|
18289
|
+
const page = pageRef.current;
|
|
18290
|
+
if (!page || typeof ResizeObserver === "undefined") return;
|
|
18291
|
+
const observer$1 = new ResizeObserver(([entry]) => {
|
|
18292
|
+
if (entry && entry.contentRect.width <= 520) setQuery("");
|
|
18293
|
+
});
|
|
18294
|
+
observer$1.observe(page);
|
|
18295
|
+
return () => {
|
|
18296
|
+
observer$1.disconnect();
|
|
18297
|
+
};
|
|
18298
|
+
}, []);
|
|
18173
18299
|
const hasEntries = view.entries.length > 0;
|
|
18174
18300
|
const entries = filterAudioHistory(view.entries, query, source);
|
|
18175
18301
|
const busy = playback.status === "loading" || playback.status === "playing";
|
|
@@ -18185,7 +18311,7 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18185
18311
|
else await history.remove(id$2);
|
|
18186
18312
|
setDeleting(null);
|
|
18187
18313
|
setClearing(false);
|
|
18188
|
-
(searchRef.current
|
|
18314
|
+
(searchRef.current?.getClientRects().length ? searchRef.current : backRef.current)?.focus({ preventScroll: true });
|
|
18189
18315
|
} catch {
|
|
18190
18316
|
setActionError(true);
|
|
18191
18317
|
} finally {
|
|
@@ -18201,6 +18327,7 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18201
18327
|
}
|
|
18202
18328
|
};
|
|
18203
18329
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
18330
|
+
ref: pageRef,
|
|
18204
18331
|
className: "xmimo-ui-scope xmimo-tts-history-page",
|
|
18205
18332
|
"aria-label": t("history.title"),
|
|
18206
18333
|
children: [
|
|
@@ -18239,31 +18366,34 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18239
18366
|
setDeleting(null);
|
|
18240
18367
|
}
|
|
18241
18368
|
}),
|
|
18242
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
18369
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
18243
18370
|
className: "xmimo-tts-history-source",
|
|
18244
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
18245
|
-
|
|
18371
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VoiceReadingSelect, {
|
|
18372
|
+
label: t("history.source"),
|
|
18246
18373
|
value: source,
|
|
18247
|
-
|
|
18248
|
-
|
|
18249
|
-
setDeleting(null);
|
|
18250
|
-
},
|
|
18251
|
-
children: [
|
|
18374
|
+
disabled: pending,
|
|
18375
|
+
options: [
|
|
18252
18376
|
"all",
|
|
18253
18377
|
"conversation",
|
|
18254
18378
|
"preview",
|
|
18255
18379
|
"service"
|
|
18256
|
-
].map((
|
|
18257
|
-
|
|
18258
|
-
|
|
18259
|
-
}
|
|
18380
|
+
].map((id$2) => ({
|
|
18381
|
+
id: id$2,
|
|
18382
|
+
label: t(`history.${id$2}`)
|
|
18383
|
+
})),
|
|
18384
|
+
onSelect: (id$2) => {
|
|
18385
|
+
setSource(id$2);
|
|
18386
|
+
setDeleting(null);
|
|
18387
|
+
}
|
|
18260
18388
|
})
|
|
18261
18389
|
}),
|
|
18262
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
18390
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
18263
18391
|
type: "button",
|
|
18392
|
+
variant: "outline",
|
|
18264
18393
|
disabled: pending || view.status === "loading",
|
|
18265
|
-
className: clearing ? "xmimo-tts-history-confirm-delete" :
|
|
18266
|
-
|
|
18394
|
+
className: `xmimo-tts-history-action${clearing ? " xmimo-tts-history-confirm-delete" : ""}`,
|
|
18395
|
+
"aria-label": t(clearing ? "history.confirmClear" : "history.clear"),
|
|
18396
|
+
title: t(clearing ? "history.clearConfirm" : "history.clear"),
|
|
18267
18397
|
onBlur: () => {
|
|
18268
18398
|
if (!pending) setClearing(false);
|
|
18269
18399
|
},
|
|
@@ -18277,7 +18407,7 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18277
18407
|
setDeleting(null);
|
|
18278
18408
|
}
|
|
18279
18409
|
},
|
|
18280
|
-
children: t(clearing ? "history.confirmClear" : "history.clear")
|
|
18410
|
+
children: [clearing ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RiCheckLine, { "aria-hidden": "true" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RiDeleteBinLine, { "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(clearing ? "history.confirmClear" : "history.clear") })]
|
|
18281
18411
|
})
|
|
18282
18412
|
]
|
|
18283
18413
|
}) : null]
|
|
@@ -18414,17 +18544,22 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18414
18544
|
}),
|
|
18415
18545
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
18416
18546
|
className: "xmimo-tts-history-actions",
|
|
18417
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
18547
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
18418
18548
|
type: "button",
|
|
18549
|
+
variant: "outline",
|
|
18550
|
+
className: "xmimo-tts-history-action",
|
|
18551
|
+
title: t("history.download"),
|
|
18419
18552
|
"aria-label": `${t("history.download")}: ${title(entry).slice(0, 60)}`,
|
|
18420
18553
|
onClick: () => {
|
|
18421
18554
|
download(entry);
|
|
18422
18555
|
},
|
|
18423
|
-
children: t("history.download")
|
|
18424
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.
|
|
18556
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RiDownloadLine, { "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("history.download") })]
|
|
18557
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
18425
18558
|
type: "button",
|
|
18559
|
+
variant: "outline",
|
|
18426
18560
|
disabled: pending,
|
|
18427
|
-
className: deleting === entry.id ? "xmimo-tts-history-confirm-delete" :
|
|
18561
|
+
className: `xmimo-tts-history-action${deleting === entry.id ? " xmimo-tts-history-confirm-delete" : ""}`,
|
|
18562
|
+
title: t(deleting === entry.id ? "history.confirmDelete" : "history.delete"),
|
|
18428
18563
|
"aria-label": `${t(deleting === entry.id ? "history.confirmDelete" : "history.delete")}: ${title(entry).slice(0, 60)}`,
|
|
18429
18564
|
onBlur: () => {
|
|
18430
18565
|
if (!pending) setDeleting((current) => current === entry.id ? null : current);
|
|
@@ -18439,7 +18574,7 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18439
18574
|
setClearing(false);
|
|
18440
18575
|
}
|
|
18441
18576
|
},
|
|
18442
|
-
children: t(deleting === entry.id ? "history.confirmDelete" : "history.delete")
|
|
18577
|
+
children: [deleting === entry.id ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RiCheckLine, { "aria-hidden": "true" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RiDeleteBinLine, { "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(deleting === entry.id ? "history.confirmDelete" : "history.delete") })]
|
|
18443
18578
|
})]
|
|
18444
18579
|
})
|
|
18445
18580
|
]
|
|
@@ -18456,7 +18591,10 @@ function AudioHistoryPage({ history, t, volume, voiceRate, minimalMode, speechAc
|
|
|
18456
18591
|
view.entries.length,
|
|
18457
18592
|
" · ",
|
|
18458
18593
|
historyFileSize(view.entries.reduce((sum, entry) => sum + entry.blob.size, 0))
|
|
18459
|
-
] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
18594
|
+
] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
18595
|
+
className: "xmimo-tts-history-limit",
|
|
18596
|
+
children: t("history.hint")
|
|
18597
|
+
})]
|
|
18460
18598
|
}) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
18461
18599
|
type: "button",
|
|
18462
18600
|
variant: "outline",
|
|
@@ -19767,54 +19905,8 @@ function VoiceReadingSection(props) {
|
|
|
19767
19905
|
}
|
|
19768
19906
|
});
|
|
19769
19907
|
}
|
|
19770
|
-
/**
|
|
19771
|
-
* Capsule selector pill plus anchored menu, mirroring the Host settings rows
|
|
19772
|
-
* (`packages/client/ui-chat/src/client/settings/PreferenceRow.tsx` and
|
|
19773
|
-
* `packages/client/locale/src/client/LanguageRow.tsx` in the harness source): a
|
|
19774
|
-
* borderless 36px pill on the module surface that opens the shared `Menu` with
|
|
19775
|
-
* a check on the selected row. Choosing returns focus to the pill before the
|
|
19776
|
-
* value is published, exactly like the Host rows.
|
|
19777
|
-
*/
|
|
19778
|
-
function VoiceReadingSelect({ label, value, fallbackLabel, options, disabled, onSelect }) {
|
|
19779
|
-
const [open, setOpen] = (0, react.useState)(false);
|
|
19780
|
-
const selectorRef = (0, react.useRef)(null);
|
|
19781
|
-
const closeMenu = () => {
|
|
19782
|
-
setOpen(false);
|
|
19783
|
-
};
|
|
19784
|
-
const choose = (id$2) => {
|
|
19785
|
-
selectorRef.current?.focus({ preventScroll: true });
|
|
19786
|
-
closeMenu();
|
|
19787
|
-
onSelect(id$2);
|
|
19788
|
-
};
|
|
19789
|
-
const selectedLabel = options.find((option) => option.id === value)?.label ?? fallbackLabel ?? value;
|
|
19790
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
19791
|
-
open: open && !disabled,
|
|
19792
|
-
anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
19793
|
-
ref: selectorRef,
|
|
19794
|
-
type: "button",
|
|
19795
|
-
className: "xmimo-voice-reading-selector",
|
|
19796
|
-
"aria-label": label,
|
|
19797
|
-
"aria-haspopup": "menu",
|
|
19798
|
-
"aria-expanded": open,
|
|
19799
|
-
disabled,
|
|
19800
|
-
onClick: () => {
|
|
19801
|
-
setOpen((current) => !current);
|
|
19802
|
-
},
|
|
19803
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
19804
|
-
className: "xmimo-voice-reading-selector-label",
|
|
19805
|
-
children: selectedLabel
|
|
19806
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: "xmimo-voice-reading-chevron" })]
|
|
19807
|
-
}),
|
|
19808
|
-
items: options,
|
|
19809
|
-
selectedId: value,
|
|
19810
|
-
onSelect: choose,
|
|
19811
|
-
onClose: closeMenu,
|
|
19812
|
-
align: "end",
|
|
19813
|
-
portal: true,
|
|
19814
|
-
listClassName: "xmimo-voice-reading-menu"
|
|
19815
|
-
});
|
|
19816
|
-
}
|
|
19817
19908
|
function VoiceReadingPage({ scope, t, openPluginSettings }) {
|
|
19909
|
+
const minimalMode = (0, react.useSyncExternalStore)(subscribeMinimalMode, readMinimalMode, () => false);
|
|
19818
19910
|
const snapshot = useSettingsSnapshot(scope);
|
|
19819
19911
|
const [clonedHistory] = (0, react.useState)(() => readVoiceIdHistory("cloned"));
|
|
19820
19912
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
@@ -19853,7 +19945,7 @@ function VoiceReadingPage({ scope, t, openPluginSettings }) {
|
|
|
19853
19945
|
}));
|
|
19854
19946
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19855
19947
|
className: "xmimo-voice-reading",
|
|
19856
|
-
style: { "--xmimo-voice-reading-background": `url(${hostRoute(TTS_HISTORY_EMPTY_ASSET_ROUTE)})` },
|
|
19948
|
+
style: minimalMode ? void 0 : { "--xmimo-voice-reading-background": `url(${hostRoute(TTS_HISTORY_EMPTY_ASSET_ROUTE)})` },
|
|
19857
19949
|
children: [
|
|
19858
19950
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19859
19951
|
className: "xmimo-voice-reading-header",
|
|
@@ -21516,7 +21608,7 @@ var voice_default = "/*\n * Voice pickers: custom voice trigger, builtin voice g
|
|
|
21516
21608
|
|
|
21517
21609
|
//#endregion
|
|
21518
21610
|
//#region src/client/style/card-actions.css?raw
|
|
21519
|
-
var card_actions_default = "/*\n * Settings card action bar: update, star, discard, and save.\n */\n\n.xmimo-tts-card-footer {\n min-width: 0;\n container: xmimo-actions / inline-size\n}\n\n.xmimo-tts-card-actions {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px;\n font-size: 12px;\n color: var(--xmimo-ui-text-subtle)\n}\n\n.xmimo-tts-card-action-links {\n display: flex;\n min-width: 0;\n flex-wrap: wrap;\n align-items: center;\n gap: inherit\n}\n\n/* Reserve one column for both actions, even inside a narrow host panel. */\n.xmimo-tts-card-action-buttons {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: inherit\n}\n\n.xmimo-tts-card-actions > span {\n grid-column: 1 / -1;\n order: -1;\n text-align: end\n}\n\n.xmimo-tts-card-actions :is(button, a),\n.xmimo-ui-scope .xmimo-tts-action-button {\n box-sizing: border-box;\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n gap: 4px;\n min-height: 30px;\n height: auto;\n border: 1px solid var(--xmimo-ui-border);\n border-radius: 8px;\n padding: 5px 10px;\n color: var(--xmimo-ui-text);\n background: var(--xmimo-ui-surface);\n cursor: pointer;\n font: inherit;\n font-weight: 500;\n line-height: 18px;\n text-decoration: none;\n white-space: nowrap;\n transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease\n}\n\n.xmimo-tts-card-actions :is(button, a):where(:hover, :focus-visible):not(:disabled),\n.xmimo-ui-scope .xmimo-tts-action-button:where(:hover, :focus-visible):not(:disabled) {\n border-color: var(--xmimo-ui-brand);\n background: var(--xmimo-ui-hover);\n text-decoration: none\n}\n\n.xmimo-tts-card-actions :is(button, a):focus-visible,\n.xmimo-ui-scope .xmimo-tts-action-button:focus-visible {\n outline: var(--xmimo-ui-focus);\n outline-offset: 3px\n}\n\n.xmimo-tts-card-actions button:disabled,\n.xmimo-ui-scope .xmimo-tts-action-button:disabled {\n border-color: var(--xmimo-ui-border);\n color: var(--xmimo-ui-text-muted);\n background: var(--xmimo-ui-control-surface);\n cursor: not-allowed;\n opacity: 1\n}\n\n.xmimo-tts-card-actions .xmimo-tts-save {\n border-color: var(--xmimo-ui-brand);\n color: var(--dsw-alias-label-primary-foreground, #fff);\n background: var(--dsw-alias-button-primary-fill, var(--xmimo-ui-brand));\n font-weight: 600\n}\n\n.xmimo-tts-card-actions .xmimo-tts-save:is(:hover, :focus-visible):not(:disabled) {\n background: var(--dsw-alias-button-primary-hover, color-mix(in srgb, var(--xmimo-ui-brand) 85%, var(--xmimo-ui-text)))\n}\n\n.xmimo-tts-card-actions .xmimo-tts-save:disabled {\n border-color: color-mix(in srgb, var(--xmimo-ui-brand) 25%, var(--xmimo-ui-border));\n color: var(--xmimo-ui-text-muted);\n background: color-mix(in srgb, var(--xmimo-ui-brand) 12%, var(--xmimo-ui-surface))\n}\n\n.xmimo-tts-card-actions .xmimo-tts-update {\n color: var(--xmimo-ui-brand)\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star) {\n position: relative;\n isolation: isolate;\n overflow: hidden;\n transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease\n}\n\n.xmimo-tts-card-actions .xmimo-tts-star {\n border: 1px solid color-mix(in srgb, var(--xmimo-ui-brand) 30%, var(--xmimo-ui-border));\n color: var(--xmimo-ui-brand);\n background: transparent;\n font-weight: 600\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star)::before {\n position: absolute;\n z-index: -1;\n inset: 0;\n background: linear-gradient(110deg, transparent 15%, color-mix(in srgb, var(--xmimo-ui-brand) 12%, transparent) 35%, color-mix(in srgb, var(--xmimo-ui-brand) 28%, transparent) 50%, color-mix(in srgb, var(--xmimo-ui-brand) 12%, transparent) 65%, transparent 85%);\n content: '';\n pointer-events: none;\n opacity: 0;\n transform: translateX(-110%)\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star):is(:hover, :focus-visible) {\n border-color: var(--xmimo-ui-brand);\n background: color-mix(in srgb, var(--xmimo-ui-brand) 6%, transparent);\n box-shadow: 0 3px 10px color-mix(in srgb, var(--xmimo-ui-brand) 16%, transparent);\n text-decoration: none;\n transform: translateY(-1px)\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star):is(:hover, :focus-visible)::before {\n opacity: 1;\n animation: xmimo-tts-star-shine 1s ease-in-out infinite\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star):focus-visible {\n outline: var(--xmimo-ui-focus);\n outline-offset: 3px\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star):active {\n box-shadow: none;\n transform: translateY(0)\n}\n\n@keyframes xmimo-tts-star-shine {\n 0% { transform: translateX(-110%) }\n 65%, 100% { transform: translateX(110%) }\n}\n\n@container xmimo-actions (max-width: 520px) {\n .xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star, .xmimo-tts-history-link, .xmimo-tts-mode-toggle) {\n position: relative;\n padding-inline: 8px\n }\n\n .xmimo-tts-card-actions .xmimo-tts-action-label {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0\n }\n}\n\n@container xmimo-actions (max-width: 360px) {\n .xmimo-tts-card-actions {\n gap: 6px\n }\n\n .xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star, .xmimo-tts-history-link, .xmimo-tts-mode-toggle) {\n padding-inline: 6px\n }\n}\n\n@media (pointer: coarse) {\n .xmimo-ui-scope .xmimo-tts-action-button {\n min-height: 44px\n }\n}\n";
|
|
21611
|
+
var card_actions_default = "/*\n * Settings card action bar: update, star, discard, and save.\n */\n\n.xmimo-tts-card-footer {\n min-width: 0;\n container: xmimo-actions / inline-size\n}\n\n.xmimo-tts-card-actions {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px;\n font-size: 12px;\n color: var(--xmimo-ui-text-subtle)\n}\n\n.xmimo-tts-card-action-links {\n display: flex;\n min-width: 0;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-start;\n gap: inherit\n}\n\n/* Reserve one column for both actions, even inside a narrow host panel. */\n.xmimo-tts-card-action-buttons {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: inherit\n}\n\n.xmimo-tts-card-actions > span {\n grid-column: 1 / -1;\n order: -1;\n text-align: end\n}\n\n.xmimo-tts-card-actions :is(button, a),\n.xmimo-ui-scope .xmimo-tts-action-button {\n box-sizing: border-box;\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n gap: 4px;\n min-height: 30px;\n height: auto;\n border: 1px solid var(--xmimo-ui-border);\n border-radius: 8px;\n padding: 5px 10px;\n color: var(--xmimo-ui-text);\n background: var(--xmimo-ui-surface);\n cursor: pointer;\n font: inherit;\n font-weight: 500;\n line-height: 18px;\n text-decoration: none;\n white-space: nowrap;\n transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease\n}\n\n.xmimo-tts-card-actions :is(button, a):where(:hover, :focus-visible):not(:disabled),\n.xmimo-ui-scope .xmimo-tts-action-button:where(:hover, :focus-visible):not(:disabled) {\n border-color: var(--xmimo-ui-brand);\n background: var(--xmimo-ui-hover);\n text-decoration: none\n}\n\n.xmimo-tts-card-actions :is(button, a):focus-visible,\n.xmimo-ui-scope .xmimo-tts-action-button:focus-visible {\n outline: var(--xmimo-ui-focus);\n outline-offset: 3px\n}\n\n.xmimo-tts-card-actions button:disabled,\n.xmimo-ui-scope .xmimo-tts-action-button:disabled {\n border-color: var(--xmimo-ui-border);\n color: var(--xmimo-ui-text-muted);\n background: var(--xmimo-ui-control-surface);\n cursor: not-allowed;\n opacity: 1\n}\n\n.xmimo-tts-card-actions .xmimo-tts-save {\n border-color: var(--xmimo-ui-brand);\n color: var(--dsw-alias-label-primary-foreground, #fff);\n background: var(--dsw-alias-button-primary-fill, var(--xmimo-ui-brand));\n font-weight: 600\n}\n\n.xmimo-tts-card-actions .xmimo-tts-save:is(:hover, :focus-visible):not(:disabled) {\n background: var(--dsw-alias-button-primary-hover, color-mix(in srgb, var(--xmimo-ui-brand) 85%, var(--xmimo-ui-text)))\n}\n\n.xmimo-tts-card-actions .xmimo-tts-save:disabled {\n border-color: color-mix(in srgb, var(--xmimo-ui-brand) 25%, var(--xmimo-ui-border));\n color: var(--xmimo-ui-text-muted);\n background: color-mix(in srgb, var(--xmimo-ui-brand) 12%, var(--xmimo-ui-surface))\n}\n\n.xmimo-tts-card-actions .xmimo-tts-update {\n color: var(--xmimo-ui-brand)\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star) {\n position: relative;\n isolation: isolate;\n overflow: hidden;\n transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease\n}\n\n.xmimo-tts-card-actions .xmimo-tts-star {\n border: 1px solid color-mix(in srgb, var(--xmimo-ui-brand) 30%, var(--xmimo-ui-border));\n color: var(--xmimo-ui-brand);\n background: transparent;\n font-weight: 600\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star)::before {\n position: absolute;\n z-index: -1;\n inset: 0;\n background: linear-gradient(110deg, transparent 15%, color-mix(in srgb, var(--xmimo-ui-brand) 12%, transparent) 35%, color-mix(in srgb, var(--xmimo-ui-brand) 28%, transparent) 50%, color-mix(in srgb, var(--xmimo-ui-brand) 12%, transparent) 65%, transparent 85%);\n content: '';\n pointer-events: none;\n opacity: 0;\n transform: translateX(-110%)\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star):is(:hover, :focus-visible) {\n border-color: var(--xmimo-ui-brand);\n background: color-mix(in srgb, var(--xmimo-ui-brand) 6%, transparent);\n box-shadow: 0 3px 10px color-mix(in srgb, var(--xmimo-ui-brand) 16%, transparent);\n text-decoration: none;\n transform: translateY(-1px)\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star):is(:hover, :focus-visible)::before {\n opacity: 1;\n animation: xmimo-tts-star-shine 1s ease-in-out infinite\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star):focus-visible {\n outline: var(--xmimo-ui-focus);\n outline-offset: 3px\n}\n\n.xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star):active {\n box-shadow: none;\n transform: translateY(0)\n}\n\n@keyframes xmimo-tts-star-shine {\n 0% { transform: translateX(-110%) }\n 65%, 100% { transform: translateX(110%) }\n}\n\n@container xmimo-actions (max-width: 520px) {\n .xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star, .xmimo-tts-history-link, .xmimo-tts-mode-toggle) {\n position: relative;\n padding-inline: 8px\n }\n\n .xmimo-tts-card-actions .xmimo-tts-action-label {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0\n }\n}\n\n@container xmimo-actions (max-width: 360px) {\n .xmimo-tts-card-actions {\n gap: 6px\n }\n\n .xmimo-tts-card-actions :is(.xmimo-tts-update, .xmimo-tts-star, .xmimo-tts-history-link, .xmimo-tts-mode-toggle) {\n padding-inline: 6px\n }\n}\n\n@media (pointer: coarse) {\n .xmimo-ui-scope .xmimo-tts-action-button {\n min-height: 44px\n }\n}\n";
|
|
21520
21612
|
|
|
21521
21613
|
//#endregion
|
|
21522
21614
|
//#region src/client/style/character.css?raw
|
|
@@ -21528,7 +21620,7 @@ var details_default = "/*\n * Voice-design details module: collapsible header, s
|
|
|
21528
21620
|
|
|
21529
21621
|
//#endregion
|
|
21530
21622
|
//#region src/client/style/preview.css?raw
|
|
21531
|
-
var preview_default = "/* Broadcast Desk shares the collapsible frame with the mixer and sounds. */\n.xmimo-tts-broadcast[data-dsh-dream-skin-composer=\"1\"] {\n background: var(--xmimo-ui-surface) !important;\n outline: none !important;\n}\n.my-plugin-card[data-dsh-dream-skin-composer=\"1\"]::before,\n.my-plugin-card[data-dsh-dream-skin-composer=\"1\"]::after {\n content: none !important;\n background: none !important;\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n box-shadow: none !important;\n}\n.xmimo-tts-broadcast + .xmimo-tts-card-actions { border-top: 0; }\n.xmimo-tts-broadcast { padding: 0 !important; }\n\n.xmimo-tts-broadcast .xmimo-tts-preview-tag {\n position: relative;\n z-index:
|
|
21623
|
+
var preview_default = "/* Broadcast Desk shares the collapsible frame with the mixer and sounds. */\n.xmimo-tts-broadcast[data-dsh-dream-skin-composer=\"1\"] {\n background: var(--xmimo-ui-surface) !important;\n outline: none !important;\n}\n.my-plugin-card[data-dsh-dream-skin-composer=\"1\"]::before,\n.my-plugin-card[data-dsh-dream-skin-composer=\"1\"]::after {\n content: none !important;\n background: none !important;\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n box-shadow: none !important;\n}\n.xmimo-tts-broadcast + .xmimo-tts-card-actions { border-top: 0; }\n.xmimo-tts-broadcast { padding: 0 !important; }\n\n.xmimo-tts-broadcast .xmimo-tts-preview-tag {\n position: relative;\n z-index: 2;\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: 3px;\n border: 0;\n border-radius: 999px;\n padding: 1px 7px;\n color: var(--xmimo-ui-brand);\n background: var(--xmimo-ui-chip-surface);\n font: inherit;\n font-size: 11px;\n font-weight: 600;\n line-height: 16px;\n white-space: nowrap;\n cursor: pointer;\n}\n.xmimo-tts-preview-tag svg { width: 12px; height: 12px; }\n.xmimo-tts-preview-tag:hover:not(:disabled) { background: var(--xmimo-ui-hover); }\n.xmimo-tts-preview-tag:focus-visible { outline: var(--xmimo-ui-focus); outline-offset: 2px; }\n.xmimo-tts-preview-tag:disabled { color: var(--xmimo-ui-text-muted); cursor: not-allowed; opacity: .5; }\n.xmimo-tts-preview-summary-status { font-size: 12px; font-weight: 400; line-height: 18px; }\n\n\n.xmimo-tts-broadcast-body {\n display: flex;\n min-height: 0;\n overflow: hidden;\n flex-direction: column;\n gap: 18px;\n padding: 0 var(--xmimo-ui-module-padding) var(--xmimo-ui-module-padding);\n}\n\n.xmimo-tts-preview-input { display: flex; align-items: center; gap: 8px; margin-top: 8px; }\n.xmimo-tts-preview-input > textarea {\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n flex: 1;\n resize: vertical;\n border: 1px solid var(--xmimo-ui-border);\n border-radius: var(--xmimo-ui-control-radius);\n padding: 8px;\n color: var(--xmimo-ui-text);\n background: var(--xmimo-ui-control-surface);\n font: inherit;\n}\n.xmimo-tts-broadcast .xmimo-tts-preview-toggle {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 32px;\n height: 32px;\n min-width: 32px;\n padding: 0;\n border: 0;\n border-radius: 50%;\n color: var(--dsw-alias-label-primary-foreground, var(--xmimo-ui-surface));\n background: var(--xmimo-ui-brand);\n}\n.xmimo-tts-broadcast .xmimo-tts-preview-toggle:hover:not(:disabled) { background: color-mix(in srgb, var(--xmimo-ui-brand) 88%, var(--xmimo-ui-text)); }\n.xmimo-tts-broadcast .xmimo-tts-preview-toggle:focus-visible { outline: var(--xmimo-ui-focus); outline-offset: 2px; }\n.xmimo-tts-preview-status, .xmimo-tts-announcement-source small { color: var(--xmimo-ui-text-muted); }\n.xmimo-tts-announcement-source { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--xmimo-ui-border-soft); }\n.xmimo-tts-announcement-source > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }\n.xmimo-tts-announcement-source a { align-self: flex-start; color: var(--xmimo-ui-brand); }\n.xmimo-tts-announcement-source > button { flex-shrink: 0; }\n.xmimo-tts-preview-input > textarea:focus-visible { outline: var(--xmimo-ui-focus); }\n";
|
|
21532
21624
|
|
|
21533
21625
|
//#endregion
|
|
21534
21626
|
//#region src/client/style/sections.css?raw
|
|
@@ -21544,7 +21636,7 @@ var volume_default = "/*\n * Volume controls: sound volume rows and the energy s
|
|
|
21544
21636
|
|
|
21545
21637
|
//#endregion
|
|
21546
21638
|
//#region src/client/style/voice-reading.css?raw
|
|
21547
|
-
var voice_reading_default = "/**\n * Voice reading settings section — standalone page registered through the host\n * `settings.section` slot. All selectors are prefixed `xmimo-voice-reading`;\n * tokens mirror the host settings chrome with literal fallbacks.\n */\n\n.xmimo-voice-reading {\n position: relative;\n isolation: isolate;\n display: flex;\n flex-direction: column;\n gap: 12px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.xmimo-voice-reading::after {\n content: '';\n position: absolute;\n z-index: -1;\n top: 50%;\n left: 50%;\n width: min(220px, 60%);\n height: 220px;\n transform: translate(-50%, -50%);\n background: var(--xmimo-voice-reading-background) center / contain no-repeat;\n filter: blur(2px);\n opacity: 0.2;\n pointer-events: none;\n}\n\n/**\n * Title row. The heading takes the free space; the 32px shortcut sits on its\n * right, vertically centered on the 26px title line so the 18px label and the\n * 16px glyph share one optical row.\n */\n.xmimo-voice-reading-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.xmimo-voice-reading-title {\n margin: 0;\n min-width: 0;\n font-size: 18px;\n line-height: 26px;\n font-weight: 600;\n}\n\n.xmimo-voice-reading-actions {\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: 2px;\n}\n\n/** Anchor the QQ capsule to its trigger without adding layout to the row. */\n.xmimo-voice-reading-qq {\n position: relative;\n display: inline-flex;\n flex: none;\n}\n\n/**\n * Icon-only shortcut. A real anchor or button so keyboard and open-in-new-tab\n * semantics stay native; the 32px box is the click target, the 16px glyph the\n * visual. The glyph stays in the neutral secondary label color — the accent is\n * reserved for primary actions, and hover only deepens the neutral plus the\n * module hover surface.\n */\n.xmimo-voice-reading-action {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 32px;\n height: 32px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n cursor: pointer;\n}\n\n/**\n * Keep these shortcuts neutral even when a skin forces an accent on links\n * with !important. Scope the override to the shortcuts and their SVGs so\n * ordinary text links can still use the skin's accent.\n */\n.xmimo-voice-reading-actions .xmimo-voice-reading-action {\n color: var(--dsw-alias-label-secondary, #5f6875) !important;\n}\n\n.xmimo-voice-reading-actions .xmimo-voice-reading-action:hover {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n color: var(--dsw-alias-label-primary, #1f2328) !important;\n}\n\n.xmimo-voice-reading-actions .xmimo-voice-reading-action > svg {\n color: inherit !important;\n}\n\n.xmimo-voice-reading-action:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #4f6ef7));\n outline-offset: 1px;\n}\n\n/**\n * QQ invite capsule. Clicking the icon opens this floating surface with the\n * QR code and group number, keeping it out of the settings rows. It\n * anchors to the right edge of the trigger so it never runs past the panel.\n */\n.xmimo-voice-reading-qq-panel {\n position: absolute;\n z-index: 30;\n top: calc(100% + 8px);\n right: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n box-sizing: border-box;\n width: 222px;\n padding: 12px;\n border: 1px solid var(--dsw-alias-border-l2, #d7dbe2);\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-bg-layer-1, #fff);\n box-shadow: 0 6px 20px rgb(0 0 0 / 14%);\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.xmimo-voice-reading-qq-close {\n position: absolute;\n top: 4px;\n right: 4px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #66707d);\n cursor: pointer;\n}\n\n.xmimo-voice-reading-qq-close:hover {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.xmimo-voice-reading-qq-close:focus-visible,\n.xmimo-voice-reading-qq-panel:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #4f6ef7));\n outline-offset: 1px;\n}\n\n/** The shipped asset already carries its quiet zone and 22px rounded corners. */\n.xmimo-voice-reading-qq-code {\n display: block;\n width: 190px;\n height: 190px;\n margin-top: 8px;\n border-radius: var(--dsw-radius-md, 12px);\n}\n\n.xmimo-voice-reading-qq-meta {\n display: flex;\n align-items: baseline;\n gap: 6px;\n margin-top: 8px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.xmimo-voice-reading-qq-group {\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n}\n\n.xmimo-voice-reading-qq-number {\n color: var(--dsw-alias-label-secondary, #5f6875);\n font-family: inherit;\n font-variant-numeric: tabular-nums;\n}\n\n.xmimo-voice-reading-intro {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px 8px;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-label-tertiary, #66707d);\n}\n\n.xmimo-voice-reading-notice {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #66707d);\n}\n\n.xmimo-voice-reading-link {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex: none;\n padding: 0;\n border: 0;\n border-radius: 2px;\n background: transparent;\n color: var(--dsw-alias-brand-primary, #4f6ef7);\n font: inherit;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.xmimo-voice-reading-link-label {\n text-decoration: underline;\n text-decoration-thickness: 1px;\n text-underline-offset: 3px;\n}\n\n.xmimo-voice-reading-link:hover .xmimo-voice-reading-link-label {\n text-decoration-thickness: 2px;\n}\n\n.xmimo-voice-reading-link:focus-visible {\n outline: 2px solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #4f6ef7));\n outline-offset: 2px;\n}\n\n.xmimo-voice-reading-warning {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n min-height: 36px;\n padding: 4px 8px 4px 12px;\n border: 1px solid color-mix(in srgb, var(--dsw-alias-state-warning-primary, #c58a00) 40%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-warning-primary, #c58a00) 12%, var(--dsw-alias-bg-layer-1, #fff));\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 12px;\n line-height: 20px;\n}\n\n.xmimo-voice-reading-warning-message {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.xmimo-voice-reading-warning-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n.xmimo-voice-reading-warning-close:hover {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n}\n\n.xmimo-voice-reading-warning-close:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #4f6ef7));\n outline-offset: 1px;\n}\n\n.xmimo-voice-reading-failure {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-state-error-primary, #c23f4a);\n}\n\n/**\n * Row stack. The page already sits inside the Host's settings panel, so the\n * card carries no border, radius, or padding of its own: the rows alone draw\n * the Host's hairline separators (same as the Host settings sections).\n */\n.xmimo-voice-reading-card {\n border: 0;\n border-radius: 0;\n padding: 0;\n}\n\n.xmimo-voice-reading-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n padding: 16px 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2, #d7dbe2);\n}\n\n.xmimo-voice-reading-row:last-child {\n border-bottom: 0;\n}\n\n.xmimo-voice-reading-provider {\n min-width: 0;\n margin: 4px 0 0;\n border: 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2, #d7dbe2);\n padding: 0 0 16px;\n}\n\n.xmimo-voice-reading-provider legend {\n padding: 0;\n}\n\n.xmimo-voice-reading-provider-options {\n display: grid;\n margin-top: 12px;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 8px;\n}\n\n.xmimo-voice-reading-provider-option {\n position: relative;\n min-width: 0;\n cursor: pointer;\n}\n\n.xmimo-voice-reading-provider-option input {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: 0;\n opacity: 0;\n}\n\n.xmimo-voice-reading-provider-face {\n display: flex;\n box-sizing: border-box;\n min-height: 64px;\n align-items: center;\n justify-content: center;\n gap: 10px;\n border: 1px solid var(--dsw-alias-border-l2, #d7dbe2);\n border-radius: var(--dsw-radius-md, 12px);\n padding: 12px;\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-bg-module-platform, #eef0f3);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.xmimo-voice-reading-provider-face img {\n flex: none;\n width: 32px;\n height: 32px;\n object-fit: contain;\n}\n\n.xmimo-voice-reading-provider-option input:checked + .xmimo-voice-reading-provider-face {\n border-color: var(--dsw-alias-brand-primary, #4f6ef7);\n}\n\n.xmimo-voice-reading-provider-option:hover input:not(:disabled) + .xmimo-voice-reading-provider-face {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n}\n\n.xmimo-voice-reading-provider-option input:focus-visible + .xmimo-voice-reading-provider-face {\n outline: 2px solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #4f6ef7));\n outline-offset: 2px;\n}\n\n.xmimo-voice-reading-provider-option:has(input:disabled) {\n cursor: default;\n}\n\n.xmimo-voice-reading-provider-option input:disabled + .xmimo-voice-reading-provider-face {\n opacity: 0.5;\n}\n\n@media (max-width: 460px) {\n .xmimo-voice-reading-provider-face {\n gap: 6px;\n padding: 10px 6px;\n font-size: 13px;\n }\n\n .xmimo-voice-reading-provider-face img {\n width: 26px;\n height: 26px;\n }\n}\n\n.xmimo-voice-reading-copy {\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.xmimo-voice-reading-row-title {\n font-size: 14px;\n line-height: 20px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.xmimo-voice-reading-row-hint {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary, #5f6875);\n}\n\n/**\n * Keep the Host's viewport margins below the 300px cap; Menu handles inner\n * scrolling. Repeat the class to override the Host rule in either CSS order.\n */\n.xmimo-voice-reading-menu.xmimo-voice-reading-menu {\n max-height: min(300px, calc(100vh - 12px - max(12px, var(--dsh-frame-overlay-top, 12px))));\n}\n\n/**\n * Capsule selector pill — mirrors the Host settings rows (harness source:\n * packages/client/ui-chat/src/client/settings/PreferenceRow.module.css .selector\n * and packages/client/locale/src/client/LanguageRow.module.css .selector): a\n * borderless 36px pill on the module surface whose chevron sits 12px from the\n * label. The dropdown itself is the Host primitive `Menu`, so the list already\n * matches every other Host menu; only the trigger is ours to style.\n */\n.xmimo-voice-reading-selector {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n flex: none;\n max-width: 260px;\n height: 36px;\n padding: 0 14px;\n border: none;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-bg-module-platform, #eef0f3);\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-label-primary, #1f2328);\n cursor: pointer;\n}\n\n.xmimo-voice-reading-selector:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n}\n\n.xmimo-voice-reading-selector:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #4f6ef7));\n outline-offset: 1px;\n}\n\n.xmimo-voice-reading-selector:disabled {\n color: var(--dsw-alias-label-tertiary, #66707d);\n cursor: default;\n}\n\n.xmimo-voice-reading-selector-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.xmimo-voice-reading-chevron {\n flex: none;\n}\n\n@media (max-width: 375px) {\n .xmimo-voice-reading-row {\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n }\n\n .xmimo-voice-reading-selector {\n align-self: flex-start;\n max-width: 100%;\n }\n\n /**\n * On narrow screens the capsule would start past the left edge when anchored\n * to the trigger's right edge; pin it to the page instead.\n */\n .xmimo-voice-reading-qq-panel {\n position: fixed;\n top: auto;\n right: 12px;\n left: 12px;\n bottom: 12px;\n width: auto;\n max-width: 320px;\n margin-inline: auto;\n }\n}\n\n/**\n * Settings nav glyph: the plugin's own voice icon, RiVoiceAiFill from\n * `react-icons/ri`. The host shell hardcodes the nav glyph per section id and\n * the `settings.section` registration has no icon field (0.2.1-rc.2), so a\n * third-party section always paints the settings gear. settings/nav-icon.ts\n * marks only our own nav cell; these rules paint the plugin icon over that cell\n * (masked so it follows the host's currentColor) while every other entry keeps\n * its host glyph. test/voice-reading-nav-icon.test.mjs pins the path data below\n * to the RiVoiceAiFill source shipped by react-icons.\n */\n[data-xmimo-voice-reading-nav] > svg {\n display: none;\n}\n\n[data-xmimo-voice-reading-nav]::before {\n content: '';\n flex: none;\n width: 16px;\n height: 16px;\n background-color: currentColor;\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M20.7134 7.12811L20.4668 7.69379C20.2864 8.10792 19.7136 8.10792 19.5331 7.69379L19.2866 7.12811C18.8471 6.11947 18.0555 5.31641 17.0677 4.87708L16.308 4.53922C15.8973 4.35653 15.8973 3.75881 16.308 3.57612L17.0252 3.25714C18.0384 2.80651 18.8442 1.97373 19.2761 0.930828L19.5293 0.319534C19.7058 -0.106511 20.2942 -0.106511 20.4706 0.319534L20.7238 0.930828C21.1558 1.97373 21.9616 2.80651 22.9748 3.25714L23.6919 3.57612C24.1027 3.75881 24.1027 4.35653 23.6919 4.53922L22.9323 4.87708C21.9445 5.31641 21.1529 6.11947 20.7134 7.12811ZM8.5 6H6.5V18H8.5V6ZM4 10H2V14H4V10ZM13 2H11V22H13V2ZM17.5 8H15.5V18H17.5V8ZM22 10H20V14H22V10Z'/%3E%3C/svg%3E\");\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-position: center;\n -webkit-mask-size: 16px 16px;\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M20.7134 7.12811L20.4668 7.69379C20.2864 8.10792 19.7136 8.10792 19.5331 7.69379L19.2866 7.12811C18.8471 6.11947 18.0555 5.31641 17.0677 4.87708L16.308 4.53922C15.8973 4.35653 15.8973 3.75881 16.308 3.57612L17.0252 3.25714C18.0384 2.80651 18.8442 1.97373 19.2761 0.930828L19.5293 0.319534C19.7058 -0.106511 20.2942 -0.106511 20.4706 0.319534L20.7238 0.930828C21.1558 1.97373 21.9616 2.80651 22.9748 3.25714L23.6919 3.57612C24.1027 3.75881 24.1027 4.35653 23.6919 4.53922L22.9323 4.87708C21.9445 5.31641 21.1529 6.11947 20.7134 7.12811ZM8.5 6H6.5V18H8.5V6ZM4 10H2V14H4V10ZM13 2H11V22H13V2ZM17.5 8H15.5V18H17.5V8ZM22 10H20V14H22V10Z'/%3E%3C/svg%3E\");\n mask-repeat: no-repeat;\n mask-position: center;\n mask-size: 16px 16px;\n}\n";
|
|
21639
|
+
var voice_reading_default = "/**\n * Voice reading settings section — standalone page registered through the host\n * `settings.section` slot. All selectors are prefixed `xmimo-voice-reading`;\n * tokens mirror the host settings chrome with literal fallbacks.\n */\n\n.xmimo-voice-reading {\n position: relative;\n isolation: isolate;\n display: flex;\n flex-direction: column;\n gap: 12px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.xmimo-voice-reading::after {\n content: '';\n position: absolute;\n z-index: -1;\n top: 50%;\n left: 50%;\n width: min(220px, 60%);\n height: 220px;\n transform: translate(-50%, -50%);\n background: var(--xmimo-voice-reading-background) center / contain no-repeat;\n filter: blur(2px);\n opacity: 0.2;\n pointer-events: none;\n}\n\n/**\n * Title row. The heading takes the free space; the 32px shortcut sits on its\n * right, vertically centered on the 26px title line so the 18px label and the\n * 16px glyph share one optical row.\n */\n.xmimo-voice-reading-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.xmimo-voice-reading-title {\n margin: 0;\n min-width: 0;\n font-size: 18px;\n line-height: 26px;\n font-weight: 600;\n}\n\n.xmimo-voice-reading-actions {\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: 2px;\n}\n\n/** Anchor the QQ capsule to its trigger without adding layout to the row. */\n.xmimo-voice-reading-qq {\n position: relative;\n display: inline-flex;\n flex: none;\n}\n\n/**\n * Icon-only shortcut. A real anchor or button so keyboard and open-in-new-tab\n * semantics stay native; the 32px box is the click target, the 16px glyph the\n * visual. The glyph stays in the neutral secondary label color — the accent is\n * reserved for primary actions, and hover only deepens the neutral plus the\n * module hover surface.\n */\n.xmimo-voice-reading-action {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 32px;\n height: 32px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n cursor: pointer;\n}\n\n/**\n * Keep these shortcuts neutral even when a skin forces an accent on links\n * with !important. Scope the override to the shortcuts and their SVGs so\n * ordinary text links can still use the skin's accent.\n */\n.xmimo-voice-reading-actions .xmimo-voice-reading-action {\n color: var(--dsw-alias-label-secondary, #5f6875) !important;\n}\n\n.xmimo-voice-reading-actions .xmimo-voice-reading-action:hover {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n color: var(--dsw-alias-label-primary, #1f2328) !important;\n}\n\n.xmimo-voice-reading-actions .xmimo-voice-reading-action > svg {\n color: inherit !important;\n}\n\n.xmimo-voice-reading-action:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #4f6ef7));\n outline-offset: 1px;\n}\n\n/**\n * QQ invite capsule. Clicking the icon opens this floating surface with the\n * QR code and group number, keeping it out of the settings rows. It\n * anchors to the right edge of the trigger so it never runs past the panel.\n */\n.xmimo-voice-reading-qq-panel {\n position: absolute;\n z-index: 30;\n top: calc(100% + 8px);\n right: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n box-sizing: border-box;\n width: 222px;\n padding: 12px;\n border: 1px solid var(--dsw-alias-border-l2, #d7dbe2);\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-bg-layer-1, #fff);\n box-shadow: 0 6px 20px rgb(0 0 0 / 14%);\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.xmimo-voice-reading-qq-close {\n position: absolute;\n top: 4px;\n right: 4px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #66707d);\n cursor: pointer;\n}\n\n.xmimo-voice-reading-qq-close:hover {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.xmimo-voice-reading-qq-close:focus-visible,\n.xmimo-voice-reading-qq-panel:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #4f6ef7));\n outline-offset: 1px;\n}\n\n/** The shipped asset already carries its quiet zone and 22px rounded corners. */\n.xmimo-voice-reading-qq-code {\n display: block;\n width: 190px;\n height: 190px;\n margin-top: 8px;\n border-radius: var(--dsw-radius-md, 12px);\n}\n\n.xmimo-voice-reading-qq-meta {\n display: flex;\n align-items: baseline;\n gap: 6px;\n margin-top: 8px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.xmimo-voice-reading-qq-group {\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n}\n\n.xmimo-voice-reading-qq-number {\n color: var(--dsw-alias-label-secondary, #5f6875);\n font-family: inherit;\n font-variant-numeric: tabular-nums;\n}\n\n.xmimo-voice-reading-intro {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 4px 8px;\n margin: 0;\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-label-tertiary, #66707d);\n}\n\n.xmimo-voice-reading-notice {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #66707d);\n}\n\n.xmimo-voice-reading-link {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex: none;\n padding: 0;\n border: 0;\n border-radius: 2px;\n background: transparent;\n color: var(--dsw-alias-brand-primary, #4f6ef7);\n font: inherit;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.xmimo-voice-reading-link-label {\n text-decoration: underline;\n text-decoration-thickness: 1px;\n text-underline-offset: 3px;\n}\n\n.xmimo-voice-reading-link:hover .xmimo-voice-reading-link-label {\n text-decoration-thickness: 2px;\n}\n\n.xmimo-voice-reading-link:focus-visible {\n outline: 2px solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #4f6ef7));\n outline-offset: 2px;\n}\n\n.xmimo-voice-reading-warning {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n min-height: 36px;\n padding: 4px 8px 4px 12px;\n border: 1px solid color-mix(in srgb, var(--dsw-alias-state-warning-primary, #c58a00) 40%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-warning-primary, #c58a00) 12%, var(--dsw-alias-bg-layer-1, #fff));\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 12px;\n line-height: 20px;\n}\n\n.xmimo-voice-reading-warning-message {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.xmimo-voice-reading-warning-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n.xmimo-voice-reading-warning-close:hover {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n}\n\n.xmimo-voice-reading-warning-close:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #4f6ef7));\n outline-offset: 1px;\n}\n\n.xmimo-voice-reading-failure {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-state-error-primary, #c23f4a);\n}\n\n/**\n * Row stack. The page already sits inside the Host's settings panel, so the\n * card carries no border, radius, or padding of its own: the rows alone draw\n * the Host's hairline separators (same as the Host settings sections).\n */\n.xmimo-voice-reading-card {\n border: 0;\n border-radius: 0;\n padding: 0;\n}\n\n.xmimo-voice-reading-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n padding: 16px 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2, #d7dbe2);\n}\n\n.xmimo-voice-reading-row:last-child {\n border-bottom: 0;\n}\n\n.xmimo-voice-reading-provider {\n min-width: 0;\n margin: 4px 0 0;\n border: 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2, #d7dbe2);\n padding: 0 0 16px;\n}\n\n.xmimo-voice-reading-provider legend {\n padding: 0;\n}\n\n.xmimo-voice-reading-provider-options {\n display: grid;\n margin-top: 12px;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 8px;\n}\n\n.xmimo-voice-reading-provider-option {\n position: relative;\n min-width: 0;\n cursor: pointer;\n}\n\n.xmimo-voice-reading-provider-option input {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: 0;\n opacity: 0;\n}\n\n.xmimo-voice-reading-provider-face {\n display: flex;\n box-sizing: border-box;\n min-height: 64px;\n align-items: center;\n justify-content: center;\n gap: 10px;\n border: 1px solid var(--dsw-alias-border-l2, #d7dbe2);\n border-radius: var(--dsw-radius-md, 12px);\n padding: 12px;\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-bg-module-platform, #eef0f3);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.xmimo-voice-reading-provider-face img {\n flex: none;\n width: 32px;\n height: 32px;\n object-fit: contain;\n}\n\n.xmimo-voice-reading-provider-option input:checked + .xmimo-voice-reading-provider-face {\n border-color: var(--dsw-alias-brand-primary, #4f6ef7);\n}\n\n.xmimo-voice-reading-provider-option:hover input:not(:disabled) + .xmimo-voice-reading-provider-face {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n}\n\n.xmimo-voice-reading-provider-option input:focus-visible + .xmimo-voice-reading-provider-face {\n outline: 2px solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary, #4f6ef7));\n outline-offset: 2px;\n}\n\n.xmimo-voice-reading-provider-option:has(input:disabled) {\n cursor: default;\n}\n\n.xmimo-voice-reading-provider-option input:disabled + .xmimo-voice-reading-provider-face {\n opacity: 0.5;\n}\n\n@media (max-width: 460px) {\n .xmimo-voice-reading-provider-face {\n gap: 6px;\n padding: 10px 6px;\n font-size: 13px;\n }\n\n .xmimo-voice-reading-provider-face img {\n width: 26px;\n height: 26px;\n }\n}\n\n.xmimo-voice-reading-copy {\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.xmimo-voice-reading-row-title {\n font-size: 14px;\n line-height: 20px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.xmimo-voice-reading-row-hint {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary, #5f6875);\n}\n\n/**\n * Keep the Host's viewport margins below the 300px cap; Menu handles inner\n * scrolling. Repeat the class to override the Host rule in either CSS order.\n */\n.xmimo-voice-reading-menu.xmimo-voice-reading-menu {\n max-height: min(300px, calc(100vh - 12px - max(12px, var(--dsh-frame-overlay-top, 12px))));\n}\n\n/**\n * Capsule selector pill — mirrors the Host settings rows (harness source:\n * packages/client/ui-chat/src/client/settings/PreferenceRow.module.css .selector\n * and packages/client/locale/src/client/LanguageRow.module.css .selector): a\n * borderless 36px pill on the module surface whose chevron sits 12px from the\n * label. The dropdown itself is the Host primitive `Menu`, so the list already\n * matches every other Host menu; only the trigger is ours to style.\n */\n.xmimo-voice-reading-selector {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n flex: none;\n max-width: 260px;\n height: 36px;\n padding: 0 14px;\n border: none;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-bg-module-platform, #eef0f3);\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-label-primary, #1f2328);\n cursor: pointer;\n}\n\n.xmimo-voice-reading-selector:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, #e4e7eb);\n}\n\n.xmimo-voice-reading-selector:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary, #4f6ef7));\n outline-offset: 1px;\n}\n\n.xmimo-voice-reading-selector:disabled {\n color: var(--dsw-alias-label-tertiary, #66707d);\n cursor: default;\n}\n\n.xmimo-voice-reading-selector-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.xmimo-voice-reading-chevron {\n flex: none;\n}\n\n@media (max-width: 300px) {\n .xmimo-voice-reading-row {\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n }\n\n .xmimo-voice-reading-selector {\n align-self: flex-start;\n max-width: 100%;\n }\n\n /**\n * On narrow screens the capsule would start past the left edge when anchored\n * to the trigger's right edge; pin it to the page instead.\n */\n .xmimo-voice-reading-qq-panel {\n position: fixed;\n top: auto;\n right: 12px;\n left: 12px;\n bottom: 12px;\n width: auto;\n max-width: 320px;\n margin-inline: auto;\n }\n}\n\n/**\n * Settings nav glyph: the plugin's own voice icon, RiVoiceAiFill from\n * `react-icons/ri`. The host shell hardcodes the nav glyph per section id and\n * the `settings.section` registration has no icon field (0.2.1-rc.2), so a\n * third-party section always paints the settings gear. settings/nav-icon.ts\n * marks only our own nav cell; these rules paint the plugin icon over that cell\n * (masked so it follows the host's currentColor) while every other entry keeps\n * its host glyph. test/voice-reading-nav-icon.test.mjs pins the path data below\n * to the RiVoiceAiFill source shipped by react-icons.\n */\n[data-xmimo-voice-reading-nav] > svg {\n display: none;\n}\n\n[data-xmimo-voice-reading-nav]::before {\n content: '';\n flex: none;\n width: 16px;\n height: 16px;\n background-color: currentColor;\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M20.7134 7.12811L20.4668 7.69379C20.2864 8.10792 19.7136 8.10792 19.5331 7.69379L19.2866 7.12811C18.8471 6.11947 18.0555 5.31641 17.0677 4.87708L16.308 4.53922C15.8973 4.35653 15.8973 3.75881 16.308 3.57612L17.0252 3.25714C18.0384 2.80651 18.8442 1.97373 19.2761 0.930828L19.5293 0.319534C19.7058 -0.106511 20.2942 -0.106511 20.4706 0.319534L20.7238 0.930828C21.1558 1.97373 21.9616 2.80651 22.9748 3.25714L23.6919 3.57612C24.1027 3.75881 24.1027 4.35653 23.6919 4.53922L22.9323 4.87708C21.9445 5.31641 21.1529 6.11947 20.7134 7.12811ZM8.5 6H6.5V18H8.5V6ZM4 10H2V14H4V10ZM13 2H11V22H13V2ZM17.5 8H15.5V18H17.5V8ZM22 10H20V14H22V10Z'/%3E%3C/svg%3E\");\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-position: center;\n -webkit-mask-size: 16px 16px;\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M20.7134 7.12811L20.4668 7.69379C20.2864 8.10792 19.7136 8.10792 19.5331 7.69379L19.2866 7.12811C18.8471 6.11947 18.0555 5.31641 17.0677 4.87708L16.308 4.53922C15.8973 4.35653 15.8973 3.75881 16.308 3.57612L17.0252 3.25714C18.0384 2.80651 18.8442 1.97373 19.2761 0.930828L19.5293 0.319534C19.7058 -0.106511 20.2942 -0.106511 20.4706 0.319534L20.7238 0.930828C21.1558 1.97373 21.9616 2.80651 22.9748 3.25714L23.6919 3.57612C24.1027 3.75881 24.1027 4.35653 23.6919 4.53922L22.9323 4.87708C21.9445 5.31641 21.1529 6.11947 20.7134 7.12811ZM8.5 6H6.5V18H8.5V6ZM4 10H2V14H4V10ZM13 2H11V22H13V2ZM17.5 8H15.5V18H17.5V8ZM22 10H20V14H22V10Z'/%3E%3C/svg%3E\");\n mask-repeat: no-repeat;\n mask-position: center;\n mask-size: 16px 16px;\n}\n";
|
|
21548
21640
|
|
|
21549
21641
|
//#endregion
|
|
21550
21642
|
//#region src/client/style/responsive.css?raw
|
|
@@ -21556,7 +21648,7 @@ var motion_default = "/*\n * Reduced-motion overrides (@media prefers-reduced-mo
|
|
|
21556
21648
|
|
|
21557
21649
|
//#endregion
|
|
21558
21650
|
//#region src/client/style/global.css?raw
|
|
21559
|
-
var global_default = "/*\n * Project-wide UI system for the Xiaomi MiMo settings card.\n * Start here when adjusting layout or visual rhythm. Component-specific artwork,\n * animations, and picker styles live in the sibling *.css modules; shared dimensions\n * and module structure belong here so every settings module stays visually consistent.\n */\n\n/* ---------- Design tokens ---------- */\n.xmimo-ui-scope {\n --xmimo-ui-space-1: 4px;\n --xmimo-ui-space-2: 6px;\n --xmimo-ui-space-3: 8px;\n --xmimo-ui-space-4: 10px;\n --xmimo-ui-space-5: 12px;\n\n --xmimo-ui-module-gap: var(--xmimo-ui-space-3);\n --xmimo-ui-module-padding: var(--xmimo-ui-space-4);\n --xmimo-ui-module-radius: 12px;\n --xmimo-ui-control-radius: 9px;\n --xmimo-ui-control-height: 34px;\n --xmimo-ui-summary-height: 34px;\n --xmimo-ui-mascot-size: 56px;\n\n --xmimo-ui-text: var(--dsw-alias-label-primary, #1f2328);\n --xmimo-ui-text-muted: var(--dsw-alias-label-secondary, #5f6875);\n --xmimo-ui-text-subtle: var(--dsw-alias-label-tertiary, #8b93a1);\n --xmimo-ui-brand: var(--dsw-alias-brand-primary, #4f6ef7);\n --xmimo-ui-border: var(--dsw-alias-border-l2, #d7dbe2);\n --xmimo-ui-border-soft: var(--dsw-alias-border-l2, #e5e7eb);\n --xmimo-ui-surface: var(--dsw-alias-bg-layer-1, #fff);\n --xmimo-ui-control-surface: var(--dsw-alias-bg-layer-2, #f3f4f6);\n --xmimo-ui-chip-surface: var(--dsw-alias-bg-module-platform, #eef0f3);\n --xmimo-ui-hover: var(--dsw-alias-interactive-bg-hover, #f3f4f6);\n --xmimo-ui-focus: 2px solid var(--xmimo-ui-brand);\n}\n\n/* ---------- Layout primitives ---------- */\n.xmimo-ui-stack {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: var(--xmimo-ui-module-gap);\n}\n\n.xmimo-ui-grid {\n display: grid;\n min-width: 0;\n}\n\n.xmimo-ui-row {\n display: flex;\n min-width: 0;\n gap: var(--xmimo-ui-module-gap);\n}\n\n/* The stack owns vertical rhythm; modules no longer negotiate margins. */\n.xmimo-ui-stack > * {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n/* ---------- Shared settings module ---------- */\n.xmimo-ui-module {\n box-sizing: border-box;\n position: relative;\n min-width: 0;\n overflow: visible;\n border: 1px solid var(--xmimo-ui-border);\n border-radius: var(--xmimo-ui-module-radius);\n color: var(--xmimo-ui-text);\n background: var(--xmimo-ui-surface);\n}\n\n.xmimo-ui-module-padded {\n padding: var(--xmimo-ui-module-padding) !important;\n}\n\n.xmimo-ui-module-header {\n position: relative;\n min-width: 0;\n}\n\n.xmimo-ui-module-decoration {\n position: static;\n}\n\n.xmimo-ui-module-toggle-static {\n padding: 0 !important;\n cursor: default;\n}\n\n.xmimo-ui-module-toggle-static:hover {\n background: transparent !important;\n}\n\n\n.xmimo-ui-module-heading,\n.xmimo-ui-module-heading > strong,\n.xmimo-ui-module-heading .xmimo-ui-module-title-toggle,\n.xmimo-ui-module-heading .xmimo-ui-module-title-toggle > strong,\n.xmimo-ui-module > .xmimo-tts-field-heading .xmimo-tts-field-label > span:first-child {\n color: var(--xmimo-ui-text);\n font-size: 14px;\n font-weight: 650;\n line-height: 20px;\n}\n\n/* ---------- Collapsible module header ---------- */\n.xmimo-ui-module-title {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n vertical-align: middle;\n}\n\n.xmimo-ui-module-title > svg {\n flex: none;\n width: 14px;\n height: 14px;\n color: var(--xmimo-ui-brand);\n}\n\n.xmimo-ui-module-toggle {\n box-sizing: border-box;\n display: flex;\n width: 100%;\n min-height: 0;\n align-items: flex-start;\n border: 0;\n border-radius: calc(var(--xmimo-ui-module-radius) - 1px);\n padding: var(--xmimo-ui-module-padding);\n color: var(--xmimo-ui-text);\n background: transparent;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.xmimo-ui-module-toggle:hover {\n background: var(--xmimo-ui-hover);\n}\n\n.xmimo-ui-module-toggle:focus-visible {\n outline: var(--xmimo-ui-focus);\n outline-offset: -2px;\n}\n\n/* Interactive summaries sit beside a trigger whose hit area fills the header. */\n.xmimo-ui-
|
|
21651
|
+
var global_default = "/*\n * Project-wide UI system for the Xiaomi MiMo settings card.\n * Start here when adjusting layout or visual rhythm. Component-specific artwork,\n * animations, and picker styles live in the sibling *.css modules; shared dimensions\n * and module structure belong here so every settings module stays visually consistent.\n */\n\n/* ---------- Design tokens ---------- */\n.xmimo-ui-scope {\n --xmimo-ui-space-1: 4px;\n --xmimo-ui-space-2: 6px;\n --xmimo-ui-space-3: 8px;\n --xmimo-ui-space-4: 10px;\n --xmimo-ui-space-5: 12px;\n\n --xmimo-ui-module-gap: var(--xmimo-ui-space-3);\n --xmimo-ui-module-padding: var(--xmimo-ui-space-4);\n --xmimo-ui-module-radius: 12px;\n --xmimo-ui-control-radius: 9px;\n --xmimo-ui-control-height: 34px;\n --xmimo-ui-summary-height: 34px;\n --xmimo-ui-mascot-size: 56px;\n\n --xmimo-ui-text: var(--dsw-alias-label-primary, #1f2328);\n --xmimo-ui-text-muted: var(--dsw-alias-label-secondary, #5f6875);\n --xmimo-ui-text-subtle: var(--dsw-alias-label-tertiary, #8b93a1);\n --xmimo-ui-brand: var(--dsw-alias-brand-primary, #4f6ef7);\n --xmimo-ui-border: var(--dsw-alias-border-l2, #d7dbe2);\n --xmimo-ui-border-soft: var(--dsw-alias-border-l2, #e5e7eb);\n --xmimo-ui-surface: var(--dsw-alias-bg-layer-1, #fff);\n --xmimo-ui-control-surface: var(--dsw-alias-bg-layer-2, #f3f4f6);\n --xmimo-ui-chip-surface: var(--dsw-alias-bg-module-platform, #eef0f3);\n --xmimo-ui-hover: var(--dsw-alias-interactive-bg-hover, #f3f4f6);\n --xmimo-ui-focus: 2px solid var(--xmimo-ui-brand);\n}\n\n/* ---------- Layout primitives ---------- */\n.xmimo-ui-stack {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: var(--xmimo-ui-module-gap);\n}\n\n.xmimo-ui-grid {\n display: grid;\n min-width: 0;\n}\n\n.xmimo-ui-row {\n display: flex;\n min-width: 0;\n gap: var(--xmimo-ui-module-gap);\n}\n\n/* The stack owns vertical rhythm; modules no longer negotiate margins. */\n.xmimo-ui-stack > * {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n/* ---------- Shared settings module ---------- */\n.xmimo-ui-module {\n box-sizing: border-box;\n position: relative;\n min-width: 0;\n overflow: visible;\n border: 1px solid var(--xmimo-ui-border);\n border-radius: var(--xmimo-ui-module-radius);\n color: var(--xmimo-ui-text);\n background: var(--xmimo-ui-surface);\n}\n\n.xmimo-ui-module-padded {\n padding: var(--xmimo-ui-module-padding) !important;\n}\n\n.xmimo-ui-module-header {\n position: relative;\n min-width: 0;\n}\n\n.xmimo-ui-module-decoration {\n position: static;\n}\n\n.xmimo-ui-module-toggle-static {\n padding: 0 !important;\n cursor: default;\n}\n\n.xmimo-ui-module-toggle-static:hover {\n background: transparent !important;\n}\n\n\n.xmimo-ui-module-heading,\n.xmimo-ui-module-heading > strong,\n.xmimo-ui-module-heading .xmimo-ui-module-title-toggle,\n.xmimo-ui-module-heading .xmimo-ui-module-title-toggle > strong,\n.xmimo-ui-module > .xmimo-tts-field-heading .xmimo-tts-field-label > span:first-child {\n color: var(--xmimo-ui-text);\n font-size: 14px;\n font-weight: 650;\n line-height: 20px;\n}\n\n/* ---------- Collapsible module header ---------- */\n.xmimo-ui-module-title {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n vertical-align: middle;\n}\n\n.xmimo-ui-module-title > svg {\n flex: none;\n width: 14px;\n height: 14px;\n color: var(--xmimo-ui-brand);\n}\n\n.xmimo-ui-module-toggle {\n box-sizing: border-box;\n display: flex;\n width: 100%;\n min-height: 0;\n align-items: flex-start;\n border: 0;\n border-radius: calc(var(--xmimo-ui-module-radius) - 1px);\n padding: var(--xmimo-ui-module-padding);\n color: var(--xmimo-ui-text);\n background: transparent;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.xmimo-ui-module-toggle:hover {\n background: var(--xmimo-ui-hover);\n}\n\n.xmimo-ui-module-toggle:focus-visible {\n outline: var(--xmimo-ui-focus);\n outline-offset: -2px;\n}\n\n/* Interactive summaries sit beside a trigger whose hit area fills the header. */\n.xmimo-ui-interactive-heading {\n min-height: 20px;\n}\n\n.xmimo-ui-module-title-toggle {\n box-sizing: border-box;\n position: absolute;\n z-index: 1;\n inset: 0;\n width: 100%;\n border: 0;\n border-radius: calc(var(--xmimo-ui-module-radius) - 1px);\n padding: var(--xmimo-ui-module-padding);\n color: inherit;\n background: transparent;\n font: inherit;\n text-align: inherit;\n display: flex;\n align-items: flex-start;\n cursor: pointer;\n}\n\n.xmimo-ui-module-title-toggle:focus-visible {\n outline: var(--xmimo-ui-focus);\n outline-offset: -2px;\n}\n\n.xmimo-ui-module-head {\n box-sizing: border-box;\n display: flex;\n min-width: 0;\n width: 100%;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--xmimo-ui-space-1);\n}\n\n.xmimo-ui-summary {\n box-sizing: border-box;\n display: flex;\n width: 100%;\n min-width: 0;\n min-height: var(--xmimo-ui-summary-height);\n align-items: center;\n gap: 6px;\n overflow: hidden;\n border: 1px solid var(--xmimo-ui-border);\n border-radius: var(--xmimo-ui-control-radius);\n padding: 6px 6px 6px var(--xmimo-ui-space-2);\n background: var(--xmimo-ui-control-surface);\n}\n\n.xmimo-ui-summary > span {\n overflow: hidden;\n min-width: 0;\n max-width: 150px;\n flex: 0 1 auto;\n border-radius: 999px;\n padding: 1px 7px;\n color: var(--xmimo-ui-text-muted);\n background: var(--xmimo-ui-chip-surface);\n font-size: 11px;\n font-weight: 500;\n line-height: 16px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.xmimo-ui-module-body {\n box-sizing: border-box;\n min-width: 0;\n}\n\n/* ---------- Shared fields and controls ---------- */\n.xmimo-ui-module input:not([type='checkbox']):not([type='radio']):not([type='range']),\n.xmimo-ui-module select,\n.xmimo-ui-module textarea {\n border-color: var(--xmimo-ui-border);\n border-radius: var(--xmimo-ui-control-radius);\n color: var(--xmimo-ui-text);\n background: var(--xmimo-ui-control-surface);\n}\n\n.xmimo-ui-module input:not([type='checkbox']):not([type='radio']):not([type='range']),\n.xmimo-ui-module select {\n min-height: var(--xmimo-ui-control-height);\n}\n\n.xmimo-ui-module input:focus-visible,\n.xmimo-ui-module select:focus-visible,\n.xmimo-ui-module textarea:focus-visible {\n outline: var(--xmimo-ui-focus);\n outline-offset: 1px;\n}\n/* ---------- Module-specific placement using shared dimensions ---------- */\n.xmimo-ui-module .xmimo-tts-api-key-whale {\n width: var(--xmimo-ui-mascot-size);\n height: var(--xmimo-ui-mascot-size);\n}\n\n.xmimo-ui-module .xmimo-tts-details-body > * {\n padding-right: var(--xmimo-ui-module-padding);\n padding-left: var(--xmimo-ui-module-padding);\n}\n\n.xmimo-ui-module .xmimo-tts-sound-body {\n gap: var(--xmimo-ui-space-3);\n padding: 6px var(--xmimo-ui-module-padding) var(--xmimo-ui-module-padding);\n}\n\n@media (max-width: 480px) {\n .xmimo-ui-scope {\n --xmimo-ui-module-padding: 12px;\n --xmimo-ui-mascot-size: 52px;\n }\n\n .xmimo-ui-summary > span {\n max-width: 100px;\n padding-right: 6px;\n padding-left: 6px;\n }\n}\n";
|
|
21560
21652
|
|
|
21561
21653
|
//#endregion
|
|
21562
21654
|
//#region src/client/style/minimal.css?raw
|
|
@@ -21564,7 +21656,7 @@ var minimal_default = ".xmimo-tts-switch-module-minimal {\n padding: var(--xmim
|
|
|
21564
21656
|
|
|
21565
21657
|
//#endregion
|
|
21566
21658
|
//#region src/client/style/history.css?raw
|
|
21567
|
-
var history_default = "/* History is a standalone compact page, independent of the settings appearance. */\n.xmimo-tts-history-page {\n container: xmimo-audio-history / inline-size;\n display: flex;\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n max-height: min(80dvh, 760px);\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--xmimo-ui-border);\n border-radius: var(--xmimo-ui-module-radius);\n padding: 12px;\n color: var(--xmimo-ui-text);\n background: var(--xmimo-ui-surface);\n font-size: 14px;\n line-height: 1.5;\n}\n\n.xmimo-tts-history-header,\n.xmimo-tts-history-toolbar,\n.xmimo-tts-history-storage,\n.xmimo-tts-history-actions,\n.xmimo-tts-history-player-controls { display: flex; min-width: 0; align-items: center; gap: 8px; }\n.xmimo-tts-history-header { flex: none; justify-content: space-between;
|
|
21659
|
+
var history_default = "/* History is a standalone compact page, independent of the settings appearance. */\n.xmimo-tts-history-page {\n container: xmimo-audio-history / inline-size;\n display: flex;\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n max-height: min(80dvh, 760px);\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--xmimo-ui-border);\n border-radius: var(--xmimo-ui-module-radius);\n padding: 12px;\n color: var(--xmimo-ui-text);\n background: var(--xmimo-ui-surface);\n font-size: 14px;\n line-height: 1.5;\n}\n\n.xmimo-tts-history-header,\n.xmimo-tts-history-toolbar,\n.xmimo-tts-history-storage,\n.xmimo-tts-history-actions,\n.xmimo-tts-history-player-controls { display: flex; min-width: 0; align-items: center; gap: 8px; }\n.xmimo-tts-history-header { flex: none; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--xmimo-ui-border); }\n.xmimo-tts-history-header h2 { flex: none; margin: 0; font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 6px; }\n.xmimo-tts-history-header .xmimo-tts-history-title-back { display: inline-flex; flex: none; align-items: center; gap: 4px; border: 0; border-radius: 6px; padding: 0 4px 0 0; color: var(--xmimo-ui-brand); background: transparent; font: inherit; cursor: pointer; }\n.xmimo-tts-history-title-back > svg { flex: none; }\n.xmimo-tts-history-title-back:hover { background: var(--xmimo-ui-hover); }\n.xmimo-tts-history-count { font-size: 12px; font-weight: 400; color: var(--xmimo-ui-text-muted); flex: none; }\n.xmimo-tts-history-toolbar { flex: 0 1 460px; justify-content: flex-end; margin-inline-start: auto; }\n.xmimo-tts-history-search { flex: 1 1 150px; min-width: 0; }\n.xmimo-tts-history-search input { width: 100%; min-width: 0; }\n.xmimo-tts-history-source { display: flex; min-width: 0; flex: 0 1 auto; }\n.xmimo-tts-history-source .xmimo-voice-reading-selector { min-width: 0; max-width: 170px; }\n.xmimo-tts-history-page .xmimo-tts-history-action { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }\n.xmimo-tts-history-action > svg { flex: none; width: 16px; height: 16px; }\n.xmimo-tts-history-footer { display: flex; flex: none; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; border-top: 1px solid var(--xmimo-ui-border); padding-top: 10px; }\n.xmimo-tts-history-storage { flex: 1; min-width: 0; color: var(--xmimo-ui-text-muted); font-size: 12px; }\n.xmimo-tts-history-storage > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-inline-end: 10px; font-weight: 500; }\n.xmimo-tts-history-limit { white-space: nowrap; }\n.xmimo-tts-history-warning { flex: none; margin: 0 0 8px; color: var(--xmimo-ui-text); background: var(--xmimo-ui-control-surface); border-inline-start: 3px solid var(--xmimo-ui-brand); padding: 6px 8px; font-size: 12px; }\n.xmimo-tts-history-results { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }\n.xmimo-tts-history-list { list-style: none; margin: 0; padding: 0; }\n.xmimo-tts-history-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-top: 1px solid var(--xmimo-ui-border-soft); padding: 5px; }\n.xmimo-tts-history-row-selected { background: var(--xmimo-ui-control-surface); border-inline-start: 2px solid var(--xmimo-ui-brand); padding-inline-start: 2px; }\n.xmimo-tts-history-copy { min-width: 0; }\n.xmimo-tts-history-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; border: 0; padding: 0; overflow: hidden; overflow-wrap: anywhere; text-align: start; color: var(--xmimo-ui-text); background: transparent; font: inherit; font-size: 14px; line-height: 1.5; cursor: pointer; }\n.xmimo-tts-history-text-expanded { display: block; }\n.xmimo-tts-history-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--xmimo-ui-text-muted); font-size: 12px; line-height: 1.6; margin: 4px 0 0; }\n.xmimo-tts-history-page .xmimo-tts-history-confirm-delete { color: var(--dsw-alias-state-error-primary, #dc2626); background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #dc2626) 10%, transparent); }\n.xmimo-tts-history-page .xmimo-tts-history-confirm-delete:hover:not(:disabled) { background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #dc2626) 18%, transparent); }\n.xmimo-tts-history-empty { padding: 28px 12px; color: var(--xmimo-ui-text-muted); text-align: center; }\n.xmimo-tts-history-empty-whale { display: block; width: 144px; height: 144px; max-width: 100%; object-fit: contain; margin: 0 auto 12px; }\n.xmimo-tts-history-empty p { margin: 0; }\n.xmimo-tts-history-player { display: flex; flex-direction: column; min-width: 0; margin-top: 4px; gap: 4px; }\n.xmimo-tts-history-page .xmimo-tts-history-player-toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; width: 32px; height: 32px; min-width: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--xmimo-ui-brand); color: var(--dsw-alias-label-primary-foreground, var(--xmimo-ui-surface)); }\n.xmimo-tts-history-page .xmimo-tts-history-player-toggle:hover:not(:disabled) { background: color-mix(in srgb, var(--xmimo-ui-brand) 88%, var(--xmimo-ui-text)); }\n.xmimo-tts-history-player-controls { gap: 6px; flex: none; width: 100%; }\n.xmimo-tts-history-player-controls input[type='range'] { appearance: none; -webkit-appearance: none; flex: 1 1 auto; min-width: 30px; width: 100%; height: 20px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }\n.xmimo-tts-history-player-controls input[type='range']::-webkit-slider-runnable-track { height: 3px; border-radius: 8px; background: linear-gradient(to right, var(--xmimo-ui-brand) 0% var(--xmimo-history-progress), var(--xmimo-ui-border) var(--xmimo-history-progress) 100%); }\n.xmimo-tts-history-player-controls input[type='range']::-moz-range-track { height: 3px; border-radius: 8px; background: var(--xmimo-ui-border); }\n.xmimo-tts-history-player-controls input[type='range']::-moz-range-progress { height: 3px; border-radius: 8px; background: var(--xmimo-ui-brand); }\n.xmimo-tts-history-player-controls input[type='range']::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 10px; height: 10px; margin-top: -3.5px; border: 0; border-radius: 50%; background: var(--xmimo-ui-brand); }\n.xmimo-tts-history-player-controls input[type='range']::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--xmimo-ui-brand); }\n.xmimo-tts-history-player-controls input[type='range']:disabled { opacity: 0.5; cursor: default; }\n.xmimo-tts-history-time { flex: none; white-space: nowrap; color: var(--xmimo-ui-text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }\n.xmimo-tts-history-player-error { display: block; margin: 0; font-size: 11px; }\n.xmimo-tts-history-player-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }\n.xmimo-tts-history-page button { min-height: 32px; }\n.xmimo-tts-history-page button:focus-visible,\n.xmimo-tts-history-page select:focus-visible,\n.xmimo-tts-history-page input:focus-visible { outline: var(--xmimo-ui-focus); outline-offset: 2px; }\n.xmimo-tts-history-text:hover { color: var(--xmimo-ui-brand); }\n.xmimo-tts-history-link { color: var(--xmimo-ui-text); }\n\n.xmimo-tts-history-page .xmimo-tts-history-search:focus-within,\n.xmimo-tts-history-page .xmimo-tts-history-search input:focus {\n border-color: var(--dsw-alias-border-l4, var(--xmimo-ui-border));\n outline: none;\n box-shadow: none;\n}\n\n@container xmimo-audio-history (max-width: 520px) {\n .xmimo-tts-history-search, .xmimo-tts-history-limit { display: none; }\n .xmimo-tts-history-toolbar { flex: 1 1 auto; }\n .xmimo-tts-history-source .xmimo-voice-reading-selector { max-width: 100%; }\n .xmimo-tts-history-page .xmimo-tts-history-action { width: 44px; min-width: 44px; padding: 0; }\n .xmimo-tts-history-action > span { display: none; }\n .xmimo-tts-history-page button,\n .xmimo-tts-history-page .xmimo-tts-history-back,\n .xmimo-tts-history-search input { min-height: 44px; }\n .xmimo-tts-history-page .xmimo-tts-history-row { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; padding-block: 10px; }\n .xmimo-tts-history-page .xmimo-tts-history-player-toggle { width: 44px; height: 44px; min-width: 44px; }\n .xmimo-tts-history-actions { gap: 4px; }\n .xmimo-tts-history-player-controls { flex-wrap: wrap; }\n .xmimo-tts-history-player-controls input[type='range'] { min-height: 44px; }\n .xmimo-tts-history-storage > span:first-child { margin-inline-end: 0; }\n}\n";
|
|
21568
21660
|
|
|
21569
21661
|
//#endregion
|
|
21570
21662
|
//#region src/client/style/index.ts
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/** Settings namespace used by the Host and Web client. */
|
|
2
2
|
export declare const TTS_SETTINGS_NAMESPACE = "xiaomi-mimo-tts";
|
|
3
3
|
/** Keep the UI version visible without making the browser bundle load package.json. */
|
|
4
|
-
export declare const TTS_VERSION = "4.2.
|
|
4
|
+
export declare const TTS_VERSION = "4.2.4";
|
|
5
5
|
/** Same-origin route used by the Web client to request synthesized audio. */
|
|
6
6
|
export declare const TTS_ROUTE = "/plugins/xiaomi-mimo-tts/synthesize";
|
|
7
7
|
/** Same-origin route that proxies MiMo PCM16 server-sent audio chunks. */
|
|
8
8
|
export declare const TTS_STREAM_ROUTE = "/plugins/xiaomi-mimo-tts/synthesize-stream";
|
|
9
9
|
export declare const TTS_DUPLEX_ROUTE = "/plugins/xiaomi-mimo-tts/synthesize-duplex";
|
|
10
10
|
export declare const DOUBAO_TTS_ENDPOINT = "wss://openspeech.bytedance.com/api/v3/tts/bidirection";
|
|
11
|
+
export declare const DOUBAO_AGENT_PLAN_TTS_ENDPOINT = "wss://openspeech.bytedance.com/api/v3/plan/tts/bidirection";
|
|
11
12
|
/** Same-origin route that checks the published npm version. */
|
|
12
13
|
export declare const TTS_UPDATE_ROUTE = "/plugins/xiaomi-mimo-tts/update";
|
|
13
14
|
/** Same-origin route that reports API key configuration status without exposing the key. */
|
package/lib/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,oBAAoB,CAAA;AAEvD,uFAAuF;AACvF,eAAO,MAAM,WAAW,UAAU,CAAA;AAElC,6EAA6E;AAC7E,eAAO,MAAM,SAAS,wCAAwC,CAAA;AAE9D,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,+CAA+C,CAAA;AAE5E,eAAO,MAAM,gBAAgB,+CAA+C,CAAA;AAC5E,eAAO,MAAM,mBAAmB,0DAA0D,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,oBAAoB,CAAA;AAEvD,uFAAuF;AACvF,eAAO,MAAM,WAAW,UAAU,CAAA;AAElC,6EAA6E;AAC7E,eAAO,MAAM,SAAS,wCAAwC,CAAA;AAE9D,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,+CAA+C,CAAA;AAE5E,eAAO,MAAM,gBAAgB,+CAA+C,CAAA;AAC5E,eAAO,MAAM,mBAAmB,0DAA0D,CAAA;AAC1F,eAAO,MAAM,8BAA8B,+DAA+D,CAAA;AAE1G,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,oCAAoC,CAAA;AAEjE,4FAA4F;AAC5F,eAAO,MAAM,wBAAwB,4CAA4C,CAAA;AAEjF,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,sCAAsC,CAAA;AAE5E,mFAAmF;AACnF,eAAO,MAAM,4BAA4B,2CAA2C,CAAA;AAEpF,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,2CAA2C,CAAA;AAE7E,8FAA8F;AAC9F,eAAO,MAAM,gCAAgC,oDAAoD,CAAA;AAEjG,oGAAoG;AACpG,eAAO,MAAM,uCAAuC,kEAAkE,CAAA;AAEtH,6EAA6E;AAC7E,eAAO,MAAM,mCAAmC;;;CAGtC,CAAA;AAEV,+DAA+D;AAC/D,eAAO,MAAM,8BAA8B;;;CAGjC,CAAA;AAEV,uFAAuF;AACvF,eAAO,MAAM,6BAA6B,gDAAgD,CAAA;AAE1F,2DAA2D;AAC3D,eAAO,MAAM,6BAA6B,sDAAsD,CAAA;AAEhG,gEAAgE;AAChE,eAAO,MAAM,wBAAwB,2CAA2C,CAAA;AAEhF,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,eAAe,CAAA;AAE/C,gFAAgF;AAChF,eAAO,MAAM,4BAA4B,mCAAmC,CAAA;AAE5E,yEAAyE;AACzE,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,sBAAsB,CAAA;AAEpE,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,yDAA0D,CAAA;AAE/F,uDAAuD;AACvD,eAAO,MAAM,uBAAuB,4CAA4C,CAAA;AAEhF,sEAAsE;AACtE,eAAO,MAAM,2BAA2B,QAAmB,CAAA;AAE3D,sEAAsE;AACtE,eAAO,MAAM,2BAA2B,QAAoB,CAAA;AAC5D,eAAO,MAAM,4BAA4B,QAAmB,CAAA;AAE5D,mEAAmE;AACnE,eAAO,MAAM,sCAAsC,QAAc,CAAA;AAEjE,eAAO,MAAM,8BAA8B,MAAM,CAAA;AACjD,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAC7C,eAAO,MAAM,0BAA0B,KAAK,CAAA;AAE5C,gGAAgG;AAChG,eAAO,MAAM,yBAAyB,KAAK,CAAA"}
|
package/lib/host/doubao.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface DoubaoSessionOptions {
|
|
|
6
6
|
format?: 'pcm' | 'mp3';
|
|
7
7
|
onAudio: (bytes: Buffer) => void;
|
|
8
8
|
/** Inject a socket factory for local protocol integration tests. Never accepted from HTTP. */
|
|
9
|
-
connect?: (headers: Record<string, string
|
|
9
|
+
connect?: (headers: Record<string, string>, endpoint: string) => WebSocket;
|
|
10
10
|
}
|
|
11
11
|
export declare class DoubaoSession {
|
|
12
12
|
private readonly options;
|
|
@@ -17,7 +17,7 @@ export declare class DoubaoSession {
|
|
|
17
17
|
private resolveDone;
|
|
18
18
|
private rejectDone;
|
|
19
19
|
private state;
|
|
20
|
-
private
|
|
20
|
+
private socket;
|
|
21
21
|
private readonly sessionId;
|
|
22
22
|
private readonly connectId;
|
|
23
23
|
private timer;
|
package/lib/host/doubao.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doubao.d.ts","sourceRoot":"","sources":["../../src/host/doubao.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,IAAI,CAAA;AAI1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAM/D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,WAAW,CAAA;IACnB,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACtB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"doubao.d.ts","sourceRoot":"","sources":["../../src/host/doubao.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,IAAI,CAAA;AAI1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAM/D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,WAAW,CAAA;IACnB,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACtB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;CAC3E;AAED,qBAAa,aAAa;IAkBZ,OAAO,CAAC,QAAQ,CAAC,OAAO;IAjBpC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,WAAW,CAAyB;IAC5C,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,UAAU,CAAyB;IAC3C,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,UAAU,CAA2C;IAC7D,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAA;gBAEG,OAAO,EAAE,oBAAoB;IA0C1D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAa1B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAWvB,MAAM,IAAI,IAAI;IAEd,OAAO,CAAC,MAAM,CAIb;IAED,OAAO,CAAC,SAAS,CA6DhB;IAED,OAAO,CAAC,IAAI;IAMZ,OAAO,CAAC,GAAG;IAKX,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,OAAO,CAAwI;IACvJ,OAAO,CAAC,OAAO,CAId;IAED,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,IAAI;CAWb;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOjG;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAgB9C"}
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { i as isNewerTtsVersion, v as prepareTtsText } from "./shared-
|
|
1
|
+
import { $ as TTS_SOUND_EFFECTS_CHARACTER_ASSET_ROUTE, A as TTS_VOICE_PRESETS, C as TTS_FORMATS, D as TTS_VOICES, E as TTS_READ_SCOPES, F as DOUBAO_AGENT_PLAN_TTS_ENDPOINT, G as TTS_HISTORY_EMPTY_ASSET_ROUTE, H as TTS_API_KEY_WHALE_ASSET_ROUTE, I as DOUBAO_TTS_ENDPOINT, J as TTS_PROVIDER_LOGO_ASSET_ROUTES, K as TTS_MIMO_LOGO_ASSET_ROUTE, O as TTS_VOICE_DESIGN_PLAYBACK_MODES, Q as TTS_SETTINGS_NAMESPACE, T as TTS_MODELS, V as TTS_API_KEY_STATUS_ROUTE, W as TTS_DUPLEX_ROUTE, Y as TTS_QQ_GROUP_ASSET_ROUTE, Z as TTS_ROUTE, a as ttsApiKey, at as TTS_VERSION, ct as TTS_VOLUME_PREVIEW_FILES, et as TTS_STREAM_ROUTE, f as ANNOUNCEMENT_SOURCES, it as TTS_UPDATE_ROUTE, k as TTS_VOICE_DESIGN_PRESETS, l as strictBase64DecodedLength, m as isSupportedTtsApiKey, n as DOUBAO_TTS_MODELS, nt as TTS_TOGGLE_CHARACTER_ASSET_ROUTE, o as ttsSelection, ot as TTS_VOICE_ASSET_ROUTE, p as DEFAULT_TTS_SETTINGS, q as TTS_PROVIDER_CHARACTER_ASSET_ROUTES, r as TTS_PROVIDERS, rt as TTS_TOGGLE_SOUND_FILES, s as normalizeVoiceRate, st as TTS_VOICE_DESIGN_ASSET_ROUTE, t as resolveTtsSettings, tt as TTS_TOGGLE_AUDIO_ASSET_ROUTE, w as TTS_LOCAL_SPEECH_MODES, y as SOUND_PACKS } from "./utils-CVl7B1KW.js";
|
|
2
|
+
import { i as isNewerTtsVersion, v as prepareTtsText } from "./shared-D5yyzz9m.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import z from "@deepseek-ai/schemastery";
|
|
@@ -389,21 +389,33 @@ var DoubaoSession = class {
|
|
|
389
389
|
"X-Api-Resource-Id": settings.doubaoModel,
|
|
390
390
|
"X-Api-Connect-Id": this.connectId
|
|
391
391
|
};
|
|
392
|
-
|
|
393
|
-
headers,
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
392
|
+
const connect = (endpoint) => {
|
|
393
|
+
const socket = options.connect?.(headers, endpoint) ?? new WebSocket(endpoint, {
|
|
394
|
+
headers,
|
|
395
|
+
maxPayload: 16 * 1024 * 1024,
|
|
396
|
+
handshakeTimeout: Math.min(1e4, settings.requestTimeoutMs),
|
|
397
|
+
followRedirects: false
|
|
398
|
+
});
|
|
399
|
+
socket.on("open", this.onOpen);
|
|
400
|
+
socket.on("message", this.onMessage);
|
|
401
|
+
socket.on("error", this.onError);
|
|
402
|
+
socket.on("unexpected-response", (_request, response) => {
|
|
403
|
+
response.resume();
|
|
404
|
+
const status = response.statusCode ?? 502;
|
|
405
|
+
if (endpoint === DOUBAO_TTS_ENDPOINT && (status === 401 || status === 403) && this.state === "connecting") {
|
|
406
|
+
socket.removeAllListeners();
|
|
407
|
+
socket.on("error", () => {});
|
|
408
|
+
socket.terminate();
|
|
409
|
+
this.socket = connect(DOUBAO_AGENT_PLAN_TTS_ENDPOINT);
|
|
410
|
+
this.arm(Math.min(1e4, settings.requestTimeoutMs));
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
this.fail(new TtsProviderError(status === 401 || status === 403 ? "api-key-rejected" : status === 429 ? "rate-limited" : "doubao-handshake-failed", `Doubao handshake failed (HTTP ${status}).`, status, String(status), this.connectId));
|
|
414
|
+
});
|
|
415
|
+
socket.on("close", this.onClose);
|
|
416
|
+
return socket;
|
|
417
|
+
};
|
|
418
|
+
this.socket = connect(headers["X-Api-Key"].startsWith("ark-") ? DOUBAO_AGENT_PLAN_TTS_ENDPOINT : DOUBAO_TTS_ENDPOINT);
|
|
407
419
|
options.signal.addEventListener("abort", this.onAbort, { once: true });
|
|
408
420
|
this.arm(Math.min(1e4, settings.requestTimeoutMs));
|
|
409
421
|
if (options.signal.aborted) this.onAbort();
|
package/lib/pcm-stream.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as MAX_TTS_SEGMENT_CHARACTERS, P as DEFAULT_TTS_SEGMENT_CHARACTERS, R as MIN_TTS_SEGMENT_CHARACTERS, z as MIN_TTS_STREAM_CHARACTERS } from "./utils-CVl7B1KW.js";
|
|
2
2
|
|
|
3
3
|
//#region src/text/fenced-code.ts
|
|
4
4
|
/** Preserve raw Markdown boundaries until both complete and unfinished code have been excluded. */
|
package/lib/shared.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { _ as splitTtsSegments, a as TTS_SMART_TRUNCATION_OUTROS, b as findFencedCodeRegions, c as applyTtsPlaybackScope, d as TtsFirstSegmentLimiter, f as batchTtsStreamSegments, g as firstTtsSegments, h as firstTtsSegment, i as isNewerTtsVersion, l as applyTtsReadScope, m as countTtsSpeechCharacters, n as DOUBAO_VOICE_CATALOG_SOURCE, o as appendTtsSmartTruncationOutro, p as batchTtsStreamText, r as DOUBAO_VOICE_PRESETS, s as applyTtsLivePlaybackScope, t as DOUBAO_VOICE_CATALOG_CHECKED, u as resolveTtsReadScope, v as prepareTtsText, x as removeFencedCode, y as splitCompletedTtsSentences } from "./shared-
|
|
1
|
+
import { $ as TTS_SOUND_EFFECTS_CHARACTER_ASSET_ROUTE, A as TTS_VOICE_PRESETS, B as TOKEN_PLAN_TTS_BASE_URL, C as TTS_FORMATS, D as TTS_VOICES, E as TTS_READ_SCOPES, F as DOUBAO_AGENT_PLAN_TTS_ENDPOINT, G as TTS_HISTORY_EMPTY_ASSET_ROUTE, H as TTS_API_KEY_WHALE_ASSET_ROUTE, I as DOUBAO_TTS_ENDPOINT, J as TTS_PROVIDER_LOGO_ASSET_ROUTES, K as TTS_MIMO_LOGO_ASSET_ROUTE, L as MAX_TTS_SEGMENT_CHARACTERS, M as DEFAULT_MAX_PAUSED_PCM_BYTES, N as DEFAULT_MAX_WAV_AUDIO_BYTES, O as TTS_VOICE_DESIGN_PLAYBACK_MODES, P as DEFAULT_TTS_SEGMENT_CHARACTERS, Q as TTS_SETTINGS_NAMESPACE, R as MIN_TTS_SEGMENT_CHARACTERS, S as resolveSoundEffectsScope, T as TTS_MODELS, U as TTS_AUDIO_RESPONSE_JSON_OVERHEAD_BYTES, V as TTS_API_KEY_STATUS_ROUTE, W as TTS_DUPLEX_ROUTE, X as TTS_QQ_GROUP_NUMBER, Y as TTS_QQ_GROUP_ASSET_ROUTE, Z as TTS_ROUTE, _ as SOUND_EFFECTS_MODES, a as ttsApiKey, at as TTS_VERSION, b as getSoundEffectsModeFlags, c as parseSseRecords, ct as TTS_VOLUME_PREVIEW_FILES, d as classifyLiveSpeechTransition, et as TTS_STREAM_ROUTE, f as ANNOUNCEMENT_SOURCES, g as DEFAULT_SOUND_SETTINGS, h as resolveTtsBaseURL, i as supportsRealtimeTts, it as TTS_UPDATE_ROUTE, j as DEFAULT_MAX_MP3_AUDIO_BYTES, k as TTS_VOICE_DESIGN_PRESETS, l as strictBase64DecodedLength, m as isSupportedTtsApiKey, n as DOUBAO_TTS_MODELS, nt as TTS_TOGGLE_CHARACTER_ASSET_ROUTE, o as ttsSelection, ot as TTS_VOICE_ASSET_ROUTE, p as DEFAULT_TTS_SETTINGS, q as TTS_PROVIDER_CHARACTER_ASSET_ROUTES, r as TTS_PROVIDERS, rt as TTS_TOGGLE_SOUND_FILES, s as normalizeVoiceRate, st as TTS_VOICE_DESIGN_ASSET_ROUTE, t as resolveTtsSettings, tt as TTS_TOGGLE_AUDIO_ASSET_ROUTE, u as AbortableSentenceQueue, v as SOUND_EFFECTS_SCOPES, w as TTS_LOCAL_SPEECH_MODES, x as resolveSoundEffectsMode, y as SOUND_PACKS, z as MIN_TTS_STREAM_CHARACTERS } from "./utils-CVl7B1KW.js";
|
|
2
|
+
import { _ as splitTtsSegments, a as TTS_SMART_TRUNCATION_OUTROS, b as findFencedCodeRegions, c as applyTtsPlaybackScope, d as TtsFirstSegmentLimiter, f as batchTtsStreamSegments, g as firstTtsSegments, h as firstTtsSegment, i as isNewerTtsVersion, l as applyTtsReadScope, m as countTtsSpeechCharacters, n as DOUBAO_VOICE_CATALOG_SOURCE, o as appendTtsSmartTruncationOutro, p as batchTtsStreamText, r as DOUBAO_VOICE_PRESETS, s as applyTtsLivePlaybackScope, t as DOUBAO_VOICE_CATALOG_CHECKED, u as resolveTtsReadScope, v as prepareTtsText, x as removeFencedCode, y as splitCompletedTtsSentences } from "./shared-D5yyzz9m.js";
|
|
3
3
|
|
|
4
|
-
export { ANNOUNCEMENT_SOURCES, AbortableSentenceQueue, DEFAULT_MAX_MP3_AUDIO_BYTES, DEFAULT_MAX_PAUSED_PCM_BYTES, DEFAULT_MAX_WAV_AUDIO_BYTES, DEFAULT_SOUND_SETTINGS, DEFAULT_TTS_SEGMENT_CHARACTERS, DEFAULT_TTS_SETTINGS, DOUBAO_TTS_ENDPOINT, DOUBAO_TTS_MODELS, DOUBAO_VOICE_CATALOG_CHECKED, DOUBAO_VOICE_CATALOG_SOURCE, DOUBAO_VOICE_PRESETS, MAX_TTS_SEGMENT_CHARACTERS, MIN_TTS_SEGMENT_CHARACTERS, MIN_TTS_STREAM_CHARACTERS, SOUND_EFFECTS_MODES, SOUND_EFFECTS_SCOPES, SOUND_PACKS, TOKEN_PLAN_TTS_BASE_URL, TTS_API_KEY_STATUS_ROUTE, TTS_API_KEY_WHALE_ASSET_ROUTE, TTS_AUDIO_RESPONSE_JSON_OVERHEAD_BYTES, TTS_DUPLEX_ROUTE, TTS_FORMATS, TTS_HISTORY_EMPTY_ASSET_ROUTE, TTS_LOCAL_SPEECH_MODES, TTS_MIMO_LOGO_ASSET_ROUTE, TTS_MODELS, TTS_PROVIDERS, TTS_PROVIDER_CHARACTER_ASSET_ROUTES, TTS_PROVIDER_LOGO_ASSET_ROUTES, TTS_QQ_GROUP_ASSET_ROUTE, TTS_QQ_GROUP_NUMBER, TTS_READ_SCOPES, TTS_ROUTE, TTS_SETTINGS_NAMESPACE, TTS_SMART_TRUNCATION_OUTROS, TTS_SOUND_EFFECTS_CHARACTER_ASSET_ROUTE, TTS_STREAM_ROUTE, TTS_TOGGLE_AUDIO_ASSET_ROUTE, TTS_TOGGLE_CHARACTER_ASSET_ROUTE, TTS_TOGGLE_SOUND_FILES, TTS_UPDATE_ROUTE, TTS_VERSION, TTS_VOICES, TTS_VOICE_ASSET_ROUTE, TTS_VOICE_DESIGN_ASSET_ROUTE, TTS_VOICE_DESIGN_PLAYBACK_MODES, TTS_VOICE_DESIGN_PRESETS, TTS_VOICE_PRESETS, TTS_VOLUME_PREVIEW_FILES, TtsFirstSegmentLimiter, appendTtsSmartTruncationOutro, applyTtsLivePlaybackScope, applyTtsPlaybackScope, applyTtsReadScope, batchTtsStreamSegments, batchTtsStreamText, classifyLiveSpeechTransition, countTtsSpeechCharacters, findFencedCodeRegions, firstTtsSegment, firstTtsSegments, getSoundEffectsModeFlags, isNewerTtsVersion, isSupportedTtsApiKey, normalizeVoiceRate, parseSseRecords, prepareTtsText, removeFencedCode, resolveSoundEffectsMode, resolveSoundEffectsScope, resolveTtsBaseURL, resolveTtsReadScope, resolveTtsSettings, splitCompletedTtsSentences, splitTtsSegments, strictBase64DecodedLength, supportsRealtimeTts, ttsApiKey, ttsSelection };
|
|
4
|
+
export { ANNOUNCEMENT_SOURCES, AbortableSentenceQueue, DEFAULT_MAX_MP3_AUDIO_BYTES, DEFAULT_MAX_PAUSED_PCM_BYTES, DEFAULT_MAX_WAV_AUDIO_BYTES, DEFAULT_SOUND_SETTINGS, DEFAULT_TTS_SEGMENT_CHARACTERS, DEFAULT_TTS_SETTINGS, DOUBAO_AGENT_PLAN_TTS_ENDPOINT, DOUBAO_TTS_ENDPOINT, DOUBAO_TTS_MODELS, DOUBAO_VOICE_CATALOG_CHECKED, DOUBAO_VOICE_CATALOG_SOURCE, DOUBAO_VOICE_PRESETS, MAX_TTS_SEGMENT_CHARACTERS, MIN_TTS_SEGMENT_CHARACTERS, MIN_TTS_STREAM_CHARACTERS, SOUND_EFFECTS_MODES, SOUND_EFFECTS_SCOPES, SOUND_PACKS, TOKEN_PLAN_TTS_BASE_URL, TTS_API_KEY_STATUS_ROUTE, TTS_API_KEY_WHALE_ASSET_ROUTE, TTS_AUDIO_RESPONSE_JSON_OVERHEAD_BYTES, TTS_DUPLEX_ROUTE, TTS_FORMATS, TTS_HISTORY_EMPTY_ASSET_ROUTE, TTS_LOCAL_SPEECH_MODES, TTS_MIMO_LOGO_ASSET_ROUTE, TTS_MODELS, TTS_PROVIDERS, TTS_PROVIDER_CHARACTER_ASSET_ROUTES, TTS_PROVIDER_LOGO_ASSET_ROUTES, TTS_QQ_GROUP_ASSET_ROUTE, TTS_QQ_GROUP_NUMBER, TTS_READ_SCOPES, TTS_ROUTE, TTS_SETTINGS_NAMESPACE, TTS_SMART_TRUNCATION_OUTROS, TTS_SOUND_EFFECTS_CHARACTER_ASSET_ROUTE, TTS_STREAM_ROUTE, TTS_TOGGLE_AUDIO_ASSET_ROUTE, TTS_TOGGLE_CHARACTER_ASSET_ROUTE, TTS_TOGGLE_SOUND_FILES, TTS_UPDATE_ROUTE, TTS_VERSION, TTS_VOICES, TTS_VOICE_ASSET_ROUTE, TTS_VOICE_DESIGN_ASSET_ROUTE, TTS_VOICE_DESIGN_PLAYBACK_MODES, TTS_VOICE_DESIGN_PRESETS, TTS_VOICE_PRESETS, TTS_VOLUME_PREVIEW_FILES, TtsFirstSegmentLimiter, appendTtsSmartTruncationOutro, applyTtsLivePlaybackScope, applyTtsPlaybackScope, applyTtsReadScope, batchTtsStreamSegments, batchTtsStreamText, classifyLiveSpeechTransition, countTtsSpeechCharacters, findFencedCodeRegions, firstTtsSegment, firstTtsSegments, getSoundEffectsModeFlags, isNewerTtsVersion, isSupportedTtsApiKey, normalizeVoiceRate, parseSseRecords, prepareTtsText, removeFencedCode, resolveSoundEffectsMode, resolveSoundEffectsScope, resolveTtsBaseURL, resolveTtsReadScope, resolveTtsSettings, splitCompletedTtsSentences, splitTtsSegments, strictBase64DecodedLength, supportsRealtimeTts, ttsApiKey, ttsSelection };
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
/** Settings namespace used by the Host and Web client. */
|
|
3
3
|
const TTS_SETTINGS_NAMESPACE = "xiaomi-mimo-tts";
|
|
4
4
|
/** Keep the UI version visible without making the browser bundle load package.json. */
|
|
5
|
-
const TTS_VERSION = "4.2.
|
|
5
|
+
const TTS_VERSION = "4.2.4";
|
|
6
6
|
/** Same-origin route used by the Web client to request synthesized audio. */
|
|
7
7
|
const TTS_ROUTE = "/plugins/xiaomi-mimo-tts/synthesize";
|
|
8
8
|
/** Same-origin route that proxies MiMo PCM16 server-sent audio chunks. */
|
|
9
9
|
const TTS_STREAM_ROUTE = "/plugins/xiaomi-mimo-tts/synthesize-stream";
|
|
10
10
|
const TTS_DUPLEX_ROUTE = "/plugins/xiaomi-mimo-tts/synthesize-duplex";
|
|
11
11
|
const DOUBAO_TTS_ENDPOINT = "wss://openspeech.bytedance.com/api/v3/tts/bidirection";
|
|
12
|
+
const DOUBAO_AGENT_PLAN_TTS_ENDPOINT = "wss://openspeech.bytedance.com/api/v3/plan/tts/bidirection";
|
|
12
13
|
/** Same-origin route that checks the published npm version. */
|
|
13
14
|
const TTS_UPDATE_ROUTE = "/plugins/xiaomi-mimo-tts/update";
|
|
14
15
|
/** Same-origin route that reports API key configuration status without exposing the key. */
|
|
@@ -483,4 +484,4 @@ function resolveTtsSettings(value) {
|
|
|
483
484
|
}
|
|
484
485
|
|
|
485
486
|
//#endregion
|
|
486
|
-
export {
|
|
487
|
+
export { TTS_SOUND_EFFECTS_CHARACTER_ASSET_ROUTE as $, TTS_VOICE_PRESETS as A, TOKEN_PLAN_TTS_BASE_URL as B, TTS_FORMATS as C, TTS_VOICES as D, TTS_READ_SCOPES as E, DOUBAO_AGENT_PLAN_TTS_ENDPOINT as F, TTS_HISTORY_EMPTY_ASSET_ROUTE as G, TTS_API_KEY_WHALE_ASSET_ROUTE as H, DOUBAO_TTS_ENDPOINT as I, TTS_PROVIDER_LOGO_ASSET_ROUTES as J, TTS_MIMO_LOGO_ASSET_ROUTE as K, MAX_TTS_SEGMENT_CHARACTERS as L, DEFAULT_MAX_PAUSED_PCM_BYTES as M, DEFAULT_MAX_WAV_AUDIO_BYTES as N, TTS_VOICE_DESIGN_PLAYBACK_MODES as O, DEFAULT_TTS_SEGMENT_CHARACTERS as P, TTS_SETTINGS_NAMESPACE as Q, MIN_TTS_SEGMENT_CHARACTERS as R, resolveSoundEffectsScope as S, TTS_MODELS as T, TTS_AUDIO_RESPONSE_JSON_OVERHEAD_BYTES as U, TTS_API_KEY_STATUS_ROUTE as V, TTS_DUPLEX_ROUTE as W, TTS_QQ_GROUP_NUMBER as X, TTS_QQ_GROUP_ASSET_ROUTE as Y, TTS_ROUTE as Z, SOUND_EFFECTS_MODES as _, ttsApiKey as a, TTS_VERSION as at, getSoundEffectsModeFlags as b, parseSseRecords as c, TTS_VOLUME_PREVIEW_FILES as ct, classifyLiveSpeechTransition as d, TTS_STREAM_ROUTE as et, ANNOUNCEMENT_SOURCES as f, DEFAULT_SOUND_SETTINGS as g, resolveTtsBaseURL as h, supportsRealtimeTts as i, TTS_UPDATE_ROUTE as it, DEFAULT_MAX_MP3_AUDIO_BYTES as j, TTS_VOICE_DESIGN_PRESETS as k, strictBase64DecodedLength as l, isSupportedTtsApiKey as m, DOUBAO_TTS_MODELS as n, TTS_TOGGLE_CHARACTER_ASSET_ROUTE as nt, ttsSelection as o, TTS_VOICE_ASSET_ROUTE as ot, DEFAULT_TTS_SETTINGS as p, TTS_PROVIDER_CHARACTER_ASSET_ROUTES as q, TTS_PROVIDERS as r, TTS_TOGGLE_SOUND_FILES as rt, normalizeVoiceRate as s, TTS_VOICE_DESIGN_ASSET_ROUTE as st, resolveTtsSettings as t, TTS_TOGGLE_AUDIO_ASSET_ROUTE as tt, AbortableSentenceQueue as u, SOUND_EFFECTS_SCOPES as v, TTS_LOCAL_SPEECH_MODES as w, resolveSoundEffectsMode as x, SOUND_PACKS as y, MIN_TTS_STREAM_CHARACTERS as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-xiaomi-tts",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.4",
|
|
4
4
|
"description": "为 DSH 添加 Xiaomi MiMo 与豆包语音朗读、浏览器本地语音兜底和可选 UI 音效。",
|
|
5
5
|
"icon": "./assets/plugin-icons/avatar.webp",
|
|
6
6
|
"license": "MIT",
|
|
@@ -152,25 +152,25 @@
|
|
|
152
152
|
"@deepseek-ai/cordis": "~4.0.5",
|
|
153
153
|
"@deepseek-ai/cordis-plugin-include": "~1.0.10",
|
|
154
154
|
"@deepseek-ai/cordis-plugin-loader": "~1.0.6",
|
|
155
|
-
"@deepseek-ai/dsh-agent-preset": "0.2.1-rc.
|
|
156
|
-
"@deepseek-ai/dsh-agent-preset-registry": "0.2.1-rc.
|
|
157
|
-
"@deepseek-ai/dsh-api-session-controller": "0.2.1-rc.
|
|
158
|
-
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.
|
|
159
|
-
"@deepseek-ai/dsh-client-store": "0.2.1-rc.
|
|
160
|
-
"@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.
|
|
161
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.
|
|
162
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.
|
|
163
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.
|
|
164
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.
|
|
165
|
-
"@deepseek-ai/dsh-client-ui-session": "0.2.1-rc.
|
|
166
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.
|
|
167
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.
|
|
168
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.1-rc.
|
|
169
|
-
"@deepseek-ai/dsh-session": "0.2.1-rc.
|
|
170
|
-
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.
|
|
171
|
-
"@deepseek-ai/dsh-settings": "0.2.1-rc.
|
|
172
|
-
"@deepseek-ai/dsh-util-code-language": "0.2.1-rc.
|
|
173
|
-
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-rc.
|
|
155
|
+
"@deepseek-ai/dsh-agent-preset": "0.2.1-rc.3",
|
|
156
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.1-rc.3",
|
|
157
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.1-rc.3",
|
|
158
|
+
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
|
|
159
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
|
|
160
|
+
"@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.3",
|
|
161
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.3",
|
|
162
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.3",
|
|
163
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.3",
|
|
164
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.3",
|
|
165
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.1-rc.3",
|
|
166
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
|
|
167
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
|
|
168
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.1-rc.3",
|
|
169
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.3",
|
|
170
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.3",
|
|
171
|
+
"@deepseek-ai/dsh-settings": "0.2.1-rc.3",
|
|
172
|
+
"@deepseek-ai/dsh-util-code-language": "0.2.1-rc.3",
|
|
173
|
+
"@deepseek-ai/dsh-util-workspace-path": "0.2.1-rc.3",
|
|
174
174
|
"@deepseek-ai/schemastery": "~3.18.5",
|
|
175
175
|
"@shikijs/langs": "^4.3.1",
|
|
176
176
|
"@types/node": "^26.6.1",
|