dsh-xiaomi-tts 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/lib/client/localization.d.ts +6 -4
- package/lib/client/localization.d.ts.map +1 -1
- package/lib/client/settings-card.d.ts.map +1 -1
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/styles.d.ts.map +1 -1
- package/lib/client.js +94 -16
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +153 -17
- package/lib/{shared-Ari92Zhu.js → shared-9qFFYsWe.js} +45 -1
- package/lib/shared.d.ts +14 -0
- package/lib/shared.d.ts.map +1 -1
- package/lib/shared.js +2 -2
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -52,12 +52,12 @@ Install from GitHub:
|
|
|
52
52
|
dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
After installation, restart `dsh web`, then open **Settings → Plugins → Plugin configuration → Xiaomi MiMo Read Aloud**, enter the API key, and save.
|
|
55
|
+
After installation, restart `dsh web`, then open **Settings → Plugins → Plugin configuration → Xiaomi MiMo Read Aloud**, enter the API key, and save. The plugin automatically selects the endpoint from the API key prefix: `sk-` uses the standard endpoint and `tp-` uses the Token Plan-compatible endpoint.
|
|
56
56
|
|
|
57
57
|
When updating or switching from the local development link to the npm package, stop DSH Web before changing the profile dependencies. This prevents a running Node process from holding the Windows Junction that pnpm needs to replace:
|
|
58
58
|
|
|
59
59
|
```powershell
|
|
60
|
-
.\start\dsh-plugin-reinstall.bat 2.3.
|
|
60
|
+
.\start\dsh-plugin-reinstall.bat 2.3.2
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
The script stops DSH Web, removes the current plugin from the profile, installs the requested npm version, and starts DSH Web again. If you run the steps manually, keep the same order:
|
|
@@ -65,7 +65,7 @@ The script stops DSH Web, removes the current plugin from the profile, installs
|
|
|
65
65
|
```powershell
|
|
66
66
|
.\start\dsh-web-stop.bat
|
|
67
67
|
dsh plugin --profile web remove dsh-xiaomi-tts
|
|
68
|
-
dsh plugin --profile web add dsh-xiaomi-tts@2.3.
|
|
68
|
+
dsh plugin --profile web add dsh-xiaomi-tts@2.3.2
|
|
69
69
|
.\start\dsh-web-start.bat
|
|
70
70
|
```
|
|
71
71
|
|
package/README.md
CHANGED
|
@@ -51,12 +51,12 @@ dsh plugin --profile web add ./dsh-plugin-xiaomi-mimo-tts
|
|
|
51
51
|
dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
安装后重启 `dsh web`,打开 **设置 → 插件 → 插件配置 → Xiaomi MiMo
|
|
54
|
+
安装后重启 `dsh web`,打开 **设置 → 插件 → 插件配置 → 语音朗读(Xiaomi MiMo)**,填写 API Key 并保存。插件会根据 API Key 前缀自动选择服务端点:`sk-` 使用标准端点,`tp-` 使用 Token Plan 兼容端点,无需额外配置。
|
|
55
55
|
|
|
56
56
|
更新或从本地开发版切换到 npm 版时,必须先停止 DSH Web,避免 Windows Junction 被运行中的 Node 进程占用:
|
|
57
57
|
|
|
58
58
|
```powershell
|
|
59
|
-
.\start\dsh-plugin-reinstall.bat 2.3.
|
|
59
|
+
.\start\dsh-plugin-reinstall.bat 2.3.2
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
这个脚本会按顺序停止 DSH Web、卸载当前 profile 中的插件、从 npm 安装指定版本并重新启动 DSH Web。若手动操作,请保持相同顺序:
|
|
@@ -64,7 +64,7 @@ dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
|
64
64
|
```powershell
|
|
65
65
|
.\start\dsh-web-stop.bat
|
|
66
66
|
dsh plugin --profile web remove dsh-xiaomi-tts
|
|
67
|
-
dsh plugin --profile web add dsh-xiaomi-tts@2.3.
|
|
67
|
+
dsh plugin --profile web add dsh-xiaomi-tts@2.3.2
|
|
68
68
|
.\start\dsh-web-start.bat
|
|
69
69
|
```
|
|
70
70
|
|
|
@@ -15,9 +15,10 @@ export declare const zh: {
|
|
|
15
15
|
readonly 'settings.enabled': "显示朗读按钮";
|
|
16
16
|
readonly 'settings.enabledHint': "关闭后不会在助手回复操作栏显示朗读按钮,也不会自动播报。";
|
|
17
17
|
readonly 'settings.apiKey': "API Key";
|
|
18
|
-
readonly 'settings.apiKeyHint': "密钥保存在 DSH 设置文件中,传到浏览器前会被脱敏。";
|
|
19
18
|
readonly 'settings.apiKeyStatus': "只有输入新值并保存时才会替换现有密钥。";
|
|
20
19
|
readonly 'settings.apiKeyConfigured': "已配置";
|
|
20
|
+
readonly 'settings.apiKeyMissing': "尚未配置 API Key,请先获取并设置密钥。";
|
|
21
|
+
readonly 'settings.apiKeyUnsupported': "这个 API Key 似乎是错的,请检查并重新设置(sk-/tp- 开头)。";
|
|
21
22
|
readonly 'settings.getApiKey': "获取 API Key";
|
|
22
23
|
readonly 'settings.autoPlay': "开启自动播报";
|
|
23
24
|
readonly 'settings.autoPlayHint': "开启时会同步显示朗读按钮;浏览器也可能拒绝自动播放。";
|
|
@@ -40,14 +41,15 @@ export declare const zh: {
|
|
|
40
41
|
readonly 'settings.reset': "恢复默认";
|
|
41
42
|
readonly 'settings.discard': "放弃修改";
|
|
42
43
|
readonly 'settings.failed': "保存失败,请重试。";
|
|
43
|
-
readonly 'settings.
|
|
44
|
-
readonly 'settings.uninstall': "
|
|
44
|
+
readonly 'settings.source': "✨查看源码";
|
|
45
|
+
readonly 'settings.uninstall': "卸载";
|
|
45
46
|
readonly 'settings.uninstalling': "卸载中…";
|
|
46
47
|
readonly 'settings.uninstallQuestion': "确认卸载?";
|
|
47
48
|
readonly 'settings.uninstallConfirm': "确认";
|
|
48
49
|
readonly 'settings.uninstallCancel': "取消";
|
|
49
|
-
readonly 'settings.uninstalled': "
|
|
50
|
+
readonly 'settings.uninstalled': "已卸载;重启DSH不再加载此插件。";
|
|
50
51
|
readonly 'settings.uninstallFailed': "卸载失败,请重试或使用 DSH 命令行卸载。";
|
|
52
|
+
readonly 'settings.updateAvailable': "🎉新版已发布";
|
|
51
53
|
readonly 'settings.readOnly': "当前 DSH 设置为只读。";
|
|
52
54
|
readonly 'settings.secretPlaceholder': "输入新的 Xiaomi MiMo API Key";
|
|
53
55
|
readonly 'settings.expand': "展开设置";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../src/client/localization.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE,oBAAoB,CAAA;AAEnC,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../src/client/localization.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE,oBAAoB,CAAA;AAEnC,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAuD9C,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAA;AAEvC,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,SAAS,KAAK,MAAM,CAAA;AAElD,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,iBAAiB,EAAE,SAAS,CAAA;KAC7B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-card.d.ts","sourceRoot":"","sources":["../../src/client/settings-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;
|
|
1
|
+
{"version":3,"file":"settings-card.d.ts","sourceRoot":"","sources":["../../src/client/settings-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAW3E,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAQlD,UAAU,iBAAiB;IACzB,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IACjC,CAAC,EAAE,SAAS,CAAA;CACb;AAoDD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,iBAAiB,GAAG,YAAY,GAAG,IAAI,CA6WjF"}
|
package/lib/client/styles.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLIENT_STYLES = "\n .xmimo-tts-action{width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:transparent;border:none;border-radius:28px;justify-content:center;align-items:center;padding:6px;display:inline-flex}.xmimo-tts-action:hover{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6);color:var(--dsw-alias-label-secondary,#5f6875)}.xmimo-tts-action[aria-pressed=true]{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6);color:var(--dsw-alias-label-secondary,#5f6875)}.xmimo-tts-action:disabled{cursor:default;opacity:.45}.xmimo-tts-spin{animation:xmimo-spin 1s linear infinite}@keyframes xmimo-spin{to{transform:rotate(360deg)}}\n .xmimo-tts-inline-error{max-width:220px;color:var(--dsw-alias-state-error-primary,#dc2626);font-size:12px}\n .xmimo-tts-card{list-style:none;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:12px;color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-3,#fff);overflow:hidden;transition:border-color 160ms ease,background 160ms ease}.xmimo-tts-card:hover{border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-card-open{background:var(--dsw-alias-bg-layer-2,#f7f8fa);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-card-header{appearance:none;display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:0;border-radius:12px;color:inherit;text-align:left;background:transparent;font:inherit;cursor:pointer}.xmimo-tts-card-header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:-2px}.xmimo-tts-card-head-text{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.xmimo-tts-card-title{font-size:15px;font-weight:600}.xmimo-tts-card-description{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:13px;line-height:18px}.xmimo-tts-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#8b93a1);transition:transform 160ms ease}.xmimo-tts-chevron-open{transform:rotate(180deg)}.xmimo-tts-pending{flex:none;border-radius:999px;padding:1px 8px;color:var(--dsw-alias-label-secondary,#5f6875);background:var(--dsw-alias-bg-module-platform,#eef0f3);font-size:11px;font-weight:500;line-height:17px}.xmimo-tts-card-body{border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);margin:0 16px;padding:0 0 16px}\n .xmimo-tts-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;align-items:start}.xmimo-tts-grid>*{box-sizing:border-box;padding:16px 0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.xmimo-tts-grid>:first-child{border-top:0}.xmimo-tts-grid label,.xmimo-tts-api-key,.xmimo-tts-model,.xmimo-tts-voice-design-prompt,.xmimo-tts-select-column>div{display:flex;min-width:0;flex-direction:column;gap:6px;font-size:13px}.xmimo-tts-grid input,.xmimo-tts-grid select,.xmimo-tts-grid textarea{box-sizing:border-box;width:100%;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:8px;padding:8px 10px;color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-2,#f3f4f6);font:inherit}.xmimo-tts-grid select{color-scheme:light dark}.xmimo-tts-grid select option{color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-1,#fff)}.xmimo-tts-grid select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}.xmimo-tts-grid small{color:var(--dsw-alias-label-tertiary,#8b93a1);line-height:17px}.xmimo-tts-field-heading{display:flex;min-width:0;min-height:20px;flex-direction:row!important;align-items:center;justify-content:space-between;gap:8px}.xmimo-tts-field-label{display:inline-flex;min-width:0;align-items:center;gap:8px}.xmimo-tts-api-key-link{color:var(--dsw-alias-brand-primary,#4f6ef7);font-size:12px;text-decoration:none}.xmimo-tts-api-key-link:hover{text-decoration:underline}.xmimo-tts-field-badges{display:flex!important;flex:none;flex-direction:row!important;align-items:center;gap:8px}.xmimo-tts-overridden{border-radius:999px;padding:1px 7px;color:var(--dsw-alias-label-secondary,#5f6875);background:var(--dsw-alias-bg-module-platform,#eef0f3);font-size:11px;line-height:17px}.xmimo-tts-reset{padding:0;border:0;color:var(--dsw-alias-label-secondary,#5f6875);background:transparent;font:inherit;font-size:12px;cursor:pointer}.xmimo-tts-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328)}.xmimo-tts-reset:disabled{cursor:not-allowed;opacity:.45}.xmimo-tts-api-key-hints{display:flex;min-width:0;gap:8px;align-items:center}.xmimo-tts-api-key-hints small{min-width:0;white-space:nowrap}.xmimo-tts-wide{grid-column:1/-1}.xmimo-tts-switch-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0}.xmimo-tts-switch-row>*:first-child{padding-right:14px}.xmimo-tts-switch-row>*+*{padding-left:14px;border-left:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.xmimo-tts-checkbox-row{position:relative;flex-direction:row!important;align-items:center!important;gap:10px!important;cursor:pointer}.xmimo-tts-switch-copy{display:flex;min-width:0;flex-direction:column;gap:4px}.xmimo-tts-checkbox-row>input{position:absolute;width:1px!important;height:1px;margin:0!important;padding:0!important;overflow:hidden;border:0!important;opacity:0;clip-path:inset(50%)}.xmimo-tts-switch-control{box-sizing:border-box;position:relative;display:inline-block!important;width:36px;height:20px;min-width:36px;flex:none;border:1px solid var(--dsw-alias-border-l2,#c8ccd4);border-radius:999px;background:var(--dsw-alias-bg-module-platform,#e5e7eb);transition:border-color 160ms ease,background 160ms ease}.xmimo-tts-switch-control:after{content:\"\";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:0 1px 3px rgba(15,23,42,.24);transition:transform 160ms ease}.xmimo-tts-checkbox-row>input:checked+.xmimo-tts-switch-control{border-color:var(--dsw-alias-brand-primary,#4f6ef7);background:var(--dsw-alias-brand-primary,#4f6ef7)}.xmimo-tts-checkbox-row>input:checked+.xmimo-tts-switch-control:after{transform:translateX(16px)}.xmimo-tts-checkbox-row>input:focus-visible+.xmimo-tts-switch-control{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:2px}.xmimo-tts-checkbox-row>input:disabled+.xmimo-tts-switch-control{cursor:not-allowed;opacity:.45}.xmimo-tts-select-column{display:flex;min-width:0;flex-direction:row;gap:0}.xmimo-tts-select-column>div{flex:1}.xmimo-tts-select-column>div:first-child:not(:only-child){padding-right:16px}.xmimo-tts-select-column>div+div{padding-left:16px;border-left:1px solid var(--dsw-alias-border-l2,#e5e7eb)}\n .xmimo-tts-voice-picker{display:flex;min-width:0;flex-direction:column;gap:6px}.xmimo-tts-voice-picker-trigger,.xmimo-tts-voice-option{box-sizing:border-box;display:flex;width:100%;min-width:0;align-items:center;gap:10px;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-2,#f3f4f6);font:inherit;text-align:left;cursor:pointer}.xmimo-tts-voice-picker-trigger{min-height:54px;border-radius:10px;padding:6px 10px}.xmimo-tts-voice-picker-trigger:hover:not(:disabled){border-color:var(--dsw-alias-label-dimmed,#c8ccd4);background:var(--dsw-alias-interactive-bg-hover,#eef0f3)}.xmimo-tts-voice-picker-trigger:focus-visible,.xmimo-tts-voice-option:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}.xmimo-tts-voice-picker-trigger:disabled{cursor:not-allowed;opacity:.55}.xmimo-tts-voice-avatar{box-sizing:border-box;display:block;width:40px;height:40px;flex:none;border:1px solid color-mix(in srgb,var(--dsw-alias-border-l2,#e5e7eb) 80%,transparent);border-radius:50%;object-fit:cover;background:var(--dsw-alias-bg-layer-1,#fff)}.xmimo-tts-custom-voice-avatar{display:grid;place-items:center;color:var(--dsw-alias-brand-primary,#4f6ef7);background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4f6ef7) 12%,var(--dsw-alias-bg-layer-1,#fff))}.xmimo-tts-custom-voice-avatar svg{width:30px;height:30px;overflow:visible}.xmimo-tts-custom-voice-avatar circle{fill:currentColor}.xmimo-tts-custom-voice-avatar path{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.xmimo-tts-voice-option-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:1px}.xmimo-tts-voice-option-copy strong{overflow:hidden;font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.xmimo-tts-voice-option-copy small{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.xmimo-tts-voice-picker-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#8b93a1);transition:transform 160ms ease}.xmimo-tts-voice-picker-chevron-open{transform:rotate(180deg)}.xmimo-tts-voice-picker-menu{display:grid;max-height:310px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:10px;padding:5px;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:0 10px 28px rgba(15,23,42,.12)}.xmimo-tts-voice-option{min-height:50px;border:0;border-radius:7px;padding:5px 7px;background:transparent}.xmimo-tts-voice-option:hover,.xmimo-tts-voice-option:focus-visible{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6)}.xmimo-tts-voice-option-selected{background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4f6ef7) 10%,transparent)}\n .xmimo-tts-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);font-size:12px;color:var(--dsw-alias-label-tertiary,#8b93a1)}.xmimo-tts-card-actions button{border:1px solid var(--dsw-alias-brand-primary,#4f6ef7);border-radius:8px;padding:5px 14px;color:var(--dsw-alias-bg-layer-1,#fff);background:var(--dsw-alias-brand-primary,#4f6ef7);cursor:pointer;font:inherit}.xmimo-tts-card-actions button:hover:not(:disabled){filter:brightness(1.08)}.xmimo-tts-card-actions button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed,#9ca3af);background:var(--dsw-alias-bg-layer-2,#f3f4f6);border-color:var(--dsw-alias-border-l2,#e5e7eb);opacity:1}.xmimo-tts-card-actions .xmimo-tts-star{border-color:transparent;color:var(--dsw-alias-brand-primary,#4f6ef7);background:transparent;font-weight:500}.xmimo-tts-card-actions .xmimo-tts-star:hover{text-decoration:underline}.xmimo-tts-card-actions .xmimo-tts-uninstall{margin-right:auto;border-color:#F56C6C;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall:hover:not(:disabled){background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-uninstall:disabled{border-color:#F56C6C;color:#F56C6C;background:transparent;opacity:.55}.xmimo-tts-uninstall-confirmation{display:flex;align-items:center;gap:8px;margin-right:auto;color:#F56C6C}.xmimo-tts-uninstall-choice{display:inline-flex;overflow:hidden;border:1px solid #F56C6C;border-radius:8px}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button{border:0;border-radius:0;padding:5px 12px;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button+button{border-left:1px solid #F56C6C}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button:hover{filter:none;background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-discard{border-color:var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-secondary,#5f6875);background:transparent}.xmimo-tts-card-actions .xmimo-tts-discard:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-failed{color:var(--dsw-alias-state-error-primary,#dc2626)}\n @media(max-width:720px){.xmimo-tts-grid{grid-template-columns:1fr}.xmimo-tts-wide{grid-column:auto}.xmimo-tts-switch-row{grid-template-columns:1fr}.xmimo-tts-switch-row>*:first-child{padding-right:0;padding-bottom:16px}.xmimo-tts-switch-row>*+*{padding-top:16px;padding-left:0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-left:0}.xmimo-tts-select-column{grid-column:auto;flex-direction:column}.xmimo-tts-select-column>div:first-child:not(:only-child){padding-right:0;padding-bottom:16px}.xmimo-tts-select-column>div+div{padding-top:16px;padding-left:0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-left:0}.xmimo-tts-api-key-hints{flex-wrap:wrap}.xmimo-tts-api-key-hints small{white-space:normal}}\n ";
|
|
1
|
+
export declare const CLIENT_STYLES = "\n .xmimo-tts-action{width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:transparent;border:none;border-radius:28px;justify-content:center;align-items:center;padding:6px;display:inline-flex}.xmimo-tts-action:hover{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6);color:var(--dsw-alias-label-secondary,#5f6875)}.xmimo-tts-action[aria-pressed=true]{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6);color:var(--dsw-alias-label-secondary,#5f6875)}.xmimo-tts-action:disabled{cursor:default;opacity:.45}.xmimo-tts-spin{animation:xmimo-spin 1s linear infinite}@keyframes xmimo-spin{to{transform:rotate(360deg)}}\n .xmimo-tts-inline-error{max-width:220px;color:var(--dsw-alias-state-error-primary,#dc2626);font-size:12px}\n .xmimo-tts-api-key-warning{color:var(--dsw-alias-state-error-primary,#dc2626)!important}\n .xmimo-tts-card{list-style:none;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:12px;color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-3,#fff);overflow:hidden;transition:border-color 160ms ease,background 160ms ease}.xmimo-tts-card:hover{border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-card-open{background:var(--dsw-alias-bg-layer-2,#f7f8fa);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-card-header{appearance:none;display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:0;border-radius:12px;color:inherit;text-align:left;background:transparent;font:inherit;cursor:pointer}.xmimo-tts-card-header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:-2px}.xmimo-tts-card-head-text{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.xmimo-tts-card-title{font-size:15px;font-weight:600}.xmimo-tts-card-description{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:13px;line-height:18px}.xmimo-tts-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#8b93a1);transition:transform 160ms ease}.xmimo-tts-chevron-open{transform:rotate(180deg)}.xmimo-tts-pending{flex:none;border-radius:999px;padding:1px 8px;color:var(--dsw-alias-label-secondary,#5f6875);background:var(--dsw-alias-bg-module-platform,#eef0f3);font-size:11px;font-weight:500;line-height:17px}.xmimo-tts-card-body{border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);margin:0 16px;padding:0 0 16px}\n .xmimo-tts-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;align-items:start}.xmimo-tts-grid>*{box-sizing:border-box;padding:16px 0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.xmimo-tts-grid>:first-child{border-top:0}.xmimo-tts-grid label,.xmimo-tts-api-key,.xmimo-tts-model,.xmimo-tts-voice-design-prompt,.xmimo-tts-select-column>div{display:flex;min-width:0;flex-direction:column;gap:6px;font-size:13px}.xmimo-tts-grid input,.xmimo-tts-grid select,.xmimo-tts-grid textarea{box-sizing:border-box;width:100%;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:8px;padding:8px 10px;color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-2,#f3f4f6);font:inherit}.xmimo-tts-grid select{color-scheme:light dark}.xmimo-tts-grid select option{color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-1,#fff)}.xmimo-tts-grid select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}.xmimo-tts-grid small{color:var(--dsw-alias-label-tertiary,#8b93a1);line-height:17px}.xmimo-tts-field-heading{display:flex;min-width:0;min-height:20px;flex-direction:row!important;align-items:center;justify-content:space-between;gap:8px}.xmimo-tts-field-label{display:inline-flex;min-width:0;align-items:center;gap:8px}.xmimo-tts-api-key-link{color:var(--dsw-alias-brand-primary,#4f6ef7);font-size:12px;text-decoration:none}.xmimo-tts-api-key-link:hover{text-decoration:underline}.xmimo-tts-field-badges{display:flex!important;flex:none;flex-direction:row!important;align-items:center;gap:8px}.xmimo-tts-overridden{border-radius:999px;padding:1px 7px;color:var(--dsw-alias-label-secondary,#5f6875);background:var(--dsw-alias-bg-module-platform,#eef0f3);font-size:11px;line-height:17px}.xmimo-tts-reset{padding:0;border:0;color:var(--dsw-alias-label-secondary,#5f6875);background:transparent;font:inherit;font-size:12px;cursor:pointer}.xmimo-tts-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328)}.xmimo-tts-reset:disabled{cursor:not-allowed;opacity:.45}.xmimo-tts-api-key-hints{display:flex;min-width:0;gap:8px;align-items:center}.xmimo-tts-api-key-hints small{min-width:0;white-space:nowrap}.xmimo-tts-wide{grid-column:1/-1}.xmimo-tts-switch-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0}.xmimo-tts-switch-row>*:first-child{padding-right:14px}.xmimo-tts-switch-row>*+*{padding-left:14px;border-left:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.xmimo-tts-checkbox-row{position:relative;flex-direction:row!important;align-items:center!important;gap:10px!important;cursor:pointer}.xmimo-tts-switch-copy{display:flex;min-width:0;flex-direction:column;gap:4px}.xmimo-tts-checkbox-row>input{position:absolute;width:1px!important;height:1px;margin:0!important;padding:0!important;overflow:hidden;border:0!important;opacity:0;clip-path:inset(50%)}.xmimo-tts-switch-control{box-sizing:border-box;position:relative;display:inline-block!important;width:36px;height:20px;min-width:36px;flex:none;border:1px solid var(--dsw-alias-border-l2,#c8ccd4);border-radius:999px;background:var(--dsw-alias-bg-module-platform,#e5e7eb);transition:border-color 160ms ease,background 160ms ease}.xmimo-tts-switch-control:after{content:\"\";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:0 1px 3px rgba(15,23,42,.24);transition:transform 160ms ease}.xmimo-tts-checkbox-row>input:checked+.xmimo-tts-switch-control{border-color:var(--dsw-alias-brand-primary,#4f6ef7);background:var(--dsw-alias-brand-primary,#4f6ef7)}.xmimo-tts-checkbox-row>input:checked+.xmimo-tts-switch-control:after{transform:translateX(16px)}.xmimo-tts-checkbox-row>input:focus-visible+.xmimo-tts-switch-control{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:2px}.xmimo-tts-checkbox-row>input:disabled+.xmimo-tts-switch-control{cursor:not-allowed;opacity:.45}.xmimo-tts-select-column{display:flex;min-width:0;flex-direction:row;gap:0}.xmimo-tts-select-column>div{flex:1}.xmimo-tts-select-column>div:first-child:not(:only-child){padding-right:16px}.xmimo-tts-select-column>div+div{padding-left:16px;border-left:1px solid var(--dsw-alias-border-l2,#e5e7eb)}\n .xmimo-tts-voice-picker{display:flex;min-width:0;flex-direction:column;gap:6px}.xmimo-tts-voice-picker-trigger,.xmimo-tts-voice-option{box-sizing:border-box;display:flex;width:100%;min-width:0;align-items:center;gap:10px;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-2,#f3f4f6);font:inherit;text-align:left;cursor:pointer}.xmimo-tts-voice-picker-trigger{min-height:54px;border-radius:10px;padding:6px 10px}.xmimo-tts-voice-picker-trigger:hover:not(:disabled){border-color:var(--dsw-alias-label-dimmed,#c8ccd4);background:var(--dsw-alias-interactive-bg-hover,#eef0f3)}.xmimo-tts-voice-picker-trigger:focus-visible,.xmimo-tts-voice-option:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}.xmimo-tts-voice-picker-trigger:disabled{cursor:not-allowed;opacity:.55}.xmimo-tts-voice-avatar{box-sizing:border-box;display:block;width:40px;height:40px;flex:none;border:1px solid color-mix(in srgb,var(--dsw-alias-border-l2,#e5e7eb) 80%,transparent);border-radius:50%;object-fit:cover;background:var(--dsw-alias-bg-layer-1,#fff)}.xmimo-tts-custom-voice-avatar{display:grid;place-items:center;color:var(--dsw-alias-brand-primary,#4f6ef7);background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4f6ef7) 12%,var(--dsw-alias-bg-layer-1,#fff))}.xmimo-tts-custom-voice-avatar svg{width:30px;height:30px;overflow:visible}.xmimo-tts-custom-voice-avatar circle{fill:currentColor}.xmimo-tts-custom-voice-avatar path{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.xmimo-tts-voice-option-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:1px}.xmimo-tts-voice-option-copy strong{overflow:hidden;font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.xmimo-tts-voice-option-copy small{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.xmimo-tts-voice-picker-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#8b93a1);transition:transform 160ms ease}.xmimo-tts-voice-picker-chevron-open{transform:rotate(180deg)}.xmimo-tts-voice-picker-menu{display:grid;max-height:310px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:10px;padding:5px;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:0 10px 28px rgba(15,23,42,.12)}.xmimo-tts-voice-option{min-height:50px;border:0;border-radius:7px;padding:5px 7px;background:transparent}.xmimo-tts-voice-option:hover,.xmimo-tts-voice-option:focus-visible{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6)}.xmimo-tts-voice-option-selected{background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4f6ef7) 10%,transparent)}\n .xmimo-tts-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);font-size:12px;color:var(--dsw-alias-label-tertiary,#8b93a1)}.xmimo-tts-card-actions button{border:1px solid var(--dsw-alias-brand-primary,#4f6ef7);border-radius:8px;padding:5px 14px;color:var(--dsw-alias-bg-layer-1,#fff);background:var(--dsw-alias-brand-primary,#4f6ef7);cursor:pointer;font:inherit}.xmimo-tts-card-actions button:hover:not(:disabled){filter:brightness(1.08)}.xmimo-tts-card-actions button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed,#9ca3af);background:var(--dsw-alias-bg-layer-2,#f3f4f6);border-color:var(--dsw-alias-border-l2,#e5e7eb);opacity:1}.xmimo-tts-card-actions .xmimo-tts-update{display:inline-flex;align-items:center;border:1px solid var(--dsw-alias-brand-primary,#4f6ef7);border-radius:8px;padding:5px 14px;color:var(--dsw-alias-brand-primary,#4f6ef7);background:transparent;text-decoration:none}.xmimo-tts-card-actions .xmimo-tts-update:hover{filter:brightness(1.08)}.xmimo-tts-card-actions .xmimo-tts-star{border-color:transparent;color:var(--dsw-alias-brand-primary,#4f6ef7);background:transparent;font-weight:500}.xmimo-tts-card-actions .xmimo-tts-star:hover{text-decoration:underline}.xmimo-tts-card-actions .xmimo-tts-uninstall{margin-right:auto;border-color:#F56C6C;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall:hover:not(:disabled){background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-uninstall:disabled{border-color:#F56C6C;color:#F56C6C;background:transparent;opacity:.55}.xmimo-tts-uninstall-confirmation{display:flex;align-items:center;gap:8px;margin-right:auto;color:#F56C6C}.xmimo-tts-uninstall-choice{display:inline-flex;overflow:hidden;border:1px solid #F56C6C;border-radius:8px}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button{border:0;border-radius:0;padding:5px 12px;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button+button{border-left:1px solid #F56C6C}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button:hover{filter:none;background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-discard{border-color:var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-secondary,#5f6875);background:transparent}.xmimo-tts-card-actions .xmimo-tts-discard:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-failed{color:var(--dsw-alias-state-error-primary,#dc2626)}.xmimo-tts-version{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:11px;font-weight:400}\n @media(max-width:720px){.xmimo-tts-grid{grid-template-columns:1fr}.xmimo-tts-wide{grid-column:auto}.xmimo-tts-switch-row{grid-template-columns:1fr}.xmimo-tts-switch-row>*:first-child{padding-right:0;padding-bottom:16px}.xmimo-tts-switch-row>*+*{padding-top:16px;padding-left:0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-left:0}.xmimo-tts-select-column{grid-column:auto;flex-direction:column}.xmimo-tts-select-column>div:first-child:not(:only-child){padding-right:0;padding-bottom:16px}.xmimo-tts-select-column>div+div{padding-top:16px;padding-left:0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-left:0}.xmimo-tts-api-key-hints{flex-wrap:wrap}.xmimo-tts-api-key-hints small{white-space:normal}}\n .xmimo-tts-card-actions .xmimo-tts-uninstall{margin-right:0}.xmimo-tts-card-actions .xmimo-tts-star{margin-right:auto}.xmimo-tts-uninstall-confirmation{margin-right:0}\n ";
|
|
2
2
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAI,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAI,eAAO,MAAM,aAAa,40ZAUzB,CAAA"}
|
package/lib/client.js
CHANGED
|
@@ -39,6 +39,12 @@ const TTS_ROUTE = "/plugins/xiaomi-mimo-tts/synthesize";
|
|
|
39
39
|
const TTS_STREAM_ROUTE = "/plugins/xiaomi-mimo-tts/synthesize-stream";
|
|
40
40
|
/** Same-origin route that removes this plugin from the DSH Web profile. */
|
|
41
41
|
const TTS_UNINSTALL_ROUTE = "/plugins/xiaomi-mimo-tts/uninstall";
|
|
42
|
+
/** Same-origin route that checks the published npm version. */
|
|
43
|
+
const TTS_UPDATE_ROUTE = "/plugins/xiaomi-mimo-tts/update";
|
|
44
|
+
/** Keep the UI version visible without making the browser bundle load package.json. */
|
|
45
|
+
const TTS_VERSION = "2.3.2";
|
|
46
|
+
/** Same-origin route that reports API key configuration status without exposing the key. */
|
|
47
|
+
const TTS_API_KEY_STATUS_ROUTE = "/plugins/xiaomi-mimo-tts/api-key-status";
|
|
42
48
|
/** Same-origin prefix used by the Web client to load voice-design preset icons. */
|
|
43
49
|
const TTS_VOICE_DESIGN_ASSET_ROUTE = "/plugins/xiaomi-mimo-tts/voice-presets";
|
|
44
50
|
/** Supported built-in Xiaomi MiMo voices. */
|
|
@@ -268,6 +274,11 @@ const DEFAULT_TTS_SETTINGS = {
|
|
|
268
274
|
maxTextLength: 12e3,
|
|
269
275
|
requestTimeoutMs: 12e4
|
|
270
276
|
};
|
|
277
|
+
/** Whether an API key selects one of the Xiaomi endpoints supported by this plugin. */
|
|
278
|
+
function isSupportedTtsApiKey(apiKey) {
|
|
279
|
+
const normalized = apiKey.trim();
|
|
280
|
+
return normalized.startsWith("sk-") || normalized.startsWith("tp-");
|
|
281
|
+
}
|
|
271
282
|
/** Resolve an optional settings snapshot into the values used by the form. */
|
|
272
283
|
function resolveTtsSettings(value) {
|
|
273
284
|
const resolved = {
|
|
@@ -1075,9 +1086,10 @@ const zh = {
|
|
|
1075
1086
|
"settings.enabled": "显示朗读按钮",
|
|
1076
1087
|
"settings.enabledHint": "关闭后不会在助手回复操作栏显示朗读按钮,也不会自动播报。",
|
|
1077
1088
|
"settings.apiKey": "API Key",
|
|
1078
|
-
"settings.apiKeyHint": "密钥保存在 DSH 设置文件中,传到浏览器前会被脱敏。",
|
|
1079
1089
|
"settings.apiKeyStatus": "只有输入新值并保存时才会替换现有密钥。",
|
|
1080
1090
|
"settings.apiKeyConfigured": "已配置",
|
|
1091
|
+
"settings.apiKeyMissing": "尚未配置 API Key,请先获取并设置密钥。",
|
|
1092
|
+
"settings.apiKeyUnsupported": "这个 API Key 似乎是错的,请检查并重新设置(sk-/tp- 开头)。",
|
|
1081
1093
|
"settings.getApiKey": "获取 API Key",
|
|
1082
1094
|
"settings.autoPlay": "开启自动播报",
|
|
1083
1095
|
"settings.autoPlayHint": "开启时会同步显示朗读按钮;浏览器也可能拒绝自动播放。",
|
|
@@ -1100,14 +1112,15 @@ const zh = {
|
|
|
1100
1112
|
"settings.reset": "恢复默认",
|
|
1101
1113
|
"settings.discard": "放弃修改",
|
|
1102
1114
|
"settings.failed": "保存失败,请重试。",
|
|
1103
|
-
"settings.
|
|
1104
|
-
"settings.uninstall": "
|
|
1115
|
+
"settings.source": "✨查看源码",
|
|
1116
|
+
"settings.uninstall": "卸载",
|
|
1105
1117
|
"settings.uninstalling": "卸载中…",
|
|
1106
1118
|
"settings.uninstallQuestion": "确认卸载?",
|
|
1107
1119
|
"settings.uninstallConfirm": "确认",
|
|
1108
1120
|
"settings.uninstallCancel": "取消",
|
|
1109
|
-
"settings.uninstalled": "
|
|
1121
|
+
"settings.uninstalled": "已卸载;重启DSH不再加载此插件。",
|
|
1110
1122
|
"settings.uninstallFailed": "卸载失败,请重试或使用 DSH 命令行卸载。",
|
|
1123
|
+
"settings.updateAvailable": "🎉新版已发布",
|
|
1111
1124
|
"settings.readOnly": "当前 DSH 设置为只读。",
|
|
1112
1125
|
"settings.secretPlaceholder": "输入新的 Xiaomi MiMo API Key",
|
|
1113
1126
|
"settings.expand": "展开设置",
|
|
@@ -1129,9 +1142,10 @@ const en = {
|
|
|
1129
1142
|
"settings.enabled": "Show read-aloud button",
|
|
1130
1143
|
"settings.enabledHint": "When disabled, the read-aloud button and automatic speech are both turned off.",
|
|
1131
1144
|
"settings.apiKey": "API Key",
|
|
1132
|
-
"settings.apiKeyHint": "Stored in DSH settings and redacted before settings are sent to the browser.",
|
|
1133
1145
|
"settings.apiKeyStatus": "An existing key changes only when you save a new value.",
|
|
1134
1146
|
"settings.apiKeyConfigured": "Configured",
|
|
1147
|
+
"settings.apiKeyMissing": "No API key is configured. Get and set an API key first.",
|
|
1148
|
+
"settings.apiKeyUnsupported": "This API key seems invalid. Check it and set it again (starting with sk- or tp-).",
|
|
1135
1149
|
"settings.getApiKey": "Get API Key",
|
|
1136
1150
|
"settings.autoPlay": "Enable automatic read-aloud",
|
|
1137
1151
|
"settings.autoPlayHint": "Enabling it also shows the read-aloud button; the browser may reject autoplay.",
|
|
@@ -1154,14 +1168,15 @@ const en = {
|
|
|
1154
1168
|
"settings.reset": "Restore default",
|
|
1155
1169
|
"settings.discard": "Discard changes",
|
|
1156
1170
|
"settings.failed": "Save failed. Try again.",
|
|
1157
|
-
"settings.
|
|
1158
|
-
"settings.uninstall": "Uninstall
|
|
1171
|
+
"settings.source": "✨ View source",
|
|
1172
|
+
"settings.uninstall": "Uninstall",
|
|
1159
1173
|
"settings.uninstalling": "Uninstalling…",
|
|
1160
1174
|
"settings.uninstallQuestion": "Confirm uninstall?",
|
|
1161
1175
|
"settings.uninstallConfirm": "Confirm",
|
|
1162
1176
|
"settings.uninstallCancel": "Cancel",
|
|
1163
|
-
"settings.uninstalled": "Uninstalled.
|
|
1177
|
+
"settings.uninstalled": "Uninstalled. DSH remains active and will not load the plugin on its next start.",
|
|
1164
1178
|
"settings.uninstallFailed": "Uninstall failed. Try again or remove the plugin with the DSH CLI.",
|
|
1179
|
+
"settings.updateAvailable": "🎉 New release",
|
|
1165
1180
|
"settings.readOnly": "DSH settings are read-only.",
|
|
1166
1181
|
"settings.secretPlaceholder": "Enter a new Xiaomi MiMo API key",
|
|
1167
1182
|
"settings.expand": "Expand settings",
|
|
@@ -1353,6 +1368,11 @@ const EDITABLE_SETTING_FIELDS = [
|
|
|
1353
1368
|
"voiceDesignCustomPrompt",
|
|
1354
1369
|
"format"
|
|
1355
1370
|
];
|
|
1371
|
+
const RELEASES_URL = "https://github.com/ppy-web/dsh-plugin-xiaomi-mimo-tts/releases";
|
|
1372
|
+
function hostRoute(path) {
|
|
1373
|
+
const relative = path.replace(/^\/+/, "");
|
|
1374
|
+
return typeof document === "undefined" ? `/${relative}` : new URL(relative, document.baseURI).pathname;
|
|
1375
|
+
}
|
|
1356
1376
|
function layerSettings(value) {
|
|
1357
1377
|
return isRecord(value) ? value : void 0;
|
|
1358
1378
|
}
|
|
@@ -1400,6 +1420,8 @@ function SettingsCard({ scope, t }) {
|
|
|
1400
1420
|
const [state, setState] = (0, react.useState)("idle");
|
|
1401
1421
|
const [uninstallState, setUninstallState] = (0, react.useState)("idle");
|
|
1402
1422
|
const [open, setOpen] = (0, react.useState)(false);
|
|
1423
|
+
const [apiKeyStatus, setApiKeyStatus] = (0, react.useState)("loading");
|
|
1424
|
+
const [latestVersion, setLatestVersion] = (0, react.useState)(null);
|
|
1403
1425
|
const accepted = resolveTtsSettings(value);
|
|
1404
1426
|
const base = resolveTtsSettings(layerSettings(snapshot.base));
|
|
1405
1427
|
const draft = {
|
|
@@ -1430,6 +1452,45 @@ function SettingsCard({ scope, t }) {
|
|
|
1430
1452
|
};
|
|
1431
1453
|
const apiKeyDirty = changes.apiKey?.kind === "clear" ? hasOverride("apiKey") : changes.apiKey?.kind === "set" && apiKey.trim().length > 0;
|
|
1432
1454
|
const dirty = EDITABLE_SETTING_FIELDS.some(fieldDirty) || apiKeyDirty === true;
|
|
1455
|
+
const enteredApiKey = apiKey.trim();
|
|
1456
|
+
const apiKeyWarning = enteredApiKey.length > 0 ? !isSupportedTtsApiKey(enteredApiKey) : apiKeyStatus === "missing" || apiKeyStatus === "unsupported";
|
|
1457
|
+
const apiKeyMessage = enteredApiKey.length > 0 ? isSupportedTtsApiKey(enteredApiKey) ? t("settings.apiKeyStatus") : t("settings.apiKeyUnsupported") : apiKeyStatus === "missing" ? t("settings.apiKeyMissing") : apiKeyStatus === "unsupported" ? t("settings.apiKeyUnsupported") : t("settings.apiKeyStatus");
|
|
1458
|
+
(0, react.useEffect)(() => {
|
|
1459
|
+
if (snapshot.status === "unavailable") return;
|
|
1460
|
+
let active = true;
|
|
1461
|
+
setApiKeyStatus("loading");
|
|
1462
|
+
fetch(TTS_API_KEY_STATUS_ROUTE, { headers: { accept: "application/json" } }).then(async (response) => {
|
|
1463
|
+
if (!response.ok) throw new Error("api-key-status-failed");
|
|
1464
|
+
return await response.json();
|
|
1465
|
+
}).then((status) => {
|
|
1466
|
+
if (!active) return;
|
|
1467
|
+
setApiKeyStatus(status.configured !== true ? "missing" : status.supported === true ? "supported" : "unsupported");
|
|
1468
|
+
}).catch(() => {
|
|
1469
|
+
if (active) setApiKeyStatus("missing");
|
|
1470
|
+
});
|
|
1471
|
+
return () => {
|
|
1472
|
+
active = false;
|
|
1473
|
+
};
|
|
1474
|
+
}, [snapshot.status, value]);
|
|
1475
|
+
(0, react.useEffect)(() => {
|
|
1476
|
+
if (!open) return;
|
|
1477
|
+
let active = true;
|
|
1478
|
+
fetch(hostRoute(TTS_UPDATE_ROUTE), {
|
|
1479
|
+
cache: "no-store",
|
|
1480
|
+
headers: { accept: "application/json" }
|
|
1481
|
+
}).then(async (response) => {
|
|
1482
|
+
if (!response.ok) throw new Error("version-check-failed");
|
|
1483
|
+
return await response.json();
|
|
1484
|
+
}).then((result) => {
|
|
1485
|
+
if (!active) return;
|
|
1486
|
+
setLatestVersion(result.updateAvailable === true && typeof result.latestVersion === "string" ? result.latestVersion : null);
|
|
1487
|
+
}).catch(() => {
|
|
1488
|
+
if (active) setLatestVersion(null);
|
|
1489
|
+
});
|
|
1490
|
+
return () => {
|
|
1491
|
+
active = false;
|
|
1492
|
+
};
|
|
1493
|
+
}, [open]);
|
|
1433
1494
|
(0, react.useEffect)(() => {
|
|
1434
1495
|
if (dirty) return;
|
|
1435
1496
|
const next = resolveTtsSettings(value);
|
|
@@ -1497,7 +1558,7 @@ function SettingsCard({ scope, t }) {
|
|
|
1497
1558
|
const uninstall = async () => {
|
|
1498
1559
|
setUninstallState("uninstalling");
|
|
1499
1560
|
try {
|
|
1500
|
-
const response = await fetch(TTS_UNINSTALL_ROUTE, {
|
|
1561
|
+
const response = await fetch(hostRoute(TTS_UNINSTALL_ROUTE), {
|
|
1501
1562
|
method: "POST",
|
|
1502
1563
|
headers: { "content-type": "application/json" },
|
|
1503
1564
|
body: "{}"
|
|
@@ -1522,9 +1583,16 @@ function SettingsCard({ scope, t }) {
|
|
|
1522
1583
|
children: [
|
|
1523
1584
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1524
1585
|
className: "xmimo-tts-card-head-text",
|
|
1525
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
1586
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1526
1587
|
className: "xmimo-tts-card-title",
|
|
1527
|
-
children:
|
|
1588
|
+
children: [
|
|
1589
|
+
t("settings.title"),
|
|
1590
|
+
" ",
|
|
1591
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", {
|
|
1592
|
+
className: "xmimo-tts-version",
|
|
1593
|
+
children: ["v", TTS_VERSION]
|
|
1594
|
+
})
|
|
1595
|
+
]
|
|
1528
1596
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1529
1597
|
className: "xmimo-tts-card-description",
|
|
1530
1598
|
children: t("settings.description")
|
|
@@ -1577,9 +1645,10 @@ function SettingsCard({ scope, t }) {
|
|
|
1577
1645
|
markChange("apiKey");
|
|
1578
1646
|
}
|
|
1579
1647
|
}),
|
|
1580
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
1581
|
-
className: "xmimo-tts-api-key-
|
|
1582
|
-
|
|
1648
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", {
|
|
1649
|
+
className: apiKeyWarning ? "xmimo-tts-api-key-warning" : void 0,
|
|
1650
|
+
role: apiKeyWarning ? "alert" : void 0,
|
|
1651
|
+
children: apiKeyMessage
|
|
1583
1652
|
})
|
|
1584
1653
|
]
|
|
1585
1654
|
}),
|
|
@@ -1797,6 +1866,13 @@ function SettingsCard({ scope, t }) {
|
|
|
1797
1866
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1798
1867
|
className: "xmimo-tts-card-actions",
|
|
1799
1868
|
children: [
|
|
1869
|
+
uninstallState === "idle" && latestVersion !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
1870
|
+
className: "xmimo-tts-update",
|
|
1871
|
+
href: RELEASES_URL,
|
|
1872
|
+
target: "_blank",
|
|
1873
|
+
rel: "noopener noreferrer",
|
|
1874
|
+
children: t("settings.updateAvailable")
|
|
1875
|
+
}) : null,
|
|
1800
1876
|
uninstallState === "confirming" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1801
1877
|
className: "xmimo-tts-uninstall-confirmation",
|
|
1802
1878
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("settings.uninstallQuestion") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -1829,7 +1905,7 @@ function SettingsCard({ scope, t }) {
|
|
|
1829
1905
|
href: "https://github.com/ppy-web/dsh-plugin-xiaomi-mimo-tts",
|
|
1830
1906
|
target: "_blank",
|
|
1831
1907
|
rel: "noopener noreferrer",
|
|
1832
|
-
children: t("settings.
|
|
1908
|
+
children: t("settings.source")
|
|
1833
1909
|
}),
|
|
1834
1910
|
!snapshot.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("settings.readOnly") }) : null,
|
|
1835
1911
|
uninstallState === "uninstalled" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1876,11 +1952,13 @@ function SettingsCard({ scope, t }) {
|
|
|
1876
1952
|
const CLIENT_STYLES = `
|
|
1877
1953
|
.xmimo-tts-action{width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:transparent;border:none;border-radius:28px;justify-content:center;align-items:center;padding:6px;display:inline-flex}.xmimo-tts-action:hover{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6);color:var(--dsw-alias-label-secondary,#5f6875)}.xmimo-tts-action[aria-pressed=true]{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6);color:var(--dsw-alias-label-secondary,#5f6875)}.xmimo-tts-action:disabled{cursor:default;opacity:.45}.xmimo-tts-spin{animation:xmimo-spin 1s linear infinite}@keyframes xmimo-spin{to{transform:rotate(360deg)}}
|
|
1878
1954
|
.xmimo-tts-inline-error{max-width:220px;color:var(--dsw-alias-state-error-primary,#dc2626);font-size:12px}
|
|
1955
|
+
.xmimo-tts-api-key-warning{color:var(--dsw-alias-state-error-primary,#dc2626)!important}
|
|
1879
1956
|
.xmimo-tts-card{list-style:none;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:12px;color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-3,#fff);overflow:hidden;transition:border-color 160ms ease,background 160ms ease}.xmimo-tts-card:hover{border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-card-open{background:var(--dsw-alias-bg-layer-2,#f7f8fa);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-card-header{appearance:none;display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:0;border-radius:12px;color:inherit;text-align:left;background:transparent;font:inherit;cursor:pointer}.xmimo-tts-card-header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:-2px}.xmimo-tts-card-head-text{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.xmimo-tts-card-title{font-size:15px;font-weight:600}.xmimo-tts-card-description{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:13px;line-height:18px}.xmimo-tts-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#8b93a1);transition:transform 160ms ease}.xmimo-tts-chevron-open{transform:rotate(180deg)}.xmimo-tts-pending{flex:none;border-radius:999px;padding:1px 8px;color:var(--dsw-alias-label-secondary,#5f6875);background:var(--dsw-alias-bg-module-platform,#eef0f3);font-size:11px;font-weight:500;line-height:17px}.xmimo-tts-card-body{border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);margin:0 16px;padding:0 0 16px}
|
|
1880
1957
|
.xmimo-tts-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;align-items:start}.xmimo-tts-grid>*{box-sizing:border-box;padding:16px 0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.xmimo-tts-grid>:first-child{border-top:0}.xmimo-tts-grid label,.xmimo-tts-api-key,.xmimo-tts-model,.xmimo-tts-voice-design-prompt,.xmimo-tts-select-column>div{display:flex;min-width:0;flex-direction:column;gap:6px;font-size:13px}.xmimo-tts-grid input,.xmimo-tts-grid select,.xmimo-tts-grid textarea{box-sizing:border-box;width:100%;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:8px;padding:8px 10px;color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-2,#f3f4f6);font:inherit}.xmimo-tts-grid select{color-scheme:light dark}.xmimo-tts-grid select option{color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-1,#fff)}.xmimo-tts-grid select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}.xmimo-tts-grid small{color:var(--dsw-alias-label-tertiary,#8b93a1);line-height:17px}.xmimo-tts-field-heading{display:flex;min-width:0;min-height:20px;flex-direction:row!important;align-items:center;justify-content:space-between;gap:8px}.xmimo-tts-field-label{display:inline-flex;min-width:0;align-items:center;gap:8px}.xmimo-tts-api-key-link{color:var(--dsw-alias-brand-primary,#4f6ef7);font-size:12px;text-decoration:none}.xmimo-tts-api-key-link:hover{text-decoration:underline}.xmimo-tts-field-badges{display:flex!important;flex:none;flex-direction:row!important;align-items:center;gap:8px}.xmimo-tts-overridden{border-radius:999px;padding:1px 7px;color:var(--dsw-alias-label-secondary,#5f6875);background:var(--dsw-alias-bg-module-platform,#eef0f3);font-size:11px;line-height:17px}.xmimo-tts-reset{padding:0;border:0;color:var(--dsw-alias-label-secondary,#5f6875);background:transparent;font:inherit;font-size:12px;cursor:pointer}.xmimo-tts-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328)}.xmimo-tts-reset:disabled{cursor:not-allowed;opacity:.45}.xmimo-tts-api-key-hints{display:flex;min-width:0;gap:8px;align-items:center}.xmimo-tts-api-key-hints small{min-width:0;white-space:nowrap}.xmimo-tts-wide{grid-column:1/-1}.xmimo-tts-switch-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0}.xmimo-tts-switch-row>*:first-child{padding-right:14px}.xmimo-tts-switch-row>*+*{padding-left:14px;border-left:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.xmimo-tts-checkbox-row{position:relative;flex-direction:row!important;align-items:center!important;gap:10px!important;cursor:pointer}.xmimo-tts-switch-copy{display:flex;min-width:0;flex-direction:column;gap:4px}.xmimo-tts-checkbox-row>input{position:absolute;width:1px!important;height:1px;margin:0!important;padding:0!important;overflow:hidden;border:0!important;opacity:0;clip-path:inset(50%)}.xmimo-tts-switch-control{box-sizing:border-box;position:relative;display:inline-block!important;width:36px;height:20px;min-width:36px;flex:none;border:1px solid var(--dsw-alias-border-l2,#c8ccd4);border-radius:999px;background:var(--dsw-alias-bg-module-platform,#e5e7eb);transition:border-color 160ms ease,background 160ms ease}.xmimo-tts-switch-control:after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:0 1px 3px rgba(15,23,42,.24);transition:transform 160ms ease}.xmimo-tts-checkbox-row>input:checked+.xmimo-tts-switch-control{border-color:var(--dsw-alias-brand-primary,#4f6ef7);background:var(--dsw-alias-brand-primary,#4f6ef7)}.xmimo-tts-checkbox-row>input:checked+.xmimo-tts-switch-control:after{transform:translateX(16px)}.xmimo-tts-checkbox-row>input:focus-visible+.xmimo-tts-switch-control{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:2px}.xmimo-tts-checkbox-row>input:disabled+.xmimo-tts-switch-control{cursor:not-allowed;opacity:.45}.xmimo-tts-select-column{display:flex;min-width:0;flex-direction:row;gap:0}.xmimo-tts-select-column>div{flex:1}.xmimo-tts-select-column>div:first-child:not(:only-child){padding-right:16px}.xmimo-tts-select-column>div+div{padding-left:16px;border-left:1px solid var(--dsw-alias-border-l2,#e5e7eb)}
|
|
1881
1958
|
.xmimo-tts-voice-picker{display:flex;min-width:0;flex-direction:column;gap:6px}.xmimo-tts-voice-picker-trigger,.xmimo-tts-voice-option{box-sizing:border-box;display:flex;width:100%;min-width:0;align-items:center;gap:10px;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-2,#f3f4f6);font:inherit;text-align:left;cursor:pointer}.xmimo-tts-voice-picker-trigger{min-height:54px;border-radius:10px;padding:6px 10px}.xmimo-tts-voice-picker-trigger:hover:not(:disabled){border-color:var(--dsw-alias-label-dimmed,#c8ccd4);background:var(--dsw-alias-interactive-bg-hover,#eef0f3)}.xmimo-tts-voice-picker-trigger:focus-visible,.xmimo-tts-voice-option:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}.xmimo-tts-voice-picker-trigger:disabled{cursor:not-allowed;opacity:.55}.xmimo-tts-voice-avatar{box-sizing:border-box;display:block;width:40px;height:40px;flex:none;border:1px solid color-mix(in srgb,var(--dsw-alias-border-l2,#e5e7eb) 80%,transparent);border-radius:50%;object-fit:cover;background:var(--dsw-alias-bg-layer-1,#fff)}.xmimo-tts-custom-voice-avatar{display:grid;place-items:center;color:var(--dsw-alias-brand-primary,#4f6ef7);background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4f6ef7) 12%,var(--dsw-alias-bg-layer-1,#fff))}.xmimo-tts-custom-voice-avatar svg{width:30px;height:30px;overflow:visible}.xmimo-tts-custom-voice-avatar circle{fill:currentColor}.xmimo-tts-custom-voice-avatar path{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.xmimo-tts-voice-option-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:1px}.xmimo-tts-voice-option-copy strong{overflow:hidden;font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.xmimo-tts-voice-option-copy small{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.xmimo-tts-voice-picker-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#8b93a1);transition:transform 160ms ease}.xmimo-tts-voice-picker-chevron-open{transform:rotate(180deg)}.xmimo-tts-voice-picker-menu{display:grid;max-height:310px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:10px;padding:5px;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:0 10px 28px rgba(15,23,42,.12)}.xmimo-tts-voice-option{min-height:50px;border:0;border-radius:7px;padding:5px 7px;background:transparent}.xmimo-tts-voice-option:hover,.xmimo-tts-voice-option:focus-visible{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6)}.xmimo-tts-voice-option-selected{background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4f6ef7) 10%,transparent)}
|
|
1882
|
-
.xmimo-tts-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);font-size:12px;color:var(--dsw-alias-label-tertiary,#8b93a1)}.xmimo-tts-card-actions button{border:1px solid var(--dsw-alias-brand-primary,#4f6ef7);border-radius:8px;padding:5px 14px;color:var(--dsw-alias-bg-layer-1,#fff);background:var(--dsw-alias-brand-primary,#4f6ef7);cursor:pointer;font:inherit}.xmimo-tts-card-actions button:hover:not(:disabled){filter:brightness(1.08)}.xmimo-tts-card-actions button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed,#9ca3af);background:var(--dsw-alias-bg-layer-2,#f3f4f6);border-color:var(--dsw-alias-border-l2,#e5e7eb);opacity:1}.xmimo-tts-card-actions .xmimo-tts-star{border-color:transparent;color:var(--dsw-alias-brand-primary,#4f6ef7);background:transparent;font-weight:500}.xmimo-tts-card-actions .xmimo-tts-star:hover{text-decoration:underline}.xmimo-tts-card-actions .xmimo-tts-uninstall{margin-right:auto;border-color:#F56C6C;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall:hover:not(:disabled){background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-uninstall:disabled{border-color:#F56C6C;color:#F56C6C;background:transparent;opacity:.55}.xmimo-tts-uninstall-confirmation{display:flex;align-items:center;gap:8px;margin-right:auto;color:#F56C6C}.xmimo-tts-uninstall-choice{display:inline-flex;overflow:hidden;border:1px solid #F56C6C;border-radius:8px}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button{border:0;border-radius:0;padding:5px 12px;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button+button{border-left:1px solid #F56C6C}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button:hover{filter:none;background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-discard{border-color:var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-secondary,#5f6875);background:transparent}.xmimo-tts-card-actions .xmimo-tts-discard:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-failed{color:var(--dsw-alias-state-error-primary,#dc2626)}
|
|
1959
|
+
.xmimo-tts-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);font-size:12px;color:var(--dsw-alias-label-tertiary,#8b93a1)}.xmimo-tts-card-actions button{border:1px solid var(--dsw-alias-brand-primary,#4f6ef7);border-radius:8px;padding:5px 14px;color:var(--dsw-alias-bg-layer-1,#fff);background:var(--dsw-alias-brand-primary,#4f6ef7);cursor:pointer;font:inherit}.xmimo-tts-card-actions button:hover:not(:disabled){filter:brightness(1.08)}.xmimo-tts-card-actions button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed,#9ca3af);background:var(--dsw-alias-bg-layer-2,#f3f4f6);border-color:var(--dsw-alias-border-l2,#e5e7eb);opacity:1}.xmimo-tts-card-actions .xmimo-tts-update{display:inline-flex;align-items:center;border:1px solid var(--dsw-alias-brand-primary,#4f6ef7);border-radius:8px;padding:5px 14px;color:var(--dsw-alias-brand-primary,#4f6ef7);background:transparent;text-decoration:none}.xmimo-tts-card-actions .xmimo-tts-update:hover{filter:brightness(1.08)}.xmimo-tts-card-actions .xmimo-tts-star{border-color:transparent;color:var(--dsw-alias-brand-primary,#4f6ef7);background:transparent;font-weight:500}.xmimo-tts-card-actions .xmimo-tts-star:hover{text-decoration:underline}.xmimo-tts-card-actions .xmimo-tts-uninstall{margin-right:auto;border-color:#F56C6C;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall:hover:not(:disabled){background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-uninstall:disabled{border-color:#F56C6C;color:#F56C6C;background:transparent;opacity:.55}.xmimo-tts-uninstall-confirmation{display:flex;align-items:center;gap:8px;margin-right:auto;color:#F56C6C}.xmimo-tts-uninstall-choice{display:inline-flex;overflow:hidden;border:1px solid #F56C6C;border-radius:8px}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button{border:0;border-radius:0;padding:5px 12px;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button+button{border-left:1px solid #F56C6C}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button:hover{filter:none;background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-discard{border-color:var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-secondary,#5f6875);background:transparent}.xmimo-tts-card-actions .xmimo-tts-discard:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-failed{color:var(--dsw-alias-state-error-primary,#dc2626)}.xmimo-tts-version{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:11px;font-weight:400}
|
|
1883
1960
|
@media(max-width:720px){.xmimo-tts-grid{grid-template-columns:1fr}.xmimo-tts-wide{grid-column:auto}.xmimo-tts-switch-row{grid-template-columns:1fr}.xmimo-tts-switch-row>*:first-child{padding-right:0;padding-bottom:16px}.xmimo-tts-switch-row>*+*{padding-top:16px;padding-left:0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-left:0}.xmimo-tts-select-column{grid-column:auto;flex-direction:column}.xmimo-tts-select-column>div:first-child:not(:only-child){padding-right:0;padding-bottom:16px}.xmimo-tts-select-column>div+div{padding-top:16px;padding-left:0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-left:0}.xmimo-tts-api-key-hints{flex-wrap:wrap}.xmimo-tts-api-key-hints small{white-space:normal}}
|
|
1961
|
+
.xmimo-tts-card-actions .xmimo-tts-uninstall{margin-right:0}.xmimo-tts-card-actions .xmimo-tts-star{margin-right:auto}.xmimo-tts-uninstall-confirmation{margin-right:0}
|
|
1884
1962
|
`;
|
|
1885
1963
|
|
|
1886
1964
|
//#endregion
|