@celljs/ta-web 4.14.0 → 4.15.0
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 +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-initiative.js +1 -1
- package/esm/browser/components/access-view.js +3 -2
- package/esm/browser/components/account-menu.js +2 -2
- package/esm/browser/components/auth-view.d.ts +1 -1
- package/esm/browser/components/auth-view.js +38 -10
- package/esm/browser/components/custom-provider-advanced.d.ts +14 -0
- package/esm/browser/components/custom-provider-advanced.js +50 -0
- package/esm/browser/components/custom-provider-util.d.ts +38 -0
- package/esm/browser/components/custom-provider-util.js +103 -0
- package/esm/browser/components/custom-provider-view.d.ts +11 -0
- package/esm/browser/components/custom-provider-view.js +181 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/settings-choices.js +2 -3
- package/esm/browser/components/settings-controls.d.ts +7 -1
- package/esm/browser/components/settings-controls.js +8 -0
- package/esm/browser/components/settings-parts.js +11 -5
- package/esm/browser/components/sign-in-setup.js +3 -1
- package/esm/browser/editor/monaco-loader.js +7 -1
- package/esm/browser/extension/web-api-contributions.d.ts +3 -0
- package/esm/browser/extension/web-extension-api.d.ts +7 -0
- package/esm/browser/extension/web-extension-context.d.ts +2 -0
- package/esm/browser/extension/web-extension-context.js +19 -0
- package/esm/browser/game/game-loader.js +22 -2
- package/esm/browser/game/game3d-protocol.d.ts +13 -4
- package/esm/browser/i18n/locales.d.ts +56 -1
- package/esm/browser/i18n/locales.js +25 -1
- package/esm/browser/i18n/messages-ja.d.ts +2 -0
- package/esm/browser/i18n/messages-ja.js +972 -0
- package/esm/browser/i18n/messages-zh-tw.d.ts +3 -0
- package/esm/browser/i18n/messages-zh-tw.js +973 -0
- package/esm/browser/i18n/messages.d.ts +51 -0
- package/esm/browser/i18n/messages.js +102 -1
- package/esm/browser/i18n/use-t.js +3 -2
- package/esm/browser/settings/settings-protocol.d.ts +3 -2
- package/esm/browser/settings/settings-protocol.js +4 -3
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +45 -1
- package/esm/browser/util/desktop.d.ts +12 -1
- package/esm/browser/util/desktop.js +14 -0
- package/esm/browser/util/voice.d.ts +20 -1
- package/esm/browser/util/voice.js +27 -11
- package/esm/browser/workbench-util.d.ts +2 -0
- package/esm/browser/workbench-util.js +6 -1
- package/lib/browser/assistant/assistant-initiative.js +1 -1
- package/lib/browser/components/access-view.js +3 -2
- package/lib/browser/components/account-menu.js +2 -2
- package/lib/browser/components/auth-view.d.ts +1 -1
- package/lib/browser/components/auth-view.js +37 -9
- package/lib/browser/components/custom-provider-advanced.d.ts +15 -0
- package/lib/browser/components/custom-provider-advanced.js +86 -0
- package/lib/browser/components/custom-provider-util.d.ts +39 -0
- package/lib/browser/components/custom-provider-util.js +106 -0
- package/lib/browser/components/custom-provider-view.d.ts +12 -0
- package/lib/browser/components/custom-provider-view.js +217 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/settings-choices.js +1 -2
- package/lib/browser/components/settings-controls.d.ts +7 -1
- package/lib/browser/components/settings-controls.js +9 -0
- package/lib/browser/components/settings-parts.js +10 -4
- package/lib/browser/components/sign-in-setup.js +3 -1
- package/lib/browser/editor/monaco-loader.js +7 -1
- package/lib/browser/extension/web-api-contributions.d.ts +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +7 -0
- package/lib/browser/extension/web-extension-context.d.ts +2 -0
- package/lib/browser/extension/web-extension-context.js +19 -0
- package/lib/browser/game/game-loader.js +22 -2
- package/lib/browser/game/game3d-protocol.d.ts +13 -4
- package/lib/browser/i18n/locales.d.ts +56 -1
- package/lib/browser/i18n/locales.js +25 -1
- package/lib/browser/i18n/messages-ja.d.ts +3 -0
- package/lib/browser/i18n/messages-ja.js +975 -0
- package/lib/browser/i18n/messages-zh-tw.d.ts +4 -0
- package/lib/browser/i18n/messages-zh-tw.js +976 -0
- package/lib/browser/i18n/messages.d.ts +51 -0
- package/lib/browser/i18n/messages.js +105 -2
- package/lib/browser/i18n/use-t.js +2 -1
- package/lib/browser/settings/settings-protocol.d.ts +3 -2
- package/lib/browser/settings/settings-protocol.js +4 -3
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +45 -1
- package/lib/browser/util/desktop.d.ts +12 -1
- package/lib/browser/util/desktop.js +14 -0
- package/lib/browser/util/voice.d.ts +20 -1
- package/lib/browser/util/voice.js +27 -11
- package/lib/browser/workbench-util.d.ts +2 -0
- package/lib/browser/workbench-util.js +6 -1
- package/package.json +7 -7
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { type TaLanguage } from '@celljs/ta-protocol';
|
|
2
|
+
import { JA_MESSAGES } from './messages-ja';
|
|
3
|
+
import { ZH_TW_MESSAGES } from './messages-zh-tw';
|
|
1
4
|
/** The messages of the web client, in ICU format. English is the source and the fallback. */
|
|
2
5
|
export declare const EN_MESSAGES: {
|
|
3
6
|
'ta.dismiss': string;
|
|
@@ -164,6 +167,7 @@ export declare const EN_MESSAGES: {
|
|
|
164
167
|
'ta.signInSetup.oidc': string;
|
|
165
168
|
'ta.signInSetup.on': string;
|
|
166
169
|
'ta.signInSetup.off': string;
|
|
170
|
+
'ta.signInSetup.device': string;
|
|
167
171
|
'ta.signInSetup.incomplete': string;
|
|
168
172
|
'ta.signInSetup.fromEnv': string;
|
|
169
173
|
'ta.signInSetup.add': string;
|
|
@@ -918,6 +922,48 @@ export declare const EN_MESSAGES: {
|
|
|
918
922
|
'ta.auth.none': string;
|
|
919
923
|
'ta.auth.search': string;
|
|
920
924
|
'ta.auth.accountsTitle': string;
|
|
925
|
+
'ta.auth.custom.add': string;
|
|
926
|
+
'ta.auth.custom.addHint': string;
|
|
927
|
+
'ta.auth.custom.title': string;
|
|
928
|
+
'ta.auth.custom.kind': string;
|
|
929
|
+
'ta.auth.custom.api': string;
|
|
930
|
+
'ta.auth.custom.apiOpenai': string;
|
|
931
|
+
'ta.auth.custom.apiResponses': string;
|
|
932
|
+
'ta.auth.custom.apiAnthropic': string;
|
|
933
|
+
'ta.auth.custom.apiGoogle': string;
|
|
934
|
+
'ta.auth.custom.baseUrl': string;
|
|
935
|
+
'ta.auth.custom.apiKey': string;
|
|
936
|
+
'ta.auth.custom.keyKept': string;
|
|
937
|
+
'ta.auth.custom.keyOptional': string;
|
|
938
|
+
'ta.auth.custom.name': string;
|
|
939
|
+
'ta.auth.custom.optional': string;
|
|
940
|
+
'ta.auth.custom.models': string;
|
|
941
|
+
'ta.auth.custom.modelPlaceholder': string;
|
|
942
|
+
'ta.auth.custom.removeModel': string;
|
|
943
|
+
'ta.auth.custom.fetch': string;
|
|
944
|
+
'ta.auth.custom.fetched': string;
|
|
945
|
+
'ta.auth.custom.fetchedNone': string;
|
|
946
|
+
'ta.auth.custom.fetchFailed': string;
|
|
947
|
+
'ta.auth.custom.filter': string;
|
|
948
|
+
'ta.auth.custom.note': string;
|
|
949
|
+
'ta.auth.custom.needModel': string;
|
|
950
|
+
'ta.auth.custom.save': string;
|
|
951
|
+
'ta.auth.custom.saved': string;
|
|
952
|
+
'ta.auth.custom.remove': string;
|
|
953
|
+
'ta.auth.custom.removeConfirm': string;
|
|
954
|
+
'ta.auth.custom.advanced': string;
|
|
955
|
+
'ta.auth.custom.advancedHint': string;
|
|
956
|
+
'ta.auth.custom.contextWindow': string;
|
|
957
|
+
'ta.auth.custom.maxTokens': string;
|
|
958
|
+
'ta.auth.custom.mixed': string;
|
|
959
|
+
'ta.auth.custom.reasoning': string;
|
|
960
|
+
'ta.auth.custom.images': string;
|
|
961
|
+
'ta.auth.custom.headers': string;
|
|
962
|
+
'ta.auth.custom.headerName': string;
|
|
963
|
+
'ta.auth.custom.headerValue': string;
|
|
964
|
+
'ta.auth.custom.addHeader': string;
|
|
965
|
+
'ta.auth.custom.removeHeader': string;
|
|
966
|
+
'ta.auth.custom.badNumber': string;
|
|
921
967
|
'ta.manage.accounts': string;
|
|
922
968
|
'ta.manage.workingDirectory': string;
|
|
923
969
|
'ta.settings.accounts': string;
|
|
@@ -929,6 +975,11 @@ export declare const EN_MESSAGES: {
|
|
|
929
975
|
};
|
|
930
976
|
export type MessageId = keyof typeof EN_MESSAGES;
|
|
931
977
|
export declare const ZH_MESSAGES: Record<MessageId, string>;
|
|
978
|
+
export { JA_MESSAGES, ZH_TW_MESSAGES };
|
|
979
|
+
/** The messages of each language of Ta, checked by scripts/check-i18n.ts. */
|
|
980
|
+
export declare const MESSAGES: Readonly<Record<TaLanguage, Record<MessageId, string>>>;
|
|
981
|
+
/** The messages of a language of the settings (`zh-CN`, `zh-TW`, `ja-JP`), English for another. */
|
|
982
|
+
export declare function messagesOf(language: string): Record<MessageId, string>;
|
|
932
983
|
/** A message outside React, in a language of the settings. */
|
|
933
984
|
export declare function message(language: string, id: MessageId): string;
|
|
934
985
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZH_MESSAGES = exports.EN_MESSAGES = void 0;
|
|
3
|
+
exports.MESSAGES = exports.ZH_TW_MESSAGES = exports.JA_MESSAGES = exports.ZH_MESSAGES = exports.EN_MESSAGES = void 0;
|
|
4
|
+
exports.messagesOf = messagesOf;
|
|
4
5
|
exports.message = message;
|
|
6
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
7
|
+
const messages_ja_1 = require("./messages-ja");
|
|
8
|
+
Object.defineProperty(exports, "JA_MESSAGES", { enumerable: true, get: function () { return messages_ja_1.JA_MESSAGES; } });
|
|
9
|
+
const messages_zh_tw_1 = require("./messages-zh-tw");
|
|
10
|
+
Object.defineProperty(exports, "ZH_TW_MESSAGES", { enumerable: true, get: function () { return messages_zh_tw_1.ZH_TW_MESSAGES; } });
|
|
5
11
|
/** The messages of the web client, in ICU format. English is the source and the fallback. */
|
|
6
12
|
exports.EN_MESSAGES = {
|
|
7
13
|
'ta.dismiss': 'Dismiss',
|
|
@@ -172,6 +178,7 @@ exports.EN_MESSAGES = {
|
|
|
172
178
|
'ta.signInSetup.oidc': 'Company SSO (OpenID Connect)',
|
|
173
179
|
'ta.signInSetup.on': 'On · {id}',
|
|
174
180
|
'ta.signInSetup.off': 'Not set up',
|
|
181
|
+
'ta.signInSetup.device': 'Built in: those you invite sign in by typing a code at GitHub. Set up your own app to replace it.',
|
|
175
182
|
'ta.signInSetup.incomplete': 'Not complete: it needs its id and its secret',
|
|
176
183
|
'ta.signInSetup.fromEnv': 'Set by the environment of the service',
|
|
177
184
|
'ta.signInSetup.add': 'Set up',
|
|
@@ -930,6 +937,48 @@ exports.EN_MESSAGES = {
|
|
|
930
937
|
'ta.auth.none': 'No matching providers',
|
|
931
938
|
'ta.auth.search': 'Search providers',
|
|
932
939
|
'ta.auth.accountsTitle': 'Model accounts',
|
|
940
|
+
'ta.auth.custom.add': 'Add a custom model service',
|
|
941
|
+
'ta.auth.custom.addHint': 'Your own address and key',
|
|
942
|
+
'ta.auth.custom.title': 'Custom model service',
|
|
943
|
+
'ta.auth.custom.kind': 'Custom',
|
|
944
|
+
'ta.auth.custom.api': 'Compatible with',
|
|
945
|
+
'ta.auth.custom.apiOpenai': 'OpenAI (Chat Completions)',
|
|
946
|
+
'ta.auth.custom.apiResponses': 'OpenAI (Responses)',
|
|
947
|
+
'ta.auth.custom.apiAnthropic': 'Anthropic (Messages)',
|
|
948
|
+
'ta.auth.custom.apiGoogle': 'Google Gemini',
|
|
949
|
+
'ta.auth.custom.baseUrl': 'Base URL',
|
|
950
|
+
'ta.auth.custom.apiKey': 'API key',
|
|
951
|
+
'ta.auth.custom.keyKept': 'Saved; leave blank to keep it',
|
|
952
|
+
'ta.auth.custom.keyOptional': 'not needed for a local server',
|
|
953
|
+
'ta.auth.custom.name': 'Name',
|
|
954
|
+
'ta.auth.custom.optional': 'optional',
|
|
955
|
+
'ta.auth.custom.models': 'Models',
|
|
956
|
+
'ta.auth.custom.modelPlaceholder': 'Type a model ID, then Enter',
|
|
957
|
+
'ta.auth.custom.removeModel': 'Remove {id}',
|
|
958
|
+
'ta.auth.custom.fetch': 'Get the list from the service',
|
|
959
|
+
'ta.auth.custom.fetched': '{count} models; pick the ones to use',
|
|
960
|
+
'ta.auth.custom.fetchedNone': 'The service lists no models: type their IDs',
|
|
961
|
+
'ta.auth.custom.fetchFailed': 'Could not get the models: {message}',
|
|
962
|
+
'ta.auth.custom.filter': 'Filter models',
|
|
963
|
+
'ta.auth.custom.note': 'The address and the key stay on the computer that runs Ta.',
|
|
964
|
+
'ta.auth.custom.needModel': 'Add at least one model',
|
|
965
|
+
'ta.auth.custom.save': 'Save',
|
|
966
|
+
'ta.auth.custom.saved': '{name} saved; pick its models in the + menu',
|
|
967
|
+
'ta.auth.custom.remove': 'Delete',
|
|
968
|
+
'ta.auth.custom.removeConfirm': 'Delete {name}? Its models can no longer be used.',
|
|
969
|
+
'ta.auth.custom.advanced': 'Advanced',
|
|
970
|
+
'ta.auth.custom.advancedHint': 'For every model of this service',
|
|
971
|
+
'ta.auth.custom.contextWindow': 'Context window',
|
|
972
|
+
'ta.auth.custom.maxTokens': 'Max output',
|
|
973
|
+
'ta.auth.custom.mixed': 'differs by model, kept unless changed',
|
|
974
|
+
'ta.auth.custom.reasoning': 'Thinks before answering (a reasoning model)',
|
|
975
|
+
'ta.auth.custom.images': 'Takes pictures',
|
|
976
|
+
'ta.auth.custom.headers': 'Headers',
|
|
977
|
+
'ta.auth.custom.headerName': 'Name',
|
|
978
|
+
'ta.auth.custom.headerValue': 'Value',
|
|
979
|
+
'ta.auth.custom.addHeader': 'Add a header',
|
|
980
|
+
'ta.auth.custom.removeHeader': 'Remove {name}',
|
|
981
|
+
'ta.auth.custom.badNumber': 'Not a number of tokens: {value}',
|
|
933
982
|
'ta.manage.accounts': 'Model accounts…',
|
|
934
983
|
'ta.manage.workingDirectory': 'Default directory…',
|
|
935
984
|
'ta.settings.accounts': 'Model accounts',
|
|
@@ -1104,6 +1153,7 @@ exports.ZH_MESSAGES = {
|
|
|
1104
1153
|
'ta.signInSetup.oidc': '企业 SSO(OpenID Connect)',
|
|
1105
1154
|
'ta.signInSetup.on': '已开启 · {id}',
|
|
1106
1155
|
'ta.signInSetup.off': '未配置',
|
|
1156
|
+
'ta.signInSetup.device': '已内置:你邀请的人在 GitHub 输入一个码就能登录。配置自己的应用后改用你的。',
|
|
1107
1157
|
'ta.signInSetup.incomplete': '还没配完:需要 ID 和密钥',
|
|
1108
1158
|
'ta.signInSetup.fromEnv': '由服务的环境变量设置',
|
|
1109
1159
|
'ta.signInSetup.add': '配置',
|
|
@@ -1860,6 +1910,48 @@ exports.ZH_MESSAGES = {
|
|
|
1860
1910
|
'ta.auth.none': '没有匹配的服务商',
|
|
1861
1911
|
'ta.auth.search': '搜索服务商',
|
|
1862
1912
|
'ta.auth.accountsTitle': '模型账号',
|
|
1913
|
+
'ta.auth.custom.add': '添加自定义模型服务',
|
|
1914
|
+
'ta.auth.custom.addHint': '填服务地址和 Key',
|
|
1915
|
+
'ta.auth.custom.title': '自定义模型服务',
|
|
1916
|
+
'ta.auth.custom.kind': '自定义',
|
|
1917
|
+
'ta.auth.custom.api': '接口格式',
|
|
1918
|
+
'ta.auth.custom.apiOpenai': 'OpenAI 兼容(Chat Completions)',
|
|
1919
|
+
'ta.auth.custom.apiResponses': 'OpenAI 兼容(Responses)',
|
|
1920
|
+
'ta.auth.custom.apiAnthropic': 'Anthropic 兼容(Messages)',
|
|
1921
|
+
'ta.auth.custom.apiGoogle': 'Google Gemini',
|
|
1922
|
+
'ta.auth.custom.baseUrl': '服务地址',
|
|
1923
|
+
'ta.auth.custom.apiKey': 'API Key',
|
|
1924
|
+
'ta.auth.custom.keyKept': '已保存,不改就留空',
|
|
1925
|
+
'ta.auth.custom.keyOptional': '本机服务可不填',
|
|
1926
|
+
'ta.auth.custom.name': '名称',
|
|
1927
|
+
'ta.auth.custom.optional': '可不填',
|
|
1928
|
+
'ta.auth.custom.models': '模型',
|
|
1929
|
+
'ta.auth.custom.modelPlaceholder': '输入模型 ID,回车添加',
|
|
1930
|
+
'ta.auth.custom.removeModel': '移除 {id}',
|
|
1931
|
+
'ta.auth.custom.fetch': '从服务读取模型',
|
|
1932
|
+
'ta.auth.custom.fetched': '共 {count} 个模型,点选要用的',
|
|
1933
|
+
'ta.auth.custom.fetchedNone': '服务没有列出模型,请手动输入',
|
|
1934
|
+
'ta.auth.custom.fetchFailed': '读取不到模型:{message}',
|
|
1935
|
+
'ta.auth.custom.filter': '筛选模型',
|
|
1936
|
+
'ta.auth.custom.note': '地址和 Key 只保存在运行 Ta 的电脑上。',
|
|
1937
|
+
'ta.auth.custom.needModel': '至少添加一个模型',
|
|
1938
|
+
'ta.auth.custom.save': '保存',
|
|
1939
|
+
'ta.auth.custom.saved': '已保存 {name},可在 + 菜单里选它的模型',
|
|
1940
|
+
'ta.auth.custom.remove': '删除',
|
|
1941
|
+
'ta.auth.custom.removeConfirm': '删除 {name}?它的模型将不能再用。',
|
|
1942
|
+
'ta.auth.custom.advanced': '高级设置',
|
|
1943
|
+
'ta.auth.custom.advancedHint': '对这个服务的所有模型生效',
|
|
1944
|
+
'ta.auth.custom.contextWindow': '上下文窗口',
|
|
1945
|
+
'ta.auth.custom.maxTokens': '最大输出',
|
|
1946
|
+
'ta.auth.custom.mixed': '各模型不同,不改就保留',
|
|
1947
|
+
'ta.auth.custom.reasoning': '会先思考(推理模型)',
|
|
1948
|
+
'ta.auth.custom.images': '能看图片',
|
|
1949
|
+
'ta.auth.custom.headers': '请求头',
|
|
1950
|
+
'ta.auth.custom.headerName': '名称',
|
|
1951
|
+
'ta.auth.custom.headerValue': '值',
|
|
1952
|
+
'ta.auth.custom.addHeader': '添加请求头',
|
|
1953
|
+
'ta.auth.custom.removeHeader': '移除 {name}',
|
|
1954
|
+
'ta.auth.custom.badNumber': '不是有效的 token 数:{value}',
|
|
1863
1955
|
'ta.manage.accounts': '模型账号…',
|
|
1864
1956
|
'ta.manage.workingDirectory': '默认目录…',
|
|
1865
1957
|
'ta.settings.accounts': '模型账号',
|
|
@@ -1869,8 +1961,19 @@ exports.ZH_MESSAGES = {
|
|
|
1869
1961
|
'ta.settings.cwdDescription': '新对话、终端和分身派出的任务在这里打开;已有的对话留在各自的目录:{path}',
|
|
1870
1962
|
'ta.workingDirectory.changed': '默认目录已改为 {path}',
|
|
1871
1963
|
};
|
|
1964
|
+
/** The messages of each language of Ta, checked by scripts/check-i18n.ts. */
|
|
1965
|
+
exports.MESSAGES = {
|
|
1966
|
+
'zh-CN': exports.ZH_MESSAGES,
|
|
1967
|
+
'zh-TW': messages_zh_tw_1.ZH_TW_MESSAGES,
|
|
1968
|
+
'en-US': exports.EN_MESSAGES,
|
|
1969
|
+
'ja-JP': messages_ja_1.JA_MESSAGES,
|
|
1970
|
+
};
|
|
1971
|
+
/** The messages of a language of the settings (`zh-CN`, `zh-TW`, `ja-JP`), English for another. */
|
|
1972
|
+
function messagesOf(language) {
|
|
1973
|
+
return ta_protocol_1.TaLanguageUtil.pick(language, exports.MESSAGES);
|
|
1974
|
+
}
|
|
1872
1975
|
/** A message outside React, in a language of the settings. */
|
|
1873
1976
|
function message(language, id) {
|
|
1874
|
-
return (language
|
|
1977
|
+
return messagesOf(language)[id];
|
|
1875
1978
|
}
|
|
1876
1979
|
//# sourceMappingURL=messages.js.map
|
|
@@ -53,7 +53,8 @@ const intls = new Map();
|
|
|
53
53
|
function translator(language) {
|
|
54
54
|
let intl = intls.get(language);
|
|
55
55
|
if (!intl) {
|
|
56
|
-
|
|
56
|
+
const messages = (0, messages_1.messagesOf)(language);
|
|
57
|
+
intl = messages === messages_1.EN_MESSAGES ? english() : (0, react_intl_1.createIntl)({ locale: language, messages });
|
|
57
58
|
intls.set(language, intl);
|
|
58
59
|
}
|
|
59
60
|
const shape = intl;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type TaLanguage } from '@celljs/ta-protocol';
|
|
1
2
|
import type { StateSpec } from '../state/state-protocol';
|
|
2
3
|
import { type NavigationSetting } from './navigation';
|
|
3
4
|
export declare const TaSettings: unique symbol;
|
|
4
5
|
export type ThemeSetting = 'system' | 'light' | 'dark';
|
|
5
6
|
export type Theme = 'light' | 'dark';
|
|
6
7
|
export type LanguageSetting = 'system' | Language;
|
|
7
|
-
export type Language =
|
|
8
|
+
export type Language = TaLanguage;
|
|
8
9
|
/** How large the text is, as the font size of WeChat: small, standard, large, extra large. */
|
|
9
10
|
export type FontSize = 'small' | 'standard' | 'large' | 'xlarge';
|
|
10
11
|
/** What each size multiplies the font sizes of the styles by (`--ta-font-scale`, see style/base.ts). */
|
|
@@ -89,7 +90,7 @@ export declare namespace SettingsUtil {
|
|
|
89
90
|
function theme(setting: ThemeSetting, prefersDark: boolean): Theme;
|
|
90
91
|
/** What the font sizes of the page are multiplied by on this device: `fontScale`, more on a phone. */
|
|
91
92
|
function deviceFontScale(fontScale: number, handheld: boolean): number;
|
|
92
|
-
/**
|
|
93
|
+
/** That of the browser for system: Traditional Chinese for Taiwan, Hong Kong and Macau, Simplified for other Chinese, Japanese, else English. */
|
|
93
94
|
function language(setting: LanguageSetting, browserLanguage: string): Language;
|
|
94
95
|
}
|
|
95
96
|
/** The settings of the web client: theme, language, font size, voice, motion. They apply as soon as they change. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SettingsUtil = exports.DEFAULT_SETTINGS = exports.MAX_TASKS_CHOICES = exports.CHAT_ARCHIVE_CHOICES = exports.CHAT_FOLD_CHOICES = exports.KEEP_ALIVE_CHOICES = exports.HANDHELD_FONT_SCALE = exports.FONT_SCALES = exports.TaSettings = void 0;
|
|
4
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
4
5
|
const navigation_1 = require("./navigation");
|
|
5
6
|
exports.TaSettings = Symbol('TaSettings');
|
|
6
7
|
/** What each size multiplies the font sizes of the styles by (`--ta-font-scale`, see style/base.ts). */
|
|
@@ -63,7 +64,7 @@ var SettingsUtil;
|
|
|
63
64
|
const kept = value;
|
|
64
65
|
return {
|
|
65
66
|
theme: ['system', 'light', 'dark'].includes(kept.theme) ? kept.theme : exports.DEFAULT_SETTINGS.theme,
|
|
66
|
-
language: ['system',
|
|
67
|
+
language: ['system', ...ta_protocol_1.TaLanguageUtil.ALL].includes(kept.language) ? kept.language : exports.DEFAULT_SETTINGS.language,
|
|
67
68
|
fontSize: fontSize(kept.fontSize),
|
|
68
69
|
chatFontSize: fontSize(kept.chatFontSize),
|
|
69
70
|
speak: kept.speak === true,
|
|
@@ -94,9 +95,9 @@ var SettingsUtil;
|
|
|
94
95
|
return handheld ? fontScale * exports.HANDHELD_FONT_SCALE : fontScale;
|
|
95
96
|
}
|
|
96
97
|
SettingsUtil.deviceFontScale = deviceFontScale;
|
|
97
|
-
/**
|
|
98
|
+
/** That of the browser for system: Traditional Chinese for Taiwan, Hong Kong and Macau, Simplified for other Chinese, Japanese, else English. */
|
|
98
99
|
function language(setting, browserLanguage) {
|
|
99
|
-
return setting === 'system' ?
|
|
100
|
+
return setting === 'system' ? ta_protocol_1.TaLanguageUtil.of(browserLanguage) : setting;
|
|
100
101
|
}
|
|
101
102
|
SettingsUtil.language = language;
|
|
102
103
|
})(SettingsUtil || (exports.SettingsUtil = SettingsUtil = {}));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** The settings page, the menus of the account, the lists of Discover and Me, and the fade of what streams in. */
|
|
2
|
-
export declare const PAGES_STYLE = "\n/* The settings: a page of the main area, a table of contents in two levels beside the sections */\n.ta-settings-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-settings-head { justify-content: flex-start; gap: 10px; border-bottom: 1px solid var(--ta-border-muted); }\n.ta-settings-title { flex: none; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; padding-left: 8px; }\n.ta-settings-search { flex: 1; max-width: 420px; height: 32px; margin: 0 auto; display: flex; align-items: center; gap: 6px; color: var(--ta-muted); }\n.ta-settings-search input { color: var(--ta-text); }\n.ta-settings-search .ta-icon-button { width: 22px; height: 22px; }\n.ta-settings-body { flex: 1; min-height: 0; display: flex; }\n.ta-settings-toc { flex: none; width: 200px; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--ta-border-muted); }\n.ta-settings-toc-part { display: flex; flex-direction: column; gap: 1px; }\n.ta-settings-toc-group { border: 0; background: none; text-align: left; padding: 2px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-muted); }\n.ta-settings-toc-group:hover { color: var(--ta-text); }\n.ta-settings-toc-item { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-settings-toc-item .ta-icon { flex: none; color: var(--ta-muted); }\n.ta-settings-toc-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-settings-toc-item.ta-active { background: var(--ta-selected); color: var(--ta-text); font-weight: 500; }\n.ta-settings-scroll { flex: 1; min-width: 0; overflow-y: auto; scroll-padding-top: 16px; }\n.ta-settings-content { max-width: 720px; margin: 0 auto; padding: 18px 24px calc(48px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 28px; }\n.ta-settings-content:has(> .ta-empty) { min-height: 100%; box-sizing: border-box; }\n.ta-settings-part { display: flex; flex-direction: column; gap: 18px; }\n.ta-settings-part-title { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n.ta-settings-part-hint { font-size: calc(12px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); }\n.ta-settings-scope { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); align-self: flex-start; max-width: 100%; }\n.ta-settings-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }\n.ta-settings-tab:hover { color: var(--ta-text); }\n.ta-settings-tab.ta-active { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-settings-file { padding: 0 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-settings-note { padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--ta-border); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-setting-row { position: relative; }\n.ta-setting-row.ta-modified::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 0 2px 2px 0; background: var(--ta-blue); }\n.ta-setting-control { gap: 6px; }\n.ta-setting-reset { width: 26px; height: 26px; }\n.ta-setting-row:not(:hover):not(:focus-within) .ta-setting-reset { opacity: 0; }\n.ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 240px; }\n.ta-setting-row:not(.ta-stacked):has(> .ta-setting-icon) > .ta-setting-text { flex-basis: 160px; }\n.ta-setting-row:not(.ta-stacked) { flex-wrap: wrap; row-gap: 8px; }\n.ta-select, .ta-setting-input, .ta-setting-control .ta-model-field { width: 200px; height: 30px; font-size: calc(12.5px * var(--ta-font-scale)); padding: 0 8px; }\n.ta-select { appearance: auto; cursor: pointer; }\n.ta-setting-input::placeholder { color: var(--ta-muted); }\n/* The settings of a phone (PhoneSettings): the sections listed as Me's rows, each a page of grouped rows. */\n.ta-head-balance { flex: none; width: 32px; }\n.ta-settings-phone > .ta-list-head { padding-left: calc(6px + env(safe-area-inset-left)); padding-right: calc(6px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-list-content { gap: 20px; padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-settings-search { flex: none; max-width: none; height: 38px; margin: 0; padding: 0 10px; border-radius: 10px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-settings-phone-group { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-phone-caption { margin: 0 4px; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-settings-phone .ta-setting-card { border-radius: 12px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); }\n.ta-settings-phone .ta-setting-row { min-height: 52px; padding: 12px 16px; gap: 12px; }\n.ta-settings-phone .ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 0; }\n.ta-settings-phone .ta-setting-label { font-size: calc(15px * var(--ta-font-scale)); font-weight: 400; }\n.ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }\n.ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }\n.ta-settings-phone .ta-segmented button { height: 32px; }\n.ta-settings-phone .ta-settings-note { border-radius: 12px; }\n.ta-keys { display: inline-flex; gap: 3px; flex: none; }\n.ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }\n\n/* The menus of the account at the foot of the rail */\n.ta-account-menu .ta-account-item { width: 100%; }\n.ta-account-menu .ta-account-item.ta-on { background: var(--ta-hover); }\n.ta-account-menu .ta-account-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-menu-chevron { color: var(--ta-muted) !important; }\n.ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }\n.ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }\n.ta-submenu-anchor { position: relative; }\n.ta-submenu { left: calc(100% + 8px); bottom: auto; top: -6px; width: 180px; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-settings-toc { display: none; }\n .ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }\n /* No table of contents: the last section, jumped to from the menu of the account, still scrolls to the top. */\n .ta-settings-scroll { container-type: size; }\n .ta-settings-part:last-child > .ta-setting-section:last-child { min-height: calc(100cqh - 48px - env(safe-area-inset-bottom)); }\n .ta-settings-title { padding-left: 0; }\n .ta-settings-search { margin: 0; }\n .ta-setting-row:has(.ta-select, .ta-setting-input, .ta-model-field) .ta-setting-control { width: 100%; }\n .ta-setting-row .ta-select, .ta-setting-row .ta-setting-input, .ta-setting-row .ta-model-field { flex: 1; width: auto; min-width: 0; }\n .ta-setting-reset { opacity: 1 !important; }\n .ta-submenu { left: 12px; right: auto; top: auto; bottom: calc(100% + 4px); width: 200px; }\n}\n/* Discover and Me: rows in rounded groups, as the settings of a phone (list-rows.tsx) */\n.ta-list-page { flex: 1; min-height: 0; display: flex; flex-direction: column; --ta-list-bg: var(--ta-main); --ta-list-cell: var(--ta-side); background: var(--ta-list-bg); }\n:root[data-theme='light'] .ta-list-page { --ta-list-bg: var(--ta-side); --ta-list-cell: var(--ta-card); }\n.ta-list-head { border-bottom: 1px solid var(--ta-border-muted); }\n.ta-list-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-list-content { max-width: 640px; margin: 0 auto; padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }\n.ta-list-group { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); overflow: hidden; }\n.ta-list-row { position: relative; display: flex; align-items: center; min-height: 48px; }\n.ta-list-row + .ta-list-row::before { content: ''; position: absolute; top: 0; right: 0; left: 46px; height: 1px; background: var(--ta-border-muted); }\n.ta-list-main { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; background: none; text-align: left; font-size: calc(14.5px * var(--ta-font-scale)); color: var(--ta-text); transition: background 120ms; }\n.ta-list-main:hover { background: var(--ta-hover); }\n.ta-list-main:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-list-icon { flex: none; color: var(--ta-secondary); }\n.ta-list-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-list-detail { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-list-chevron { flex: none; color: var(--ta-muted); }\n/* In place of the chevron while the page opens: as wide. */\n.ta-list-busy { margin: 0 1.5px; }\n.ta-list-trailing { flex: none; margin-right: 8px; color: var(--ta-muted); }\n/* WebView.mark of a page under Discover: before its pin, as WeChat shows who posted last by Moments. */\n.ta-list-mark { flex: none; display: inline-flex; align-items: center; margin-right: 2px; pointer-events: none; }\n.ta-list-row.ta-action .ta-list-main { justify-content: center; }\n.ta-list-row.ta-action .ta-list-label { flex: none; }\n.ta-list-row.ta-danger .ta-list-main { color: var(--ta-red); }\n.ta-list-row.ta-danger + .ta-list-row::before, .ta-list-row + .ta-list-row.ta-danger::before { left: 0; }\n.ta-list-hint { margin: -6px 4px 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-me-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); font: inherit; text-align: left; color: inherit; transition: background 120ms; }\n.ta-me-card:hover, .ta-me-card:active { background: var(--ta-hover); }\n.ta-me-card:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-account-figure.ta-me-figure { border-radius: 16px; }\n.ta-me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }\n.ta-me-name { font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; color: var(--ta-text); }\n.ta-me-host { font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-me-state { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n/* The computers of this device (host-view.tsx): rows as the conversations, a sheet from the bottom on a phone */\n.ta-hosts-dialog { width: min(420px, 100%); gap: 12px; }\n.ta-hosts-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-host-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-host-row { border-radius: 12px; --ta-swipe-bg: var(--ta-card); }\n.ta-host-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--ta-card); font: inherit; text-align: left; color: var(--ta-text); transition: background 120ms; }\n.ta-host-item:hover, .ta-host-item:active { background: var(--ta-hover); }\n.ta-host-row.ta-selected .ta-host-item { background: var(--ta-selected); }\n.ta-host-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-host-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }\n.ta-host-name { font-size: calc(14.5px * var(--ta-font-scale)); font-weight: 600; }\n.ta-host-detail { font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-host-check { flex: none; color: var(--ta-green); }\n.ta-host-actions { display: flex; gap: 8px; }\n.ta-host-actions .ta-button { flex: 1; height: 40px; justify-content: center; gap: 6px; }\n.ta-host-form { display: flex; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-host-form .ta-field { flex: 1; height: 40px; }\n.ta-host-form .ta-button { height: 40px; min-width: 72px; justify-content: center; }\n.ta-scan-button { height: 46px; gap: 8px; font-size: calc(15px * var(--ta-font-scale)); justify-content: center; }\n.ta-link-button { padding: 4px 8px; border: 0; background: none; font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-link-button:hover { color: var(--ta-text); }\n.ta-host-saved { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-host-saved h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-signin .ta-host-item { background: var(--ta-main); }\n.ta-signin .ta-host-item:hover, .ta-signin .ta-host-item:active { background: var(--ta-hover); }\n.ta-sign-in-accounts { display: flex; flex-direction: column; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-sign-in-account { height: 42px; gap: 8px; text-decoration: none; font-size: calc(14.5px * var(--ta-font-scale)); }\n.ta-sign-in-account:hover { background: var(--ta-hover); }\n.ta-sign-in-account[aria-busy='true'] { pointer-events: none; opacity: 0.7; }\n.ta-sign-in-mark { flex: none; }\n.ta-sign-in-or { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-or::before, .ta-sign-in-or::after { content: ''; flex: 1; height: 1px; background: var(--ta-border); }\n.ta-access-account { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }\n.ta-access-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; }\n.ta-access-avatar.ta-chat-avatar { font-size: calc(11px * var(--ta-font-scale)); }\n.ta-access-bind { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-sign-in-name { display: inline-flex; align-items: center; gap: 6px; }\n.ta-sign-in-callbacks { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }\n.ta-sign-in-callback { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--ta-hover); }\n.ta-sign-in-callback code { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }\n.ta-sign-in-field { display: flex; flex-direction: column; gap: 4px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-sign-in-field .ta-input { height: 32px; }\n.ta-sign-in-actions { display: flex; justify-content: flex-end; gap: 8px; }\n.ta-environment-chooser { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }\n.ta-environment-own { display: flex; flex-direction: column; gap: 8px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-environment-own .ta-button { align-self: flex-end; }\n.ta-environment-hint { margin: 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: 1.5; }\n.ta-environment-card { gap: 14px; }\n/* While the page loads again for another computer: which one, at once, over all. */\n.ta-switching { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--ta-main); color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); animation: ta-fade 140ms ease-out both; }\n/* Me has no head: the card under the status bar. */\n.ta-me .ta-list-content { padding-top: calc(20px + env(safe-area-inset-top)); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-list-content { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); }\n .ta-me .ta-list-content { padding-top: calc(14px + env(safe-area-inset-top)); }\n}\n\n/* Streaming: what comes in fades in where it will stay; nothing already shown moves or draws again. */\n.ta-thread-new { animation: ta-in 220ms var(--ta-ease); }\n/* Words ta said on the way move from the reply into the steps when a tool follows them: they were on the screen, so they do not fade in again. */\n.ta-turn-live > .ta-markdown > *, .ta-process-active .ta-process-steps > :not(.ta-more, .ta-step-text), .ta-turn-live .ta-turn-head > .ta-process-head, .ta-turn-live .ta-turn-head > .ta-run-status { animation: ta-fade 240ms ease-out; }\n.ta-run-line { animation: ta-fade 200ms ease-out; }\n.ta-scroll { overflow-anchor: none; }\n/* The scroll bar held while a reply comes in: the thread keeps its height (ConversationScroller), what grows past it waits. */\n.ta-scroll-held { overflow-y: clip; }\n.ta-scroll-held > * { flex-shrink: 0; }\n/* The look of the double: it walks above, the kinds of dinosaur below, then the ways it walks */\n.ta-look { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }\n.ta-look-stage { height: 120px; flex: none; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }\n.ta-look-figure, .ta-look-walk { border-radius: 12px; background: var(--ta-raised); display: grid; place-items: center; }\n/* Wide enough for the walk to and fro (half the width of the dinosaur to either side of the middle, and itself). */\n.ta-look-walk { min-width: 220px; overflow: hidden; }\n.ta-look-label { font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-secondary); }\n.ta-look-kinds { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }\n.ta-look-kind { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 7px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: transparent; color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); transition: background 120ms, border-color 120ms; }\n.ta-look-kind:hover { background: var(--ta-hover); }\n.ta-look-kind.ta-on { border-color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 8%, transparent); }\n.ta-look-name { max-width: 100%; }\n/* The voice replies are read with: its list, and a button to listen to it. */\n.ta-voice-picker { display: flex; align-items: center; gap: 8px; width: 100%; }\n.ta-voice-picker .ta-select { flex: 1; min-width: 0; }\n.ta-voice-picker .ta-button { flex: none; }\n.ta-look-premium { position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 8px; background: linear-gradient(135deg, #FCD866, #D98E14); color: #4a2c00; font-size: calc(10px * var(--ta-font-scale)); font-weight: 600; line-height: calc(14px * var(--ta-font-scale)); }\n/* Scan, as WeChat's: the camera over everything, a green glow sweeping down, round buttons on it; a photo for Ta asks on a sheet. */\n.ta-scan { position: fixed; inset: 0; z-index: 55; overflow: hidden; background: #000; color: #fff; animation: ta-fade 160ms ease-out; -webkit-user-select: none; user-select: none; }\n.ta-scan-video, .ta-scan-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }\n.ta-scan-mirrored { transform: scaleX(-1); }\n.ta-scan-line { position: absolute; left: 0; right: 0; top: 16%; height: 22%; pointer-events: none; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ta-green) 40%, transparent) 88%, color-mix(in srgb, var(--ta-green) 90%, transparent) 100%); -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); animation: ta-scan-sweep 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }\n@keyframes ta-scan-sweep { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(220%); opacity: 0; } }\n.ta-scan-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; background: var(--ta-green); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); animation: ta-scan-pop 260ms var(--ta-ease) both; }\n@keyframes ta-scan-pop { from { transform: scale(0.3); opacity: 0; } }\n.ta-scan-problem { position: absolute; top: 42%; left: 32px; right: 32px; margin: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: calc(15px * var(--ta-font-scale)); line-height: calc(22px * var(--ta-font-scale)); }\n.ta-scan-top { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }\n.ta-scan-round { pointer-events: auto; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.32); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }\n.ta-scan-bottom { position: absolute; left: 18px; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 28px); display: flex; align-items: center; gap: 12px; }\n.ta-scan-side, .ta-scan-ask { border: 0; color: #fff; background: rgba(48, 48, 48, 0.58); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); transition: transform 120ms, background 120ms; }\n.ta-scan-side { flex: none; width: 62px; height: 62px; display: grid; place-items: center; padding: 0; border-radius: 50%; }\n.ta-scan-ask { flex: 1; min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 14px; border-radius: 31px; }\n.ta-scan-side:active, .ta-scan-ask:active { transform: scale(0.96); background: rgba(70, 70, 70, 0.66); }\n.ta-scan-side:disabled, .ta-scan-ask:disabled { opacity: 0.45; }\n.ta-scan-ask-title { display: flex; align-items: center; gap: 6px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; line-height: calc(24px * var(--ta-font-scale)); }\n.ta-scan-ask-hint { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.62); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-scan-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--ta-card); color: var(--ta-text); box-shadow: var(--ta-shadow-pop); animation: ta-in 220ms var(--ta-ease); }\n:root[data-keyboard] .ta-scan-sheet { bottom: var(--ta-keyboard, 0px); padding-bottom: 12px; }\n.ta-scan-sheet-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-scan-chips { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-scan-chip { padding: 8px 14px; border: 1px solid var(--ta-border); border-radius: 999px; background: var(--ta-main); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-scan-chip:active { background: var(--ta-hover); }\n.ta-scan-field { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border: 1px solid var(--ta-border); border-radius: 22px; background: var(--ta-main); }\n.ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }\n.ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }\n.ta-scan-send:disabled { opacity: 0.5; }\n";
|
|
2
|
+
export declare const PAGES_STYLE = "\n/* The settings: a page of the main area, a table of contents in two levels beside the sections */\n.ta-settings-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-settings-head { justify-content: flex-start; gap: 10px; border-bottom: 1px solid var(--ta-border-muted); }\n.ta-settings-title { flex: none; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; padding-left: 8px; }\n.ta-settings-search { flex: 1; max-width: 420px; height: 32px; margin: 0 auto; display: flex; align-items: center; gap: 6px; color: var(--ta-muted); }\n.ta-settings-search input { color: var(--ta-text); }\n.ta-settings-search .ta-icon-button { width: 22px; height: 22px; }\n.ta-settings-body { flex: 1; min-height: 0; display: flex; }\n.ta-settings-toc { flex: none; width: 200px; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--ta-border-muted); }\n.ta-settings-toc-part { display: flex; flex-direction: column; gap: 1px; }\n.ta-settings-toc-group { border: 0; background: none; text-align: left; padding: 2px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-muted); }\n.ta-settings-toc-group:hover { color: var(--ta-text); }\n.ta-settings-toc-item { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-settings-toc-item .ta-icon { flex: none; color: var(--ta-muted); }\n.ta-settings-toc-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-settings-toc-item.ta-active { background: var(--ta-selected); color: var(--ta-text); font-weight: 500; }\n.ta-settings-scroll { flex: 1; min-width: 0; overflow-y: auto; scroll-padding-top: 16px; }\n.ta-settings-content { max-width: 720px; margin: 0 auto; padding: 18px 24px calc(48px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 28px; }\n.ta-settings-content:has(> .ta-empty) { min-height: 100%; box-sizing: border-box; }\n.ta-settings-part { display: flex; flex-direction: column; gap: 18px; }\n.ta-settings-part-title { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n.ta-settings-part-hint { font-size: calc(12px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); }\n.ta-settings-scope { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); align-self: flex-start; max-width: 100%; }\n.ta-settings-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }\n.ta-settings-tab:hover { color: var(--ta-text); }\n.ta-settings-tab.ta-active { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-settings-file { padding: 0 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-settings-note { padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--ta-border); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-setting-row { position: relative; }\n.ta-setting-row.ta-modified::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 0 2px 2px 0; background: var(--ta-blue); }\n.ta-setting-control { gap: 6px; }\n.ta-setting-reset { width: 26px; height: 26px; }\n.ta-setting-row:not(:hover):not(:focus-within) .ta-setting-reset { opacity: 0; }\n.ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 240px; }\n.ta-setting-row:not(.ta-stacked):has(> .ta-setting-icon) > .ta-setting-text { flex-basis: 160px; }\n.ta-setting-row:not(.ta-stacked) { flex-wrap: wrap; row-gap: 8px; }\n.ta-select, .ta-setting-input, .ta-setting-control .ta-model-field { width: 200px; height: 30px; font-size: calc(12.5px * var(--ta-font-scale)); padding: 0 8px; }\n.ta-select { appearance: auto; cursor: pointer; }\n.ta-setting-input::placeholder { color: var(--ta-muted); }\n/* The settings of a phone (PhoneSettings): the sections listed as Me's rows, each a page of grouped rows. */\n.ta-head-balance { flex: none; width: 32px; }\n.ta-settings-phone > .ta-list-head { padding-left: calc(6px + env(safe-area-inset-left)); padding-right: calc(6px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-list-content { gap: 20px; padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-settings-search { flex: none; max-width: none; height: 38px; margin: 0; padding: 0 10px; border-radius: 10px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-settings-phone-group { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-phone-caption { margin: 0 4px; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-settings-phone .ta-setting-card { border-radius: 12px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); }\n.ta-settings-phone .ta-setting-row { min-height: 52px; padding: 12px 16px; gap: 12px; }\n.ta-settings-phone .ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 0; }\n.ta-settings-phone .ta-setting-label { font-size: calc(15px * var(--ta-font-scale)); font-weight: 400; }\n.ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }\n.ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }\n.ta-settings-phone .ta-segmented button { height: 32px; }\n.ta-setting-choice { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-setting-choice:active { background: var(--ta-hover); }\n.ta-setting-check { flex: none; color: var(--ta-text); }\n.ta-settings-phone .ta-settings-note { border-radius: 12px; }\n.ta-keys { display: inline-flex; gap: 3px; flex: none; }\n.ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }\n\n/* The menus of the account at the foot of the rail */\n.ta-account-menu .ta-account-item { width: 100%; }\n.ta-account-menu .ta-account-item.ta-on { background: var(--ta-hover); }\n.ta-account-menu .ta-account-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-menu-chevron { color: var(--ta-muted) !important; }\n.ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }\n.ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }\n.ta-submenu-anchor { position: relative; }\n/* The account menu sits at the foot of the window: a second menu grows up from its entry, or the last choices would fall below it. */\n.ta-submenu { left: calc(100% + 8px); top: auto; bottom: -6px; width: 180px; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-settings-toc { display: none; }\n .ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }\n /* No table of contents: the last section, jumped to from the menu of the account, still scrolls to the top. */\n .ta-settings-scroll { container-type: size; }\n .ta-settings-part:last-child > .ta-setting-section:last-child { min-height: calc(100cqh - 48px - env(safe-area-inset-bottom)); }\n .ta-settings-title { padding-left: 0; }\n .ta-settings-search { margin: 0; }\n .ta-setting-row:has(.ta-select, .ta-setting-input, .ta-model-field) .ta-setting-control { width: 100%; }\n .ta-setting-row .ta-select, .ta-setting-row .ta-setting-input, .ta-setting-row .ta-model-field { flex: 1; width: auto; min-width: 0; }\n .ta-setting-reset { opacity: 1 !important; }\n .ta-submenu { left: 12px; right: auto; top: auto; bottom: calc(100% + 4px); width: 200px; }\n}\n/* Discover and Me: rows in rounded groups, as the settings of a phone (list-rows.tsx) */\n.ta-list-page { flex: 1; min-height: 0; display: flex; flex-direction: column; --ta-list-bg: var(--ta-main); --ta-list-cell: var(--ta-side); background: var(--ta-list-bg); }\n:root[data-theme='light'] .ta-list-page { --ta-list-bg: var(--ta-side); --ta-list-cell: var(--ta-card); }\n.ta-list-head { border-bottom: 1px solid var(--ta-border-muted); }\n.ta-list-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-list-content { max-width: 640px; margin: 0 auto; padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }\n.ta-list-group { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); overflow: hidden; }\n.ta-list-row { position: relative; display: flex; align-items: center; min-height: 48px; }\n.ta-list-row + .ta-list-row::before { content: ''; position: absolute; top: 0; right: 0; left: 46px; height: 1px; background: var(--ta-border-muted); }\n.ta-list-main { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; background: none; text-align: left; font-size: calc(14.5px * var(--ta-font-scale)); color: var(--ta-text); transition: background 120ms; }\n.ta-list-main:hover { background: var(--ta-hover); }\n.ta-list-main:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-list-icon { flex: none; color: var(--ta-secondary); }\n.ta-list-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-list-detail { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-list-chevron { flex: none; color: var(--ta-muted); }\n/* In place of the chevron while the page opens: as wide. */\n.ta-list-busy { margin: 0 1.5px; }\n.ta-list-trailing { flex: none; margin-right: 8px; color: var(--ta-muted); }\n/* WebView.mark of a page under Discover: before its pin, as WeChat shows who posted last by Moments. */\n.ta-list-mark { flex: none; display: inline-flex; align-items: center; margin-right: 2px; pointer-events: none; }\n.ta-list-row.ta-action .ta-list-main { justify-content: center; }\n.ta-list-row.ta-action .ta-list-label { flex: none; }\n.ta-list-row.ta-danger .ta-list-main { color: var(--ta-red); }\n.ta-list-row.ta-danger + .ta-list-row::before, .ta-list-row + .ta-list-row.ta-danger::before { left: 0; }\n.ta-list-hint { margin: -6px 4px 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-me-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); font: inherit; text-align: left; color: inherit; transition: background 120ms; }\n.ta-me-card:hover, .ta-me-card:active { background: var(--ta-hover); }\n.ta-me-card:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-account-figure.ta-me-figure { border-radius: 16px; }\n.ta-me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }\n.ta-me-name { font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; color: var(--ta-text); }\n.ta-me-host { font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-me-state { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n/* The computers of this device (host-view.tsx): rows as the conversations, a sheet from the bottom on a phone */\n.ta-hosts-dialog { width: min(420px, 100%); gap: 12px; }\n.ta-hosts-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-host-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-host-row { border-radius: 12px; --ta-swipe-bg: var(--ta-card); }\n.ta-host-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--ta-card); font: inherit; text-align: left; color: var(--ta-text); transition: background 120ms; }\n.ta-host-item:hover, .ta-host-item:active { background: var(--ta-hover); }\n.ta-host-row.ta-selected .ta-host-item { background: var(--ta-selected); }\n.ta-host-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-host-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }\n.ta-host-name { font-size: calc(14.5px * var(--ta-font-scale)); font-weight: 600; }\n.ta-host-detail { font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-host-check { flex: none; color: var(--ta-green); }\n.ta-host-actions { display: flex; gap: 8px; }\n.ta-host-actions .ta-button { flex: 1; height: 40px; justify-content: center; gap: 6px; }\n.ta-host-form { display: flex; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-host-form .ta-field { flex: 1; height: 40px; }\n.ta-host-form .ta-button { height: 40px; min-width: 72px; justify-content: center; }\n.ta-scan-button { height: 46px; gap: 8px; font-size: calc(15px * var(--ta-font-scale)); justify-content: center; }\n.ta-link-button { padding: 4px 8px; border: 0; background: none; font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-link-button:hover { color: var(--ta-text); }\n.ta-host-saved { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-host-saved h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-signin .ta-host-item { background: var(--ta-main); }\n.ta-signin .ta-host-item:hover, .ta-signin .ta-host-item:active { background: var(--ta-hover); }\n.ta-sign-in-accounts { display: flex; flex-direction: column; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-sign-in-account { height: 42px; gap: 8px; text-decoration: none; font-size: calc(14.5px * var(--ta-font-scale)); }\n.ta-sign-in-account:hover { background: var(--ta-hover); }\n.ta-sign-in-account[aria-busy='true'] { pointer-events: none; opacity: 0.7; }\n.ta-sign-in-mark { flex: none; }\n.ta-sign-in-or { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-or::before, .ta-sign-in-or::after { content: ''; flex: 1; height: 1px; background: var(--ta-border); }\n.ta-access-account { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }\n.ta-access-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; }\n.ta-access-avatar.ta-chat-avatar { font-size: calc(11px * var(--ta-font-scale)); }\n.ta-access-bind { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-sign-in-name { display: inline-flex; align-items: center; gap: 6px; }\n.ta-sign-in-callbacks { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }\n.ta-sign-in-callback { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--ta-hover); }\n.ta-sign-in-callback code { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }\n.ta-sign-in-field { display: flex; flex-direction: column; gap: 4px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-sign-in-field .ta-input { height: 32px; }\n.ta-sign-in-actions { display: flex; justify-content: flex-end; gap: 8px; }\n.ta-environment-chooser { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }\n.ta-environment-own { display: flex; flex-direction: column; gap: 8px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-environment-own .ta-button { align-self: flex-end; }\n.ta-environment-hint { margin: 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: 1.5; }\n.ta-environment-card { gap: 14px; }\n/* While the page loads again for another computer: which one, at once, over all. */\n.ta-switching { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--ta-main); color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); animation: ta-fade 140ms ease-out both; }\n/* Me has no head: the card under the status bar. */\n.ta-me .ta-list-content { padding-top: calc(20px + env(safe-area-inset-top)); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-list-content { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); }\n .ta-me .ta-list-content { padding-top: calc(14px + env(safe-area-inset-top)); }\n}\n\n/* Streaming: what comes in fades in where it will stay; nothing already shown moves or draws again. */\n.ta-thread-new { animation: ta-in 220ms var(--ta-ease); }\n/* Words ta said on the way move from the reply into the steps when a tool follows them: they were on the screen, so they do not fade in again. */\n.ta-turn-live > .ta-markdown > *, .ta-process-active .ta-process-steps > :not(.ta-more, .ta-step-text), .ta-turn-live .ta-turn-head > .ta-process-head, .ta-turn-live .ta-turn-head > .ta-run-status { animation: ta-fade 240ms ease-out; }\n.ta-run-line { animation: ta-fade 200ms ease-out; }\n.ta-scroll { overflow-anchor: none; }\n/* The scroll bar held while a reply comes in: the thread keeps its height (ConversationScroller), what grows past it waits. */\n.ta-scroll-held { overflow-y: clip; }\n.ta-scroll-held > * { flex-shrink: 0; }\n/* The look of the double: it walks above, the kinds of dinosaur below, then the ways it walks */\n.ta-look { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }\n.ta-look-stage { height: 120px; flex: none; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }\n.ta-look-figure, .ta-look-walk { border-radius: 12px; background: var(--ta-raised); display: grid; place-items: center; }\n/* Wide enough for the walk to and fro (half the width of the dinosaur to either side of the middle, and itself). */\n.ta-look-walk { min-width: 220px; overflow: hidden; }\n.ta-look-label { font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-secondary); }\n.ta-look-kinds { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }\n.ta-look-kind { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 7px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: transparent; color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); transition: background 120ms, border-color 120ms; }\n.ta-look-kind:hover { background: var(--ta-hover); }\n.ta-look-kind.ta-on { border-color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 8%, transparent); }\n.ta-look-name { max-width: 100%; }\n/* The voice replies are read with: its list, and a button to listen to it. */\n.ta-voice-picker { display: flex; align-items: center; gap: 8px; width: 100%; }\n.ta-voice-picker .ta-select { flex: 1; min-width: 0; }\n.ta-voice-picker .ta-button { flex: none; }\n.ta-look-premium { position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 8px; background: linear-gradient(135deg, #FCD866, #D98E14); color: #4a2c00; font-size: calc(10px * var(--ta-font-scale)); font-weight: 600; line-height: calc(14px * var(--ta-font-scale)); }\n/* Scan, as WeChat's: the camera over everything, a green glow sweeping down, round buttons on it; a photo for Ta asks on a sheet. */\n.ta-scan { position: fixed; inset: 0; z-index: 55; overflow: hidden; background: #000; color: #fff; animation: ta-fade 160ms ease-out; -webkit-user-select: none; user-select: none; }\n.ta-scan-video, .ta-scan-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }\n.ta-scan-mirrored { transform: scaleX(-1); }\n.ta-scan-line { position: absolute; left: 0; right: 0; top: 16%; height: 22%; pointer-events: none; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ta-green) 40%, transparent) 88%, color-mix(in srgb, var(--ta-green) 90%, transparent) 100%); -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); animation: ta-scan-sweep 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }\n@keyframes ta-scan-sweep { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(220%); opacity: 0; } }\n.ta-scan-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; background: var(--ta-green); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); animation: ta-scan-pop 260ms var(--ta-ease) both; }\n@keyframes ta-scan-pop { from { transform: scale(0.3); opacity: 0; } }\n.ta-scan-problem { position: absolute; top: 42%; left: 32px; right: 32px; margin: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: calc(15px * var(--ta-font-scale)); line-height: calc(22px * var(--ta-font-scale)); }\n.ta-scan-top { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }\n.ta-scan-round { pointer-events: auto; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.32); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }\n.ta-scan-bottom { position: absolute; left: 18px; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 28px); display: flex; align-items: center; gap: 12px; }\n.ta-scan-side, .ta-scan-ask { border: 0; color: #fff; background: rgba(48, 48, 48, 0.58); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); transition: transform 120ms, background 120ms; }\n.ta-scan-side { flex: none; width: 62px; height: 62px; display: grid; place-items: center; padding: 0; border-radius: 50%; }\n.ta-scan-ask { flex: 1; min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 14px; border-radius: 31px; }\n.ta-scan-side:active, .ta-scan-ask:active { transform: scale(0.96); background: rgba(70, 70, 70, 0.66); }\n.ta-scan-side:disabled, .ta-scan-ask:disabled { opacity: 0.45; }\n.ta-scan-ask-title { display: flex; align-items: center; gap: 6px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; line-height: calc(24px * var(--ta-font-scale)); }\n.ta-scan-ask-hint { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.62); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-scan-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--ta-card); color: var(--ta-text); box-shadow: var(--ta-shadow-pop); animation: ta-in 220ms var(--ta-ease); }\n:root[data-keyboard] .ta-scan-sheet { bottom: var(--ta-keyboard, 0px); padding-bottom: 12px; }\n.ta-scan-sheet-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-scan-chips { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-scan-chip { padding: 8px 14px; border: 1px solid var(--ta-border); border-radius: 999px; background: var(--ta-main); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-scan-chip:active { background: var(--ta-hover); }\n.ta-scan-field { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border: 1px solid var(--ta-border); border-radius: 22px; background: var(--ta-main); }\n.ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }\n.ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }\n.ta-scan-send:disabled { opacity: 0.5; }\n/* A model service added by its address and key (custom-provider-view) */\n.ta-custom-flow { flex: 1 1 auto; min-height: 0; }\n.ta-custom-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; margin: 0 -4px; padding: 0 4px; overflow-y: auto; }\n.ta-custom-form .ta-select { width: 100%; height: 32px; }\n.ta-custom-models { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); transition: border-color 120ms; }\n.ta-custom-models:focus-within { border-color: var(--ta-border-focus); }\n.ta-custom-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 24px; padding: 0 2px 0 8px; border-radius: 6px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); animation: ta-in 160ms var(--ta-ease) both; }\n.ta-custom-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-custom-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ta-muted); cursor: pointer; }\n.ta-custom-chip button:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-custom-model-input { flex: 1; min-width: 140px; height: 26px; border: 0; outline: none; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); }\n.ta-custom-fetch { align-self: flex-start; margin-top: 2px; }\n.ta-custom-fetched { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }\n.ta-custom-fetched .ta-auth-note { white-space: normal; }\n.ta-custom-fetched .ta-input { height: 32px; }\n.ta-custom-fetched-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; padding: 2px; border: 1px solid var(--ta-border-muted); border-radius: 8px; }\n.ta-custom-fetched-list .ta-auth-item { height: 32px; flex: none; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-custom-fetched-list .ta-auth-item > .ta-custom-picked { margin-left: auto; color: var(--ta-accent); }\n.ta-custom-actions { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; background: var(--ta-card); }\n.ta-custom-actions .ta-danger { margin-right: auto; }\n.ta-custom-add > .ta-icon:first-child { color: var(--ta-accent); }\n.ta-custom-add { width: 100%; }\n.ta-custom-advanced { border: 1px solid var(--ta-border-muted); border-radius: 10px; }\n.ta-custom-advanced-toggle { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; cursor: pointer; }\n.ta-custom-advanced-toggle:hover { background: var(--ta-hover); }\n.ta-custom-advanced-toggle .ta-auth-note { font-weight: 400; }\n.ta-custom-advanced-toggle > .ta-icon { margin-left: auto; color: var(--ta-muted); transition: transform 160ms var(--ta-ease); }\n.ta-custom-advanced.ta-open .ta-custom-advanced-toggle > .ta-icon { transform: rotate(180deg); }\n.ta-custom-advanced-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 10px 12px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-custom-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }\n.ta-custom-check { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }\n.ta-custom-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ta-accent); }\n.ta-custom-header { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 6px; align-items: center; }\n.ta-custom-header .ta-input { height: 32px; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-custom-header-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ta-muted); cursor: pointer; }\n.ta-custom-header-remove:hover { background: var(--ta-hover); color: var(--ta-text); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-custom-form .ta-input, .ta-custom-model-input { font-size: max(16px, calc(14px * var(--ta-font-scale))); }\n .ta-custom-actions .ta-button { flex: 1; }\n}\n";
|
|
3
3
|
//# sourceMappingURL=pages.d.ts.map
|
|
@@ -58,6 +58,9 @@ exports.PAGES_STYLE = `
|
|
|
58
58
|
.ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }
|
|
59
59
|
.ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }
|
|
60
60
|
.ta-settings-phone .ta-segmented button { height: 32px; }
|
|
61
|
+
.ta-setting-choice { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
62
|
+
.ta-setting-choice:active { background: var(--ta-hover); }
|
|
63
|
+
.ta-setting-check { flex: none; color: var(--ta-text); }
|
|
61
64
|
.ta-settings-phone .ta-settings-note { border-radius: 12px; }
|
|
62
65
|
.ta-keys { display: inline-flex; gap: 3px; flex: none; }
|
|
63
66
|
.ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }
|
|
@@ -71,7 +74,8 @@ exports.PAGES_STYLE = `
|
|
|
71
74
|
.ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }
|
|
72
75
|
.ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }
|
|
73
76
|
.ta-submenu-anchor { position: relative; }
|
|
74
|
-
|
|
77
|
+
/* The account menu sits at the foot of the window: a second menu grows up from its entry, or the last choices would fall below it. */
|
|
78
|
+
.ta-submenu { left: calc(100% + 8px); top: auto; bottom: -6px; width: 180px; }
|
|
75
79
|
@media ${device_protocol_1.DeviceMedia.COMPACT} {
|
|
76
80
|
.ta-settings-toc { display: none; }
|
|
77
81
|
.ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }
|
|
@@ -232,5 +236,45 @@ exports.PAGES_STYLE = `
|
|
|
232
236
|
.ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }
|
|
233
237
|
.ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }
|
|
234
238
|
.ta-scan-send:disabled { opacity: 0.5; }
|
|
239
|
+
/* A model service added by its address and key (custom-provider-view) */
|
|
240
|
+
.ta-custom-flow { flex: 1 1 auto; min-height: 0; }
|
|
241
|
+
.ta-custom-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; margin: 0 -4px; padding: 0 4px; overflow-y: auto; }
|
|
242
|
+
.ta-custom-form .ta-select { width: 100%; height: 32px; }
|
|
243
|
+
.ta-custom-models { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); transition: border-color 120ms; }
|
|
244
|
+
.ta-custom-models:focus-within { border-color: var(--ta-border-focus); }
|
|
245
|
+
.ta-custom-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 24px; padding: 0 2px 0 8px; border-radius: 6px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); animation: ta-in 160ms var(--ta-ease) both; }
|
|
246
|
+
.ta-custom-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
247
|
+
.ta-custom-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ta-muted); cursor: pointer; }
|
|
248
|
+
.ta-custom-chip button:hover { background: var(--ta-hover); color: var(--ta-text); }
|
|
249
|
+
.ta-custom-model-input { flex: 1; min-width: 140px; height: 26px; border: 0; outline: none; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); }
|
|
250
|
+
.ta-custom-fetch { align-self: flex-start; margin-top: 2px; }
|
|
251
|
+
.ta-custom-fetched { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
|
|
252
|
+
.ta-custom-fetched .ta-auth-note { white-space: normal; }
|
|
253
|
+
.ta-custom-fetched .ta-input { height: 32px; }
|
|
254
|
+
.ta-custom-fetched-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; padding: 2px; border: 1px solid var(--ta-border-muted); border-radius: 8px; }
|
|
255
|
+
.ta-custom-fetched-list .ta-auth-item { height: 32px; flex: none; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }
|
|
256
|
+
.ta-custom-fetched-list .ta-auth-item > .ta-custom-picked { margin-left: auto; color: var(--ta-accent); }
|
|
257
|
+
.ta-custom-actions { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; background: var(--ta-card); }
|
|
258
|
+
.ta-custom-actions .ta-danger { margin-right: auto; }
|
|
259
|
+
.ta-custom-add > .ta-icon:first-child { color: var(--ta-accent); }
|
|
260
|
+
.ta-custom-add { width: 100%; }
|
|
261
|
+
.ta-custom-advanced { border: 1px solid var(--ta-border-muted); border-radius: 10px; }
|
|
262
|
+
.ta-custom-advanced-toggle { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; cursor: pointer; }
|
|
263
|
+
.ta-custom-advanced-toggle:hover { background: var(--ta-hover); }
|
|
264
|
+
.ta-custom-advanced-toggle .ta-auth-note { font-weight: 400; }
|
|
265
|
+
.ta-custom-advanced-toggle > .ta-icon { margin-left: auto; color: var(--ta-muted); transition: transform 160ms var(--ta-ease); }
|
|
266
|
+
.ta-custom-advanced.ta-open .ta-custom-advanced-toggle > .ta-icon { transform: rotate(180deg); }
|
|
267
|
+
.ta-custom-advanced-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 10px 12px; animation: ta-in 200ms var(--ta-ease) both; }
|
|
268
|
+
.ta-custom-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
|
|
269
|
+
.ta-custom-check { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }
|
|
270
|
+
.ta-custom-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ta-accent); }
|
|
271
|
+
.ta-custom-header { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 6px; align-items: center; }
|
|
272
|
+
.ta-custom-header .ta-input { height: 32px; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }
|
|
273
|
+
.ta-custom-header-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ta-muted); cursor: pointer; }
|
|
274
|
+
.ta-custom-header-remove:hover { background: var(--ta-hover); color: var(--ta-text); }
|
|
275
|
+
@media ${device_protocol_1.DeviceMedia.COMPACT} {
|
|
276
|
+
.ta-custom-form .ta-input, .ta-custom-model-input { font-size: max(16px, calc(14px * var(--ta-font-scale))); }
|
|
277
|
+
.ta-custom-actions .ta-button { flex: 1; }
|
|
278
|
+
}
|
|
235
279
|
`;
|
|
236
280
|
//# sourceMappingURL=pages.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What Ta Desktop can do for the page beyond a tab of a browser. */
|
|
2
|
-
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices';
|
|
2
|
+
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices' | 'speech';
|
|
3
3
|
/** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
|
|
4
4
|
export interface DesktopFileManager {
|
|
5
5
|
/** Node's `process.platform` of the machine: what the file manager is called there. */
|
|
@@ -52,6 +52,15 @@ export interface DesktopNoticeTarget {
|
|
|
52
52
|
cwd?: string;
|
|
53
53
|
view?: string;
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Apple's recognizer on macOS (native/ta-speech of apps/ta-desktop): the messages of a listening (`Voice` of voice.ts), and
|
|
57
|
+
* what it answers them, as the Ta app on iOS has it.
|
|
58
|
+
*/
|
|
59
|
+
export interface DesktopSpeech<Message = object, Answer = object> {
|
|
60
|
+
post(message: Message): void;
|
|
61
|
+
/** Returns what stops hearing them. */
|
|
62
|
+
onAnswer(listener: (answer: Answer) => void): () => void;
|
|
63
|
+
}
|
|
55
64
|
/** A command of the DevTools protocol to the page of a `<webview>` of this page, by its getWebContentsId(). */
|
|
56
65
|
export type DebugWebview = (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
57
66
|
/**
|
|
@@ -73,6 +82,8 @@ export declare namespace DesktopUtil {
|
|
|
73
82
|
function notices(scope?: object): {
|
|
74
83
|
onOpen(listener: (target: DesktopNoticeTarget) => void): () => void;
|
|
75
84
|
} | undefined;
|
|
85
|
+
/** Apple's recognizer, where Ta Desktop has it (macOS). */
|
|
86
|
+
function speech<Message = object, Answer = object>(scope?: object): DesktopSpeech<Message, Answer> | undefined;
|
|
76
87
|
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
77
88
|
function recentShots(scope?: object): DesktopShots | undefined;
|
|
78
89
|
}
|
|
@@ -67,6 +67,20 @@ var DesktopUtil;
|
|
|
67
67
|
return Object.freeze({ onOpen: (listener) => onOpen(listener) });
|
|
68
68
|
}
|
|
69
69
|
DesktopUtil.notices = notices;
|
|
70
|
+
/** Apple's recognizer, where Ta Desktop has it (macOS). */
|
|
71
|
+
function speech(scope = globalThis) {
|
|
72
|
+
var _a;
|
|
73
|
+
var _b;
|
|
74
|
+
const { post, onAnswer } = (_b = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.speech) !== null && _b !== void 0 ? _b : {};
|
|
75
|
+
if (!has('speech', scope) || typeof post !== 'function' || typeof onAnswer !== 'function') {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
return Object.freeze({
|
|
79
|
+
post: (message) => void post(message),
|
|
80
|
+
onAnswer: (listener) => onAnswer(listener),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
DesktopUtil.speech = speech;
|
|
70
84
|
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
71
85
|
function recentShots(scope = globalThis) {
|
|
72
86
|
var _a;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/** What the page tells Apple's recognizer: of the Ta app on iOS (TaSpeech.swift of apps/ta-mobile) or of Ta Desktop on macOS. */
|
|
2
|
+
export type NativeSpeechMessage = {
|
|
3
|
+
id: string;
|
|
4
|
+
action: 'start';
|
|
5
|
+
language: string;
|
|
6
|
+
continuous: boolean;
|
|
7
|
+
hints: string[];
|
|
8
|
+
} | {
|
|
9
|
+
id: string;
|
|
10
|
+
action: 'stop';
|
|
11
|
+
};
|
|
12
|
+
/** What it answers: the words so far of a listening, or its end. */
|
|
13
|
+
export interface NativeSpeechEvent {
|
|
14
|
+
id: string;
|
|
15
|
+
text?: string;
|
|
16
|
+
final?: boolean;
|
|
17
|
+
end?: boolean;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
1
20
|
/** Talking to ta and hearing it, with what the browser or the app has: no service, no dependency. */
|
|
2
21
|
export declare namespace Voice {
|
|
3
22
|
/** The window event the Ta app on iOS answers a listening with. */
|
|
@@ -40,7 +59,7 @@ export declare namespace Voice {
|
|
|
40
59
|
function spoken(markdown: string): string;
|
|
41
60
|
/** What a text is read in: its sentences and lines, a long one in pieces at its commas. */
|
|
42
61
|
function sentences(text: string): string[];
|
|
43
|
-
/** The language a text is read in: Chinese for Chinese, whatever the page's. */
|
|
62
|
+
/** The language a text is read in: Japanese for kana, Chinese for other Han (the page's, if Chinese or Japanese), whatever the page's. */
|
|
44
63
|
function languageOf(text: string, language: string): string;
|
|
45
64
|
/**
|
|
46
65
|
* How natural a voice sounds, from what its name and address say: the neural voices of Edge and the premium
|