@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
@@ -25,9 +25,49 @@ const MEDIA_MAX_HEIGHT = 420;
25
25
  const MEDIA_MAX_WIDTH = 720;
26
26
  /** The box an image of a reply asks for. */
27
27
  const IMAGE_BOX = { width: ThumbnailUtil.side(MEDIA_MAX_WIDTH), height: ThumbnailUtil.side(MEDIA_MAX_HEIGHT) };
28
+ /** What could not load, told to load again: when the page may reach the computer again, or a tap on one asks. */
29
+ const again = new Set();
30
+ function askAgainShown() {
31
+ if (document.visibilityState === 'visible') {
32
+ askAgain();
33
+ }
34
+ }
35
+ /**
36
+ * Asks every picture that could not load to load again: one may not have come for a while (a phone whose network
37
+ * changed, the app in the background, the relay of the computer reconnecting), not be missing.
38
+ */
39
+ export function askAgain() {
40
+ for (const one of [...again]) {
41
+ one();
42
+ }
43
+ }
44
+ /** Counts the times what could not load is asked again, while `waiting`: a dependency of what asks for it. */
45
+ function useAgain(waiting) {
46
+ const [count, setCount] = React.useState(0);
47
+ React.useEffect(() => {
48
+ if (!waiting) {
49
+ return;
50
+ }
51
+ const bump = () => setCount(n => n + 1);
52
+ if (!again.size) {
53
+ window.addEventListener('online', askAgain);
54
+ document.addEventListener('visibilitychange', askAgainShown);
55
+ }
56
+ again.add(bump);
57
+ return () => {
58
+ again.delete(bump);
59
+ if (!again.size) {
60
+ window.removeEventListener('online', askAgain);
61
+ document.removeEventListener('visibilitychange', askAgainShown);
62
+ }
63
+ };
64
+ }, [waiting]);
65
+ return count;
66
+ }
28
67
  /**
29
68
  * The URL of a target: as it is, or for a path, the URL of the file, smaller in `box`; null when it cannot show,
30
- * undefined while it is asked (and for no target).
69
+ * undefined while it is asked (and for no target). With it, what to call when what it gave did not load (an image
70
+ * that failed): it is null then, and asked again with the others that could not load (askAgain).
31
71
  */
32
72
  export function useMediaUrl(src, box) {
33
73
  const fileUrl = React.useContext(FileUrls);
@@ -36,6 +76,8 @@ export function useMediaUrl(src, box) {
36
76
  // What it asked for with the URL: another target (a gallery enlarged goes through its pictures) is not shown the one before.
37
77
  const asked = `${path} ${width}x${height}${cover ? ' cover' : ''}`;
38
78
  const [found, setFound] = React.useState();
79
+ const count = useAgain(path !== undefined && (found === null || found === void 0 ? void 0 : found.asked) === asked && found.url === null);
80
+ // biome-ignore lint/correctness/useExhaustiveDependencies: count asks again what could not load
39
81
  React.useEffect(() => {
40
82
  if (path === undefined) {
41
83
  return;
@@ -49,11 +91,12 @@ export function useMediaUrl(src, box) {
49
91
  return () => {
50
92
  current = false;
51
93
  };
52
- }, [fileUrl, path, asked, width, height, cover]);
94
+ }, [fileUrl, path, asked, width, height, cover, count]);
95
+ const broke = React.useCallback(() => setFound(known => ((known === null || known === void 0 ? void 0 : known.asked) === asked ? { asked, url: null } : known)), [asked]);
53
96
  if (path === undefined) {
54
- return src;
97
+ return [src, broke];
55
98
  }
56
- return (found === null || found === void 0 ? void 0 : found.asked) === asked ? found.url : undefined;
99
+ return [(found === null || found === void 0 ? void 0 : found.asked) === asked ? found.url : undefined, broke];
57
100
  }
58
101
  /** The URL of the file itself of a target, not of a picture of it made smaller: what copying it takes. */
59
102
  export function useFullUrl() {
@@ -66,12 +109,14 @@ export function useFullUrl() {
66
109
  return fileUrl ? fileUrl(path) : Promise.reject(new Error(`Cannot load ${path}`));
67
110
  }, [fileUrl]);
68
111
  }
69
- /** The URLs of targets, as `useMediaUrl` gives each, all in one `box`: the tiles of a gallery. */
112
+ /** The URLs of targets, as `useMediaUrl` gives each, all in one `box`: the tiles of a gallery; and what to call for one that did not load. */
70
113
  export function useMediaUrls(sources, box) {
71
114
  const fileUrl = React.useContext(FileUrls);
72
115
  const key = sources.join('\n');
73
116
  const { width, height, cover } = box !== null && box !== void 0 ? box : {};
74
117
  const [urls, setUrls] = React.useState({});
118
+ const count = useAgain(sources.some(src => urls[src] === null));
119
+ // biome-ignore lint/correctness/useExhaustiveDependencies: count asks again what could not load
75
120
  React.useEffect(() => {
76
121
  let current = true;
77
122
  for (const src of key.split('\n')) {
@@ -83,13 +128,14 @@ export function useMediaUrls(sources, box) {
83
128
  setUrls(known => ({ ...known, [src]: null }));
84
129
  continue;
85
130
  }
86
- fileUrl(path, width && height ? { width, height, cover } : undefined).then(url => current && setUrls(known => ({ ...known, [src]: url })), () => current && setUrls(known => ({ ...known, [src]: null })));
131
+ fileUrl(path, width && height ? { width, height, cover } : undefined).then(url => current && setUrls(known => (known[src] === url ? known : { ...known, [src]: url })), () => current && setUrls(known => (known[src] === null ? known : { ...known, [src]: null })));
87
132
  }
88
133
  return () => {
89
134
  current = false;
90
135
  };
91
- }, [fileUrl, key, width, height, cover]);
92
- return sources.map(src => (MarkdownUtil.localPath(src) === undefined ? src : urls[src]));
136
+ }, [fileUrl, key, width, height, cover, count]);
137
+ const broke = React.useCallback((src) => setUrls(known => (known[src] === null ? known : { ...known, [src]: null })), []);
138
+ return [sources.map(src => (MarkdownUtil.localPath(src) === undefined ? src : urls[src])), broke];
93
139
  }
94
140
  /** An image, a video or a sound a reply shows: from the web, a data URL, or a file of the workspace. */
95
141
  export function MediaView({ src, alt }) {
@@ -97,21 +143,21 @@ export function MediaView({ src, alt }) {
97
143
  const t = useT();
98
144
  const kind = (_a = MarkdownUtil.media(src)) !== null && _a !== void 0 ? _a : 'image';
99
145
  // A picture of the workspace loads as large as it shows (ThumbnailUtil); enlarged, as it is.
100
- const url = useMediaUrl(src, kind === 'image' ? IMAGE_BOX : undefined);
101
- const [failedUrl, setFailedUrl] = React.useState();
146
+ const [url, broke] = useMediaUrl(src, kind === 'image' ? IMAGE_BOX : undefined);
102
147
  const [open, setOpen] = React.useState(false);
103
- const full = useMediaUrl(open && kind === 'image' ? src : undefined);
148
+ const [full] = useMediaUrl(open && kind === 'image' ? src : undefined);
104
149
  const [loaded, setLoaded] = React.useState(false);
105
150
  const fullUrl = useFullUrl();
106
151
  const [menu, openMenu] = useImageMenu();
107
152
  const known = shown.get(src);
108
- const failed = (!!url && url === failedUrl) || known === false;
153
+ // One that could not show before says so at once while it is asked again: it may only not have come then.
154
+ const failed = url === null || (url === undefined && known === false);
109
155
  const setFailed = () => {
110
156
  // A file of the workspace that is not there; one from the web may only be out of reach for now (offline).
111
157
  if (MarkdownUtil.localPath(src) !== undefined) {
112
158
  shown.set(src, false);
113
159
  }
114
- setFailedUrl(url !== null && url !== void 0 ? url : undefined);
160
+ broke();
115
161
  };
116
162
  const size = kind === 'image' && known ? known : undefined;
117
163
  // Of the size it had when known: its place does not change as it loads.
@@ -127,7 +173,7 @@ export function MediaView({ src, alt }) {
127
173
  }
128
174
  if (!url || failed) {
129
175
  const name = alt || src.split(/[?#]/)[0].split('/').pop() || src;
130
- return (React.createElement("span", { className: "ta-media-missing", title: src },
176
+ return (React.createElement("button", { type: "button", className: "ta-media-missing", title: `${src}\n${t('ta.markdown.retry')}`, onClick: askAgain },
131
177
  React.createElement(Icon, { icon: ImageOff, size: 14 }),
132
178
  t('ta.markdown.missing', { name })));
133
179
  }
@@ -4,8 +4,9 @@ import { CallGroup, CustomMessage, ExtensionBoundary, MessageRenderers, SessionA
4
4
  import { useT } from '../i18n/use-t.js';
5
5
  import { CodeAnswer } from '../markdown/code-renderers.js';
6
6
  import { CallTranscript } from '../util/call-transcript.js';
7
+ import { FreshRows } from '../util/fresh-rows.js';
7
8
  import { MessageUtil } from '../util/message.js';
8
- import { FreshRows, ProcessUtil } from '../util/process.js';
9
+ import { ProcessUtil } from '../util/process.js';
9
10
  import { ProgressUtil } from '../util/progress.js';
10
11
  import { Callout } from './callout.js';
11
12
  import { ContextLine } from './context-line.js';
@@ -59,12 +59,15 @@ const SaidStep = React.memo(function SaidStep({ message }) {
59
59
  React.createElement(MessageOrigin, { blocks: blocks })),
60
60
  React.createElement(UserSaid, { blocks: blocks, text: text, bubble: "ta-said-bubble", timestamp: message.timestamp })));
61
61
  });
62
- /** Where Ta restarted in the middle of the work and went on with it: one quiet line on the string of the steps. */
63
- function ResumedStep({ online }) {
62
+ /**
63
+ * Where the work went on after it was cut short (Ta restarted, the network came back, a part of Ta told it something,
64
+ * as that it moved to the cloud): one quiet line on the string of the steps.
65
+ */
66
+ function ResumedStep({ online, text }) {
64
67
  const t = useT();
65
- return (React.createElement("div", { className: "ta-step-resumed" },
68
+ return (React.createElement("div", { className: "ta-step-resumed", title: text },
66
69
  React.createElement("span", { className: "ta-status ta-status-thought" }),
67
- React.createElement("span", null, t(online ? 'ta.message.resumedOnline' : 'ta.message.resumed'))));
70
+ React.createElement("span", { className: "ta-step-resumed-text" }, text || t(online ? 'ta.message.resumedOnline' : 'ta.message.resumed'))));
68
71
  }
69
72
  const TextStep = React.memo(function TextStep({ text, streaming }) {
70
73
  return (React.createElement("div", { className: "ta-step-text" },
@@ -86,7 +89,7 @@ function Step({ step, results, tools, tagged, streaming, }) {
86
89
  case 'said':
87
90
  return React.createElement(SaidStep, { message: step.message });
88
91
  case 'resumed':
89
- return React.createElement(ResumedStep, { online: step.online });
92
+ return React.createElement(ResumedStep, { online: step.online, text: step.text });
90
93
  default:
91
94
  return React.createElement(ActView, { act: step, results: results, runs: tools });
92
95
  }
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import type { WebPeoplePickerProps, WebPerson } from '../extension/web-api-partners.js';
3
+ export declare namespace PeoplePickerUtil {
4
+ /** Those with every word of `query`, in any case, in their name, tag, line, heading or keywords. */
5
+ function filter(people: readonly WebPerson[], query: string): WebPerson[];
6
+ /** Under their headings, each heading once, in the order the first of it comes. */
7
+ function sections(people: readonly WebPerson[]): {
8
+ title?: string;
9
+ people: WebPerson[];
10
+ }[];
11
+ /** What is picked once `key` is tapped: in or out of several, in place of the one before alone. */
12
+ function toggle(value: readonly string[], key: string, single?: boolean): string[];
13
+ /** Whether a tap does nothing on it: it is fixed, or there are as many as may be and it is not one of them. */
14
+ function locked(person: WebPerson, value: readonly string[], max?: number): boolean;
15
+ }
16
+ /** The one way to pick people of Ta (WebPeoplePickerProps; web extensions `ui.PeoplePicker`). */
17
+ export declare function PeoplePicker({ people, value, onChange, single, max, disabled, placeholder, empty, emptyHint }: WebPeoplePickerProps): React.JSX.Element;
@@ -0,0 +1,129 @@
1
+ import { Check, Search } from 'lucide-react';
2
+ import * as React from 'react';
3
+ import { useT } from '../i18n/use-t.js';
4
+ import { EmptyState } from './empty-state.js';
5
+ import { Face, GroupFace } from './face.js';
6
+ import { Icon } from './icon.js';
7
+ import { Loading } from './loading.js';
8
+ import { SelectCheck } from './select-bar.js';
9
+ export var PeoplePickerUtil;
10
+ (function (PeoplePickerUtil) {
11
+ /** Those with every word of `query`, in any case, in their name, tag, line, heading or keywords. */
12
+ function filter(people, query) {
13
+ const words = query.toLowerCase().split(/\s+/).filter(Boolean);
14
+ if (!words.length) {
15
+ return [...people];
16
+ }
17
+ return people.filter(person => {
18
+ const text = [person.name, person.tag, person.detail, person.section, person.keywords].filter(Boolean).join(' ').toLowerCase();
19
+ return words.every(word => text.includes(word));
20
+ });
21
+ }
22
+ PeoplePickerUtil.filter = filter;
23
+ /** Under their headings, each heading once, in the order the first of it comes. */
24
+ function sections(people) {
25
+ const sections = [];
26
+ for (const person of people) {
27
+ const section = sections.find(each => each.title === person.section);
28
+ if (section) {
29
+ section.people.push(person);
30
+ }
31
+ else {
32
+ sections.push({ title: person.section, people: [person] });
33
+ }
34
+ }
35
+ return sections;
36
+ }
37
+ PeoplePickerUtil.sections = sections;
38
+ /** What is picked once `key` is tapped: in or out of several, in place of the one before alone. */
39
+ function toggle(value, key, single) {
40
+ if (single) {
41
+ return [key];
42
+ }
43
+ return value.includes(key) ? value.filter(each => each !== key) : [...value, key];
44
+ }
45
+ PeoplePickerUtil.toggle = toggle;
46
+ /** Whether a tap does nothing on it: it is fixed, or there are as many as may be and it is not one of them. */
47
+ function locked(person, value, max) {
48
+ return !!person.disabled || (max !== undefined && value.length >= max && !value.includes(person.key));
49
+ }
50
+ PeoplePickerUtil.locked = locked;
51
+ })(PeoplePickerUtil || (PeoplePickerUtil = {}));
52
+ /** How large a face is in a row, and among those picked in the box. */
53
+ const FACE = 36;
54
+ const CHIP = 28;
55
+ /**
56
+ * Its face as the lists draw it: its own picture (drawn at 36 px, scaled into a chip), the faces of a group chat, else
57
+ * that of its seed; whether it is online only in its row.
58
+ */
59
+ function PersonFace({ person, size = FACE }) {
60
+ var _a;
61
+ var _b;
62
+ if (person.avatar) {
63
+ return (React.createElement("span", { className: "ta-picker-face", style: { width: size, height: size }, "aria-hidden": "true" },
64
+ React.createElement("span", { style: size === FACE ? undefined : { transform: `scale(${size / FACE})` } }, person.avatar)));
65
+ }
66
+ if ((_a = person.members) === null || _a === void 0 ? void 0 : _a.length) {
67
+ return React.createElement(GroupFace, { members: person.members, size: size });
68
+ }
69
+ const online = size === FACE ? person.online : undefined;
70
+ return React.createElement(Face, { seed: (_b = person.seed) !== null && _b !== void 0 ? _b : person.key, face: person.face, look: person.look, double: person.double, online: online, size: size });
71
+ }
72
+ /** The one way to pick people of Ta (WebPeoplePickerProps; web extensions `ui.PeoplePicker`). */
73
+ export function PeoplePicker({ people, value, onChange, single, max, disabled, placeholder, empty, emptyHint }) {
74
+ const t = useT();
75
+ const [query, setQuery] = React.useState('');
76
+ if (!people) {
77
+ return React.createElement(Loading, { compact: true });
78
+ }
79
+ if (people.length === 0) {
80
+ return React.createElement(EmptyState, { compact: true, title: empty !== null && empty !== void 0 ? empty : t('ta.people.none'), hint: emptyHint });
81
+ }
82
+ const shown = PeoplePickerUtil.filter(people, query);
83
+ const picked = single ? [] : value.map(key => people.find(person => person.key === key)).filter(person => !!person);
84
+ const tap = (person) => {
85
+ if (!disabled && !PeoplePickerUtil.locked(person, value, max)) {
86
+ onChange(PeoplePickerUtil.toggle(value, person.key, single));
87
+ }
88
+ };
89
+ const label = placeholder !== null && placeholder !== void 0 ? placeholder : t('ta.people.search');
90
+ return (React.createElement("div", { className: "ta-picker" },
91
+ React.createElement("label", { className: "ta-picker-search" },
92
+ picked.length === 0 && React.createElement(Icon, { icon: Search, size: 14 }),
93
+ picked.map(person => (React.createElement("button", { key: person.key, type: "button", className: "ta-picker-chip", title: person.disabled ? person.name : t('ta.people.leaveOut', { name: person.name }), "aria-label": t('ta.people.leaveOut', { name: person.name }), disabled: disabled || person.disabled, onClick: event => {
94
+ event.preventDefault();
95
+ tap(person);
96
+ } },
97
+ React.createElement(PersonFace, { person: person, size: CHIP })))),
98
+ React.createElement("input", { value: query, placeholder: label, "aria-label": label, onChange: event => setQuery(event.target.value), onKeyDown: event => {
99
+ // The one found is taken by Enter, as a search of a messenger's picker.
100
+ if (event.key === 'Enter' && shown.length === 1) {
101
+ event.preventDefault();
102
+ tap(shown[0]);
103
+ setQuery('');
104
+ }
105
+ else if (event.key === 'Backspace' && !query && picked.length) {
106
+ const last = picked[picked.length - 1];
107
+ if (!last.disabled) {
108
+ tap(last);
109
+ }
110
+ }
111
+ } })),
112
+ React.createElement("div", { className: "ta-picker-list" },
113
+ shown.length === 0 && React.createElement(EmptyState, { compact: true, title: t('ta.people.noMatch') }),
114
+ PeoplePickerUtil.sections(shown).map(section => { var _a; return (React.createElement("div", { key: (_a = section.title) !== null && _a !== void 0 ? _a : '', className: "ta-picker-section" },
115
+ section.title && React.createElement("div", { className: "ta-picker-heading" }, section.title),
116
+ section.people.map(person => {
117
+ const on = value.includes(person.key);
118
+ return (React.createElement("button", { key: person.key, type: "button", "aria-pressed": on, className: "ta-picker-row", disabled: disabled || PeoplePickerUtil.locked(person, value, max), onClick: () => tap(person) },
119
+ !single && React.createElement(SelectCheck, { checked: on, disabled: PeoplePickerUtil.locked(person, value, max) && !on }),
120
+ React.createElement(PersonFace, { person: person }),
121
+ React.createElement("span", { className: "ta-picker-text" },
122
+ React.createElement("span", { className: "ta-picker-line" },
123
+ React.createElement("span", { className: "ta-picker-name" }, person.name),
124
+ person.tag && React.createElement("span", { className: "ta-picker-tag" }, person.tag)),
125
+ person.detail && React.createElement("span", { className: "ta-picker-detail" }, person.detail)),
126
+ single && on && React.createElement(Icon, { icon: Check, size: 16, className: "ta-picker-check" })));
127
+ }))); }))));
128
+ }
129
+ //# sourceMappingURL=people-picker.js.map
@@ -108,7 +108,7 @@ export function RelayDialog({ onClose }) {
108
108
  React.createElement(RelayPicture, null),
109
109
  React.createElement("p", null, t('ta.relay.hint')),
110
110
  React.createElement("div", { className: "ta-relay-form" },
111
- React.createElement("label", { className: "ta-field ta-field-small" },
111
+ React.createElement("label", { className: "ta-field" },
112
112
  React.createElement(Smartphone, { size: 15, strokeWidth: 1.75, "aria-hidden": "true" }),
113
113
  React.createElement("input", { placeholder: t('ta.relay.phone'), value: name, onChange: event => setName(event.target.value) })),
114
114
  React.createElement("button", { type: "button", className: busy ? 'ta-button ta-primary ta-busy' : 'ta-button ta-primary', "aria-busy": busy || undefined, disabled: !info, onClick: () => void pair() },
@@ -3,12 +3,13 @@ import { type LucideIcon } from 'lucide-react';
3
3
  import type { WebSettingsGroup } from '../extension/web-extension-api.js';
4
4
  import type { MessageId } from '../i18n/messages.js';
5
5
  import type { useT } from '../i18n/use-t.js';
6
- import { type DiagramStyle, type FontSize, type LanguageSetting, type ThemeSetting } from '../settings/settings-protocol.js';
6
+ import { type DiagramStyle, type FontSize, type LanguageSetting, type SkinGlass, type ThemeSetting } from '../settings/settings-protocol.js';
7
7
  import type { Navigation } from './nav-places.js';
8
8
  import { type Choice, type RowEntry } from './settings-controls.js';
9
9
  export declare const THEMES: Choice<ThemeSetting>[];
10
10
  export declare const FONT_SIZES: Choice<FontSize>[];
11
11
  export declare const DIAGRAM_STYLE_CHOICES: Choice<DiagramStyle>[];
12
+ export declare const GLASS_CHOICES: Choice<SkinGlass>[];
12
13
  export declare const LANGUAGES: Choice<LanguageSetting>[];
13
14
  /** The model has the icon of the + menu's model (ModelPicker), the others their own. */
14
15
  export declare const GROUP_ICONS: Record<string, LucideIcon>;
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import { WEB_ICONS } from '../extension/icons.js';
5
5
  import { WebLabelUtil } from '../extension/web-extension-protocol.js';
6
6
  import { useWebExtensions, useWorkbench } from '../hooks.js';
7
- import { DIAGRAM_STYLES } from '../settings/settings-protocol.js';
7
+ import { DIAGRAM_STYLES, SKIN_GLASSES, } from '../settings/settings-protocol.js';
8
8
  import { EmptyRow, Row, row, Switch } from './settings-controls.js';
9
9
  export const THEMES = [
10
10
  { value: 'system', icon: Monitor, label: 'ta.settings.theme.system' },
@@ -18,6 +18,7 @@ export const FONT_SIZES = [
18
18
  { value: 'xlarge', label: 'ta.settings.fontSize.xlarge' },
19
19
  ];
20
20
  export const DIAGRAM_STYLE_CHOICES = DIAGRAM_STYLES.map(value => ({ value, label: `ta.settings.diagramStyle.${value}` }));
21
+ export const GLASS_CHOICES = SKIN_GLASSES.map(value => ({ value, label: `ta.settings.glass.${value}` }));
21
22
  export const LANGUAGES = [
22
23
  { value: 'system', icon: Globe, label: 'ta.settings.language.system' },
23
24
  ...TaLanguageUtil.ALL.map(value => ({ value, label: TaLanguageUtil.NAMES[value] })),
@@ -2,16 +2,18 @@ import { TaDelegateUtil } from '@celljs/ta-protocol';
2
2
  import { Compass, Languages, Link2, List, Palette, Smile, Volume2, Wrench } from 'lucide-react';
3
3
  import * as React from 'react';
4
4
  import { useDevice } from '../device/device.js';
5
+ import { WebLabelUtil } from '../extension/web-extension-protocol.js';
5
6
  import { useSettings, useSettingsServer, useWebExtensions, useWorkbench } from '../hooks.js';
6
7
  import { useT } from '../i18n/use-t.js';
7
8
  import { AGENT_SETTINGS_GROUPS, AgentSettingsUtil } from '../settings/agent-settings.js';
8
- import { CHAT_ARCHIVE_CHOICES, CHAT_FOLD_CHOICES, MAX_TASKS_CHOICES } from '../settings/settings-protocol.js';
9
+ import { CHAT_ARCHIVE_CHOICES, CHAT_FOLD_CHOICES, MAX_TASKS_CHOICES, NO_SKIN } from '../settings/settings-protocol.js';
10
+ import { SkinUtil } from '../skin/skin-util.js';
9
11
  import { Voice } from '../util/voice.js';
10
12
  import { AgentControl, ScopeBar, useAgentSettings } from './agent-settings-view.js';
11
13
  import { useNavigation } from './app-nav.js';
12
14
  import { Loading } from './loading.js';
13
15
  import { SettingsModelPicker } from './model-picker.js';
14
- import { DIAGRAM_STYLE_CHOICES, FONT_SIZES, GROUP_ICONS, LANGUAGES, navigationRows, SETTINGS_GROUPS, THEMES } from './settings-choices.js';
16
+ import { DIAGRAM_STYLE_CHOICES, FONT_SIZES, GLASS_CHOICES, GROUP_ICONS, LANGUAGES, navigationRows, SETTINGS_GROUPS, THEMES } from './settings-choices.js';
15
17
  import { ChoiceRow, Row, row, Segmented, SettingsViewUtil, Switch } from './settings-controls.js';
16
18
  import { useMoreSections } from './settings-more.js';
17
19
  import { TrustedDomains } from './trusted-domains.js';
@@ -20,11 +22,13 @@ import { VoiceServices } from './voice-services.js';
20
22
  /** The sections of the page and of ta, by part, with their rows. */
21
23
  export function useParts(scope, onScope, onDialog) {
22
24
  var _a;
25
+ var _b;
23
26
  const t = useT();
24
27
  const [{ settings }, store] = useSettings();
25
28
  const settingsServer = useSettingsServer();
26
29
  const [workbench] = useWorkbench();
27
- const [{ cwd, views }] = useWebExtensions();
30
+ const [{ cwd, views, skins }] = useWebExtensions();
31
+ const skin = SkinUtil.pick(skins, settings.skin);
28
32
  const navigation = useNavigation(views);
29
33
  const agent = useAgentSettings(cwd !== null && cwd !== void 0 ? cwd : (_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd);
30
34
  const more = useMoreSections(onDialog);
@@ -37,6 +41,22 @@ export function useParts(scope, onScope, onDialog) {
37
41
  rows: [
38
42
  row('theme', [t('ta.settings.theme'), 'theme'], React.createElement(Row, { label: t('ta.settings.theme'), stacked: true },
39
43
  React.createElement(Segmented, { label: t('ta.settings.theme'), value: settings.theme, choices: THEMES, onChange: theme => store.update({ theme }) }))),
44
+ // The skins of the extensions installed, none without (docs/design/ta-skins.md); its glass while one shows.
45
+ ...(skins.length
46
+ ? [
47
+ row('skin', [t('ta.settings.skin'), t('ta.settings.skinHint'), 'skin', 'theme', ...skins.map(entry => WebLabelUtil.text(entry.skin.title))], React.createElement(Row, { label: t('ta.settings.skin'), description: t('ta.settings.skinHint'), stacked: true },
48
+ React.createElement(Segmented, { label: t('ta.settings.skin'), value: (_b = skin === null || skin === void 0 ? void 0 : skin.id) !== null && _b !== void 0 ? _b : NO_SKIN, choices: [
49
+ { value: NO_SKIN, label: 'ta.settings.skin.none' },
50
+ ...skins.map(entry => ({ value: entry.id, label: WebLabelUtil.text(entry.skin.title) })),
51
+ ], onChange: chosen => store.update({ skin: chosen }) }))),
52
+ ]
53
+ : []),
54
+ ...(skin
55
+ ? [
56
+ row('glass', [t('ta.settings.glass'), t('ta.settings.glassHint'), 'skin'], React.createElement(Row, { label: t('ta.settings.glass'), description: t('ta.settings.glassHint'), stacked: true },
57
+ React.createElement(Segmented, { label: t('ta.settings.glass'), value: settings.glass, choices: GLASS_CHOICES, onChange: glass => store.update({ glass }) }))),
58
+ ]
59
+ : []),
40
60
  row('font-size', [t('ta.settings.fontSize'), t('ta.settings.fontSizeHint'), 'font'], React.createElement(Row, { label: t('ta.settings.fontSize'), description: t('ta.settings.fontSizeHint'), stacked: true },
41
61
  React.createElement(Segmented, { label: t('ta.settings.fontSize'), value: settings.fontSize, choices: FONT_SIZES, onChange: fontSize => store.update({ fontSize }) }))),
42
62
  row('chat-font-size', [t('ta.settings.chatFontSize'), t('ta.settings.chatFontSizeHint'), 'font'], React.createElement(Row, { label: t('ta.settings.chatFontSize'), description: t('ta.settings.chatFontSizeHint'), stacked: true },
@@ -96,6 +116,8 @@ export function useParts(scope, onScope, onDialog) {
96
116
  // After the notices and who answers others, before what is kept.
97
117
  order: 30,
98
118
  rows: [
119
+ row('clipboard-links', [t('ta.settings.clipboardLinks'), t('ta.settings.clipboardLinksHint')], React.createElement(Row, { label: t('ta.settings.clipboardLinks'), description: t('ta.settings.clipboardLinksHint') },
120
+ React.createElement(Switch, { label: t('ta.settings.clipboardLinks'), checked: settings.clipboardLinks, onChange: clipboardLinks => store.update({ clipboardLinks }) }))),
99
121
  row('trusted-domains', [t('ta.settings.trustedDomains'), t('ta.settings.trustedDomainsHint'), ...settings.trustedDomains], React.createElement(TrustedDomains, null)),
100
122
  ],
101
123
  },
@@ -8,5 +8,5 @@ export declare function ShareDialog({ target, onClose }: {
8
8
  target: WebShareTarget;
9
9
  onClose(): void;
10
10
  }): React.JSX.Element;
11
- /** The share asked for by a web extension, over the page. */
12
- export declare function ShareHost(): React.JSX.Element | null;
11
+ /** The share asked for by a web extension, over the page: an extension handed on, or the share sheet of something. */
12
+ export declare function ShareHost(): React.JSX.Element;
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  import { useNotices, useWebExtensions, useWorkbench } from '../hooks.js';
4
4
  import { useT } from '../i18n/use-t.js';
5
5
  import { ShareLinkUtil } from '../util/share-link.js';
6
+ import { ShareItemSheet } from './share-item-sheet.js';
6
7
  import { ShareSheet } from './share-sheet.js';
7
8
  /** The link of an extension: of its source when it is published, else of the relay, made by this computer. */
8
9
  function useShared(target) {
@@ -37,12 +38,14 @@ export function ShareDialog({ target, onClose }) {
37
38
  const [shared, error] = useShared(target);
38
39
  const packageId = target.packageId;
39
40
  const days = (shared === null || shared === void 0 ? void 0 : shared.relayed) ? Math.max(1, Math.round((shared.expiresAt - Date.now()) / 86400000)) : 0;
40
- return (React.createElement(ShareSheet, { title: t('ta.share.title', { name: target.title }), link: shared === null || shared === void 0 ? void 0 : shared.link, error: error === undefined ? undefined : error || t('ta.share.cannot'), face: React.createElement(Package, { size: 22 }), name: target.title, gets: t('ta.share.extensionGets'), notes: [(shared === null || shared === void 0 ? void 0 : shared.relayed) ? t('ta.share.relayed', { days, size: Math.round(shared.maxBytes / 1024 / 1024) }) : t('ta.share.published')], onStop: (shared === null || shared === void 0 ? void 0 : shared.relayed) && packageId ? () => bench.relay.unsharePackage(packageId) : undefined, stop: { title: t('ta.share.stopTitle', { name: target.title }), message: t('ta.share.stopHint') }, onClose: onClose, notices: notices, rooms: bench.rooms }));
41
+ return (React.createElement(ShareSheet, { title: t('ta.share.title', { name: target.title }), link: shared === null || shared === void 0 ? void 0 : shared.link, error: error === undefined ? undefined : error || t('ta.share.cannot'), face: React.createElement(Package, { size: 22 }), name: target.title, gets: t('ta.share.extensionGets'), invite: t('ta.share.extensionInvite', { name: target.title }), notes: [(shared === null || shared === void 0 ? void 0 : shared.relayed) ? t('ta.share.relayed', { days, size: Math.round(shared.maxBytes / 1024 / 1024) }) : t('ta.share.published')], onStop: (shared === null || shared === void 0 ? void 0 : shared.relayed) && packageId ? () => bench.relay.unsharePackage(packageId) : undefined, stop: { title: t('ta.share.stopTitle', { name: target.title }), message: t('ta.share.stopHint') }, onClose: onClose, notices: notices, rooms: bench.rooms, onRoomEvent: listener => bench.onRoomEvent(listener, { messages: false }) }));
41
42
  }
42
- /** The share asked for by a web extension, over the page. */
43
+ /** The share asked for by a web extension, over the page: an extension handed on, or the share sheet of something. */
43
44
  export function ShareHost() {
44
45
  var _a, _b;
45
- const [{ sharing }, host] = useWebExtensions();
46
- return sharing ? React.createElement(ShareDialog, { key: (_b = (_a = sharing.packageId) !== null && _a !== void 0 ? _a : sharing.source) !== null && _b !== void 0 ? _b : sharing.title, target: sharing, onClose: () => host.share(undefined) }) : null;
46
+ const [{ sharing, sharingItem, shareWays }, host] = useWebExtensions();
47
+ return (React.createElement(React.Fragment, null,
48
+ sharing && React.createElement(ShareDialog, { key: (_b = (_a = sharing.packageId) !== null && _a !== void 0 ? _a : sharing.source) !== null && _b !== void 0 ? _b : sharing.title, target: sharing, onClose: () => host.share(undefined) }),
49
+ sharingItem && React.createElement(ShareItemSheet, { item: sharingItem, ways: shareWays, onClose: () => host.shareItem(undefined) })));
47
50
  }
48
51
  //# sourceMappingURL=share-dialog.js.map
@@ -1,8 +1,22 @@
1
- import type { TaFriend, TaRoomServer } from '@celljs/ta-protocol';
1
+ import type { TaFriend, TaFriendSent, TaRoomEvent, TaRoomServer } from '@celljs/ta-protocol';
2
2
  import * as React from 'react';
3
3
  import type { TaNotices } from '../notices/notices-protocol.js';
4
4
  /** The friends of this Ta, once read; undefined while read, or where they cannot be. */
5
5
  export declare function useShareFriends(rooms: TaRoomServer): TaFriend[] | undefined;
6
+ type Sent = TaFriendSent['to'][number];
7
+ /**
8
+ * The friends this link went to and how far it got with each (TaRoomServer.listFriendSends), read again as the rooms
9
+ * change and when `again` does: the furthest each got, the latest sent first. None from a Ta service of before.
10
+ */
11
+ export declare function useFriendSends(rooms: TaRoomServer, link: string | undefined, again: number, onRoomEvent?: (listener: (event: TaRoomEvent) => void) => () => void): Sent[];
12
+ export declare namespace FriendSendsUtil {
13
+ /** Each friend once, the furthest any of the sends got with them, in the order they were sent to. */
14
+ function merge(list: readonly TaFriendSent[]): Sent[];
15
+ }
16
+ /** Who the link went to, a line each with how far it got: so the user knows it arrived, and whether it was opened. */
17
+ export declare function FriendSends({ sent }: {
18
+ sent: readonly Sent[];
19
+ }): React.JSX.Element | null;
6
20
  /**
7
21
  * Send to Ta friends, in the share sheet: the friends to tick, then Send; the link goes sealed for each, into their
8
22
  * Ta, where it waits among the partners till opened (TaRoomServer.sendToFriends). What is sent is the link alone, and
@@ -14,5 +28,7 @@ export declare function ShareToFriends({ rooms, notices, friends, link, title, o
14
28
  friends: TaFriend[];
15
29
  link: string;
16
30
  title: string;
17
- onDone(): void;
31
+ /** Back to the sheet; `sent` once it went, where the sheet then says to whom and how far it got. */
32
+ onDone(sent?: boolean): void;
18
33
  }): React.JSX.Element;
34
+ export {};
@@ -1,7 +1,7 @@
1
- import { Check } from 'lucide-react';
2
1
  import * as React from 'react';
3
2
  import { useT } from '../i18n/use-t.js';
4
3
  import { Face } from './face.js';
4
+ import { PeoplePicker } from './people-picker.js';
5
5
  /** The friends of this Ta, once read; undefined while read, or where they cannot be. */
6
6
  export function useShareFriends(rooms) {
7
7
  const [friends, setFriends] = React.useState();
@@ -17,6 +17,64 @@ export function useShareFriends(rooms) {
17
17
  }, [rooms]);
18
18
  return friends;
19
19
  }
20
+ /**
21
+ * The friends this link went to and how far it got with each (TaRoomServer.listFriendSends), read again as the rooms
22
+ * change and when `again` does: the furthest each got, the latest sent first. None from a Ta service of before.
23
+ */
24
+ export function useFriendSends(rooms, link, again, onRoomEvent) {
25
+ const [sent, setSent] = React.useState([]);
26
+ const hear = React.useRef(onRoomEvent);
27
+ hear.current = onRoomEvent;
28
+ // biome-ignore lint/correctness/useExhaustiveDependencies: read again once the user sent it
29
+ React.useEffect(() => {
30
+ var _a;
31
+ if (!link) {
32
+ return;
33
+ }
34
+ let live = true;
35
+ const read = () => { var _a; return void Promise.resolve((_a = rooms.listFriendSends) === null || _a === void 0 ? void 0 : _a.call(rooms, link))
36
+ .then(list => live && list && setSent(FriendSendsUtil.merge(list)))
37
+ .catch(() => undefined); };
38
+ read();
39
+ const stop = (_a = hear.current) === null || _a === void 0 ? void 0 : _a.call(hear, event => event.type === 'rooms' && read());
40
+ return () => {
41
+ live = false;
42
+ stop === null || stop === void 0 ? void 0 : stop();
43
+ };
44
+ }, [rooms, link, again]);
45
+ return sent;
46
+ }
47
+ export var FriendSendsUtil;
48
+ (function (FriendSendsUtil) {
49
+ const RANK = { sent: 0, got: 1, opened: 2 };
50
+ /** Each friend once, the furthest any of the sends got with them, in the order they were sent to. */
51
+ function merge(list) {
52
+ const byFriend = new Map();
53
+ for (const one of list) {
54
+ for (const friend of one.to) {
55
+ const known = byFriend.get(friend.id);
56
+ if (!known || RANK[friend.state] > RANK[known.state]) {
57
+ byFriend.set(friend.id, { ...friend, ...(known && RANK[known.state] > RANK[friend.state] ? { state: known.state } : {}) });
58
+ }
59
+ }
60
+ }
61
+ return [...byFriend.values()];
62
+ }
63
+ FriendSendsUtil.merge = merge;
64
+ })(FriendSendsUtil || (FriendSendsUtil = {}));
65
+ /** Who the link went to, a line each with how far it got: so the user knows it arrived, and whether it was opened. */
66
+ export function FriendSends({ sent }) {
67
+ const t = useT();
68
+ if (!sent.length) {
69
+ return null;
70
+ }
71
+ return (React.createElement("div", { className: "ta-share-sent" },
72
+ React.createElement("span", { className: "ta-share-sent-title" }, t('ta.share.sentTitle')),
73
+ React.createElement("ul", null, sent.map(friend => (React.createElement("li", { key: friend.id },
74
+ React.createElement(Face, { seed: friend.id, look: friend.look, size: 24 }),
75
+ React.createElement("span", { className: "ta-share-sent-name" }, friend.name),
76
+ React.createElement("span", { className: `ta-share-sent-state ta-share-sent-${friend.state}` }, friend.state === 'opened' ? t('ta.share.opened') : friend.state === 'got' ? t('ta.share.got') : t('ta.share.sent'))))))));
77
+ }
20
78
  /**
21
79
  * Send to Ta friends, in the share sheet: the friends to tick, then Send; the link goes sealed for each, into their
22
80
  * Ta, where it waits among the partners till opened (TaRoomServer.sendToFriends). What is sent is the link alone, and
@@ -29,26 +87,19 @@ export function ShareToFriends({ rooms, notices, friends, link, title, onDone, }
29
87
  const send = async () => {
30
88
  setBusy(true);
31
89
  try {
32
- const n = await rooms.sendToFriends(chosen, { link, title });
33
- notices.notify(t('ta.share.sentTo', { n }), { level: 'success' });
34
- onDone();
90
+ await rooms.sendToFriends(chosen, { link, title });
91
+ onDone(true);
35
92
  }
36
93
  catch (reason) {
37
94
  notices.error(reason);
38
95
  setBusy(false);
39
96
  }
40
97
  };
98
+ const people = friends.map(friend => ({ key: friend.id, name: friend.name, seed: friend.id, look: friend.look, online: friend.online }));
41
99
  return (React.createElement("div", { className: "ta-share-friends" },
42
- React.createElement("ul", { className: "ta-share-friend-list" }, friends.map(friend => {
43
- const on = chosen.includes(friend.id);
44
- return (React.createElement("li", { key: friend.id },
45
- React.createElement("button", { type: "button", className: `ta-share-friend${on ? ' ta-on' : ''}`, "aria-pressed": on, onClick: () => setChosen(on ? chosen.filter(id => id !== friend.id) : [...chosen, friend.id]) },
46
- React.createElement(Face, { seed: friend.id, look: friend.look, size: 36, online: friend.online }),
47
- React.createElement("span", { className: "ta-share-friend-name" }, friend.name),
48
- React.createElement("span", { className: "ta-share-friend-check" }, on && React.createElement(Check, { size: 14 })))));
49
- })),
100
+ React.createElement(PeoplePicker, { people: people, value: chosen, onChange: setChosen, disabled: busy }),
50
101
  React.createElement("div", { className: "ta-share-friends-actions" },
51
- React.createElement("button", { type: "button", className: "ta-button", onClick: onDone }, t('ta.cancel')),
102
+ React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDone() }, t('ta.cancel')),
52
103
  React.createElement("button", { type: "button", className: `ta-button ta-primary${busy ? ' ta-busy' : ''}`, disabled: busy || chosen.length === 0, onClick: () => void send() },
53
104
  busy && React.createElement("span", { className: "ta-spinner ta-busy-mark" }),
54
105
  React.createElement("span", null, chosen.length ? t('ta.share.sendN', { n: chosen.length }) : t('ta.share.pickFriends'))))));