@celljs/ta-web 4.42.0 → 4.44.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.
Files changed (400) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/apps/app-window.js +2 -2
  4. package/esm/browser/apps/web-apps.d.ts +4 -0
  5. package/esm/browser/apps/web-apps.js +14 -3
  6. package/esm/browser/assistant/assistant-chat-list.js +2 -1
  7. package/esm/browser/assistant/assistant-extension.js +16 -2
  8. package/esm/browser/assistant/assistant-protocol.d.ts +6 -0
  9. package/esm/browser/assistant/assistant-task-source.js +3 -0
  10. package/esm/browser/assistant/assistant-task-util.d.ts +2 -0
  11. package/esm/browser/assistant/assistant-task-util.js +5 -0
  12. package/esm/browser/assistant/assistant.d.ts +3 -0
  13. package/esm/browser/assistant/assistant.js +26 -2
  14. package/esm/browser/assistant/ta-hearing.d.ts +85 -0
  15. package/esm/browser/assistant/ta-hearing.js +272 -0
  16. package/esm/browser/components/app-shell-hooks.d.ts +2 -1
  17. package/esm/browser/components/app-shell-hooks.js +4 -3
  18. package/esm/browser/components/app-shell-state.js +2 -2
  19. package/esm/browser/components/auth-view.js +1 -1
  20. package/esm/browser/components/board.js +9 -1
  21. package/esm/browser/components/chat-list-row.js +4 -4
  22. package/esm/browser/components/chat-list-util.d.ts +2 -2
  23. package/esm/browser/components/clipboard-link-host.d.ts +2 -0
  24. package/esm/browser/components/clipboard-link-host.js +27 -0
  25. package/esm/browser/components/cloud-network.js +1 -1
  26. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  27. package/esm/browser/components/custom-host.d.ts +4 -1
  28. package/esm/browser/components/custom-host.js +8 -2
  29. package/esm/browser/components/custom-provider-advanced.js +8 -8
  30. package/esm/browser/components/custom-provider-view.js +12 -12
  31. package/esm/browser/components/earlier-messages.d.ts +4 -1
  32. package/esm/browser/components/earlier-messages.js +5 -2
  33. package/esm/browser/components/empty-state.d.ts +2 -1
  34. package/esm/browser/components/empty-state.js +6 -2
  35. package/esm/browser/components/folder-picker.js +2 -2
  36. package/esm/browser/components/gallery.js +8 -9
  37. package/esm/browser/components/hearing-host.d.ts +5 -0
  38. package/esm/browser/components/hearing-host.js +58 -0
  39. package/esm/browser/components/host-view.d.ts +1 -1
  40. package/esm/browser/components/link-dialog.js +4 -0
  41. package/esm/browser/components/loading.d.ts +3 -2
  42. package/esm/browser/components/loading.js +7 -3
  43. package/esm/browser/components/markdown.d.ts +3 -1
  44. package/esm/browser/components/markdown.js +10 -5
  45. package/esm/browser/components/media.d.ts +10 -4
  46. package/esm/browser/components/media.js +60 -14
  47. package/esm/browser/components/message-list.js +2 -1
  48. package/esm/browser/components/message-steps.js +8 -5
  49. package/esm/browser/components/people-picker.d.ts +17 -0
  50. package/esm/browser/components/people-picker.js +129 -0
  51. package/esm/browser/components/relay-view.js +1 -1
  52. package/esm/browser/components/settings-choices.d.ts +2 -1
  53. package/esm/browser/components/settings-choices.js +2 -1
  54. package/esm/browser/components/settings-parts.js +25 -3
  55. package/esm/browser/components/share-dialog.d.ts +2 -2
  56. package/esm/browser/components/share-dialog.js +7 -4
  57. package/esm/browser/components/share-friends.d.ts +18 -2
  58. package/esm/browser/components/share-friends.js +64 -13
  59. package/esm/browser/components/share-item-sheet.d.ts +12 -0
  60. package/esm/browser/components/share-item-sheet.js +39 -0
  61. package/esm/browser/components/share-sheet.d.ts +12 -4
  62. package/esm/browser/components/share-sheet.js +15 -6
  63. package/esm/browser/components/sign-in-setup.js +4 -4
  64. package/esm/browser/components/trusted-domains.js +1 -1
  65. package/esm/browser/components/view-room.d.ts +25 -0
  66. package/esm/browser/components/view-room.js +136 -0
  67. package/esm/browser/components/voice-services.js +6 -6
  68. package/esm/browser/device/device-protocol.d.ts +9 -6
  69. package/esm/browser/device/device-protocol.js +7 -4
  70. package/esm/browser/device/launch-screen.d.ts +11 -1
  71. package/esm/browser/device/launch-screen.js +22 -4
  72. package/esm/browser/extension/share-sheet-compat.d.ts +2 -0
  73. package/esm/browser/extension/share-sheet-compat.js +12 -2
  74. package/esm/browser/extension/web-api-chats.d.ts +23 -0
  75. package/esm/browser/extension/web-api-code.d.ts +11 -0
  76. package/esm/browser/extension/web-api-components.d.ts +8 -1
  77. package/esm/browser/extension/web-api-contributions.d.ts +30 -1
  78. package/esm/browser/extension/web-api-desktop.d.ts +2 -1
  79. package/esm/browser/extension/web-api-file-views.d.ts +38 -0
  80. package/esm/browser/extension/web-api-file-views.js +2 -0
  81. package/esm/browser/extension/web-api-host.d.ts +47 -0
  82. package/esm/browser/extension/web-api-host.js +3 -0
  83. package/esm/browser/extension/web-api-menus.d.ts +46 -0
  84. package/esm/browser/extension/web-api-partners.d.ts +58 -1
  85. package/esm/browser/extension/web-api-skins.d.ts +95 -0
  86. package/esm/browser/extension/web-api-skins.js +2 -0
  87. package/esm/browser/extension/web-api-spec.js +9 -0
  88. package/esm/browser/extension/web-extension-api.d.ts +13 -34
  89. package/esm/browser/extension/web-extension-context.d.ts +2 -8
  90. package/esm/browser/extension/web-extension-context.js +15 -39
  91. package/esm/browser/extension/web-extension-marks.d.ts +10 -0
  92. package/esm/browser/extension/web-extension-marks.js +29 -0
  93. package/esm/browser/extension/web-extension-protocol.d.ts +13 -1
  94. package/esm/browser/extension/web-extension-protocol.js +4 -0
  95. package/esm/browser/extension/web-extension-run.d.ts +16 -2
  96. package/esm/browser/extension/web-extension-run.js +80 -0
  97. package/esm/browser/extension/web-extensions-running.d.ts +5 -1
  98. package/esm/browser/extension/web-extensions-running.js +16 -0
  99. package/esm/browser/extension/web-extensions.d.ts +2 -1
  100. package/esm/browser/extension/web-extensions.js +3 -0
  101. package/esm/browser/extension/web-home.js +3 -1
  102. package/esm/browser/extension/web-host-values.d.ts +66 -0
  103. package/esm/browser/extension/web-host-values.js +191 -0
  104. package/esm/browser/extension/web-hosts.d.ts +7 -2
  105. package/esm/browser/extension/web-hosts.js +16 -4
  106. package/esm/browser/extension/web-share-ui.d.ts +7 -0
  107. package/esm/browser/extension/web-share-ui.js +20 -0
  108. package/esm/browser/extension/web-share.d.ts +18 -0
  109. package/esm/browser/extension/web-share.js +42 -0
  110. package/esm/browser/i18n/en/assistant.d.ts +4 -0
  111. package/esm/browser/i18n/en/assistant.js +4 -0
  112. package/esm/browser/i18n/en/chat.d.ts +10 -0
  113. package/esm/browser/i18n/en/chat.js +10 -0
  114. package/esm/browser/i18n/en/common.d.ts +15 -0
  115. package/esm/browser/i18n/en/common.js +15 -0
  116. package/esm/browser/i18n/en/discover.d.ts +11 -1
  117. package/esm/browser/i18n/en/discover.js +11 -1
  118. package/esm/browser/i18n/en/settings.d.ts +10 -0
  119. package/esm/browser/i18n/en/settings.js +10 -0
  120. package/esm/browser/i18n/ja/assistant.js +4 -0
  121. package/esm/browser/i18n/ja/chat.js +10 -0
  122. package/esm/browser/i18n/ja/common.js +15 -0
  123. package/esm/browser/i18n/ja/discover.js +11 -1
  124. package/esm/browser/i18n/ja/settings.js +10 -0
  125. package/esm/browser/i18n/locales.d.ts +51 -2
  126. package/esm/browser/i18n/messages.d.ts +50 -1
  127. package/esm/browser/i18n/zh/assistant.js +4 -0
  128. package/esm/browser/i18n/zh/chat.js +10 -0
  129. package/esm/browser/i18n/zh/common.js +15 -0
  130. package/esm/browser/i18n/zh/discover.js +11 -1
  131. package/esm/browser/i18n/zh/settings.js +10 -0
  132. package/esm/browser/i18n/zh-tw/assistant.js +4 -0
  133. package/esm/browser/i18n/zh-tw/chat.js +10 -0
  134. package/esm/browser/i18n/zh-tw/common.js +15 -0
  135. package/esm/browser/i18n/zh-tw/discover.js +11 -1
  136. package/esm/browser/i18n/zh-tw/settings.js +10 -0
  137. package/esm/browser/launch-art/art-palette.d.ts +41 -0
  138. package/esm/browser/launch-art/art-palette.js +72 -0
  139. package/esm/browser/launch-art/cyclic-automaton.d.ts +45 -0
  140. package/esm/browser/launch-art/cyclic-automaton.js +176 -0
  141. package/esm/browser/launch-art/fractal-tree.d.ts +43 -0
  142. package/esm/browser/launch-art/fractal-tree.js +48 -0
  143. package/esm/browser/launch-art/launch-art.d.ts +98 -0
  144. package/esm/browser/launch-art/launch-art.js +420 -0
  145. package/esm/browser/launch-art/launch-sky.d.ts +66 -0
  146. package/esm/browser/launch-art/launch-sky.js +153 -0
  147. package/esm/browser/links/clipboard-links.d.ts +85 -0
  148. package/esm/browser/links/clipboard-links.js +261 -0
  149. package/esm/browser/links/link-text.d.ts +29 -0
  150. package/esm/browser/links/link-text.js +97 -0
  151. package/esm/browser/links/links-protocol.d.ts +12 -1
  152. package/esm/browser/links/links.d.ts +8 -2
  153. package/esm/browser/links/links.js +33 -3
  154. package/esm/browser/markdown/code-renderers.d.ts +4 -0
  155. package/esm/browser/markdown/code-renderers.js +4 -0
  156. package/esm/browser/partners/group-picker.js +23 -29
  157. package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
  158. package/esm/browser/sandbox/work/work-senses.js +1 -1
  159. package/esm/browser/settings/settings-protocol.d.ts +26 -0
  160. package/esm/browser/settings/settings-protocol.js +11 -0
  161. package/esm/browser/settings/settings.d.ts +4 -1
  162. package/esm/browser/settings/settings.js +16 -3
  163. package/esm/browser/skin/skin-layer.d.ts +8 -0
  164. package/esm/browser/skin/skin-layer.js +118 -0
  165. package/esm/browser/skin/skin-util.d.ts +40 -0
  166. package/esm/browser/skin/skin-util.js +120 -0
  167. package/esm/browser/style/base.d.ts +1 -1
  168. package/esm/browser/style/base.js +10 -6
  169. package/esm/browser/style/chat-list.d.ts +1 -1
  170. package/esm/browser/style/chat-list.js +28 -15
  171. package/esm/browser/style/conversation-column.d.ts +1 -1
  172. package/esm/browser/style/conversation.d.ts +1 -1
  173. package/esm/browser/style/conversation.js +5 -4
  174. package/esm/browser/style/dialogs.d.ts +1 -1
  175. package/esm/browser/style/dialogs.js +2 -5
  176. package/esm/browser/style/forms.d.ts +5 -0
  177. package/esm/browser/style/forms.js +65 -0
  178. package/esm/browser/style/layout.d.ts +1 -1
  179. package/esm/browser/style/pages.d.ts +1 -1
  180. package/esm/browser/style/pages.js +14 -24
  181. package/esm/browser/style/phone.d.ts +1 -1
  182. package/esm/browser/style/shared.d.ts +1 -1
  183. package/esm/browser/style/shell.d.ts +1 -1
  184. package/esm/browser/style/shell.js +1 -6
  185. package/esm/browser/style/skins.d.ts +9 -0
  186. package/esm/browser/style/skins.js +107 -0
  187. package/esm/browser/style/surfaces.d.ts +1 -1
  188. package/esm/browser/style/surfaces.js +8 -6
  189. package/esm/browser/style/tasks.d.ts +1 -1
  190. package/esm/browser/style.js +4 -0
  191. package/esm/browser/util/fresh-rows.d.ts +21 -0
  192. package/esm/browser/util/fresh-rows.js +36 -0
  193. package/esm/browser/util/process.d.ts +12 -22
  194. package/esm/browser/util/process.js +49 -39
  195. package/esm/browser/util/voice.d.ts +18 -0
  196. package/esm/browser/util/voice.js +111 -3
  197. package/esm/browser/workbench-protocol.d.ts +2 -0
  198. package/esm/browser/workbench-services.d.ts +2 -0
  199. package/esm/browser/workbench-services.js +5 -0
  200. package/esm/browser/workbench.js +5 -0
  201. package/lib/browser/apps/app-window.js +2 -2
  202. package/lib/browser/apps/web-apps.d.ts +4 -0
  203. package/lib/browser/apps/web-apps.js +14 -3
  204. package/lib/browser/assistant/assistant-chat-list.js +2 -1
  205. package/lib/browser/assistant/assistant-extension.js +15 -1
  206. package/lib/browser/assistant/assistant-protocol.d.ts +6 -0
  207. package/lib/browser/assistant/assistant-task-source.js +3 -0
  208. package/lib/browser/assistant/assistant-task-util.d.ts +2 -0
  209. package/lib/browser/assistant/assistant-task-util.js +5 -0
  210. package/lib/browser/assistant/assistant.d.ts +3 -0
  211. package/lib/browser/assistant/assistant.js +26 -2
  212. package/lib/browser/assistant/ta-hearing.d.ts +86 -0
  213. package/lib/browser/assistant/ta-hearing.js +277 -0
  214. package/lib/browser/components/app-shell-hooks.d.ts +2 -1
  215. package/lib/browser/components/app-shell-hooks.js +4 -3
  216. package/lib/browser/components/app-shell-state.js +2 -2
  217. package/lib/browser/components/auth-view.js +1 -1
  218. package/lib/browser/components/board.js +9 -1
  219. package/lib/browser/components/chat-list-row.js +4 -4
  220. package/lib/browser/components/chat-list-util.d.ts +2 -2
  221. package/lib/browser/components/clipboard-link-host.d.ts +3 -0
  222. package/lib/browser/components/clipboard-link-host.js +63 -0
  223. package/lib/browser/components/cloud-network.js +1 -1
  224. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  225. package/lib/browser/components/custom-host.d.ts +4 -1
  226. package/lib/browser/components/custom-host.js +8 -2
  227. package/lib/browser/components/custom-provider-advanced.js +8 -8
  228. package/lib/browser/components/custom-provider-view.js +12 -12
  229. package/lib/browser/components/earlier-messages.d.ts +4 -1
  230. package/lib/browser/components/earlier-messages.js +5 -2
  231. package/lib/browser/components/empty-state.d.ts +2 -1
  232. package/lib/browser/components/empty-state.js +6 -2
  233. package/lib/browser/components/folder-picker.js +2 -2
  234. package/lib/browser/components/gallery.js +7 -8
  235. package/lib/browser/components/hearing-host.d.ts +6 -0
  236. package/lib/browser/components/hearing-host.js +94 -0
  237. package/lib/browser/components/host-view.d.ts +1 -1
  238. package/lib/browser/components/link-dialog.js +4 -0
  239. package/lib/browser/components/loading.d.ts +3 -2
  240. package/lib/browser/components/loading.js +7 -3
  241. package/lib/browser/components/markdown.d.ts +3 -1
  242. package/lib/browser/components/markdown.js +9 -4
  243. package/lib/browser/components/media.d.ts +10 -4
  244. package/lib/browser/components/media.js +61 -14
  245. package/lib/browser/components/message-list.js +2 -1
  246. package/lib/browser/components/message-steps.js +8 -5
  247. package/lib/browser/components/people-picker.d.ts +18 -0
  248. package/lib/browser/components/people-picker.js +166 -0
  249. package/lib/browser/components/relay-view.js +1 -1
  250. package/lib/browser/components/settings-choices.d.ts +2 -1
  251. package/lib/browser/components/settings-choices.js +2 -1
  252. package/lib/browser/components/settings-parts.js +23 -1
  253. package/lib/browser/components/share-dialog.d.ts +2 -2
  254. package/lib/browser/components/share-dialog.js +7 -4
  255. package/lib/browser/components/share-friends.d.ts +18 -2
  256. package/lib/browser/components/share-friends.js +67 -13
  257. package/lib/browser/components/share-item-sheet.d.ts +13 -0
  258. package/lib/browser/components/share-item-sheet.js +75 -0
  259. package/lib/browser/components/share-sheet.d.ts +12 -4
  260. package/lib/browser/components/share-sheet.js +14 -4
  261. package/lib/browser/components/sign-in-setup.js +4 -4
  262. package/lib/browser/components/trusted-domains.js +1 -1
  263. package/lib/browser/components/view-room.d.ts +26 -0
  264. package/lib/browser/components/view-room.js +173 -0
  265. package/lib/browser/components/voice-services.js +6 -6
  266. package/lib/browser/device/device-protocol.d.ts +9 -6
  267. package/lib/browser/device/device-protocol.js +7 -4
  268. package/lib/browser/device/launch-screen.d.ts +11 -1
  269. package/lib/browser/device/launch-screen.js +22 -4
  270. package/lib/browser/extension/share-sheet-compat.d.ts +2 -0
  271. package/lib/browser/extension/share-sheet-compat.js +13 -2
  272. package/lib/browser/extension/web-api-chats.d.ts +23 -0
  273. package/lib/browser/extension/web-api-code.d.ts +11 -0
  274. package/lib/browser/extension/web-api-components.d.ts +8 -1
  275. package/lib/browser/extension/web-api-contributions.d.ts +30 -1
  276. package/lib/browser/extension/web-api-desktop.d.ts +2 -1
  277. package/lib/browser/extension/web-api-file-views.d.ts +39 -0
  278. package/lib/browser/extension/web-api-file-views.js +3 -0
  279. package/lib/browser/extension/web-api-host.d.ts +48 -0
  280. package/lib/browser/extension/web-api-host.js +4 -0
  281. package/lib/browser/extension/web-api-menus.d.ts +46 -0
  282. package/lib/browser/extension/web-api-partners.d.ts +58 -1
  283. package/lib/browser/extension/web-api-skins.d.ts +96 -0
  284. package/lib/browser/extension/web-api-skins.js +3 -0
  285. package/lib/browser/extension/web-api-spec.js +9 -0
  286. package/lib/browser/extension/web-extension-api.d.ts +13 -34
  287. package/lib/browser/extension/web-extension-context.d.ts +2 -8
  288. package/lib/browser/extension/web-extension-context.js +15 -39
  289. package/lib/browser/extension/web-extension-marks.d.ts +11 -0
  290. package/lib/browser/extension/web-extension-marks.js +65 -0
  291. package/lib/browser/extension/web-extension-protocol.d.ts +13 -1
  292. package/lib/browser/extension/web-extension-protocol.js +4 -0
  293. package/lib/browser/extension/web-extension-run.d.ts +16 -2
  294. package/lib/browser/extension/web-extension-run.js +80 -0
  295. package/lib/browser/extension/web-extensions-running.d.ts +5 -1
  296. package/lib/browser/extension/web-extensions-running.js +16 -0
  297. package/lib/browser/extension/web-extensions.d.ts +2 -1
  298. package/lib/browser/extension/web-extensions.js +3 -0
  299. package/lib/browser/extension/web-home.js +3 -1
  300. package/lib/browser/extension/web-host-values.d.ts +67 -0
  301. package/lib/browser/extension/web-host-values.js +229 -0
  302. package/lib/browser/extension/web-hosts.d.ts +7 -2
  303. package/lib/browser/extension/web-hosts.js +16 -4
  304. package/lib/browser/extension/web-share-ui.d.ts +8 -0
  305. package/lib/browser/extension/web-share-ui.js +56 -0
  306. package/lib/browser/extension/web-share.d.ts +19 -0
  307. package/lib/browser/extension/web-share.js +45 -0
  308. package/lib/browser/i18n/en/assistant.d.ts +4 -0
  309. package/lib/browser/i18n/en/assistant.js +4 -0
  310. package/lib/browser/i18n/en/chat.d.ts +10 -0
  311. package/lib/browser/i18n/en/chat.js +10 -0
  312. package/lib/browser/i18n/en/common.d.ts +15 -0
  313. package/lib/browser/i18n/en/common.js +15 -0
  314. package/lib/browser/i18n/en/discover.d.ts +11 -1
  315. package/lib/browser/i18n/en/discover.js +11 -1
  316. package/lib/browser/i18n/en/settings.d.ts +10 -0
  317. package/lib/browser/i18n/en/settings.js +10 -0
  318. package/lib/browser/i18n/ja/assistant.js +4 -0
  319. package/lib/browser/i18n/ja/chat.js +10 -0
  320. package/lib/browser/i18n/ja/common.js +15 -0
  321. package/lib/browser/i18n/ja/discover.js +11 -1
  322. package/lib/browser/i18n/ja/settings.js +10 -0
  323. package/lib/browser/i18n/locales.d.ts +51 -2
  324. package/lib/browser/i18n/messages.d.ts +50 -1
  325. package/lib/browser/i18n/zh/assistant.js +4 -0
  326. package/lib/browser/i18n/zh/chat.js +10 -0
  327. package/lib/browser/i18n/zh/common.js +15 -0
  328. package/lib/browser/i18n/zh/discover.js +11 -1
  329. package/lib/browser/i18n/zh/settings.js +10 -0
  330. package/lib/browser/i18n/zh-tw/assistant.js +4 -0
  331. package/lib/browser/i18n/zh-tw/chat.js +10 -0
  332. package/lib/browser/i18n/zh-tw/common.js +15 -0
  333. package/lib/browser/i18n/zh-tw/discover.js +11 -1
  334. package/lib/browser/i18n/zh-tw/settings.js +10 -0
  335. package/lib/browser/launch-art/art-palette.d.ts +42 -0
  336. package/lib/browser/launch-art/art-palette.js +76 -0
  337. package/lib/browser/launch-art/cyclic-automaton.d.ts +46 -0
  338. package/lib/browser/launch-art/cyclic-automaton.js +180 -0
  339. package/lib/browser/launch-art/fractal-tree.d.ts +44 -0
  340. package/lib/browser/launch-art/fractal-tree.js +52 -0
  341. package/lib/browser/launch-art/launch-art.d.ts +99 -0
  342. package/lib/browser/launch-art/launch-art.js +424 -0
  343. package/lib/browser/launch-art/launch-sky.d.ts +67 -0
  344. package/lib/browser/launch-art/launch-sky.js +157 -0
  345. package/lib/browser/links/clipboard-links.d.ts +86 -0
  346. package/lib/browser/links/clipboard-links.js +266 -0
  347. package/lib/browser/links/link-text.d.ts +30 -0
  348. package/lib/browser/links/link-text.js +100 -0
  349. package/lib/browser/links/links-protocol.d.ts +12 -1
  350. package/lib/browser/links/links.d.ts +8 -2
  351. package/lib/browser/links/links.js +33 -3
  352. package/lib/browser/markdown/code-renderers.d.ts +4 -0
  353. package/lib/browser/markdown/code-renderers.js +5 -1
  354. package/lib/browser/partners/group-picker.js +23 -29
  355. package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
  356. package/lib/browser/sandbox/work/work-senses.js +1 -1
  357. package/lib/browser/settings/settings-protocol.d.ts +26 -0
  358. package/lib/browser/settings/settings-protocol.js +12 -1
  359. package/lib/browser/settings/settings.d.ts +4 -1
  360. package/lib/browser/settings/settings.js +16 -3
  361. package/lib/browser/skin/skin-layer.d.ts +9 -0
  362. package/lib/browser/skin/skin-layer.js +154 -0
  363. package/lib/browser/skin/skin-util.d.ts +41 -0
  364. package/lib/browser/skin/skin-util.js +123 -0
  365. package/lib/browser/style/base.d.ts +1 -1
  366. package/lib/browser/style/base.js +10 -6
  367. package/lib/browser/style/chat-list.d.ts +1 -1
  368. package/lib/browser/style/chat-list.js +28 -15
  369. package/lib/browser/style/conversation-column.d.ts +1 -1
  370. package/lib/browser/style/conversation.d.ts +1 -1
  371. package/lib/browser/style/conversation.js +5 -4
  372. package/lib/browser/style/dialogs.d.ts +1 -1
  373. package/lib/browser/style/dialogs.js +2 -5
  374. package/lib/browser/style/forms.d.ts +6 -0
  375. package/lib/browser/style/forms.js +68 -0
  376. package/lib/browser/style/layout.d.ts +1 -1
  377. package/lib/browser/style/pages.d.ts +1 -1
  378. package/lib/browser/style/pages.js +14 -24
  379. package/lib/browser/style/phone.d.ts +1 -1
  380. package/lib/browser/style/shared.d.ts +1 -1
  381. package/lib/browser/style/shell.d.ts +1 -1
  382. package/lib/browser/style/shell.js +1 -6
  383. package/lib/browser/style/skins.d.ts +10 -0
  384. package/lib/browser/style/skins.js +110 -0
  385. package/lib/browser/style/surfaces.d.ts +1 -1
  386. package/lib/browser/style/surfaces.js +8 -6
  387. package/lib/browser/style/tasks.d.ts +1 -1
  388. package/lib/browser/style.js +4 -0
  389. package/lib/browser/util/fresh-rows.d.ts +22 -0
  390. package/lib/browser/util/fresh-rows.js +40 -0
  391. package/lib/browser/util/process.d.ts +12 -22
  392. package/lib/browser/util/process.js +49 -40
  393. package/lib/browser/util/voice.d.ts +18 -0
  394. package/lib/browser/util/voice.js +111 -3
  395. package/lib/browser/workbench-protocol.d.ts +2 -0
  396. package/lib/browser/workbench-services.d.ts +2 -0
  397. package/lib/browser/workbench-services.js +5 -0
  398. package/lib/browser/workbench.js +5 -0
  399. package/package.json +8 -8
  400. package/public/launch.svg +3 -3
@@ -118,7 +118,7 @@ exports.BROWSER_SENSE_DEVICES = {
118
118
  return false;
119
119
  }
120
120
  // A computer has the events and never fires them: only where fingers touch.
121
- if (!((_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(pointer: coarse)').matches)) {
121
+ if (!((_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(hover: none)').matches)) {
122
122
  return false;
123
123
  }
124
124
  const asks = [window.DeviceOrientationEvent, window.DeviceMotionEvent];
@@ -9,6 +9,13 @@ export type Language = TaLanguage;
9
9
  /** How diagrams of replies draw: in the colours of the page, as by hand, a colour to a node, or coming in and flowing. */
10
10
  export type DiagramStyle = 'clean' | 'sketch' | 'colour' | 'motion';
11
11
  export declare const DIAGRAM_STYLES: readonly DiagramStyle[];
12
+ /** How much of the picture of a skin the columns let through (WebSkinGlass). */
13
+ export type SkinGlass = 'clear' | 'soft' | 'focus';
14
+ export declare const SKIN_GLASSES: readonly SkinGlass[];
15
+ /** `Settings.skin` at first: the first skin there is, so that one the user installs shows. */
16
+ export declare const AUTO_SKIN = "auto";
17
+ /** `Settings.skin` of the user who wants none. */
18
+ export declare const NO_SKIN = "none";
12
19
  /** How large the text is, as the font size of WeChat: small, standard, large, extra large. */
13
20
  export type FontSize = 'small' | 'standard' | 'large' | 'xlarge';
14
21
  /** What each size multiplies the font sizes of the styles by (`--ta-font-scale`, see style/base.ts). */
@@ -55,6 +62,13 @@ export interface Settings {
55
62
  taskModel: string;
56
63
  reduceMotion: boolean;
57
64
  diagramStyle: DiagramStyle;
65
+ /**
66
+ * The skin Ta shows in (WebExtensionAPI.registerSkin, docs/design/ta-skins.md): `<extension id>/<skin id>`, NO_SKIN,
67
+ * or AUTO_SKIN for the first there is.
68
+ */
69
+ skin: string;
70
+ /** How clear the glass of a skin is. */
71
+ glass: SkinGlass;
58
72
  /** The names of the built-in web extensions turned off; the others are on. */
59
73
  builtinsOff: string[];
60
74
  /**
@@ -62,6 +76,8 @@ export interface Settings {
62
76
  * `github.com`, `*.github.com`, `localhost:3000`, or `*` for all. This machine always is.
63
77
  */
64
78
  trustedDomains: string[];
79
+ /** Links of Ta the user copied are offered as Ta comes back, and those pasted, with Open (ClipboardLinks). On at first. */
80
+ clipboardLinks: boolean;
65
81
  /** Which pages of web extensions are in the navigation, and which under Discover. */
66
82
  navigation: NavigationSetting;
67
83
  /** How long an extension started on open keeps running once left, before it stops (ta-launcher.md). */
@@ -89,6 +105,8 @@ export interface SettingsState {
89
105
  chatFontScale: number;
90
106
  /** Also when the system asks for it. */
91
107
  reduceMotion: boolean;
108
+ /** The colour of the window, which a skin that shows gives it (ShownLook.color); else that of the theme. */
109
+ skinColor?: string;
92
110
  }
93
111
  /** What `keepAliveMinutes` may be. */
94
112
  export declare const KEEP_ALIVE_CHOICES: readonly number[];
@@ -113,9 +131,17 @@ export declare namespace SettingsUtil {
113
131
  function language(setting: LanguageSetting, browserLanguage: string): Language;
114
132
  }
115
133
  /** The settings of the web client: theme, language, font size, voice, motion. They apply as soon as they change. */
134
+ /** How a skin that shows wants the page (SkinLayer): its tone over the user's theme, and the window in its colour. */
135
+ export interface ShownLook {
136
+ theme: Theme;
137
+ /** Of the window and the bar of the browser (theme-color), opaque. */
138
+ color: string;
139
+ }
116
140
  export interface TaSettings {
117
141
  readonly state: SettingsState;
118
142
  update(change: Partial<Settings>): void;
119
143
  subscribe(listener: (state: SettingsState) => void): () => void;
144
+ /** The look of a skin, over the theme of the settings, until it is undefined again. */
145
+ show(look: ShownLook | undefined): void;
120
146
  }
121
147
  //# sourceMappingURL=settings-protocol.d.ts.map
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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.DIAGRAM_STYLES = exports.TaSettings = void 0;
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.NO_SKIN = exports.AUTO_SKIN = exports.SKIN_GLASSES = exports.DIAGRAM_STYLES = exports.TaSettings = void 0;
4
4
  const ta_protocol_1 = require("@celljs/ta-protocol");
5
5
  const navigation_1 = require("./navigation");
6
6
  exports.TaSettings = Symbol('TaSettings');
7
7
  exports.DIAGRAM_STYLES = ['clean', 'sketch', 'colour', 'motion'];
8
+ exports.SKIN_GLASSES = ['clear', 'soft', 'focus'];
9
+ /** `Settings.skin` at first: the first skin there is, so that one the user installs shows. */
10
+ exports.AUTO_SKIN = 'auto';
11
+ /** `Settings.skin` of the user who wants none. */
12
+ exports.NO_SKIN = 'none';
8
13
  /** What each size multiplies the font sizes of the styles by (`--ta-font-scale`, see style/base.ts). */
9
14
  exports.FONT_SCALES = { small: 0.9, standard: 1, large: 1.12, xlarge: 1.25 };
10
15
  /**
@@ -38,8 +43,11 @@ exports.DEFAULT_SETTINGS = {
38
43
  taskModel: '',
39
44
  reduceMotion: false,
40
45
  diagramStyle: 'clean',
46
+ skin: exports.AUTO_SKIN,
47
+ glass: 'soft',
41
48
  builtinsOff: [],
42
49
  trustedDomains: [],
50
+ clipboardLinks: true,
43
51
  navigation: navigation_1.DEFAULT_NAVIGATION,
44
52
  keepAliveMinutes: 5,
45
53
  chatFoldDays: 7,
@@ -87,8 +95,11 @@ var SettingsUtil;
87
95
  taskModel: modelRef(kept.taskModel),
88
96
  reduceMotion: kept.reduceMotion === true,
89
97
  diagramStyle: exports.DIAGRAM_STYLES.includes(kept.diagramStyle) ? kept.diagramStyle : exports.DEFAULT_SETTINGS.diagramStyle,
98
+ skin: typeof kept.skin === 'string' && kept.skin ? kept.skin : exports.AUTO_SKIN,
99
+ glass: exports.SKIN_GLASSES.includes(kept.glass) ? kept.glass : exports.DEFAULT_SETTINGS.glass,
90
100
  builtinsOff: strings(kept.builtinsOff),
91
101
  trustedDomains: strings(kept.trustedDomains),
102
+ clipboardLinks: kept.clipboardLinks !== false,
92
103
  navigation: navigation_1.NavigationUtil.parse(kept.navigation),
93
104
  keepAliveMinutes: choice(kept.keepAliveMinutes, exports.KEEP_ALIVE_CHOICES, exports.DEFAULT_SETTINGS.keepAliveMinutes),
94
105
  chatFoldDays: choice(kept.chatFoldDays, exports.CHAT_FOLD_CHOICES, exports.DEFAULT_SETTINGS.chatFoldDays),
@@ -1,7 +1,7 @@
1
1
  import { LocaleManager } from '@celljs/widget';
2
2
  import { TaState } from '../state/state-protocol';
3
3
  import { TaWorkbench } from '../workbench-protocol';
4
- import { type Settings, type SettingsState, TaSettings } from './settings-protocol';
4
+ import { type Settings, type SettingsState, type ShownLook, TaSettings } from './settings-protocol';
5
5
  /**
6
6
  * The colours of the conversation (--ta-main) and of the side columns (--ta-side), for the bar of the
7
7
  * browser and the title bar of the installed app.
@@ -21,6 +21,8 @@ export declare class TaSettingsImpl implements TaSettings {
21
21
  protected readonly persisted: TaState;
22
22
  protected readonly workbench: TaWorkbench;
23
23
  protected current: SettingsState;
24
+ /** That of a skin that shows (show). */
25
+ protected shownLook?: ShownLook;
24
26
  /** The settings kept for the computer signed in to; the page may show another look (shown). */
25
27
  protected kept: Settings;
26
28
  protected readonly listeners: Set<(state: SettingsState) => void>;
@@ -30,6 +32,7 @@ export declare class TaSettingsImpl implements TaSettings {
30
32
  protected init(): void;
31
33
  update(change: Partial<Settings>): void;
32
34
  subscribe(listener: (state: SettingsState) => void): () => void;
35
+ show(look: ShownLook | undefined): void;
33
36
  protected resolve(settings: Settings): SettingsState;
34
37
  /** Signed in, the settings kept for the computer; else those with the look the page had last. */
35
38
  protected shown(settings: Settings): Settings;
@@ -62,14 +62,25 @@ let TaSettingsImpl = class TaSettingsImpl {
62
62
  this.listeners.add(listener);
63
63
  return () => this.listeners.delete(listener);
64
64
  }
65
+ show(look) {
66
+ var _a, _b;
67
+ if ((look === null || look === void 0 ? void 0 : look.theme) === ((_a = this.shownLook) === null || _a === void 0 ? void 0 : _a.theme) && (look === null || look === void 0 ? void 0 : look.color) === ((_b = this.shownLook) === null || _b === void 0 ? void 0 : _b.color)) {
68
+ return;
69
+ }
70
+ this.shownLook = look;
71
+ this.apply(this.kept);
72
+ }
65
73
  resolve(settings) {
74
+ var _a;
75
+ var _b;
66
76
  return {
67
77
  settings,
68
- theme: settings_protocol_1.SettingsUtil.theme(settings.theme, this.dark.matches),
78
+ theme: (_b = (_a = this.shownLook) === null || _a === void 0 ? void 0 : _a.theme) !== null && _b !== void 0 ? _b : settings_protocol_1.SettingsUtil.theme(settings.theme, this.dark.matches),
69
79
  language: settings_protocol_1.SettingsUtil.language(settings.language, navigator.language),
70
80
  fontScale: settings_protocol_1.FONT_SCALES[settings.fontSize],
71
81
  chatFontScale: settings_protocol_1.FONT_SCALES[settings.chatFontSize],
72
82
  reduceMotion: settings.reduceMotion || this.calm.matches,
83
+ ...(this.shownLook ? { skinColor: this.shownLook.color } : {}),
73
84
  };
74
85
  }
75
86
  /** Signed in, the settings kept for the computer; else those with the look the page had last. */
@@ -77,6 +88,7 @@ let TaSettingsImpl = class TaSettingsImpl {
77
88
  return this.workbench.state.host === undefined ? { ...settings, ...this.persisted.get(settings_protocol_1.SettingsUtil.LOOK) } : settings;
78
89
  }
79
90
  apply(kept) {
91
+ var _a, _b;
80
92
  const state = this.resolve(this.shown(kept));
81
93
  this.kept = kept;
82
94
  this.current = state;
@@ -97,9 +109,10 @@ let TaSettingsImpl = class TaSettingsImpl {
97
109
  meta.name = 'theme-color';
98
110
  document.head.appendChild(meta);
99
111
  }
100
- meta.content = exports.THEME_COLORS[state.theme].main;
112
+ // Under a skin, the window is its colour: what shows for a moment where the page has not drawn is the picture's, never black.
113
+ meta.content = (_a = state.skinColor) !== null && _a !== void 0 ? _a : exports.THEME_COLORS[state.theme].main;
101
114
  // The bar of WeChat's mini program over the page: the colour at the top of the chats, its first page (--ta-side).
102
- mini_program_1.MiniProgram.paint(exports.THEME_COLORS[state.theme].side, state.theme === 'dark');
115
+ mini_program_1.MiniProgram.paint((_b = state.skinColor) !== null && _b !== void 0 ? _b : exports.THEME_COLORS[state.theme].side, state.theme === 'dark');
103
116
  // Even the current one: a language whose messages still load (Japanese, Traditional Chinese) is selected once
104
117
  // they are there, unless another is asked for meanwhile.
105
118
  void this.localeManager.get().then(locales => {
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The skin the user picked (Settings.skin, docs/design/ta-skins.md), behind the page: its backdrop over the picture it
4
+ * kept, in the colour it gives, faded in once it draws; the page in its tone and its colours (style/skins.ts), the
5
+ * window in its colour (TaSettings.show). Another skin, or its extension loaded again, fades in over the one before,
6
+ * which goes once it is in: the window never shows blank between them.
7
+ */
8
+ export declare function SkinLayer(): React.JSX.Element | null;
9
+ //# sourceMappingURL=skin-layer.d.ts.map
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.SkinLayer = SkinLayer;
37
+ const React = __importStar(require("react"));
38
+ const extension_view_1 = require("../extension/extension-view");
39
+ const hooks_1 = require("../hooks");
40
+ const settings_protocol_1 = require("../settings/settings-protocol");
41
+ const skin_util_1 = require("./skin-util");
42
+ /** A backdrop that never says it is ready is shown after this long. */
43
+ const READY_AT_LATEST_MS = 4000;
44
+ /** As the fade of .ta-skin-live: the backdrop before is let go once the new one is in. */
45
+ const FADE_MS = 1000;
46
+ let nextLayer = 0;
47
+ /** Normalizes any CSS colour to `#rrggbb` with a canvas of the page. */
48
+ function normalize(color) {
49
+ const context = document.createElement('canvas').getContext('2d');
50
+ if (!context) {
51
+ return undefined;
52
+ }
53
+ context.fillStyle = '#000';
54
+ context.fillStyle = color;
55
+ return String(context.fillStyle);
56
+ }
57
+ function usePrefersDark() {
58
+ return React.useSyncExternalStore(listener => {
59
+ const query = matchMedia('(prefers-color-scheme: dark)');
60
+ query.addEventListener('change', listener);
61
+ return () => query.removeEventListener('change', listener);
62
+ }, () => matchMedia('(prefers-color-scheme: dark)').matches);
63
+ }
64
+ /**
65
+ * The skin the user picked (Settings.skin, docs/design/ta-skins.md), behind the page: its backdrop over the picture it
66
+ * kept, in the colour it gives, faded in once it draws; the page in its tone and its colours (style/skins.ts), the
67
+ * window in its colour (TaSettings.show). Another skin, or its extension loaded again, fades in over the one before,
68
+ * which goes once it is in: the window never shows blank between them.
69
+ */
70
+ function SkinLayer() {
71
+ const [{ skins }] = (0, hooks_1.useWebExtensions)();
72
+ const [state, settings] = (0, hooks_1.useSettings)();
73
+ const [kept, keep] = (0, hooks_1.usePersisted)(skin_util_1.SkinUtil.PICTURE);
74
+ const prefersDark = usePrefersDark();
75
+ const entry = skin_util_1.SkinUtil.pick(skins, state.settings.skin);
76
+ const [asked, setAsked] = React.useState();
77
+ const tone = entry && skin_util_1.SkinUtil.tone((asked === null || asked === void 0 ? void 0 : asked.skin) === entry.id ? asked.tone : undefined, entry.skin, settings_protocol_1.SettingsUtil.theme(state.settings.theme, prefersDark));
78
+ const colors = entry && tone ? entry.skin.colors[tone] : undefined;
79
+ const skinId = entry === null || entry === void 0 ? void 0 : entry.id;
80
+ const [base, glassColor, ink, accent] = [colors === null || colors === void 0 ? void 0 : colors.base, colors === null || colors === void 0 ? void 0 : colors.glass, colors === null || colors === void 0 ? void 0 : colors.ink, colors === null || colors === void 0 ? void 0 : colors.accent];
81
+ const variables = React.useMemo(() => (base === undefined ? undefined : skin_util_1.SkinUtil.variables({ base, glass: glassColor, ink, accent }, normalize)), [base, glassColor, ink, accent]);
82
+ const glass = state.settings.glass;
83
+ const softens = !!(entry === null || entry === void 0 ? void 0 : entry.skin.softens);
84
+ React.useLayoutEffect(() => {
85
+ if (!skinId || !tone || !variables) {
86
+ return;
87
+ }
88
+ const root = document.documentElement;
89
+ root.setAttribute('data-ta-skin', skinId);
90
+ root.setAttribute('data-ta-glass', glass);
91
+ root.toggleAttribute('data-ta-skin-softens', softens);
92
+ for (const [name, value] of Object.entries(variables)) {
93
+ root.style.setProperty(name, value);
94
+ }
95
+ settings.show({ theme: tone, color: variables['--ta-skin-base'] });
96
+ return () => {
97
+ root.removeAttribute('data-ta-skin');
98
+ root.removeAttribute('data-ta-glass');
99
+ root.removeAttribute('data-ta-skin-softens');
100
+ for (const name of skin_util_1.SkinUtil.VARIABLES) {
101
+ root.style.removeProperty(name);
102
+ }
103
+ settings.show(undefined);
104
+ };
105
+ }, [skinId, tone, variables, glass, softens, settings]);
106
+ const [layers, setLayers] = React.useState([]);
107
+ React.useEffect(() => {
108
+ setLayers(current => {
109
+ if (!entry) {
110
+ return current.length ? [] : current;
111
+ }
112
+ const top = current.at(-1);
113
+ if (top && top.entry.id === entry.id && top.entry.skin.backdrop === entry.skin.backdrop) {
114
+ return top.entry === entry ? current : [...current.slice(0, -1), { ...top, entry }];
115
+ }
116
+ return [...current, { key: ++nextLayer, entry, ready: false }];
117
+ });
118
+ }, [entry]);
119
+ const top = layers.at(-1);
120
+ // The one before goes once the new one is in.
121
+ React.useEffect(() => {
122
+ if (!(top === null || top === void 0 ? void 0 : top.ready) || layers.length < 2) {
123
+ return;
124
+ }
125
+ const timer = setTimeout(() => setLayers(current => current.filter(layer => layer.key >= top.key)), FADE_MS);
126
+ return () => clearTimeout(timer);
127
+ }, [top, layers.length]);
128
+ const ready = React.useCallback((key) => setLayers(current => current.map(layer => (layer.key === key && !layer.ready ? { ...layer, ready: true } : layer))), []);
129
+ if (!entry || !tone || !layers.length) {
130
+ return null;
131
+ }
132
+ const picture = (kept === null || kept === void 0 ? void 0 : kept.skin) === entry.id ? kept.picture : undefined;
133
+ return (React.createElement("div", { className: "ta-skin", inert: true, "aria-hidden": "true", style: picture ? { backgroundImage: `url("${picture}")` } : undefined }, layers.map(layer => (React.createElement(SkinBackdrop, { key: layer.key, layer: layer, tone: tone, glass: glass, top: layer === top, onReady: ready, onTone: next => setAsked({ skin: layer.entry.id, tone: next }), onKeep: picture => skin_util_1.SkinUtil.keepable(picture) && keep({ skin: layer.entry.id, picture }) })))));
134
+ }
135
+ function SkinBackdrop({ layer, tone, glass, top, onReady, onTone, onKeep }) {
136
+ const calls = React.useRef({ top, onReady, onTone, onKeep });
137
+ calls.current = { top, onReady, onTone, onKeep };
138
+ const { key } = layer;
139
+ React.useEffect(() => {
140
+ const timer = setTimeout(() => calls.current.onReady(key), READY_AT_LATEST_MS);
141
+ return () => clearTimeout(timer);
142
+ }, [key]);
143
+ const own = React.useMemo(() => ({
144
+ setTone: next => calls.current.top && calls.current.onTone(next),
145
+ areas: () => skin_util_1.SkinUtil.areas(document),
146
+ ready: () => calls.current.onReady(key),
147
+ keep: picture => calls.current.onKeep(picture),
148
+ }), [key]);
149
+ const Backdrop = layer.entry.skin.backdrop;
150
+ return (React.createElement("div", { className: layer.ready ? 'ta-skin-live ta-skin-ready' : 'ta-skin-live' },
151
+ React.createElement(extension_view_1.ExtensionBoundary, { name: layer.entry.extension, extension: layer.entry.extension, resetKey: Backdrop, fallback: null },
152
+ React.createElement(Backdrop, { ...own, tone: tone, glass: glass }))));
153
+ }
154
+ //# sourceMappingURL=skin-layer.js.map
@@ -0,0 +1,41 @@
1
+ import type { WebSkin, WebSkinAreas, WebSkinColors, WebSkinEntry, WebSkinRect } from '../extension/web-extension-api';
2
+ import { type Theme } from '../settings/settings-protocol';
3
+ import type { StateSpec } from '../state/state-protocol';
4
+ /** The picture of the skin that showed last, on this device (WebSkinBackdropProps.keep). */
5
+ export interface KeptSkinPicture {
6
+ /** WebSkinEntry.id. */
7
+ skin: string;
8
+ /** A `data:` URL. */
9
+ picture: string;
10
+ }
11
+ /** What the page does with a skin (docs/design/ta-skins.md): which shows, in which tone, its colours, where it is read over. */
12
+ export declare namespace SkinUtil {
13
+ /** Where words are read over the picture: the conversation, the message box, the settings. */
14
+ const READ = ".ta-thread, .ta-console-box, .ta-settings-scroll";
15
+ /** Columns that cover it: the lists beside, the workbench, the navigation. */
16
+ const COVER = ".ta-chats, .ta-side-view, .ta-editors, .ta-rail, .ta-tabbar";
17
+ /** One picture for the device, of the skin that showed last: a skin chosen again shows its own once it keeps one. */
18
+ const PICTURE: StateSpec<KeptSkinPicture | undefined>;
19
+ /** The skin of `setting` (Settings.skin): none for NO_SKIN or one that is not there (its extension is not on this device), the first for AUTO_SKIN. */
20
+ function pick(skins: readonly WebSkinEntry[], setting: string): WebSkinEntry | undefined;
21
+ /** The tone the page shows in: the one its backdrop asked for, else its own, else the user's theme. */
22
+ function tone(asked: Theme | undefined, skin: WebSkin, theme: Theme): Theme;
23
+ /** A picture fit to keep: a picture, not too long. */
24
+ function keepable(picture: unknown): picture is string;
25
+ /** `#rrggbb` of `#rgb`, `#rrggbb` or `rgb(r, g, b)`; otherwise what `normalize` makes of it (a canvas of the page), else undefined. */
26
+ function hex(color: string | undefined, normalize?: (color: string) => string | undefined): string | undefined;
27
+ /** Whether words on `#rrggbb` should be dark. */
28
+ function light(hex: string): boolean;
29
+ /**
30
+ * The variables of the root for the colours of a tone (style/skins.ts makes the theme of them): those left out are
31
+ * not set, so that the style's own stand; the words on the accent dark or light as it is.
32
+ */
33
+ function variables(colors: WebSkinColors, normalize?: (color: string) => string | undefined): Record<string, string>;
34
+ /** Every variable `variables` may set, to take them off again. */
35
+ const VARIABLES: string[];
36
+ /** The rectangles of what `selector` finds that can be seen in the window. */
37
+ function rects(root: ParentNode, selector: string, width: number, height: number): WebSkinRect[];
38
+ /** Where words are read and where columns cover the picture, in the window now. */
39
+ function areas(document: Document): WebSkinAreas;
40
+ }
41
+ //# sourceMappingURL=skin-util.d.ts.map
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SkinUtil = void 0;
4
+ const settings_protocol_1 = require("../settings/settings-protocol");
5
+ /** The longest a picture kept may be, as text: a JPEG some 480 pixels wide is a tenth of it. */
6
+ const MAX_PICTURE = 400000;
7
+ /** What the page does with a skin (docs/design/ta-skins.md): which shows, in which tone, its colours, where it is read over. */
8
+ var SkinUtil;
9
+ (function (SkinUtil) {
10
+ /** Where words are read over the picture: the conversation, the message box, the settings. */
11
+ SkinUtil.READ = '.ta-thread, .ta-console-box, .ta-settings-scroll';
12
+ /** Columns that cover it: the lists beside, the workbench, the navigation. */
13
+ SkinUtil.COVER = '.ta-chats, .ta-side-view, .ta-editors, .ta-rail, .ta-tabbar';
14
+ /** One picture for the device, of the skin that showed last: a skin chosen again shows its own once it keeps one. */
15
+ SkinUtil.PICTURE = {
16
+ key: 'skin.picture',
17
+ tier: 'device',
18
+ initial: undefined,
19
+ parse: value => {
20
+ const kept = value;
21
+ return typeof (kept === null || kept === void 0 ? void 0 : kept.skin) === 'string' && typeof kept.picture === 'string' && kept.picture.startsWith('data:image/')
22
+ ? kept
23
+ : undefined;
24
+ },
25
+ };
26
+ /** The skin of `setting` (Settings.skin): none for NO_SKIN or one that is not there (its extension is not on this device), the first for AUTO_SKIN. */
27
+ function pick(skins, setting) {
28
+ if (setting === settings_protocol_1.NO_SKIN) {
29
+ return undefined;
30
+ }
31
+ return setting === settings_protocol_1.AUTO_SKIN ? skins[0] : skins.find(entry => entry.id === setting);
32
+ }
33
+ SkinUtil.pick = pick;
34
+ /** The tone the page shows in: the one its backdrop asked for, else its own, else the user's theme. */
35
+ function tone(asked, skin, theme) {
36
+ var _a;
37
+ return (_a = asked !== null && asked !== void 0 ? asked : skin.tone) !== null && _a !== void 0 ? _a : theme;
38
+ }
39
+ SkinUtil.tone = tone;
40
+ /** A picture fit to keep: a picture, not too long. */
41
+ function keepable(picture) {
42
+ return typeof picture === 'string' && picture.startsWith('data:image/') && picture.length <= MAX_PICTURE;
43
+ }
44
+ SkinUtil.keepable = keepable;
45
+ /** `#rrggbb` of `#rgb`, `#rrggbb` or `rgb(r, g, b)`; otherwise what `normalize` makes of it (a canvas of the page), else undefined. */
46
+ function hex(color, normalize) {
47
+ var _a;
48
+ const value = (_a = color === null || color === void 0 ? void 0 : color.trim().toLowerCase()) !== null && _a !== void 0 ? _a : '';
49
+ const short = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(value);
50
+ if (short) {
51
+ return `#${short[1]}${short[1]}${short[2]}${short[2]}${short[3]}${short[3]}`;
52
+ }
53
+ if (/^#[0-9a-f]{6}$/.test(value)) {
54
+ return value;
55
+ }
56
+ const rgb = /^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)\s*(?:[,/]\s*[\d.]+%?\s*)?\)$/.exec(value);
57
+ if (rgb) {
58
+ return `#${rgb
59
+ .slice(1, 4)
60
+ .map(part => Math.min(255, Number(part)).toString(16).padStart(2, '0'))
61
+ .join('')}`;
62
+ }
63
+ const made = value && (normalize === null || normalize === void 0 ? void 0 : normalize(value));
64
+ return made && /^#[0-9a-f]{6}$/.test(made) ? made : undefined;
65
+ }
66
+ SkinUtil.hex = hex;
67
+ /** Whether words on `#rrggbb` should be dark. */
68
+ function light(hex) {
69
+ const [r, g, b] = [1, 3, 5]
70
+ .map(at => Number.parseInt(hex.slice(at, at + 2), 16) / 255)
71
+ .map(c => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4));
72
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b > 0.4;
73
+ }
74
+ SkinUtil.light = light;
75
+ /**
76
+ * The variables of the root for the colours of a tone (style/skins.ts makes the theme of them): those left out are
77
+ * not set, so that the style's own stand; the words on the accent dark or light as it is.
78
+ */
79
+ function variables(colors, normalize) {
80
+ var _a;
81
+ const base = (_a = hex(colors.base, normalize)) !== null && _a !== void 0 ? _a : '#808080';
82
+ const out = { '--ta-skin-base': base };
83
+ const glass = hex(colors.glass, normalize);
84
+ const ink = hex(colors.ink, normalize);
85
+ const accent = hex(colors.accent, normalize);
86
+ if (glass) {
87
+ out['--ta-skin-glass'] = glass;
88
+ }
89
+ if (ink) {
90
+ out['--ta-skin-ink'] = ink;
91
+ }
92
+ if (accent) {
93
+ out['--ta-skin-accent'] = accent;
94
+ out['--ta-skin-on-accent'] = light(accent) ? '#1a1a1a' : '#ffffff';
95
+ }
96
+ return out;
97
+ }
98
+ SkinUtil.variables = variables;
99
+ /** Every variable `variables` may set, to take them off again. */
100
+ SkinUtil.VARIABLES = ['--ta-skin-base', '--ta-skin-glass', '--ta-skin-ink', '--ta-skin-accent', '--ta-skin-on-accent'];
101
+ /** The rectangles of what `selector` finds that can be seen in the window. */
102
+ function rects(root, selector, width, height) {
103
+ const out = [];
104
+ for (const element of root.querySelectorAll(selector)) {
105
+ const box = element.getBoundingClientRect();
106
+ if (box.width > 1 && box.height > 1 && box.right > 0 && box.bottom > 0 && box.left < width && box.top < height) {
107
+ out.push({ left: box.left, top: box.top, right: box.right, bottom: box.bottom });
108
+ }
109
+ }
110
+ return out;
111
+ }
112
+ SkinUtil.rects = rects;
113
+ /** Where words are read and where columns cover the picture, in the window now. */
114
+ function areas(document) {
115
+ var _a, _b;
116
+ const view = document.defaultView;
117
+ const width = (_a = view === null || view === void 0 ? void 0 : view.innerWidth) !== null && _a !== void 0 ? _a : 0;
118
+ const height = (_b = view === null || view === void 0 ? void 0 : view.innerHeight) !== null && _b !== void 0 ? _b : 0;
119
+ return { read: rects(document, SkinUtil.READ, width, height), cover: rects(document, SkinUtil.COVER, width, height) };
120
+ }
121
+ SkinUtil.areas = areas;
122
+ })(SkinUtil || (exports.SkinUtil = SkinUtil = {}));
123
+ //# sourceMappingURL=skin-util.js.map
@@ -1,3 +1,3 @@
1
1
  /** Tokens of the theme, controls, levels. */
2
- export declare const BASE_STYLE = "\n:root, :root[data-theme='dark'] {\n --ta-main: #141416;\n --ta-side: #1c1c1e;\n --ta-card: #1a1a1c;\n --ta-input: #1a1a1a;\n --ta-raised: #242426;\n --ta-user: #2a2a2d;\n --ta-hover: #2a2a2e;\n --ta-hover-strong: #333338;\n --ta-selected: #2c2c31;\n --ta-chip: #2a2a2e;\n /* The chosen segment of a segmented control, on a track of --ta-raised: above it, lighter in the dark. */\n --ta-segment: #333338;\n --ta-border: #2e2e33;\n --ta-border-muted: #232328;\n --ta-border-field: #3d3d45;\n --ta-border-focus: #8a8a96;\n --ta-text: #e5e5e5;\n --ta-body: #d4d4d6;\n --ta-secondary: #a3a3a3;\n --ta-muted: #7c7c82;\n --ta-brand: #e5e5e5;\n --ta-brand-text: #1a1a1a;\n --ta-accent: #34d399;\n --ta-link: #4dabf7;\n --ta-green: #4ade80;\n --ta-red: #f87171;\n --ta-yellow: #fbbf24;\n --ta-blue: #60a5fa;\n --ta-code: #161618;\n --ta-add: rgba(74, 222, 128, 0.1);\n --ta-remove: rgba(248, 113, 113, 0.1);\n --ta-shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);\n --ta-shadow-composer: 0 12px 32px rgba(0, 0, 0, 0.32);\n --ta-scrollbar: rgba(255, 255, 255, 0.12);\n color-scheme: dark;\n}\n:root[data-theme='light'] {\n --ta-main: #ffffff;\n --ta-side: #f5f5f7;\n --ta-card: #ffffff;\n --ta-input: #ffffff;\n --ta-raised: #f3f3f5;\n --ta-user: #f2f2f2;\n --ta-hover: #ebebf0;\n --ta-hover-strong: #e2e2e8;\n --ta-selected: #e6e6ea;\n --ta-chip: #ececf0;\n --ta-segment: #ffffff;\n --ta-border: #dcdee3;\n --ta-border-muted: #e8eaed;\n --ta-border-field: #c9ccd4;\n --ta-border-focus: #6b6e76;\n --ta-text: #1a1a1a;\n --ta-body: #33363b;\n --ta-secondary: #5c5c5c;\n --ta-muted: #8e8e93;\n --ta-brand: #1a1a1a;\n --ta-brand-text: #ffffff;\n --ta-accent: #10a372;\n --ta-link: #1677ff;\n --ta-green: #16a34a;\n --ta-red: #e5484d;\n --ta-yellow: #d97706;\n --ta-blue: #1677ff;\n --ta-code: #f7f8fa;\n --ta-add: rgba(34, 197, 94, 0.1);\n --ta-remove: rgba(239, 68, 68, 0.08);\n --ta-shadow-pop: 0 16px 40px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.05);\n --ta-shadow-composer: 0 8px 24px rgba(15, 23, 42, 0.07);\n --ta-scrollbar: rgba(0, 0, 0, 0.14);\n color-scheme: light;\n}\n:root {\n /** The height of the title bar the page draws itself; see .ta-titlebar. */\n --ta-titlebar: 0px;\n /**\n * Under a title bar every column keeps a gap of 3px below it, and the first row of each rises into the rest of\n * its head, centred on the tabs of the workbench (34px high, below the gap) rather than on a head of 56px:\n * 28px - 3px - 17px. The search of the sidebar, 40px high, so starts right under the bar, none of it hidden.\n */\n --ta-top-gap: min(3px, var(--ta-titlebar));\n --ta-lift: min(8px, var(--ta-titlebar));\n --ta-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;\n --ta-mono: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;\n --ta-col: 760px;\n --ta-ease: cubic-bezier(0.2, 0.8, 0.2, 1);\n /* The font sizes of the settings (TaSettingsImpl sets the first two). Every font size in px is written\n calc(13px * var(--ta-font-scale)), line heights in px too: the page's size (more on a phone, see\n style/device.ts), and in a conversation (.ta-conversation: its messages and the field of its message\n box) that of conversations on top of it. */\n --ta-page-font-scale: 1;\n --ta-chat-font-scale: 1;\n --ta-device-font-scale: 1;\n --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale));\n /* How wide the content of a page is (the pages of Discover, Extensions): a column of rows, a feed or a\n form; or wide, for cards and tiles side by side. Web extensions use them too. */\n --ta-page-width: 720px;\n --ta-page-wide: 880px;\n}\n.ta-conversation { --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale) * var(--ta-chat-font-scale)); font-size: calc(14px * var(--ta-font-scale)); }\n* { box-sizing: border-box; }\nhtml, body, #cell-root, #root { height: 100%; margin: 0; }\n/* The page and its scrolling areas do not bounce at the ends. Only scrolling areas of their own: on any\n other element (one with overflow: hidden is a scroll container too) it stops the wheel from reaching\n the area under it, and nothing scrolls while the pointer is over a card or a code block. */\nhtml, body, .ta-scroll, .ta-chat-scroll, .ta-side-scroll, .ta-rail-items, .ta-side-view-body, .ta-editor-body,\n.ta-workbench-launcher, .ta-workbench-menu, .ta-settings-scroll, .ta-settings-toc, .ta-pick-list, .ta-commands,\n.ta-folder-list, .ta-auth-list { overscroll-behavior: none; }\nbody { background: var(--ta-main); color: var(--ta-text); font: calc(14px * var(--ta-font-scale))/1.6 var(--ta-sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }\nbutton, input, select, textarea { font: inherit; color: inherit; }\nbutton { cursor: pointer; }\ncode, pre { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\na { color: var(--ta-link); text-decoration: none; }\n* { scrollbar-width: thin; scrollbar-color: var(--ta-scrollbar) transparent; }\n:focus-visible { outline: 2px solid var(--ta-blue); outline-offset: 1px; }\n.ta-muted { color: var(--ta-muted); }\n.ta-small { font-size: calc(12px * var(--ta-font-scale)); }\n.ta-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n.ta-path { font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-spacer { flex: 1; }\n.ta-icon { flex: none; }\n.ta-narrow-only { display: none !important; }\n.ta-glass { background: var(--ta-card); border: 1px solid var(--ta-border); }\n\n/* Controls */\n.ta-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--ta-border); background: transparent; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; color: var(--ta-text); transition: background 120ms, border-color 120ms; }\n.ta-button:hover:not(:disabled) { background: var(--ta-hover); }\n.ta-button:disabled { opacity: 0.45; cursor: default; }\n.ta-primary { background: var(--ta-brand); border-color: var(--ta-brand); color: var(--ta-brand-text); }\n.ta-primary:hover:not(:disabled) { background: var(--ta-brand); opacity: 0.88; }\n.ta-danger, .ta-stop { color: var(--ta-red); }\n.ta-quiet { border-color: transparent; color: var(--ta-secondary); }\n.ta-wide { width: 100%; height: 38px; }\n.ta-link { background: none; border: 0; padding: 0; color: var(--ta-link); font-size: calc(12px * var(--ta-font-scale)); display: inline-flex; align-items: center; gap: 4px; }\n/* Buttons that hold an icon, centred in a box of their size: without the padding of the browser, which iOS makes 14px a side, so that the icon sat off centre there. */\n.ta-icon-button, .ta-footer-button, .ta-rail-item, .ta-rail-logo, .ta-send, .ta-mic, .ta-editor-tab-close, .ta-attachment-remove, .ta-account-button, .ta-tool-trailing, .ta-to-bottom { padding: 0; }\n.ta-icon-button { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; border: 0; background: transparent; color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-icon-button:hover:not(:disabled) { background: var(--ta-hover); color: var(--ta-text); }\n.ta-icon-button:disabled { opacity: 0.4; }\n.ta-icon-button.ta-on { color: var(--ta-text); background: var(--ta-hover); }\n.ta-icon-button-boxed { border: 1px solid var(--ta-border-field); height: 34px; width: 34px; }\n.ta-badge { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--ta-red); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; }\n.ta-input, .ta-field { width: 100%; height: 36px; border: 1px solid var(--ta-border-field); background: var(--ta-input); border-radius: 8px; padding: 0 10px; outline: none; transition: border-color 120ms; }\n.ta-field { display: flex; align-items: center; gap: 8px; color: var(--ta-muted); }\n.ta-field-small { height: 34px; }\n.ta-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ta-text); padding: 0; font-size: calc(13px * var(--ta-font-scale)); }\n.ta-input:focus, .ta-field:focus-within { border-color: var(--ta-border-focus); }\n.ta-editor { height: auto; min-height: 140px; padding: 8px 10px; font-family: var(--ta-mono); resize: vertical; }\n.ta-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }\n/* Levels: the colour of the icon tells the level; the text stays in the colours of text. */\n.ta-level-info { --ta-level: var(--ta-blue); }\n.ta-level-success { --ta-level: var(--ta-green); }\n.ta-level-warning { --ta-level: var(--ta-yellow); }\n.ta-level-error { --ta-level: var(--ta-red); }\n.ta-level-icon { color: var(--ta-level, var(--ta-muted)); }\n/* In its place: a soft tint of its level, the text in the colours of text. */\n.ta-callout { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; text-align: left; color: var(--ta-body); background: color-mix(in srgb, var(--ta-level) 7%, var(--ta-card)); border: 1px solid color-mix(in srgb, var(--ta-level) 18%, var(--ta-border-muted)); }\n.ta-callout > .ta-level-icon { margin-top: 2px; }\n.ta-callout-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-callout-message { white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-callout-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-empty .ta-callout { max-width: min(520px, 100%); }\n.ta-spinner { width: 13px; height: 13px; border: 1.8px solid var(--ta-border-field); border-top-color: var(--ta-text); border-radius: 50%; animation: ta-spin 0.8s linear infinite; flex: none; display: inline-block; }\n/*\n * Busy (components/busy.tsx): what waits on something slow says so only once it took a moment (--ta-busy-delay),\n * so that what is quick does not flash, and takes no second click meanwhile. ta-busy a button or an icon\n * button, its spinner (ta-busy-mark; with ta-on-brand on a button of the brand's color) over its label, which keeps its width; ta-pending a row that is being\n * taken away, which fades back; ta-spinner ta-later a spinner of its own; ta-switch ta-busy a switch, which\n * moved at once, its knob turning.\n */\n.ta-busy, .ta-pending { --ta-busy-delay: 160ms; pointer-events: none; }\n.ta-busy:not(.ta-switch) { animation: ta-busy-ink 0s var(--ta-busy-delay) forwards; }\n.ta-button.ta-busy { position: relative; }\n.ta-busy > .ta-busy-mark { position: absolute; inset: 0; margin: auto; animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-primary > .ta-busy-mark, .ta-busy-mark.ta-on-brand { border-color: color-mix(in srgb, var(--ta-brand-text) 30%, transparent); border-top-color: var(--ta-brand-text); }\n.ta-button-danger > .ta-busy-mark { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }\n/* A busy button that brought no ta-busy-mark of its own gets one: its label inked out alone would leave it blank. */\n.ta-button.ta-busy:not(:has(> .ta-busy-mark))::after { content: ''; position: absolute; inset: 0; width: 13px; height: 13px; margin: auto; border: 1.8px solid var(--ta-border-field); border-top-color: var(--ta-text); border-radius: 50%; animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-primary.ta-busy:not(:has(> .ta-busy-mark))::after { border-color: color-mix(in srgb, var(--ta-brand-text) 30%, transparent); border-top-color: var(--ta-brand-text); }\n.ta-pending { animation: ta-busy-dim 180ms var(--ta-busy-delay) forwards; }\n.ta-spinner.ta-later { animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay, 160ms) both; }\n.ta-switch.ta-busy::before { content: ''; position: absolute; z-index: 1; top: 5px; left: 5px; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 1.6px solid rgba(0, 0, 0, 0.12); border-top-color: #8a8a8a; transition: translate 180ms var(--ta-ease); animation: ta-turn 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-switch.ta-busy:checked::before { translate: 16px 0; border-top-color: var(--ta-green); }\n@keyframes ta-busy-in { from { opacity: 0; } }\n@keyframes ta-busy-ink { to { color: transparent; } }\n@keyframes ta-busy-dim { to { opacity: 0.45; } }\n/* A turn by rotate, which leaves transform and translate to what is turned. */\n@keyframes ta-turn { to rotate: 360deg; }\n/* Nothing to show (EmptyState, ui.Empty): in the middle of the space of its parent, a column of flex; compact, a line of its own in a menu or a picker. */\n.ta-empty { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 24px 56px; text-align: center; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; color: var(--ta-muted); text-wrap: balance; }\n.ta-empty-title { color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; }\n.ta-empty-title + .ta-empty-hint { margin-top: -4px; }\n/* Chinese breaks between its words and after its commas, as the first page of a conversation (.ta-hero p) */\n.ta-empty-hint { max-width: 260px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-empty-compact { flex: none; width: 100%; box-sizing: border-box; padding: 20px 12px; }\n.ta-empty-compact .ta-empty-title { font-size: calc(13px * var(--ta-font-scale)); font-weight: 400; }\n.ta-empty-picture { width: min(200px, 80%); margin-bottom: 8px; animation: ta-in 320ms var(--ta-ease) both; }\n.ta-empty-compact .ta-empty-picture { width: min(150px, 60%); margin-bottom: 4px; }\n.ta-setting-row > .ta-empty-compact { padding: 4px 0; }\n.ta-empty-error .ta-empty-title { color: var(--ta-red); overflow-wrap: anywhere; }\n/*\n * On its way (Loading, ui.Loading): a turning mark, its words under it, in the middle of the space of its parent as\n * .ta-empty (some room of its own where its parent is not a column of flex); only after a moment, so that what comes\n * at once never flashes it. Compact: a line of its own in a card, a dialog or a section.\n */\n.ta-loading { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 120px; padding: 24px; box-sizing: border-box; text-align: center; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; animation: ta-fade 200ms ease-out var(--ta-loading-delay, 450ms) both; }\n.ta-loading-compact { flex: none; width: 100%; min-height: 0; padding: 20px 12px; }\n.ta-loading-label { max-width: 280px; text-wrap: balance; overflow-wrap: anywhere; }\n\n";
2
+ export declare const BASE_STYLE = "\n:root, :root[data-theme='dark'] {\n --ta-main: #141416;\n --ta-side: #1c1c1e;\n --ta-card: #1a1a1c;\n --ta-input: #1a1a1a;\n --ta-raised: #242426;\n --ta-user: #2a2a2d;\n --ta-hover: #2a2a2e;\n --ta-hover-strong: #333338;\n --ta-selected: #2c2c31;\n --ta-chip: #2a2a2e;\n /* The chosen segment of a segmented control, on a track of --ta-raised: above it, lighter in the dark. */\n --ta-segment: #333338;\n --ta-border: #2e2e33;\n --ta-border-muted: #232328;\n --ta-border-field: #3d3d45;\n --ta-border-focus: #8a8a96;\n --ta-text: #e5e5e5;\n --ta-body: #d4d4d6;\n --ta-secondary: #a3a3a3;\n --ta-muted: #7c7c82;\n /* The chevron of a select, drawn in --ta-muted (an image cannot take currentColor). */\n --ta-select-chevron: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c7c82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");\n --ta-brand: #e5e5e5;\n --ta-brand-text: #1a1a1a;\n --ta-accent: #34d399;\n --ta-link: #4dabf7;\n --ta-green: #4ade80;\n --ta-red: #f87171;\n --ta-yellow: #fbbf24;\n --ta-blue: #60a5fa;\n --ta-code: #161618;\n --ta-add: rgba(74, 222, 128, 0.1);\n --ta-remove: rgba(248, 113, 113, 0.1);\n --ta-shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);\n --ta-shadow-composer: 0 12px 32px rgba(0, 0, 0, 0.32);\n --ta-scrollbar: rgba(255, 255, 255, 0.12);\n color-scheme: dark;\n}\n:root[data-theme='light'] {\n --ta-main: #ffffff;\n --ta-side: #f5f5f7;\n --ta-card: #ffffff;\n --ta-input: #ffffff;\n --ta-raised: #f3f3f5;\n --ta-user: #f2f2f2;\n --ta-hover: #ebebf0;\n --ta-hover-strong: #e2e2e8;\n --ta-selected: #e6e6ea;\n --ta-chip: #ececf0;\n --ta-segment: #ffffff;\n --ta-border: #dcdee3;\n --ta-border-muted: #e8eaed;\n --ta-border-field: #c9ccd4;\n --ta-border-focus: #6b6e76;\n --ta-text: #1a1a1a;\n --ta-body: #33363b;\n --ta-secondary: #5c5c5c;\n --ta-muted: #8e8e93;\n --ta-select-chevron: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");\n --ta-brand: #1a1a1a;\n --ta-brand-text: #ffffff;\n --ta-accent: #10a372;\n --ta-link: #1677ff;\n --ta-green: #16a34a;\n --ta-red: #e5484d;\n --ta-yellow: #d97706;\n --ta-blue: #1677ff;\n --ta-code: #f7f8fa;\n --ta-add: rgba(34, 197, 94, 0.1);\n --ta-remove: rgba(239, 68, 68, 0.08);\n --ta-shadow-pop: 0 16px 40px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.05);\n --ta-shadow-composer: 0 8px 24px rgba(15, 23, 42, 0.07);\n --ta-scrollbar: rgba(0, 0, 0, 0.14);\n color-scheme: light;\n}\n:root {\n /** The height of the title bar the page draws itself; see .ta-titlebar. */\n --ta-titlebar: 0px;\n /**\n * Under a title bar every column keeps a gap of 3px below it, and the first row of each rises into the rest of\n * its head, centred on the tabs of the workbench (34px high, below the gap) rather than on a head of 56px:\n * 28px - 3px - 17px. The search of the sidebar, 40px high, so starts right under the bar, none of it hidden.\n */\n --ta-top-gap: min(3px, var(--ta-titlebar));\n --ta-lift: min(8px, var(--ta-titlebar));\n --ta-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;\n --ta-mono: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;\n --ta-col: 760px;\n --ta-ease: cubic-bezier(0.2, 0.8, 0.2, 1);\n /* The font sizes of the settings (TaSettingsImpl sets the first two). Every font size in px is written\n calc(13px * var(--ta-font-scale)), line heights in px too: the page's size (more on a phone, see\n style/device.ts), and in a conversation (.ta-conversation: its messages and the field of its message\n box) that of conversations on top of it. */\n --ta-page-font-scale: 1;\n --ta-chat-font-scale: 1;\n --ta-device-font-scale: 1;\n --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale));\n /* How wide the content of a page is (the pages of Discover, Extensions): a column of rows, a feed or a\n form; or wide, for cards and tiles side by side. Web extensions use them too. */\n --ta-page-width: 720px;\n --ta-page-wide: 880px;\n}\n.ta-conversation { --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale) * var(--ta-chat-font-scale)); font-size: calc(14px * var(--ta-font-scale)); }\n* { box-sizing: border-box; }\nhtml, body, #cell-root, #root { height: 100%; margin: 0; }\n/* The page and its scrolling areas do not bounce at the ends. Only scrolling areas of their own: on any\n other element (one with overflow: hidden is a scroll container too) it stops the wheel from reaching\n the area under it, and nothing scrolls while the pointer is over a card or a code block. */\nhtml, body, .ta-scroll, .ta-chat-scroll, .ta-side-scroll, .ta-rail-items, .ta-side-view-body, .ta-editor-body,\n.ta-workbench-launcher, .ta-workbench-menu, .ta-settings-scroll, .ta-settings-toc, .ta-pick-list, .ta-commands,\n.ta-folder-list, .ta-auth-list { overscroll-behavior: none; }\nbody { background: var(--ta-main); color: var(--ta-text); font: calc(14px * var(--ta-font-scale))/1.6 var(--ta-sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }\nbutton, input, select, textarea { font: inherit; color: inherit; }\nbutton { cursor: pointer; }\ncode, pre { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\na { color: var(--ta-link); text-decoration: none; }\n* { scrollbar-width: thin; scrollbar-color: var(--ta-scrollbar) transparent; }\n:focus-visible { outline: 2px solid var(--ta-blue); outline-offset: 1px; }\n.ta-muted { color: var(--ta-muted); }\n.ta-small { font-size: calc(12px * var(--ta-font-scale)); }\n.ta-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n.ta-path { font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-spacer { flex: 1; }\n.ta-icon { flex: none; }\n.ta-narrow-only { display: none !important; }\n.ta-glass { background: var(--ta-card); border: 1px solid var(--ta-border); }\n\n/* Controls */\n.ta-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--ta-border); background: transparent; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; color: var(--ta-text); transition: background 120ms, border-color 120ms; }\n.ta-button:hover:not(:disabled) { background: var(--ta-hover); }\n.ta-button:disabled { opacity: 0.45; cursor: default; }\n.ta-primary { background: var(--ta-brand); border-color: var(--ta-brand); color: var(--ta-brand-text); }\n.ta-primary:hover:not(:disabled) { background: var(--ta-brand); opacity: 0.88; }\n.ta-danger, .ta-stop { color: var(--ta-red); }\n.ta-quiet { border-color: transparent; color: var(--ta-secondary); }\n.ta-wide { width: 100%; height: 38px; }\n.ta-link { background: none; border: 0; padding: 0; color: var(--ta-link); font-size: calc(12px * var(--ta-font-scale)); display: inline-flex; align-items: center; gap: 4px; }\n/* Buttons that hold an icon, centred in a box of their size: without the padding of the browser, which iOS makes 14px a side, so that the icon sat off centre there. */\n.ta-icon-button, .ta-footer-button, .ta-rail-item, .ta-rail-logo, .ta-send, .ta-mic, .ta-editor-tab-close, .ta-attachment-remove, .ta-account-button, .ta-tool-trailing, .ta-to-bottom { padding: 0; }\n.ta-icon-button { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; border: 0; background: transparent; color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-icon-button:hover:not(:disabled) { background: var(--ta-hover); color: var(--ta-text); }\n.ta-icon-button:disabled { opacity: 0.4; }\n.ta-icon-button.ta-on { color: var(--ta-text); background: var(--ta-hover); }\n.ta-icon-button-boxed { border: 1px solid var(--ta-border-field); height: var(--ta-input-height); width: var(--ta-input-height); }\n.ta-badge { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--ta-red); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; }\n/* Fields and forms are style/forms.ts. */\n/* Every select of Ta and of its extensions has the one chevron of the model picker, kept off its right border by\n --ta-select-inset; each owner sets only its box. A select that draws its own (or none) is .ta-select-plain. */\nselect:not([multiple]):not([size]):not(.ta-select-plain) { appearance: none; -webkit-appearance: none; padding-right: calc(var(--ta-select-inset, 10px) + 21px); background-image: var(--ta-select-chevron); background-repeat: no-repeat; background-position: right var(--ta-select-inset, 10px) center; background-size: 15px 15px; text-overflow: ellipsis; cursor: pointer; }\nselect.ta-select-plain { appearance: none; -webkit-appearance: none; }\nselect:disabled { cursor: default; }\n.ta-editor { height: auto; min-height: 140px; padding: 8px 10px; font-family: var(--ta-mono); resize: vertical; }\n.ta-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }\n/* Levels: the colour of the icon tells the level; the text stays in the colours of text. */\n.ta-level-info { --ta-level: var(--ta-blue); }\n.ta-level-success { --ta-level: var(--ta-green); }\n.ta-level-warning { --ta-level: var(--ta-yellow); }\n.ta-level-error { --ta-level: var(--ta-red); }\n.ta-level-icon { color: var(--ta-level, var(--ta-muted)); }\n/* In its place: a soft tint of its level, the text in the colours of text. */\n.ta-callout { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; text-align: left; color: var(--ta-body); background: color-mix(in srgb, var(--ta-level) 7%, var(--ta-card)); border: 1px solid color-mix(in srgb, var(--ta-level) 18%, var(--ta-border-muted)); }\n.ta-callout > .ta-level-icon { margin-top: 2px; }\n.ta-callout-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-callout-message { white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-callout-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-empty .ta-callout { max-width: min(520px, 100%); }\n.ta-spinner { width: 13px; height: 13px; border: 1.8px solid var(--ta-border-field); border-top-color: var(--ta-text); border-radius: 50%; animation: ta-spin 0.8s linear infinite; flex: none; display: inline-block; }\n/*\n * Busy (components/busy.tsx): what waits on something slow says so only once it took a moment (--ta-busy-delay),\n * so that what is quick does not flash, and takes no second click meanwhile. ta-busy a button or an icon\n * button, its spinner (ta-busy-mark; with ta-on-brand on a button of the brand's color) over its label, which keeps its width; ta-pending a row that is being\n * taken away, which fades back; ta-spinner ta-later a spinner of its own; ta-switch ta-busy a switch, which\n * moved at once, its knob turning.\n */\n.ta-busy, .ta-pending { --ta-busy-delay: 160ms; pointer-events: none; }\n.ta-busy:not(.ta-switch) { animation: ta-busy-ink 0s var(--ta-busy-delay) forwards; }\n.ta-button.ta-busy { position: relative; }\n.ta-busy > .ta-busy-mark { position: absolute; inset: 0; margin: auto; animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-primary > .ta-busy-mark, .ta-busy-mark.ta-on-brand { border-color: color-mix(in srgb, var(--ta-brand-text) 30%, transparent); border-top-color: var(--ta-brand-text); }\n.ta-button-danger > .ta-busy-mark { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }\n/* A busy button that brought no ta-busy-mark of its own gets one: its label inked out alone would leave it blank. */\n.ta-button.ta-busy:not(:has(> .ta-busy-mark))::after { content: ''; position: absolute; inset: 0; width: 13px; height: 13px; margin: auto; border: 1.8px solid var(--ta-border-field); border-top-color: var(--ta-text); border-radius: 50%; animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-primary.ta-busy:not(:has(> .ta-busy-mark))::after { border-color: color-mix(in srgb, var(--ta-brand-text) 30%, transparent); border-top-color: var(--ta-brand-text); }\n.ta-pending { animation: ta-busy-dim 180ms var(--ta-busy-delay) forwards; }\n.ta-spinner.ta-later { animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay, 160ms) both; }\n.ta-switch.ta-busy::before { content: ''; position: absolute; z-index: 1; top: 5px; left: 5px; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 1.6px solid rgba(0, 0, 0, 0.12); border-top-color: #8a8a8a; transition: translate 180ms var(--ta-ease); animation: ta-turn 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-switch.ta-busy:checked::before { translate: 16px 0; border-top-color: var(--ta-green); }\n@keyframes ta-busy-in { from { opacity: 0; } }\n@keyframes ta-busy-ink { to { color: transparent; } }\n@keyframes ta-busy-dim { to { opacity: 0.45; } }\n/* A turn by rotate, which leaves transform and translate to what is turned. */\n@keyframes ta-turn { to rotate: 360deg; }\n/* Nothing to show (EmptyState, ui.Empty): in the middle of the space of its parent, a column of flex; compact, a line of its own in a menu or a picker. */\n.ta-empty { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 24px 56px; text-align: center; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; color: var(--ta-muted); text-wrap: balance; }\n.ta-empty-title { color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; }\n.ta-empty-title + .ta-empty-hint { margin-top: -4px; }\n/* Chinese breaks between its words and after its commas, as the first page of a conversation (.ta-hero p) */\n.ta-empty-hint { max-width: 260px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-empty-compact { flex: none; width: 100%; box-sizing: border-box; padding: 20px 12px; }\n.ta-empty-compact .ta-empty-title { font-size: calc(13px * var(--ta-font-scale)); font-weight: 400; }\n.ta-empty-picture { width: min(200px, 80%); margin-bottom: 8px; animation: ta-in 320ms var(--ta-ease) both; }\n.ta-empty-compact .ta-empty-picture { width: min(150px, 60%); margin-bottom: 4px; }\n.ta-setting-row > .ta-empty-compact { padding: 4px 0; }\n.ta-empty-error .ta-empty-title { color: var(--ta-red); overflow-wrap: anywhere; }\n/*\n * On its way (Loading, ui.Loading): a turning mark, its words under it, in the middle of the space of its parent as\n * .ta-empty (some room of its own where its parent is not a column of flex); only after a moment, so that what comes\n * at once never flashes it. Compact: a line of its own in a card, a dialog or a section.\n */\n.ta-loading { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 120px; padding: 24px; box-sizing: border-box; text-align: center; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; animation: ta-fade 200ms ease-out var(--ta-loading-delay, 450ms) both; }\n.ta-loading-compact { flex: none; width: 100%; min-height: 0; padding: 20px 12px; }\n.ta-loading-label { max-width: 280px; text-wrap: balance; overflow-wrap: anywhere; }\n\n";
3
3
  //# sourceMappingURL=base.d.ts.map
@@ -24,6 +24,8 @@ exports.BASE_STYLE = `
24
24
  --ta-body: #d4d4d6;
25
25
  --ta-secondary: #a3a3a3;
26
26
  --ta-muted: #7c7c82;
27
+ /* The chevron of a select, drawn in --ta-muted (an image cannot take currentColor). */
28
+ --ta-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c7c82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
27
29
  --ta-brand: #e5e5e5;
28
30
  --ta-brand-text: #1a1a1a;
29
31
  --ta-accent: #34d399;
@@ -60,6 +62,7 @@ exports.BASE_STYLE = `
60
62
  --ta-body: #33363b;
61
63
  --ta-secondary: #5c5c5c;
62
64
  --ta-muted: #8e8e93;
65
+ --ta-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
63
66
  --ta-brand: #1a1a1a;
64
67
  --ta-brand-text: #ffffff;
65
68
  --ta-accent: #10a372;
@@ -144,13 +147,14 @@ a { color: var(--ta-link); text-decoration: none; }
144
147
  .ta-icon-button:hover:not(:disabled) { background: var(--ta-hover); color: var(--ta-text); }
145
148
  .ta-icon-button:disabled { opacity: 0.4; }
146
149
  .ta-icon-button.ta-on { color: var(--ta-text); background: var(--ta-hover); }
147
- .ta-icon-button-boxed { border: 1px solid var(--ta-border-field); height: 34px; width: 34px; }
150
+ .ta-icon-button-boxed { border: 1px solid var(--ta-border-field); height: var(--ta-input-height); width: var(--ta-input-height); }
148
151
  .ta-badge { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--ta-red); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; }
149
- .ta-input, .ta-field { width: 100%; height: 36px; border: 1px solid var(--ta-border-field); background: var(--ta-input); border-radius: 8px; padding: 0 10px; outline: none; transition: border-color 120ms; }
150
- .ta-field { display: flex; align-items: center; gap: 8px; color: var(--ta-muted); }
151
- .ta-field-small { height: 34px; }
152
- .ta-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ta-text); padding: 0; font-size: calc(13px * var(--ta-font-scale)); }
153
- .ta-input:focus, .ta-field:focus-within { border-color: var(--ta-border-focus); }
152
+ /* Fields and forms are style/forms.ts. */
153
+ /* Every select of Ta and of its extensions has the one chevron of the model picker, kept off its right border by
154
+ --ta-select-inset; each owner sets only its box. A select that draws its own (or none) is .ta-select-plain. */
155
+ select:not([multiple]):not([size]):not(.ta-select-plain) { appearance: none; -webkit-appearance: none; padding-right: calc(var(--ta-select-inset, 10px) + 21px); background-image: var(--ta-select-chevron); background-repeat: no-repeat; background-position: right var(--ta-select-inset, 10px) center; background-size: 15px 15px; text-overflow: ellipsis; cursor: pointer; }
156
+ select.ta-select-plain { appearance: none; -webkit-appearance: none; }
157
+ select:disabled { cursor: default; }
154
158
  .ta-editor { height: auto; min-height: 140px; padding: 8px 10px; font-family: var(--ta-mono); resize: vertical; }
155
159
  .ta-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
156
160
  /* Levels: the colour of the icon tells the level; the text stays in the colours of text. */