@celljs/ta-web 4.10.0 → 4.11.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 (525) hide show
  1. package/README.en.md +7 -7
  2. package/README.md +7 -7
  3. package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
  4. package/esm/browser/assistant/assistant-chat-list.js +12 -0
  5. package/esm/browser/assistant/assistant-extension.js +5 -0
  6. package/esm/browser/assistant/assistant-protocol.d.ts +2 -1
  7. package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
  8. package/esm/browser/assistant/assistant-task-book.js +23 -4
  9. package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
  10. package/esm/browser/assistant/assistant-task-source.js +5 -10
  11. package/esm/browser/assistant/assistant-task-util.d.ts +13 -3
  12. package/esm/browser/assistant/assistant-task-util.js +59 -12
  13. package/esm/browser/assistant/assistant-view.js +44 -23
  14. package/esm/browser/assistant/assistant.d.ts +18 -4
  15. package/esm/browser/assistant/assistant.js +52 -17
  16. package/esm/browser/avatar/dino-face.js +1 -2
  17. package/esm/browser/chat/chat-protocol.d.ts +5 -0
  18. package/esm/browser/chat/chat-stores.d.ts +8 -5
  19. package/esm/browser/chat/chat-stores.js +17 -9
  20. package/esm/browser/chat/chat-view.js +18 -11
  21. package/esm/browser/chat/chat.d.ts +16 -8
  22. package/esm/browser/chat/chat.js +86 -51
  23. package/esm/browser/components/account-menu.d.ts +0 -2
  24. package/esm/browser/components/account-menu.js +1 -27
  25. package/esm/browser/components/agent-settings-view.d.ts +3 -2
  26. package/esm/browser/components/agent-settings-view.js +2 -1
  27. package/esm/browser/components/app-nav.d.ts +5 -2
  28. package/esm/browser/components/app-nav.js +22 -9
  29. package/esm/browser/components/app-shell-hooks.js +5 -3
  30. package/esm/browser/components/app-view.js +76 -16
  31. package/esm/browser/components/busy.d.ts +25 -0
  32. package/esm/browser/components/busy.js +52 -0
  33. package/esm/browser/components/chat-icon.d.ts +29 -0
  34. package/esm/browser/components/chat-icon.js +78 -0
  35. package/esm/browser/components/chat-list.d.ts +73 -6
  36. package/esm/browser/components/chat-list.js +295 -60
  37. package/esm/browser/components/chat-seen.d.ts +53 -0
  38. package/esm/browser/components/chat-seen.js +101 -0
  39. package/esm/browser/components/composer-box.d.ts +14 -4
  40. package/esm/browser/components/composer-box.js +104 -64
  41. package/esm/browser/components/composer.d.ts +6 -6
  42. package/esm/browser/components/composer.js +5 -3
  43. package/esm/browser/components/conversation-scroll.d.ts +7 -0
  44. package/esm/browser/components/conversation-scroll.js +46 -7
  45. package/esm/browser/components/custom-host.d.ts +3 -0
  46. package/esm/browser/components/custom-host.js +14 -0
  47. package/esm/browser/components/directory-commands.d.ts +6 -0
  48. package/esm/browser/components/directory-commands.js +34 -0
  49. package/esm/browser/components/discover-view.d.ts +11 -4
  50. package/esm/browser/components/discover-view.js +20 -11
  51. package/esm/browser/components/dismiss.d.ts +3 -0
  52. package/esm/browser/components/dismiss.js +29 -0
  53. package/esm/browser/components/earlier-messages.d.ts +34 -3
  54. package/esm/browser/components/earlier-messages.js +42 -8
  55. package/esm/browser/components/editor-area.d.ts +6 -22
  56. package/esm/browser/components/editor-area.js +10 -97
  57. package/esm/browser/components/fold-text.d.ts +20 -0
  58. package/esm/browser/components/fold-text.js +66 -0
  59. package/esm/browser/components/folder-picker.d.ts +1 -1
  60. package/esm/browser/components/folder-picker.js +1 -1
  61. package/esm/browser/components/full-screen.d.ts +9 -0
  62. package/esm/browser/components/full-screen.js +26 -0
  63. package/esm/browser/components/grow-box.d.ts +9 -0
  64. package/esm/browser/components/grow-box.js +50 -0
  65. package/esm/browser/components/hold-to-talk.d.ts +22 -0
  66. package/esm/browser/components/hold-to-talk.js +29 -0
  67. package/esm/browser/components/host-view.d.ts +1 -1
  68. package/esm/browser/components/icon.d.ts +3 -1
  69. package/esm/browser/components/icon.js +4 -3
  70. package/esm/browser/components/image-viewer.d.ts +10 -2
  71. package/esm/browser/components/image-viewer.js +48 -11
  72. package/esm/browser/components/launcher-search-util.d.ts +4 -3
  73. package/esm/browser/components/launcher-search-util.js +12 -4
  74. package/esm/browser/components/lightbox.d.ts +5 -2
  75. package/esm/browser/components/lightbox.js +4 -3
  76. package/esm/browser/components/list-rows.d.ts +9 -1
  77. package/esm/browser/components/list-rows.js +17 -3
  78. package/esm/browser/components/markdown.js +36 -4
  79. package/esm/browser/components/media.js +19 -2
  80. package/esm/browser/components/message-actions.js +2 -0
  81. package/esm/browser/components/message-footer.d.ts +6 -0
  82. package/esm/browser/components/message-footer.js +20 -3
  83. package/esm/browser/components/message-list.d.ts +57 -6
  84. package/esm/browser/components/message-list.js +152 -36
  85. package/esm/browser/components/message-menu.js +6 -1
  86. package/esm/browser/components/model-picker.js +1 -0
  87. package/esm/browser/components/nav-places.d.ts +21 -2
  88. package/esm/browser/components/nav-places.js +20 -4
  89. package/esm/browser/components/notice-center.js +34 -0
  90. package/esm/browser/components/notice-face.d.ts +10 -0
  91. package/esm/browser/components/notice-face.js +28 -0
  92. package/esm/browser/components/phone-shell.d.ts +23 -1
  93. package/esm/browser/components/phone-shell.js +96 -9
  94. package/esm/browser/components/picture.d.ts +8 -1
  95. package/esm/browser/components/picture.js +12 -1
  96. package/esm/browser/components/plus-menu.d.ts +23 -0
  97. package/esm/browser/components/plus-menu.js +90 -0
  98. package/esm/browser/components/recent-shot.d.ts +15 -0
  99. package/esm/browser/components/recent-shot.js +174 -0
  100. package/esm/browser/components/relay-view.js +10 -3
  101. package/esm/browser/components/run-status.d.ts +1 -1
  102. package/esm/browser/components/run-status.js +17 -29
  103. package/esm/browser/components/said-text.d.ts +6 -0
  104. package/esm/browser/components/said-text.js +14 -0
  105. package/esm/browser/components/scan-screen.d.ts +10 -0
  106. package/esm/browser/components/scan-screen.js +230 -0
  107. package/esm/browser/components/search-page.js +10 -6
  108. package/esm/browser/components/session-settings.d.ts +2 -3
  109. package/esm/browser/components/session-settings.js +1 -0
  110. package/esm/browser/components/session-view.js +29 -19
  111. package/esm/browser/components/settings-choices.d.ts +1 -0
  112. package/esm/browser/components/settings-choices.js +3 -2
  113. package/esm/browser/components/settings-controls.d.ts +5 -3
  114. package/esm/browser/components/settings-controls.js +10 -1
  115. package/esm/browser/components/settings-parts.js +45 -14
  116. package/esm/browser/components/tool-view.js +7 -2
  117. package/esm/browser/components/unseen-drop.d.ts +39 -0
  118. package/esm/browser/components/unseen-drop.js +219 -0
  119. package/esm/browser/components/use-seen-chats.d.ts +8 -0
  120. package/esm/browser/components/use-seen-chats.js +49 -0
  121. package/esm/browser/components/voice-button.d.ts +7 -1
  122. package/esm/browser/components/voice-button.js +15 -2
  123. package/esm/browser/components/voice-picker.d.ts +6 -0
  124. package/esm/browser/components/voice-picker.js +53 -0
  125. package/esm/browser/components/voice-talk.d.ts +11 -3
  126. package/esm/browser/components/voice-talk.js +24 -4
  127. package/esm/browser/components/web-composer.d.ts +4 -2
  128. package/esm/browser/components/web-composer.js +8 -4
  129. package/esm/browser/components/workbench-tabs.d.ts +41 -0
  130. package/esm/browser/components/workbench-tabs.js +193 -0
  131. package/esm/browser/components/workbench-toggle.d.ts +0 -13
  132. package/esm/browser/components/workbench-toggle.js +1 -28
  133. package/esm/browser/device/code-scan.d.ts +55 -0
  134. package/esm/browser/device/code-scan.js +137 -0
  135. package/esm/browser/device/code-vision.d.ts +51 -0
  136. package/esm/browser/device/code-vision.js +100 -0
  137. package/esm/browser/device/hold.js +4 -6
  138. package/esm/browser/device/long-press.d.ts +10 -0
  139. package/esm/browser/device/long-press.js +28 -12
  140. package/esm/browser/device/own-gestures.d.ts +25 -0
  141. package/esm/browser/device/own-gestures.js +39 -0
  142. package/esm/browser/device/pull-down.js +3 -2
  143. package/esm/browser/device/recent-shots.d.ts +45 -0
  144. package/esm/browser/device/recent-shots.js +142 -0
  145. package/esm/browser/device/row-swipe.js +6 -1
  146. package/esm/browser/device/sheet-swipe.js +8 -1
  147. package/esm/browser/extension/extension-view.d.ts +10 -0
  148. package/esm/browser/extension/extension-view.js +6 -0
  149. package/esm/browser/extension/icons.js +15 -2
  150. package/esm/browser/extension/web-api-components.d.ts +269 -0
  151. package/esm/browser/extension/web-api-components.js +2 -0
  152. package/esm/browser/extension/web-api-contributions.d.ts +385 -0
  153. package/esm/browser/extension/web-api-contributions.js +2 -0
  154. package/esm/browser/extension/web-api-desktop.d.ts +55 -0
  155. package/esm/browser/extension/web-api-desktop.js +2 -0
  156. package/esm/browser/extension/web-api-terminal.d.ts +71 -0
  157. package/esm/browser/extension/web-api-terminal.js +2 -0
  158. package/esm/browser/extension/web-editor-tabs.d.ts +42 -0
  159. package/esm/browser/extension/web-editor-tabs.js +137 -0
  160. package/esm/browser/extension/web-extension-api.d.ts +166 -565
  161. package/esm/browser/extension/web-extension-context.d.ts +78 -0
  162. package/esm/browser/extension/web-extension-context.js +346 -0
  163. package/esm/browser/extension/web-extension-protocol.d.ts +44 -6
  164. package/esm/browser/extension/web-extension-protocol.js +33 -0
  165. package/esm/browser/extension/web-extension-run.d.ts +54 -0
  166. package/esm/browser/extension/web-extension-run.js +120 -0
  167. package/esm/browser/extension/web-extensions.d.ts +29 -69
  168. package/esm/browser/extension/web-extensions.js +118 -516
  169. package/esm/browser/extension/web-home.d.ts +19 -0
  170. package/esm/browser/extension/web-home.js +72 -0
  171. package/esm/browser/extension/web-pages.d.ts +13 -3
  172. package/esm/browser/extension/web-pages.js +23 -3
  173. package/esm/browser/extension/web-session-notices.d.ts +36 -0
  174. package/esm/browser/extension/web-session-notices.js +174 -0
  175. package/esm/browser/extension/web-sharing.d.ts +2 -0
  176. package/esm/browser/extension/web-sharing.js +4 -0
  177. package/esm/browser/game/game-host.d.ts +27 -0
  178. package/esm/browser/game/game-host.js +127 -0
  179. package/esm/browser/game/game-loader.d.ts +10 -0
  180. package/esm/browser/game/game-loader.js +28 -0
  181. package/esm/browser/game/game-protocol.d.ts +49 -0
  182. package/esm/browser/game/game-protocol.js +2 -0
  183. package/esm/browser/game/game-runner.d.ts +27 -0
  184. package/esm/browser/game/game-runner.js +60 -0
  185. package/esm/browser/game/game-util.d.ts +29 -0
  186. package/esm/browser/game/game-util.js +180 -0
  187. package/esm/browser/game/game-view.d.ts +12 -0
  188. package/esm/browser/game/game-view.js +31 -0
  189. package/esm/browser/game/game3d-protocol.d.ts +51 -0
  190. package/esm/browser/game/game3d-protocol.js +2 -0
  191. package/esm/browser/game/game3d-runner.d.ts +27 -0
  192. package/esm/browser/game/game3d-runner.js +149 -0
  193. package/esm/browser/hooks.d.ts +5 -1
  194. package/esm/browser/hooks.js +13 -2
  195. package/esm/browser/i18n/locales.d.ts +82 -2
  196. package/esm/browser/i18n/messages.d.ts +81 -1
  197. package/esm/browser/i18n/messages.js +167 -7
  198. package/esm/browser/index.d.ts +9 -0
  199. package/esm/browser/index.js +9 -0
  200. package/esm/browser/links/links-protocol.d.ts +5 -0
  201. package/esm/browser/links/links.d.ts +19 -7
  202. package/esm/browser/links/links.js +57 -11
  203. package/esm/browser/markdown/code-renderers.d.ts +4 -0
  204. package/esm/browser/markdown/code-renderers.js +4 -0
  205. package/esm/browser/notices/notices-protocol.d.ts +17 -0
  206. package/esm/browser/notices/notices.d.ts +1 -1
  207. package/esm/browser/notices/notices.js +6 -2
  208. package/esm/browser/notices/session-notices.d.ts +69 -0
  209. package/esm/browser/notices/session-notices.js +92 -0
  210. package/esm/browser/offline/device-values.js +12 -3
  211. package/esm/browser/offline/offline-reads.js +3 -1
  212. package/esm/browser/settings/navigation.d.ts +3 -2
  213. package/esm/browser/settings/navigation.js +4 -3
  214. package/esm/browser/settings/settings-protocol.d.ts +15 -0
  215. package/esm/browser/settings/settings-protocol.js +18 -4
  216. package/esm/browser/state/state-protocol.d.ts +8 -1
  217. package/esm/browser/state/state.d.ts +2 -0
  218. package/esm/browser/state/state.js +21 -2
  219. package/esm/browser/style/base.d.ts +1 -1
  220. package/esm/browser/style/base.js +27 -1
  221. package/esm/browser/style/conversation.d.ts +1 -1
  222. package/esm/browser/style/conversation.js +43 -5
  223. package/esm/browser/style/device.js +15 -1
  224. package/esm/browser/style/layout.d.ts +1 -1
  225. package/esm/browser/style/layout.js +189 -56
  226. package/esm/browser/style/pages.d.ts +1 -1
  227. package/esm/browser/style/pages.js +36 -1
  228. package/esm/browser/style/phone.d.ts +1 -1
  229. package/esm/browser/style/phone.js +15 -0
  230. package/esm/browser/style/shell.d.ts +1 -1
  231. package/esm/browser/style/shell.js +30 -6
  232. package/esm/browser/style/surfaces.d.ts +1 -1
  233. package/esm/browser/style/surfaces.js +2 -2
  234. package/esm/browser/style/tints.d.ts +27 -0
  235. package/esm/browser/style/tints.js +56 -0
  236. package/esm/browser/style.js +13 -1
  237. package/esm/browser/util/composer.d.ts +6 -0
  238. package/esm/browser/util/composer.js +16 -0
  239. package/esm/browser/util/desktop.d.ts +19 -1
  240. package/esm/browser/util/desktop.js +15 -0
  241. package/esm/browser/util/link.d.ts +18 -0
  242. package/esm/browser/util/link.js +66 -1
  243. package/esm/browser/util/markdown.d.ts +4 -1
  244. package/esm/browser/util/markdown.js +1 -1
  245. package/esm/browser/util/message.d.ts +5 -0
  246. package/esm/browser/util/message.js +30 -0
  247. package/esm/browser/util/process.d.ts +14 -2
  248. package/esm/browser/util/process.js +39 -8
  249. package/esm/browser/util/progress.d.ts +19 -1
  250. package/esm/browser/util/progress.js +57 -4
  251. package/esm/browser/util/quote.d.ts +19 -0
  252. package/esm/browser/util/quote.js +58 -0
  253. package/esm/browser/util/tool.d.ts +19 -2
  254. package/esm/browser/util/tool.js +70 -2
  255. package/esm/browser/util/voice.d.ts +47 -7
  256. package/esm/browser/util/voice.js +269 -27
  257. package/esm/browser/workbench-calls.d.ts +6 -4
  258. package/esm/browser/workbench-calls.js +15 -10
  259. package/esm/browser/workbench-protocol.d.ts +31 -2
  260. package/esm/browser/workbench-util.d.ts +15 -4
  261. package/esm/browser/workbench-util.js +28 -5
  262. package/esm/browser/workbench.d.ts +33 -1
  263. package/esm/browser/workbench.js +142 -14
  264. package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
  265. package/lib/browser/assistant/assistant-chat-list.js +13 -0
  266. package/lib/browser/assistant/assistant-extension.js +5 -0
  267. package/lib/browser/assistant/assistant-protocol.d.ts +2 -1
  268. package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
  269. package/lib/browser/assistant/assistant-task-book.js +23 -4
  270. package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
  271. package/lib/browser/assistant/assistant-task-source.js +5 -10
  272. package/lib/browser/assistant/assistant-task-util.d.ts +13 -3
  273. package/lib/browser/assistant/assistant-task-util.js +59 -12
  274. package/lib/browser/assistant/assistant-view.js +42 -21
  275. package/lib/browser/assistant/assistant.d.ts +18 -4
  276. package/lib/browser/assistant/assistant.js +52 -17
  277. package/lib/browser/avatar/dino-face.js +1 -2
  278. package/lib/browser/chat/chat-protocol.d.ts +5 -0
  279. package/lib/browser/chat/chat-stores.d.ts +8 -5
  280. package/lib/browser/chat/chat-stores.js +17 -9
  281. package/lib/browser/chat/chat-view.js +17 -10
  282. package/lib/browser/chat/chat.d.ts +16 -8
  283. package/lib/browser/chat/chat.js +86 -51
  284. package/lib/browser/components/account-menu.d.ts +0 -2
  285. package/lib/browser/components/account-menu.js +2 -29
  286. package/lib/browser/components/agent-settings-view.d.ts +3 -2
  287. package/lib/browser/components/agent-settings-view.js +2 -1
  288. package/lib/browser/components/app-nav.d.ts +5 -2
  289. package/lib/browser/components/app-nav.js +18 -5
  290. package/lib/browser/components/app-shell-hooks.js +5 -3
  291. package/lib/browser/components/app-view.js +72 -12
  292. package/lib/browser/components/busy.d.ts +26 -0
  293. package/lib/browser/components/busy.js +91 -0
  294. package/lib/browser/components/chat-icon.d.ts +30 -0
  295. package/lib/browser/components/chat-icon.js +117 -0
  296. package/lib/browser/components/chat-list.d.ts +73 -6
  297. package/lib/browser/components/chat-list.js +295 -59
  298. package/lib/browser/components/chat-seen.d.ts +54 -0
  299. package/lib/browser/components/chat-seen.js +104 -0
  300. package/lib/browser/components/composer-box.d.ts +14 -4
  301. package/lib/browser/components/composer-box.js +102 -62
  302. package/lib/browser/components/composer.d.ts +6 -6
  303. package/lib/browser/components/composer.js +4 -2
  304. package/lib/browser/components/conversation-scroll.d.ts +7 -0
  305. package/lib/browser/components/conversation-scroll.js +46 -7
  306. package/lib/browser/components/custom-host.d.ts +4 -0
  307. package/lib/browser/components/custom-host.js +50 -0
  308. package/lib/browser/components/directory-commands.d.ts +7 -0
  309. package/lib/browser/components/directory-commands.js +70 -0
  310. package/lib/browser/components/discover-view.d.ts +11 -4
  311. package/lib/browser/components/discover-view.js +19 -10
  312. package/lib/browser/components/dismiss.d.ts +4 -0
  313. package/lib/browser/components/dismiss.js +65 -0
  314. package/lib/browser/components/earlier-messages.d.ts +34 -3
  315. package/lib/browser/components/earlier-messages.js +44 -9
  316. package/lib/browser/components/editor-area.d.ts +6 -22
  317. package/lib/browser/components/editor-area.js +11 -98
  318. package/lib/browser/components/fold-text.d.ts +21 -0
  319. package/lib/browser/components/fold-text.js +103 -0
  320. package/lib/browser/components/folder-picker.d.ts +1 -1
  321. package/lib/browser/components/folder-picker.js +1 -1
  322. package/lib/browser/components/full-screen.d.ts +10 -0
  323. package/lib/browser/components/full-screen.js +62 -0
  324. package/lib/browser/components/grow-box.d.ts +10 -0
  325. package/lib/browser/components/grow-box.js +86 -0
  326. package/lib/browser/components/hold-to-talk.d.ts +23 -0
  327. package/lib/browser/components/hold-to-talk.js +65 -0
  328. package/lib/browser/components/host-view.d.ts +1 -1
  329. package/lib/browser/components/icon.d.ts +3 -1
  330. package/lib/browser/components/icon.js +4 -3
  331. package/lib/browser/components/image-viewer.d.ts +10 -2
  332. package/lib/browser/components/image-viewer.js +47 -10
  333. package/lib/browser/components/launcher-search-util.d.ts +4 -3
  334. package/lib/browser/components/launcher-search-util.js +12 -4
  335. package/lib/browser/components/lightbox.d.ts +5 -2
  336. package/lib/browser/components/lightbox.js +4 -3
  337. package/lib/browser/components/list-rows.d.ts +9 -1
  338. package/lib/browser/components/list-rows.js +18 -3
  339. package/lib/browser/components/markdown.js +36 -4
  340. package/lib/browser/components/media.js +19 -2
  341. package/lib/browser/components/message-actions.js +2 -0
  342. package/lib/browser/components/message-footer.d.ts +6 -0
  343. package/lib/browser/components/message-footer.js +20 -2
  344. package/lib/browser/components/message-list.d.ts +57 -6
  345. package/lib/browser/components/message-list.js +153 -34
  346. package/lib/browser/components/message-menu.js +6 -1
  347. package/lib/browser/components/model-picker.js +1 -0
  348. package/lib/browser/components/nav-places.d.ts +21 -2
  349. package/lib/browser/components/nav-places.js +22 -4
  350. package/lib/browser/components/notice-center.js +34 -0
  351. package/lib/browser/components/notice-face.d.ts +11 -0
  352. package/lib/browser/components/notice-face.js +64 -0
  353. package/lib/browser/components/phone-shell.d.ts +23 -1
  354. package/lib/browser/components/phone-shell.js +97 -10
  355. package/lib/browser/components/picture.d.ts +8 -1
  356. package/lib/browser/components/picture.js +13 -1
  357. package/lib/browser/components/plus-menu.d.ts +24 -0
  358. package/lib/browser/components/plus-menu.js +126 -0
  359. package/lib/browser/components/recent-shot.d.ts +16 -0
  360. package/lib/browser/components/recent-shot.js +210 -0
  361. package/lib/browser/components/relay-view.js +10 -3
  362. package/lib/browser/components/run-status.d.ts +1 -1
  363. package/lib/browser/components/run-status.js +17 -29
  364. package/lib/browser/components/said-text.d.ts +7 -0
  365. package/lib/browser/components/said-text.js +50 -0
  366. package/lib/browser/components/scan-screen.d.ts +11 -0
  367. package/lib/browser/components/scan-screen.js +266 -0
  368. package/lib/browser/components/search-page.js +10 -6
  369. package/lib/browser/components/session-settings.d.ts +2 -3
  370. package/lib/browser/components/session-settings.js +1 -0
  371. package/lib/browser/components/session-view.js +26 -16
  372. package/lib/browser/components/settings-choices.d.ts +1 -0
  373. package/lib/browser/components/settings-choices.js +2 -1
  374. package/lib/browser/components/settings-controls.d.ts +5 -3
  375. package/lib/browser/components/settings-controls.js +10 -1
  376. package/lib/browser/components/settings-parts.js +43 -12
  377. package/lib/browser/components/tool-view.js +7 -2
  378. package/lib/browser/components/unseen-drop.d.ts +40 -0
  379. package/lib/browser/components/unseen-drop.js +256 -0
  380. package/lib/browser/components/use-seen-chats.d.ts +9 -0
  381. package/lib/browser/components/use-seen-chats.js +85 -0
  382. package/lib/browser/components/voice-button.d.ts +7 -1
  383. package/lib/browser/components/voice-button.js +16 -2
  384. package/lib/browser/components/voice-picker.d.ts +7 -0
  385. package/lib/browser/components/voice-picker.js +89 -0
  386. package/lib/browser/components/voice-talk.d.ts +11 -3
  387. package/lib/browser/components/voice-talk.js +25 -4
  388. package/lib/browser/components/web-composer.d.ts +4 -2
  389. package/lib/browser/components/web-composer.js +7 -3
  390. package/lib/browser/components/workbench-tabs.d.ts +42 -0
  391. package/lib/browser/components/workbench-tabs.js +232 -0
  392. package/lib/browser/components/workbench-toggle.d.ts +0 -13
  393. package/lib/browser/components/workbench-toggle.js +1 -29
  394. package/lib/browser/device/code-scan.d.ts +56 -0
  395. package/lib/browser/device/code-scan.js +141 -0
  396. package/lib/browser/device/code-vision.d.ts +52 -0
  397. package/lib/browser/device/code-vision.js +103 -0
  398. package/lib/browser/device/hold.js +4 -6
  399. package/lib/browser/device/long-press.d.ts +10 -0
  400. package/lib/browser/device/long-press.js +28 -12
  401. package/lib/browser/device/own-gestures.d.ts +26 -0
  402. package/lib/browser/device/own-gestures.js +42 -0
  403. package/lib/browser/device/pull-down.js +3 -2
  404. package/lib/browser/device/recent-shots.d.ts +46 -0
  405. package/lib/browser/device/recent-shots.js +145 -0
  406. package/lib/browser/device/row-swipe.js +6 -1
  407. package/lib/browser/device/sheet-swipe.js +8 -1
  408. package/lib/browser/extension/extension-view.d.ts +10 -0
  409. package/lib/browser/extension/extension-view.js +7 -1
  410. package/lib/browser/extension/icons.js +14 -1
  411. package/lib/browser/extension/web-api-components.d.ts +270 -0
  412. package/lib/browser/extension/web-api-components.js +3 -0
  413. package/lib/browser/extension/web-api-contributions.d.ts +386 -0
  414. package/lib/browser/extension/web-api-contributions.js +3 -0
  415. package/lib/browser/extension/web-api-desktop.d.ts +56 -0
  416. package/lib/browser/extension/web-api-desktop.js +3 -0
  417. package/lib/browser/extension/web-api-terminal.d.ts +72 -0
  418. package/lib/browser/extension/web-api-terminal.js +3 -0
  419. package/lib/browser/extension/web-editor-tabs.d.ts +43 -0
  420. package/lib/browser/extension/web-editor-tabs.js +141 -0
  421. package/lib/browser/extension/web-extension-api.d.ts +166 -565
  422. package/lib/browser/extension/web-extension-context.d.ts +79 -0
  423. package/lib/browser/extension/web-extension-context.js +383 -0
  424. package/lib/browser/extension/web-extension-protocol.d.ts +44 -6
  425. package/lib/browser/extension/web-extension-protocol.js +34 -1
  426. package/lib/browser/extension/web-extension-run.d.ts +55 -0
  427. package/lib/browser/extension/web-extension-run.js +123 -0
  428. package/lib/browser/extension/web-extensions.d.ts +29 -69
  429. package/lib/browser/extension/web-extensions.js +114 -545
  430. package/lib/browser/extension/web-home.d.ts +20 -0
  431. package/lib/browser/extension/web-home.js +76 -0
  432. package/lib/browser/extension/web-pages.d.ts +13 -3
  433. package/lib/browser/extension/web-pages.js +23 -3
  434. package/lib/browser/extension/web-session-notices.d.ts +37 -0
  435. package/lib/browser/extension/web-session-notices.js +177 -0
  436. package/lib/browser/extension/web-sharing.d.ts +2 -0
  437. package/lib/browser/extension/web-sharing.js +4 -0
  438. package/lib/browser/game/game-host.d.ts +28 -0
  439. package/lib/browser/game/game-host.js +163 -0
  440. package/lib/browser/game/game-loader.d.ts +11 -0
  441. package/lib/browser/game/game-loader.js +31 -0
  442. package/lib/browser/game/game-protocol.d.ts +50 -0
  443. package/lib/browser/game/game-protocol.js +3 -0
  444. package/lib/browser/game/game-runner.d.ts +28 -0
  445. package/lib/browser/game/game-runner.js +64 -0
  446. package/lib/browser/game/game-util.d.ts +30 -0
  447. package/lib/browser/game/game-util.js +183 -0
  448. package/lib/browser/game/game-view.d.ts +13 -0
  449. package/lib/browser/game/game-view.js +68 -0
  450. package/lib/browser/game/game3d-protocol.d.ts +52 -0
  451. package/lib/browser/game/game3d-protocol.js +3 -0
  452. package/lib/browser/game/game3d-runner.d.ts +28 -0
  453. package/lib/browser/game/game3d-runner.js +153 -0
  454. package/lib/browser/hooks.d.ts +5 -1
  455. package/lib/browser/hooks.js +14 -2
  456. package/lib/browser/i18n/locales.d.ts +82 -2
  457. package/lib/browser/i18n/messages.d.ts +81 -1
  458. package/lib/browser/i18n/messages.js +167 -7
  459. package/lib/browser/index.d.ts +9 -0
  460. package/lib/browser/index.js +9 -0
  461. package/lib/browser/links/links-protocol.d.ts +5 -0
  462. package/lib/browser/links/links.d.ts +19 -7
  463. package/lib/browser/links/links.js +57 -11
  464. package/lib/browser/markdown/code-renderers.d.ts +5 -0
  465. package/lib/browser/markdown/code-renderers.js +40 -0
  466. package/lib/browser/notices/notices-protocol.d.ts +17 -0
  467. package/lib/browser/notices/notices.d.ts +1 -1
  468. package/lib/browser/notices/notices.js +6 -2
  469. package/lib/browser/notices/session-notices.d.ts +70 -0
  470. package/lib/browser/notices/session-notices.js +96 -0
  471. package/lib/browser/offline/device-values.js +12 -3
  472. package/lib/browser/offline/offline-reads.js +3 -1
  473. package/lib/browser/settings/navigation.d.ts +3 -2
  474. package/lib/browser/settings/navigation.js +4 -3
  475. package/lib/browser/settings/settings-protocol.d.ts +15 -0
  476. package/lib/browser/settings/settings-protocol.js +19 -5
  477. package/lib/browser/state/state-protocol.d.ts +8 -1
  478. package/lib/browser/state/state.d.ts +2 -0
  479. package/lib/browser/state/state.js +21 -2
  480. package/lib/browser/style/base.d.ts +1 -1
  481. package/lib/browser/style/base.js +27 -1
  482. package/lib/browser/style/conversation.d.ts +1 -1
  483. package/lib/browser/style/conversation.js +43 -5
  484. package/lib/browser/style/device.js +15 -1
  485. package/lib/browser/style/layout.d.ts +1 -1
  486. package/lib/browser/style/layout.js +189 -56
  487. package/lib/browser/style/pages.d.ts +1 -1
  488. package/lib/browser/style/pages.js +36 -1
  489. package/lib/browser/style/phone.d.ts +1 -1
  490. package/lib/browser/style/phone.js +15 -0
  491. package/lib/browser/style/shell.d.ts +1 -1
  492. package/lib/browser/style/shell.js +30 -6
  493. package/lib/browser/style/surfaces.d.ts +1 -1
  494. package/lib/browser/style/surfaces.js +2 -2
  495. package/lib/browser/style/tints.d.ts +28 -0
  496. package/lib/browser/style/tints.js +59 -0
  497. package/lib/browser/style.js +13 -1
  498. package/lib/browser/util/composer.d.ts +6 -0
  499. package/lib/browser/util/composer.js +16 -0
  500. package/lib/browser/util/desktop.d.ts +19 -1
  501. package/lib/browser/util/desktop.js +15 -0
  502. package/lib/browser/util/link.d.ts +18 -0
  503. package/lib/browser/util/link.js +66 -1
  504. package/lib/browser/util/markdown.d.ts +4 -1
  505. package/lib/browser/util/markdown.js +1 -1
  506. package/lib/browser/util/message.d.ts +5 -0
  507. package/lib/browser/util/message.js +30 -0
  508. package/lib/browser/util/process.d.ts +14 -2
  509. package/lib/browser/util/process.js +39 -8
  510. package/lib/browser/util/progress.d.ts +19 -1
  511. package/lib/browser/util/progress.js +57 -4
  512. package/lib/browser/util/quote.d.ts +20 -0
  513. package/lib/browser/util/quote.js +61 -0
  514. package/lib/browser/util/tool.d.ts +19 -2
  515. package/lib/browser/util/tool.js +70 -2
  516. package/lib/browser/util/voice.d.ts +47 -7
  517. package/lib/browser/util/voice.js +269 -27
  518. package/lib/browser/workbench-calls.d.ts +6 -4
  519. package/lib/browser/workbench-calls.js +15 -10
  520. package/lib/browser/workbench-protocol.d.ts +31 -2
  521. package/lib/browser/workbench-util.d.ts +15 -4
  522. package/lib/browser/workbench-util.js +28 -5
  523. package/lib/browser/workbench.d.ts +33 -1
  524. package/lib/browser/workbench.js +140 -12
  525. package/package.json +11 -8
@@ -8,11 +8,26 @@ export interface NoticeAction {
8
8
  label: string;
9
9
  run(): void;
10
10
  }
11
+ /** A conversation that said what a notice says (TaNotices.notify `from`): drawn with its face and name. */
12
+ export interface NoticeFrom {
13
+ sessionId?: string;
14
+ sessionFile?: string;
15
+ /** Its name, as the lists show it. */
16
+ title: string;
17
+ /** What it asks of the user, beside its name: it waits for them, or its run failed. */
18
+ status?: 'ask' | 'failed';
19
+ /** Shows the conversation: a tap on the notice. */
20
+ open(): void;
21
+ }
11
22
  export interface NoticeOptions {
12
23
  level?: NoticeLevel;
13
24
  /** A second, quieter line: what to do about it. */
14
25
  detail?: string;
15
26
  action?: NoticeAction;
27
+ /** Buttons side by side under the message (answers to pick); `action` is the last of them. */
28
+ actions?: NoticeAction[];
29
+ /** Said by a conversation. */
30
+ from?: NoticeFrom;
16
31
  /** Notices of one key replace each other and count how often they came, instead of piling up. */
17
32
  key?: string;
18
33
  /** Stays until the user closes it. */
@@ -26,6 +41,8 @@ export interface Notice {
26
41
  message: string;
27
42
  detail?: string;
28
43
  action?: NoticeAction;
44
+ actions?: NoticeAction[];
45
+ from?: NoticeFrom;
29
46
  key?: string;
30
47
  sticky?: boolean;
31
48
  art?: boolean[][];
@@ -14,7 +14,7 @@ type Question = {
14
14
  };
15
15
  export declare namespace NoticesUtil {
16
16
  /** How long a notice stays, or `undefined` until it is closed. */
17
- function duration(notice: Pick<Notice, 'level' | 'sticky' | 'action'>): number | undefined;
17
+ function duration(notice: Pick<Notice, 'level' | 'sticky' | 'action' | 'actions'>): number | undefined;
18
18
  /** Notices of the same key are one, which came `count` times: the same failure ten times is one notice. */
19
19
  function key(level: NoticeLevel, text: string, options: NoticeOptions): string;
20
20
  /** At most MAX_NOTICES, the newest kept; a sticky one goes only when there is nothing else to drop. */
@@ -25,7 +25,8 @@ export var NoticesUtil;
25
25
  (function (NoticesUtil) {
26
26
  /** How long a notice stays, or `undefined` until it is closed. */
27
27
  function duration(notice) {
28
- return notice.sticky ? undefined : DURATIONS_MS[notice.level] + (notice.action ? ACTION_MS : 0);
28
+ var _a;
29
+ return notice.sticky ? undefined : DURATIONS_MS[notice.level] + (notice.action || ((_a = notice.actions) === null || _a === void 0 ? void 0 : _a.length) ? ACTION_MS : 0);
29
30
  }
30
31
  NoticesUtil.duration = duration;
31
32
  /** Notices of the same key are one, which came `count` times: the same failure ten times is one notice. */
@@ -94,10 +95,13 @@ let TaNoticesImpl = class TaNoticesImpl {
94
95
  message: text,
95
96
  detail: options.detail,
96
97
  action: options.action,
98
+ actions: options.actions,
99
+ from: options.from,
97
100
  key,
98
101
  sticky: options.sticky,
99
102
  art: options.art,
100
- count: same && same.message === text ? same.count + 1 : 1,
103
+ // A conversation's newer message takes the place of its last one, not counted.
104
+ count: same && same.message === text && !options.from ? same.count + 1 : 1,
101
105
  };
102
106
  this.update({ notices: NoticesUtil.keep([...this.current.notices.filter(other => other !== same), notice]) });
103
107
  return notice.id;
@@ -0,0 +1,69 @@
1
+ import type { WebSessionNotice } from '../extension/web-api-contributions.js';
2
+ import type { NoticeAction, NoticeLevel, TaNotices } from './notices-protocol.js';
3
+ export declare const TaSessionNotices: unique symbol;
4
+ /** What conversations tell the user (WebExtensionUI.notifySession), one for every extension of the page: each key told once. */
5
+ export interface TaSessionNotices {
6
+ notify(notice: WebSessionNotice): SessionNoticeWay;
7
+ }
8
+ /** How a page tells of a notice of a conversation (SessionNoticeUtil.way). */
9
+ export type SessionNoticeWay = 'none' | 'banner' | 'system' | 'waiting';
10
+ /** What the page is at when a notice comes. */
11
+ export interface SessionNoticeScene {
12
+ /** The page is in front and has the focus: the user is on it. */
13
+ focused: boolean;
14
+ /** The user looks at that conversation: it is shown, or it is the double's and its page is. */
15
+ looking: boolean;
16
+ /** It is a task the double follows, which tells the user of it. */
17
+ task: boolean;
18
+ /** Notices of the system can be shown: the browser has them and the user allowed them. */
19
+ system: boolean;
20
+ /**
21
+ * A phone or a tablet: nothing floats over the page, as a messenger in front tells of a message only by
22
+ * the unread of its list and its tab; the question is answered in its conversation.
23
+ */
24
+ quiet: boolean;
25
+ }
26
+ /** What the page asks of the shell to tell of a conversation; SessionNotices decides how. */
27
+ export interface SessionNoticeHost {
28
+ readonly notices: TaNotices;
29
+ scene(notice: WebSessionNotice): SessionNoticeScene;
30
+ /** Its name, as the lists show it. */
31
+ title(notice: WebSessionNotice): string;
32
+ /** Shows the conversation. */
33
+ open(notice: WebSessionNotice): Promise<void>;
34
+ /** Sends an answer the user picked, as their message. */
35
+ answer(notice: WebSessionNotice, text: string, clientMessageId: string): Promise<void>;
36
+ /** A notice of the system; `onClick` brings the page to the front first. */
37
+ system(title: string, body: string, options: {
38
+ tag: string;
39
+ silent: boolean;
40
+ onClick(): void;
41
+ }): void;
42
+ }
43
+ export declare namespace SessionNoticeUtil {
44
+ /** How many of a page's keys it remembers having told: a notice read again after it does not come twice. */
45
+ const TOLD = 200;
46
+ /**
47
+ * How to tell of it: not of what the user looks at, nor of a task the double tells of unless it asks; a
48
+ * banner while the user is on the page; a notice of the system while not, if there are any; else a banner
49
+ * that waits for them, only when it asks or failed (an answer the lists mark unread anyway). On a phone or a
50
+ * tablet never a banner: the unread of the list and its tab tell, a notice of the system while away.
51
+ */
52
+ function way(notice: Pick<WebSessionNotice, 'level'>, scene: SessionNoticeScene): SessionNoticeWay;
53
+ function level(notice: Pick<WebSessionNotice, 'level'>): NoticeLevel;
54
+ /** The banners of one conversation take each other's place. */
55
+ function bannerKey(notice: Pick<WebSessionNotice, 'key' | 'sessionId' | 'sessionFile'>): string;
56
+ /** The id of the message of an answer: the same on every page, so that it is sent once. */
57
+ function answerId(notice: Pick<WebSessionNotice, 'key'>, index: number): string;
58
+ }
59
+ /**
60
+ * Tells the user what conversations say, as a messenger does (WebExtensionUI.notifySession): each key once,
61
+ * the way SessionNoticeUtil.way picks.
62
+ */
63
+ export declare class SessionNotices implements TaSessionNotices {
64
+ protected readonly host: SessionNoticeHost;
65
+ protected readonly told: Set<string>;
66
+ constructor(host: SessionNoticeHost);
67
+ notify(notice: WebSessionNotice): SessionNoticeWay;
68
+ protected actions(notice: WebSessionNotice): NoticeAction[];
69
+ }
@@ -0,0 +1,92 @@
1
+ export const TaSessionNotices = Symbol('TaSessionNotices');
2
+ export var SessionNoticeUtil;
3
+ (function (SessionNoticeUtil) {
4
+ /** How many of a page's keys it remembers having told: a notice read again after it does not come twice. */
5
+ SessionNoticeUtil.TOLD = 200;
6
+ /**
7
+ * How to tell of it: not of what the user looks at, nor of a task the double tells of unless it asks; a
8
+ * banner while the user is on the page; a notice of the system while not, if there are any; else a banner
9
+ * that waits for them, only when it asks or failed (an answer the lists mark unread anyway). On a phone or a
10
+ * tablet never a banner: the unread of the list and its tab tell, a notice of the system while away.
11
+ */
12
+ function way(notice, scene) {
13
+ if (scene.task && notice.level !== 'ask') {
14
+ return 'none';
15
+ }
16
+ if (scene.focused) {
17
+ return scene.looking || scene.quiet ? 'none' : 'banner';
18
+ }
19
+ if (scene.system) {
20
+ return 'system';
21
+ }
22
+ return notice.level === 'done' || scene.quiet ? 'none' : 'waiting';
23
+ }
24
+ SessionNoticeUtil.way = way;
25
+ function level(notice) {
26
+ return notice.level === 'ask' ? 'warning' : notice.level === 'failed' ? 'error' : 'info';
27
+ }
28
+ SessionNoticeUtil.level = level;
29
+ /** The banners of one conversation take each other's place. */
30
+ function bannerKey(notice) {
31
+ var _a, _b;
32
+ return `session:${(_b = (_a = notice.sessionFile) !== null && _a !== void 0 ? _a : notice.sessionId) !== null && _b !== void 0 ? _b : notice.key}`;
33
+ }
34
+ SessionNoticeUtil.bannerKey = bannerKey;
35
+ /** The id of the message of an answer: the same on every page, so that it is sent once. */
36
+ function answerId(notice, index) {
37
+ return `notice:${notice.key}:${index}`;
38
+ }
39
+ SessionNoticeUtil.answerId = answerId;
40
+ })(SessionNoticeUtil || (SessionNoticeUtil = {}));
41
+ /**
42
+ * Tells the user what conversations say, as a messenger does (WebExtensionUI.notifySession): each key once,
43
+ * the way SessionNoticeUtil.way picks.
44
+ */
45
+ export class SessionNotices {
46
+ constructor(host) {
47
+ this.host = host;
48
+ this.told = new Set();
49
+ }
50
+ notify(notice) {
51
+ if (this.told.has(notice.key)) {
52
+ return 'none';
53
+ }
54
+ this.told.add(notice.key);
55
+ if (this.told.size > SessionNoticeUtil.TOLD) {
56
+ this.told.delete(this.told.values().next().value);
57
+ }
58
+ const way = SessionNoticeUtil.way(notice, this.host.scene(notice));
59
+ const title = way === 'none' ? '' : this.host.title(notice);
60
+ const open = () => void this.host.open(notice).catch(error => this.host.notices.error(error));
61
+ if (way === 'system') {
62
+ this.host.system(title, notice.text, { tag: SessionNoticeUtil.bannerKey(notice), silent: notice.level === 'done', onClick: open });
63
+ }
64
+ else if (way === 'banner' || way === 'waiting') {
65
+ const from = {
66
+ sessionId: notice.sessionId,
67
+ sessionFile: notice.sessionFile,
68
+ title,
69
+ status: notice.level === 'done' ? undefined : notice.level,
70
+ open,
71
+ };
72
+ this.host.notices.notify(notice.text, {
73
+ level: SessionNoticeUtil.level(notice),
74
+ key: SessionNoticeUtil.bannerKey(notice),
75
+ from,
76
+ actions: this.actions(notice),
77
+ // What waits for the user stays until they see it.
78
+ sticky: way === 'waiting' || notice.level === 'ask',
79
+ });
80
+ }
81
+ return way;
82
+ }
83
+ actions(notice) {
84
+ var _a, _b;
85
+ const answers = ((_a = notice.options) !== null && _a !== void 0 ? _a : []).map((option, index) => ({
86
+ label: option,
87
+ run: () => void this.host.answer(notice, option, SessionNoticeUtil.answerId(notice, index)).catch(error => this.host.notices.error(error)),
88
+ }));
89
+ return [...answers, ...((_b = notice.actions) !== null && _b !== void 0 ? _b : [])];
90
+ }
91
+ }
92
+ //# sourceMappingURL=session-notices.js.map
@@ -116,14 +116,23 @@ export class IndexedValues {
116
116
  return otherwise;
117
117
  }
118
118
  try {
119
- const store = database.transaction(IndexedValues.STORE, mode).objectStore(IndexedValues.STORE);
120
- const request = work(store);
119
+ const transaction = database.transaction(IndexedValues.STORE, mode);
120
+ const request = work(transaction.objectStore(IndexedValues.STORE));
121
121
  if (request instanceof Promise) {
122
122
  return await request;
123
123
  }
124
+ // A write is done once its transaction committed, not when its request succeeded: a load of the page in between aborts it.
124
125
  return await new Promise((resolve, reject) => {
125
- request.onsuccess = () => resolve(request.result);
126
+ request.onsuccess = () => {
127
+ if (mode === 'readonly') {
128
+ resolve(request.result);
129
+ }
130
+ };
126
131
  request.onerror = () => reject(request.error);
132
+ if (mode !== 'readonly') {
133
+ transaction.oncomplete = () => resolve(request.result);
134
+ transaction.onabort = () => reject(transaction.error);
135
+ }
127
136
  });
128
137
  }
129
138
  catch (_a) {
@@ -7,9 +7,11 @@ import { OfflineKeys } from './device-values.js';
7
7
  export const OFFLINE_READS = {
8
8
  server: {
9
9
  // A session answering then is not said to be answering now.
10
- listSessions: answer => (Array.isArray(answer) ? answer.map(session => ({ ...session, isStreaming: false })) : answer),
10
+ listSessions: answer => Array.isArray(answer) ? answer.map(session => ({ ...session, isStreaming: false, waiting: false })) : answer,
11
11
  listSavedSessions: undefined,
12
12
  getServerInfo: undefined,
13
+ // The `/` menu of a new conversation.
14
+ getDirectoryCommands: undefined,
13
15
  },
14
16
  // The data of web extensions (pi.storage): the agents and channels, what they said, the tasks.
15
17
  packages: { getExtensionData: undefined },
@@ -28,12 +28,13 @@ export declare namespace NavigationUtil {
28
28
  * Where the pages go. They all fit in the slots: all in the navigation. Else Discover takes a slot, the pages
29
29
  * the user put in the navigation keep theirs, the others take what is left in their order, and the rest is
30
30
  * under Discover. `room` bounds the entries of a device (a phone's tabs), Discover among them: the pages
31
- * put in the navigation go under Discover too past it.
31
+ * put in the navigation go under Discover too past it. `own`: Discover has entries of its own (extensions
32
+ * started on open), so it takes a slot whatever the pages.
32
33
  */
33
34
  function arrange<T extends {
34
35
  id: string;
35
36
  discover?: boolean;
36
- }>(pages: T[], setting: NavigationSetting, room?: number): NavigationLayout<T>;
37
+ }>(pages: T[], setting: NavigationSetting, room?: number, own?: boolean): NavigationLayout<T>;
37
38
  /** The page in the navigation, whatever the slots. */
38
39
  function pin(setting: NavigationSetting, id: string): NavigationSetting;
39
40
  /** The page under Discover. */
@@ -22,15 +22,16 @@ export var NavigationUtil;
22
22
  * Where the pages go. They all fit in the slots: all in the navigation. Else Discover takes a slot, the pages
23
23
  * the user put in the navigation keep theirs, the others take what is left in their order, and the rest is
24
24
  * under Discover. `room` bounds the entries of a device (a phone's tabs), Discover among them: the pages
25
- * put in the navigation go under Discover too past it.
25
+ * put in the navigation go under Discover too past it. `own`: Discover has entries of its own (extensions
26
+ * started on open), so it takes a slot whatever the pages.
26
27
  */
27
- function arrange(pages, setting, room = Number.POSITIVE_INFINITY) {
28
+ function arrange(pages, setting, room = Number.POSITIVE_INFINITY, own = false) {
28
29
  const limit = Math.max(1, Math.min(setting.slots, room));
29
30
  const pinned = pages.filter(page => setting.pinned.includes(page.id));
30
31
  // A page that asks to start under Discover is there until the user pins it.
31
32
  const free = pages.filter(page => !setting.pinned.includes(page.id) && !setting.discover.includes(page.id) && !page.discover);
32
33
  const folded = pages.length - pinned.length - free.length;
33
- if (folded === 0 && pinned.length + free.length <= limit) {
34
+ if (folded === 0 && !own && pinned.length + free.length <= limit) {
34
35
  return { nav: pages, discover: [] };
35
36
  }
36
37
  const kept = pinned.slice(0, Math.max(limit - 1, Math.min(pinned.length, room - 1)));
@@ -26,6 +26,8 @@ export interface Settings {
26
26
  speak: boolean;
27
27
  /** Said to the double by voice (a finger held to talk), its answer is read aloud, even with `speak` off. */
28
28
  speakTalk: boolean;
29
+ /** The voice replies are read with (its `voiceURI`), `''` for the most natural of the language (Voice.pick). */
30
+ voice: string;
29
31
  /** The double asks before it hands out work: it says what it would start and waits for the user's go. */
30
32
  confirmTasks: boolean;
31
33
  /** How many of the double's tasks run at once; 0, as many as it starts. */
@@ -49,6 +51,15 @@ export interface Settings {
49
51
  navigation: NavigationSetting;
50
52
  /** How long an extension started on open keeps running once left, before it stops (ta-launcher.md). */
51
53
  keepAliveMinutes: number;
54
+ /** The conversations of the list not updated for these days are folded at its end; 0, none. */
55
+ chatFoldDays: number;
56
+ /**
57
+ * The conversations not updated for these days are archived: out of the list, not read with it every few
58
+ * seconds, read when the archive or a search shows them; 0, none.
59
+ */
60
+ chatArchiveDays: number;
61
+ /** The screenshot just taken is offered above the message box, once (RecentShots), where Ta can read the screenshots. */
62
+ recentShots: boolean;
52
63
  }
53
64
  export interface SettingsState {
54
65
  settings: Settings;
@@ -64,6 +75,10 @@ export interface SettingsState {
64
75
  }
65
76
  /** What `keepAliveMinutes` may be. */
66
77
  export declare const KEEP_ALIVE_CHOICES: readonly number[];
78
+ /** What `chatFoldDays` may be. */
79
+ export declare const CHAT_FOLD_CHOICES: readonly number[];
80
+ /** What `chatArchiveDays` may be. */
81
+ export declare const CHAT_ARCHIVE_CHOICES: readonly number[];
67
82
  /** What `maxTasks` may be. */
68
83
  export declare const MAX_TASKS_CHOICES: readonly number[];
69
84
  export declare const DEFAULT_SETTINGS: Settings;
@@ -9,6 +9,10 @@ export const FONT_SCALES = { small: 0.9, standard: 1, large: 1.12, xlarge: 1.25
9
9
  export const HANDHELD_FONT_SCALE = 1.12;
10
10
  /** What `keepAliveMinutes` may be. */
11
11
  export const KEEP_ALIVE_CHOICES = [1, 5, 15, 30];
12
+ /** What `chatFoldDays` may be. */
13
+ export const CHAT_FOLD_CHOICES = [3, 7, 30, 0];
14
+ /** What `chatArchiveDays` may be. */
15
+ export const CHAT_ARCHIVE_CHOICES = [30, 90, 365, 0];
12
16
  /** What `maxTasks` may be. */
13
17
  export const MAX_TASKS_CHOICES = [0, 2, 4, 8];
14
18
  export const DEFAULT_SETTINGS = {
@@ -18,6 +22,7 @@ export const DEFAULT_SETTINGS = {
18
22
  chatFontSize: 'standard',
19
23
  speak: false,
20
24
  speakTalk: false,
25
+ voice: '',
21
26
  confirmTasks: false,
22
27
  maxTasks: 0,
23
28
  assistantModel: '',
@@ -27,7 +32,14 @@ export const DEFAULT_SETTINGS = {
27
32
  trustedDomains: [],
28
33
  navigation: DEFAULT_NAVIGATION,
29
34
  keepAliveMinutes: 5,
35
+ chatFoldDays: 7,
36
+ chatArchiveDays: 30,
37
+ recentShots: true,
30
38
  };
39
+ /** `value` when it is one of `choices`, else `fallback`. */
40
+ function choice(value, choices, fallback) {
41
+ return choices.includes(value) ? value : fallback;
42
+ }
31
43
  function fontSize(value) {
32
44
  return typeof value === 'string' && Object.keys(FONT_SCALES).includes(value) ? value : 'standard';
33
45
  }
@@ -53,17 +65,19 @@ export var SettingsUtil;
53
65
  chatFontSize: fontSize(kept.chatFontSize),
54
66
  speak: kept.speak === true,
55
67
  speakTalk: kept.speakTalk === true,
68
+ voice: typeof kept.voice === 'string' ? kept.voice : '',
56
69
  confirmTasks: kept.confirmTasks === true,
57
- maxTasks: MAX_TASKS_CHOICES.includes(kept.maxTasks) ? kept.maxTasks : DEFAULT_SETTINGS.maxTasks,
70
+ maxTasks: choice(kept.maxTasks, MAX_TASKS_CHOICES, DEFAULT_SETTINGS.maxTasks),
58
71
  assistantModel: modelRef(kept.assistantModel),
59
72
  taskModel: modelRef(kept.taskModel),
60
73
  reduceMotion: kept.reduceMotion === true,
61
74
  builtinsOff: strings(kept.builtinsOff),
62
75
  trustedDomains: strings(kept.trustedDomains),
63
76
  navigation: NavigationUtil.parse(kept.navigation),
64
- keepAliveMinutes: KEEP_ALIVE_CHOICES.includes(kept.keepAliveMinutes)
65
- ? kept.keepAliveMinutes
66
- : DEFAULT_SETTINGS.keepAliveMinutes,
77
+ keepAliveMinutes: choice(kept.keepAliveMinutes, KEEP_ALIVE_CHOICES, DEFAULT_SETTINGS.keepAliveMinutes),
78
+ chatFoldDays: choice(kept.chatFoldDays, CHAT_FOLD_CHOICES, DEFAULT_SETTINGS.chatFoldDays),
79
+ chatArchiveDays: choice(kept.chatArchiveDays, CHAT_ARCHIVE_CHOICES, DEFAULT_SETTINGS.chatArchiveDays),
80
+ recentShots: kept.recentShots !== false,
67
81
  };
68
82
  }
69
83
  SettingsUtil.parse = parse;
@@ -20,11 +20,18 @@ export interface StateSpec<T> {
20
20
  initial: T;
21
21
  /** The value read, or undefined when it is not one (kept by an older version, or by hand). */
22
22
  parse(value: unknown): T | undefined;
23
+ /**
24
+ * For a `user` value of which each page changes a part (when each conversation was seen): the value
25
+ * the server has is merged with this browser's rather than replacing it, and written back when this
26
+ * browser had more, so that two pages that write at once both keep what they wrote. Without it, the
27
+ * last write wins.
28
+ */
29
+ merge?(local: T, remote: T): T;
23
30
  }
24
31
  /**
25
32
  * The values of the page that outlive it, each at its tier. Values are JSON and replaced, never changed in
26
33
  * place: the same value is the same object, for React. A value set here wins over one read from the
27
- * server meanwhile; the last write wins between browsers.
34
+ * server meanwhile; the last write wins between browsers, unless the value says how to merge (StateSpec.merge).
28
35
  */
29
36
  export interface TaState {
30
37
  /** At once, what this browser has; for `user` it also asks the server, and tells the listeners if that differs. */
@@ -30,6 +30,8 @@ export declare class TaStateImpl implements TaState {
30
30
  protected schedule(): void;
31
31
  /** What the server has: taken unless set here meanwhile; what only this browser had goes there. */
32
32
  protected fetch(slot: Slot): Promise<void>;
33
+ /** The server's value with this browser's (set here meanwhile too); written back when this browser had more. */
34
+ protected merged(slot: Slot, remote: unknown, merge: (local: unknown, remote: unknown) => unknown): void;
33
35
  /** Follows the connection and the server: what changed elsewhere, and what was missed while offline. */
34
36
  protected watch(): void;
35
37
  /** Signed in to another computer in this page: its `user` values, from its copy until its server answers. */
@@ -95,10 +95,15 @@ let TaStateImpl = class TaStateImpl {
95
95
  .getExtensionData(StateUtil.DATA_NAME, slot.spec.key)
96
96
  .then(remote => {
97
97
  slot.loaded = true;
98
+ const value = remote === undefined || remote === null ? undefined : slot.spec.parse(remote);
99
+ const { merge } = slot.spec;
100
+ if (merge && value !== undefined) {
101
+ this.merged(slot, value, merge);
102
+ return;
103
+ }
98
104
  if (slot.version !== version) {
99
105
  return;
100
106
  }
101
- const value = remote === undefined || remote === null ? undefined : slot.spec.parse(remote);
102
107
  if (value === undefined) {
103
108
  // Kept in this browser before the server kept it: the server keeps it from now on.
104
109
  if (!StateUtil.same(slot.value, slot.spec.initial)) {
@@ -120,6 +125,19 @@ let TaStateImpl = class TaStateImpl {
120
125
  slot.loading = loading;
121
126
  return loading;
122
127
  }
128
+ /** The server's value with this browser's (set here meanwhile too); written back when this browser had more. */
129
+ merged(slot, remote, merge) {
130
+ const value = merge(slot.value, remote);
131
+ if (!StateUtil.same(value, remote)) {
132
+ slot.dirty = true;
133
+ this.schedule();
134
+ }
135
+ if (!StateUtil.same(value, slot.value)) {
136
+ slot.value = value;
137
+ this.writeLocal(slot);
138
+ this.notify();
139
+ }
140
+ }
123
141
  /** Follows the connection and the server: what changed elsewhere, and what was missed while offline. */
124
142
  watch() {
125
143
  if (this.watching) {
@@ -153,7 +171,8 @@ let TaStateImpl = class TaStateImpl {
153
171
  }
154
172
  for (const key of keys) {
155
173
  const slot = this.slots.get(key);
156
- if (slot && slot.spec.tier === 'user' && !slot.dirty) {
174
+ // A value that merges takes what another page wrote even while this one has its own to write.
175
+ if (slot && slot.spec.tier === 'user' && (!slot.dirty || slot.spec.merge)) {
157
176
  void this.fetch(slot);
158
177
  }
159
178
  }
@@ -1,2 +1,2 @@
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 --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-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 --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}\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-plus-items, .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/* 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.ta-empty-hint { max-width: 260px; 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";
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 --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}\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.ta-pending { animation: ta-busy-dim 180ms var(--ta-busy-delay) forwards; }\n.ta-opening { display: inline-flex; align-items: center; gap: 6px; animation: ta-busy-in 140ms 240ms both; }\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.ta-empty-hint { max-width: 260px; 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";
@@ -11,6 +11,8 @@ export const BASE_STYLE = `
11
11
  --ta-hover-strong: #333338;
12
12
  --ta-selected: #2c2c31;
13
13
  --ta-chip: #2a2a2e;
14
+ /* The chosen segment of a segmented control, on a track of --ta-raised: above it, lighter in the dark. */
15
+ --ta-segment: #333338;
14
16
  --ta-border: #2e2e33;
15
17
  --ta-border-muted: #232328;
16
18
  --ta-border-field: #3d3d45;
@@ -46,6 +48,7 @@ export const BASE_STYLE = `
46
48
  --ta-hover-strong: #e2e2e8;
47
49
  --ta-selected: #e6e6ea;
48
50
  --ta-chip: #ececf0;
51
+ --ta-segment: #ffffff;
49
52
  --ta-border: #dcdee3;
50
53
  --ta-border-muted: #e8eaed;
51
54
  --ta-border-field: #c9ccd4;
@@ -93,7 +96,7 @@ html, body, #cell-root, #root { height: 100%; margin: 0; }
93
96
  other element (one with overflow: hidden is a scroll container too) it stops the wheel from reaching
94
97
  the area under it, and nothing scrolls while the pointer is over a card or a code block. */
95
98
  html, body, .ta-scroll, .ta-chat-scroll, .ta-side-scroll, .ta-rail-items, .ta-side-view-body, .ta-editor-body,
96
- .ta-workbench-launcher, .ta-workbench-menu, .ta-settings-scroll, .ta-settings-toc, .ta-plus-items, .ta-pick-list, .ta-commands,
99
+ .ta-workbench-launcher, .ta-workbench-menu, .ta-settings-scroll, .ta-settings-toc, .ta-pick-list, .ta-commands,
97
100
  .ta-folder-list, .ta-auth-list { overscroll-behavior: none; }
98
101
  body { 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; }
99
102
  button, input, select, textarea { font: inherit; color: inherit; }
@@ -150,6 +153,29 @@ a { color: var(--ta-link); text-decoration: none; }
150
153
  .ta-callout-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); white-space: pre-wrap; overflow-wrap: anywhere; }
151
154
  .ta-empty .ta-callout { max-width: min(520px, 100%); }
152
155
  .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; }
156
+ /*
157
+ * Busy (components/busy.tsx): what waits on something slow says so only once it took a moment (--ta-busy-delay),
158
+ * so that what is quick does not flash, and takes no second click meanwhile. ta-busy a button or an icon
159
+ * 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
160
+ * taken away, which fades back; ta-spinner ta-later a spinner of its own; ta-switch ta-busy a switch, which
161
+ * moved at once, its knob turning.
162
+ */
163
+ .ta-busy, .ta-pending { --ta-busy-delay: 160ms; pointer-events: none; }
164
+ .ta-busy:not(.ta-switch) { animation: ta-busy-ink 0s var(--ta-busy-delay) forwards; }
165
+ .ta-button.ta-busy { position: relative; }
166
+ .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; }
167
+ .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); }
168
+ .ta-button-danger > .ta-busy-mark { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
169
+ .ta-pending { animation: ta-busy-dim 180ms var(--ta-busy-delay) forwards; }
170
+ .ta-opening { display: inline-flex; align-items: center; gap: 6px; animation: ta-busy-in 140ms 240ms both; }
171
+ .ta-spinner.ta-later { animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay, 160ms) both; }
172
+ .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; }
173
+ .ta-switch.ta-busy:checked::before { translate: 16px 0; border-top-color: var(--ta-green); }
174
+ @keyframes ta-busy-in { from { opacity: 0; } }
175
+ @keyframes ta-busy-ink { to { color: transparent; } }
176
+ @keyframes ta-busy-dim { to { opacity: 0.45; } }
177
+ /* A turn by rotate, which leaves transform and translate to what is turned. */
178
+ @keyframes ta-turn { to rotate: 360deg; }
153
179
  /* 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. */
154
180
  .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; }
155
181
  .ta-empty-title { color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; }