@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
@@ -100,9 +100,27 @@ export interface WebRoomAddon {
100
100
  }>;
101
101
  /** Without a page: what a tap on its tile or line does. */
102
102
  open?(room: TaRoomInfo): void;
103
- /** What `tile` and `line` give changed (the data they read came): the page reads them again. */
103
+ /**
104
+ * What was said elsewhere, which the user may carry into the room as one card of chat history, as a messenger forwards
105
+ * one (docs/design/ta-link.md 7.6): a group chat of this computer it was before, say. The room offers it above the
106
+ * chat until the user carries it in or lets it go, and keeps it in its +. None: nothing to carry.
107
+ */
108
+ history?(room: TaRoomInfo): WebRoomHistory | undefined;
109
+ /** What `tile`, `line` and `history` give changed (the data they read came): the page reads them again. */
104
110
  subscribe?(listener: () => void): () => void;
105
111
  }
112
+ /** What was said elsewhere, to carry into a room (WebRoomAddon.history). */
113
+ export interface WebRoomHistory {
114
+ /** Where it was said, as the offer names it: the name of the group chat of before. */
115
+ from: string;
116
+ /** What was said there, the earliest first, read when the user opens the offer: who, what (text only), when. */
117
+ lines(): Promise<WebRoomHistoryLine[]>;
118
+ }
119
+ export interface WebRoomHistoryLine {
120
+ name: string;
121
+ text: string;
122
+ at: number;
123
+ }
106
124
  /** What an extension adds to the rooms, as `ui.useRoomAddons` lists it. */
107
125
  export interface WebRoomAddonEntry {
108
126
  /** `<extension id>/<index>`. */
@@ -559,4 +577,15 @@ export interface WebOpenerOptions {
559
577
  * go out of Ta too (one scanned, opened with Cmd or Ctrl, pasted in Quick open), which the others are not.
560
578
  */
561
579
  specific?: boolean;
580
+ /**
581
+ * What a link of its own is, in a few words of the user's ("Invite to a group chat"), told without opening it;
582
+ * undefined for one it does not open. Ta names by it the links of Ta in what the user copied or pasted, and offers
583
+ * to open them (docs/design/ta-links.md 7): it is asked often, so it only reads the link.
584
+ */
585
+ describe?(link: {
586
+ type: 'url';
587
+ url: string;
588
+ }): string | undefined;
562
589
  }
590
+ /** WebOpenerOptions.describe, of an extension that runs. */
591
+ export type WebLinkDescriber = (url: string) => string | undefined;
@@ -15,7 +15,8 @@ export interface WebDeviceUI {
15
15
  readonly saveFile?: (file: Blob, name: string) => Promise<WebFileSaved>;
16
16
  /**
17
17
  * Pages installed as apps of the computer, each with a window, a name and an icon of its own (Launchpad, the Dock, the
18
- * Start menu): in Ta Desktop only, `pi.ui.apps?.…`. An extension installs, opens and removes only pages of its own.
18
+ * Start menu): in Ta Desktop only, `pi.ui.apps?.…`. In a sandbox an extension installs, opens, removes and lists only
19
+ * pages of its own (SANDBOX_GUARDS); once it stopped, none.
19
20
  */
20
21
  readonly apps?: WebApps;
21
22
  }
@@ -0,0 +1,38 @@
1
+ /** Part of the web extension API (web-extension-api.ts, which exports it all): how files of a kind look, drawn by an extension. */
2
+ import type * as React from 'react';
3
+ /** A file the page holds, its bytes all here (one sent in a chat), as a view of its kind draws it (WebFileView). */
4
+ export interface WebFileViewProps {
5
+ name: string;
6
+ /** Its media type as it came; may be empty. */
7
+ type: string;
8
+ bytes: Uint8Array;
9
+ }
10
+ /**
11
+ * How files of a kind look in Ta (registerFileView): a Word, PowerPoint or Excel file drawn as it reads where the page
12
+ * holding it (a file of a chat) would only save it. The page draws it where it shows the file (a tab of the workbench, a
13
+ * page over the chat), with what is done with it (Save) around it.
14
+ */
15
+ export interface WebFileView {
16
+ /** Whether it draws the file, by its name and type: read at once, as the file is opened. */
17
+ accepts(file: {
18
+ name: string;
19
+ type: string;
20
+ }): boolean;
21
+ render: React.ComponentType<WebFileViewProps>;
22
+ }
23
+ /** What a web extension registers of files (WebExtensionAPI extends it). */
24
+ export interface WebFileViews {
25
+ /**
26
+ * How files of a kind look, where a page holds one it would otherwise only save: a file sent in a chat
27
+ * (`ui.fileView`). The first whose `accepts` takes a file draws it. Newer than some Ta apps: `pi.registerFileView?.(…)`.
28
+ */
29
+ registerFileView(view: WebFileView): void;
30
+ }
31
+ /** What `ui` tells of them (WebExtensionUI extends it). */
32
+ export interface WebFileViewsUI {
33
+ /** How a file the page holds looks, as an extension draws its kind (registerFileView); undefined for none. Newer than some Ta apps. */
34
+ fileView?(file: {
35
+ name: string;
36
+ type: string;
37
+ }): React.ComponentType<WebFileViewProps> | undefined;
38
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=web-api-file-views.js.map
@@ -0,0 +1,47 @@
1
+ /** Part of the web extension API (web-extension-api.ts, which exports it all): what the server side of the package answers, as it changes. */
2
+ /** What a method of the package's host answers, as `ui.useHost` reads it: the same object until it changes. */
3
+ export interface WebHostValue<T> {
4
+ /** Its answer, the last one while it is read again; undefined until the first comes. */
5
+ readonly value?: T;
6
+ /** Why the last read failed; the value before stays. */
7
+ readonly error?: string;
8
+ /** Not answered yet. */
9
+ readonly loading: boolean;
10
+ /** Reads it again now (after the page changed something itself). */
11
+ read(): Promise<void>;
12
+ }
13
+ export interface WebHostOptions {
14
+ /**
15
+ * What the host says it changed (`TaExtensionHost.changed(topic)`) to read it again: the name of the method unless
16
+ * given.
17
+ */
18
+ topics?: readonly string[];
19
+ /**
20
+ * Read again this often too (ms), while the page shows: only for what the host cannot tell (a service elsewhere),
21
+ * never to know what it can.
22
+ */
23
+ every?: number;
24
+ }
25
+ export interface WebHostUI {
26
+ /**
27
+ * A React hook: what a method of the package's host (`pi.host`, as `callHost`) answers, read as the component shows
28
+ * and again as soon as the host says it changed (`TaExtensionHost.changed`), as the connection comes back, and as
29
+ * the page shows again after it changed while hidden; never on a timer of the extension's own. Components that read
30
+ * the same method with the same params share one read, and an answer equal to the last renders nothing. Newer than
31
+ * some Ta apps: `pi.ui.useHost?.(…)`.
32
+ */
33
+ useHost<T = unknown>(method: string, params?: readonly unknown[], options?: WebHostOptions): WebHostValue<T>;
34
+ }
35
+ export interface WebHostAPI {
36
+ /**
37
+ * Calls a method of the server side of the extension's package (`pi.host` of its package.json, which
38
+ * ta serve runs for the packages that come with Ta), with JSON values: what the page cannot do itself.
39
+ */
40
+ callHost<T = unknown>(method: string, ...params: unknown[]): Promise<T>;
41
+ /**
42
+ * What the package's host says changed (`TaExtensionHost.changed`), once the page called one of its methods: for a
43
+ * store of the extension's own that `ui.useHost` does not fit. Stops when the extension unloads. Newer than some Ta
44
+ * apps: `pi.onHostChanged?.(…)`.
45
+ */
46
+ onHostChanged(listener: (topics: string[]) => void): () => void;
47
+ }
@@ -0,0 +1,3 @@
1
+ /** Part of the web extension API (web-extension-api.ts, which exports it all): what the server side of the package answers, as it changes. */
2
+ export {};
3
+ //# sourceMappingURL=web-api-host.js.map
@@ -1,6 +1,7 @@
1
1
  /** Part of the web extension API (web-extension-api.ts, which exports it all): the entries extensions add to menus of the page. */
2
2
  import type { TaWorkPoint } from '@celljs/ta-protocol';
3
3
  import type { WebMenuItem } from './web-api-contributions.js';
4
+ import type { WebIcon } from './web-extension-api.js';
4
5
  /** A conversation as a list shows it: an open one has its session, one kept on the disk its file only. */
5
6
  export interface WebSessionRef {
6
7
  sessionId?: string;
@@ -42,6 +43,45 @@ export interface WebCodeRef {
42
43
  }
43
44
  /** The actions an extension adds to a block of code (registerCodeMenu); none for some. */
44
45
  export type WebCodeMenu = (block: WebCodeRef) => WebMenuItem[];
46
+ /**
47
+ * Something the user shares (docs/design/ta-links.md 4.2): a block a renderer drew (a work: a game, a plot, a card…),
48
+ * or a file of a workspace. Its one Share opens the share sheet, which lists the ways that take it (registerShareWay).
49
+ */
50
+ export type WebShareItem = {
51
+ kind: 'block';
52
+ /** As the fence names it, in lower case. */
53
+ language: string;
54
+ code: string;
55
+ /** The file of the conversation it is in, when it is drawn in one. */
56
+ conversation?: string;
57
+ } | {
58
+ kind: 'file';
59
+ file: WebFileRef;
60
+ };
61
+ /**
62
+ * A way to share (registerShareWay): a tile of the share sheet, for what it takes. Send to friends and group chats,
63
+ * Post to Moments, a link: each package gives its own, and Share is one entry wherever something is shared.
64
+ */
65
+ export interface WebShareWay {
66
+ key: string;
67
+ /** A few words under its icon. */
68
+ label: string | (() => string);
69
+ icon: WebIcon;
70
+ /** Its place among the tiles, the lowest first; default 100. */
71
+ order?: number;
72
+ /** Whether it takes the item; read as the sheet opens. */
73
+ accepts(item: WebShareItem): boolean;
74
+ /** The user picked it: the sheet has closed, the way shows what it needs (who to send to, the words of a post). */
75
+ share(item: WebShareItem): void | Promise<void>;
76
+ }
77
+ /** What `ui` shares with (WebExtensionUI extends it). */
78
+ export interface WebShareUI {
79
+ /**
80
+ * The share sheet of something (WebShareItem): its tiles are the ways that take it (registerShareWay), as the one
81
+ * Share under a block and in the menu of a file opens it. Newer than some Ta apps: `pi.ui.share?.(…)`.
82
+ */
83
+ share(item: WebShareItem): void;
84
+ }
45
85
  /** What a web extension adds to the menus of the page (WebExtensionAPI extends it). */
46
86
  export interface WebMenus {
47
87
  /**
@@ -63,4 +103,10 @@ export interface WebMenus {
63
103
  * Newer than some Ta apps: `pi.registerCodeMenu?.(…)`.
64
104
  */
65
105
  registerCodeMenu(menu: WebCodeMenu): void;
106
+ /**
107
+ * A way to share things (WebShareWay): a tile of the share sheet the page opens from the one Share under a block a
108
+ * renderer drew and in the menu of a file, or from `ui.share`; Share shows where a way takes the item. Never a
109
+ * Share or a dialog of its own beside it. Newer than some Ta apps: `pi.registerShareWay?.(…)`.
110
+ */
111
+ registerShareWay(way: WebShareWay): void;
66
112
  }
@@ -1,4 +1,5 @@
1
1
  import type * as React from 'react';
2
+ import type { WebGroupFaceProps } from './web-api-components.js';
2
3
  import type { WebMenuItem } from './web-api-contributions.js';
3
4
  import type { WebIcon } from './web-extension-api.js';
4
5
  /**
@@ -37,6 +38,8 @@ export interface WebPartner {
37
38
  label?: string;
38
39
  /** Where it works (an agent's directory): a remote one is marked by its host. */
39
40
  location?: string;
41
+ /** The room of its chat when that is not its id (a friend's chat of two), so that the room's id opens it too (WebPartnersUI.openPartner). */
42
+ room?: string;
40
43
  /** Opens its conversation (or, while not a partner yet, what to answer). A promise keeps the row busy. */
41
44
  open(): unknown;
42
45
  /**
@@ -103,6 +106,55 @@ export interface WebPartnersAPI {
103
106
  */
104
107
  registerPartners(source: WebPartnerSource): void;
105
108
  }
109
+ /**
110
+ * One to pick in `ui.PeoplePicker`: a friend, an agent, a group chat. Drawn by its face (`seed`, `face`, `look`,
111
+ * `double`, `online` as `ui.Face`; `members` as `ui.GroupFace` for a group chat; `avatar` drawn as it is, 36 px,
112
+ * over both), its name, a small tag after it (`tag`: what it is, as 好友 or 群聊) and a quieter line (`detail`).
113
+ */
114
+ export interface WebPerson {
115
+ /** Its id among those of the picker: what `value` holds once it is picked. */
116
+ key: string;
117
+ name: string;
118
+ /** The heading it is listed under (Friends, Group chats); in the order the first of each comes. */
119
+ section?: string;
120
+ tag?: string;
121
+ detail?: string;
122
+ /** More words a search finds it by (a role, a name it had). */
123
+ keywords?: string;
124
+ seed?: string;
125
+ face?: number;
126
+ look?: string;
127
+ double?: boolean;
128
+ online?: boolean;
129
+ members?: WebGroupFaceProps['members'];
130
+ avatar?: React.ReactNode;
131
+ /** Cannot be picked or left out: one picked already stays so (the friend of the chat it starts from), another greys. */
132
+ disabled?: boolean;
133
+ }
134
+ /**
135
+ * The one way to pick people (`ui.PeoplePicker`): to send to, to share with, to invite, to start a group chat with.
136
+ * A box to search on top (the ones picked shown in it, a tap leaves one out), then every one a row of its face and its
137
+ * name, under their headings; several are picked with the round mark at the start of each, one (`single`) with a
138
+ * check on the right. What to do with them stays the caller's (a button under it).
139
+ */
140
+ export interface WebPeoplePickerProps {
141
+ /** Those to pick from; undefined while they are read. */
142
+ people: readonly WebPerson[] | undefined;
143
+ /** The keys picked. */
144
+ value: readonly string[];
145
+ onChange(value: string[]): void;
146
+ /** One at a time: a tap picks it in place of the one before. */
147
+ single?: boolean;
148
+ /** At most so many: the others grey once there are. */
149
+ max?: number;
150
+ /** Nothing to pick while it is busy. */
151
+ disabled?: boolean;
152
+ /** What the box says: default 搜索. */
153
+ placeholder?: string;
154
+ /** What it says when there is nobody to pick, and how to get some. */
155
+ empty?: string;
156
+ emptyHint?: string;
157
+ }
106
158
  /** What the page offers of the partners (WebExtensionUI). */
107
159
  export interface WebPartnersUI {
108
160
  /**
@@ -112,11 +164,16 @@ export interface WebPartnersUI {
112
164
  */
113
165
  startGroup(partner?: string): void;
114
166
  /**
115
- * Opens a partner of any extension by its id (a group chat's: its room id), as its row does: false when there is none
167
+ * Opens a partner of any extension by its id (a group chat's: its room id; a friend's chat of two: its room id too, WebPartner.room), as its row does: false when there is none
116
168
  * (its extension not loaded). For an extension that works in a group chat it did not make (a class's). Newer than some
117
169
  * Ta apps: `pi.ui.openPartner?.(…)`.
118
170
  */
119
171
  openPartner(id: string, kind?: WebPartnerKind): Promise<boolean>;
172
+ /**
173
+ * Picks people as every picker of Ta does (WebPeoplePickerProps): never a `<select>` or checkboxes of one's own.
174
+ * Newer than some Ta apps: `pi.ui.PeoplePicker` may be missing.
175
+ */
176
+ readonly PeoplePicker: React.ComponentType<WebPeoplePickerProps>;
120
177
  }
121
178
  /** A partner as the page lists it. */
122
179
  export interface WebPartnerEntry extends WebPartner {
@@ -0,0 +1,95 @@
1
+ import type * as React from 'react';
2
+ import type { SkinGlass } from '../settings/settings-protocol.js';
3
+ import type { WebLabel } from './web-api-contributions.js';
4
+ /** Light glass with dark words, or dark glass with light words. */
5
+ export type WebSkinTone = 'light' | 'dark';
6
+ /** How much of the picture the columns of Ta let through: clear, soft (the default), or focus, nearly solid (Settings → Appearance). */
7
+ export type WebSkinGlass = SkinGlass;
8
+ /**
9
+ * The colours of a tone of a skin, each a CSS colour without alpha; Ta makes every surface, word and line of its
10
+ * columns from them (docs/design/ta-skins.md 3). Any it leaves out is Ta's own.
11
+ */
12
+ export interface WebSkinColors {
13
+ /** What the picture shows before it draws (it loads, it starts again), under it, and the window's own colour. */
14
+ base: string;
15
+ /** The glass of the columns, made more or less clear by the user's choice (WebSkinGlass). */
16
+ glass?: string;
17
+ /** Words: titles in it, the body and the quieter lines mixed toward the glass. */
18
+ ink?: string;
19
+ /** What stands out: the brand buttons, links, what is chosen. */
20
+ accent?: string;
21
+ }
22
+ /** A rectangle of the window, in CSS pixels. */
23
+ export interface WebSkinRect {
24
+ left: number;
25
+ top: number;
26
+ right: number;
27
+ bottom: number;
28
+ }
29
+ /** Where the picture is under Ta now (WebSkinBackdropProps.areas). */
30
+ export interface WebSkinAreas {
31
+ /** Where words are read (the conversation, the message box, the settings): the picture is calmest behind them. */
32
+ read: WebSkinRect[];
33
+ /** Where columns cover it (the list of chats, the workbench, the navigation): what matters is not put there. */
34
+ cover: WebSkinRect[];
35
+ }
36
+ /** What a backdrop is given: it draws the whole window, behind every column of Ta, and never takes the pointer. */
37
+ export interface WebSkinBackdropProps {
38
+ /** The tone Ta shows in now. */
39
+ tone: WebSkinTone;
40
+ /** How clear the user wants the glass. */
41
+ glass: WebSkinGlass;
42
+ /**
43
+ * Sets the tone of Ta while the skin shows (its night, its day), as a theme of the settings would; undefined gives
44
+ * it back to `WebSkin.tone`, else the user's theme. Ta switches once, not to and fro: tell it a new tone only past a margin.
45
+ */
46
+ setTone(tone: WebSkinTone | undefined): void;
47
+ /** Where words are read and where columns cover the picture, now: read it each frame, it costs little. */
48
+ areas(): WebSkinAreas;
49
+ /** It has drawn its first frame: Ta fades it in over its picture (`keep`) and lets the one before go. */
50
+ ready(): void;
51
+ /**
52
+ * A small picture of how it looks now (a `data:` URL of a JPEG some 480 pixels wide): kept on this device, shown
53
+ * under it the next time while it loads, or while it starts again, so that the window never shows blank.
54
+ */
55
+ keep(picture: string): void;
56
+ }
57
+ /**
58
+ * A look of Ta: a picture behind it, which its columns show through as glass (`registerSkin`). The user picks it
59
+ * in Settings → Appearance, as the theme; Ta draws the glass, the words, the title bar and the window in its colours,
60
+ * so a skin is its picture and a few colours, never styles of Ta's own classes.
61
+ */
62
+ export interface WebSkin {
63
+ /** Unique among the skins of the extension. */
64
+ id: string;
65
+ title: WebLabel;
66
+ /** Drawn behind Ta, the size of the window: a picture, a 3D world (`ui.Game3D`), anything. */
67
+ backdrop: React.ComponentType<WebSkinBackdropProps>;
68
+ /** Its colours in each tone. */
69
+ colors: {
70
+ light: WebSkinColors;
71
+ dark: WebSkinColors;
72
+ };
73
+ /** Its tone while its backdrop sets none; default the user's theme. */
74
+ tone?: WebSkinTone;
75
+ /**
76
+ * Its backdrop softens itself behind the columns and the words (`areas`), as a 3D world does in its last pass: the
77
+ * page does not blur it again, which would cost a blur of the window at each of its frames. Without, the page blurs
78
+ * what is behind its columns, which a still picture costs nothing.
79
+ */
80
+ softens?: boolean;
81
+ }
82
+ export interface WebSkinsAPI {
83
+ /**
84
+ * A look of Ta: a picture behind it and the colours of its glass (docs/design/ta-skins.md), which the user picks in
85
+ * Settings → Appearance. Newer than some Ta apps: `pi.registerSkin?.(…)`.
86
+ */
87
+ registerSkin(skin: WebSkin): void;
88
+ }
89
+ /** A skin of an extension, as Ta lists them. */
90
+ export interface WebSkinEntry {
91
+ /** `<package name>/<skin id>`: what the settings keep, the same on every device. */
92
+ id: string;
93
+ extension: string;
94
+ skin: WebSkin;
95
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=web-api-skins.js.map
@@ -85,6 +85,7 @@ export const WEB_UI_SPEC = {
85
85
  SwipeRow: component(B),
86
86
  SelectCheck: component(B),
87
87
  SelectBar: component(B),
88
+ PeoplePicker: component(B),
88
89
  TaskIcon: component(B),
89
90
  Picture: component(B),
90
91
  PictureCards: component(B),
@@ -103,6 +104,7 @@ export const WEB_UI_SPEC = {
103
104
  scan: call(A),
104
105
  saveFile: call(A),
105
106
  shareExtension: fire(A),
107
+ share: fire(B),
106
108
  stopExtension: fire(A),
107
109
  forgetPage: fire(A),
108
110
  useView: hook(A),
@@ -124,12 +126,14 @@ export const WEB_UI_SPEC = {
124
126
  // The computer, the conversations, the people, the other extensions.
125
127
  useRoomAddons: page,
126
128
  fileMenu: page,
129
+ fileView: page,
127
130
  pinChat: page,
128
131
  desktop: page,
129
132
  debugWebview: page,
130
133
  useCwd: page,
131
134
  useSessionId: page,
132
135
  useSessions: page,
136
+ useHost: page,
133
137
  useSavedSessions: page,
134
138
  useAsks: page,
135
139
  answer: page,
@@ -177,17 +181,22 @@ export const WEB_API_SPEC = {
177
181
  registerToolRenderer: page,
178
182
  registerComposerAddon: page,
179
183
  registerRoomAddon: page,
184
+ // Its backdrop is drawn behind the page, given functions: only in the page.
185
+ registerSkin: page,
180
186
  registerOpener: page,
181
187
  registerSearch: page,
182
188
  registerPartners: page,
183
189
  registerSessionMenu: page,
184
190
  registerFileMenu: page,
191
+ registerFileView: page,
185
192
  registerCodeMenu: page,
193
+ registerShareWay: page,
186
194
  on: page,
187
195
  sendUserMessage: page,
188
196
  switchSession: page,
189
197
  openChat: page,
190
198
  callHost: page,
199
+ onHostChanged: page,
191
200
  openTemporary: page,
192
201
  onRoomEvent: page,
193
202
  onTerminalData: page,
@@ -6,14 +6,17 @@ import type { ScreenPartSpec, TaScreen } from '../screen/screen-protocol.js';
6
6
  import type { Language, Theme } from '../settings/settings-protocol.js';
7
7
  import type { WebCodeRendererOptions, WebCodeRendererProps } from './web-api-code.js';
8
8
  import type { CodeEditorProps, DiffEditorProps, WebAvatarProps, WebChatImagesProps, WebComposerProps, WebConversationViewProps, WebDialogProps, WebEmptyProps, WebFaceProps, WebFolderPickerProps, WebFullScreenProps, WebGroupFaceProps, WebHoldToTalkProps, WebImageViewerProps, WebLoadingProps, WebModelPickerProps, WebPictureCardsProps, WebPictureProps, WebSelectBarProps, WebSelectCheckProps, WebShareSheetProps, WebStackProps, WebSwipeRowProps, WebSwitchProps, WebTaskIconProps, WebVoice } from './web-api-components.js';
9
- import type { WebAsk, WebCallsAPI, WebChatIconSource, WebChatTagsAPI, WebComposerAddon, WebCustomMessage, WebHomeSource, WebInitiative, WebMenuItem, WebOpener, WebOpenerOptions, WebRoomAddon, WebRoomAddonEntry, WebSearchSource, WebSessionNotice, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions.js';
9
+ import type { WebAsk, WebCallsAPI, WebChatIconSource, WebChatTagsAPI, WebComposerAddon, WebCustomMessage, WebHomeSource, WebInitiative, WebMenuItem, WebNotifyOptions, WebOpener, WebOpenerOptions, WebRoomAddon, WebRoomAddonEntry, WebSearchSource, WebSessionNotice, WebSessionOpening, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions.js';
10
10
  import type { WebDesktop, WebDeviceUI, WebFileDrag } from './web-api-desktop.js';
11
11
  import type { WebEditorsUI } from './web-api-editors.js';
12
+ import type { WebFileViews, WebFileViewsUI } from './web-api-file-views.js';
12
13
  import type { WebHomeUI, WebPartnersAPI, WebPartnersUI } from './web-api-home.js';
14
+ import type { WebHostAPI, WebHostUI } from './web-api-host.js';
13
15
  import type { WebHosts } from './web-api-hosts.js';
14
- import type { WebFileRef, WebMenus } from './web-api-menus.js';
16
+ import type { WebFileRef, WebMenus, WebShareUI } from './web-api-menus.js';
15
17
  import type { WebPlayUI } from './web-api-play.js';
16
18
  import type { WebServices } from './web-api-services.js';
19
+ import type { WebSkinsAPI } from './web-api-skins.js';
17
20
  import type { WebPackageStorage } from './web-api-storage.js';
18
21
  import type { WebTargetsAPI } from './web-api-targets.js';
19
22
  import type { WebTerminal, WebTerminalOptions } from './web-api-terminal.js';
@@ -23,17 +26,21 @@ export type { DeviceLayout, DeviceState } from '../device/device-protocol.js';
23
26
  export type { TaFileBytes, TaFiles } from '../files/files-protocol.js';
24
27
  export type { GameColors, GameConfig, GameEngine, GameInstance, GamePage, GamePoint, GameProps, GameState } from '../game/game-protocol.js';
25
28
  export type { Game3DContext, Game3DEngine, Game3DLoop, Game3DProps } from '../game/game3d-protocol.js';
29
+ export type { ScreenAction, ScreenItem, ScreenPartSpec, ScreenPartView, ScreenPlace, ScreenScrollable, ScreenScrollTo } from '../screen/screen-protocol.js';
26
30
  export type { Language, Theme } from '../settings/settings-protocol.js';
27
31
  export type * from './web-api-code.js';
28
32
  export type * from './web-api-components.js';
29
33
  export type * from './web-api-contributions.js';
30
34
  export type * from './web-api-desktop.js';
31
35
  export type * from './web-api-editors.js';
36
+ export type * from './web-api-file-views.js';
32
37
  export type * from './web-api-home.js';
38
+ export type * from './web-api-host.js';
33
39
  export type * from './web-api-hosts.js';
34
40
  export type * from './web-api-menus.js';
35
41
  export type * from './web-api-play.js';
36
42
  export type * from './web-api-services.js';
43
+ export type * from './web-api-skins.js';
37
44
  export type * from './web-api-storage.js';
38
45
  export type * from './web-api-targets.js';
39
46
  export type * from './web-api-terminal.js';
@@ -42,7 +49,7 @@ export type { WebPageInfo, WebPageState } from './web-pages.js';
42
49
  * What a web extension gets: the web client's side of pi's extension API, its names where they mean the same. A web
43
50
  * extension is one ES module without imports, the `web` part of a pi package (TaWebExtensionInfo): a {@link WebExtensionFactory}.
44
51
  */
45
- export interface WebExtensionAPI extends WebServices, WebPartnersAPI, WebMenus, WebCallsAPI, WebChatTagsAPI, WebTargetsAPI {
52
+ export interface WebExtensionAPI extends WebServices, WebPartnersAPI, WebMenus, WebFileViews, WebCallsAPI, WebChatTagsAPI, WebTargetsAPI, WebHostAPI, WebSkinsAPI {
46
53
  /** The React of the page: an extension brings no React of its own. */
47
54
  readonly React: typeof React;
48
55
  readonly ui: WebExtensionUI;
@@ -140,11 +147,6 @@ export interface WebExtensionAPI extends WebServices, WebPartnersAPI, WebMenus,
140
147
  openLink(url: string, options?: {
141
148
  onlyTa?: boolean;
142
149
  }): Promise<boolean>;
143
- /**
144
- * Calls a method of the server side of the extension's package (`pi.host` of its package.json, which
145
- * ta serve runs for the packages that come with Ta), with JSON values: what the page cannot do itself.
146
- */
147
- callHost<T = unknown>(method: string, ...params: unknown[]): Promise<T>;
148
150
  /**
149
151
  * Loads the web extensions again, and the pi extensions of the conversation shown, as when a reply that
150
152
  * changed a package ends: after the extension installed, imported or removed a package itself.
@@ -179,38 +181,14 @@ export interface WebExtensionAPI extends WebServices, WebPartnersAPI, WebMenus,
179
181
  /** Output of the terminals this page opened (terminals.openTerminal); with `exitCode`, the terminal ended. Stops when the extension unloads. */
180
182
  onTerminalData(listener: (terminalId: string, data: string, exitCode?: number) => void): () => void;
181
183
  }
182
- /** What a session still opening is shown as (`switchSession`): the head of its conversation, till it comes. */
183
- export interface WebSessionOpening {
184
- title?: string;
185
- cwd?: string;
186
- /** Its session file, when known: what the device kept of the conversation shows while it opens, and while the computer cannot be reached. */
187
- sessionFile?: string;
188
- }
189
184
  /** An icon, drawn at `size` pixels in `currentColor`. */
190
185
  export type WebIcon = React.ComponentType<{
191
186
  size?: number | string;
192
187
  strokeWidth?: number | string;
193
188
  }>;
194
- /** What a notice of an extension has besides its message (WebExtensionUI.notify). */
195
- export interface WebNotifyOptions {
196
- action?: {
197
- label: string;
198
- run(): void;
199
- };
200
- key?: string;
201
- /** Ta did it for the user: drawn with the double's face, the message as its head (`修改了设置`). */
202
- ta?: boolean;
203
- /** What it changed, a row each under the message: `{ label: '通话字幕', before: '关', after: '开' }`, or a name alone. */
204
- changes?: {
205
- label?: string;
206
- before?: string;
207
- after: string;
208
- }[];
209
- }
210
- export type { ScreenAction, ScreenItem, ScreenPartSpec, ScreenPartView, ScreenPlace, ScreenScrollable, ScreenScrollTo } from '../screen/screen-protocol.js';
211
189
  /** What web extensions see of TaScreen. */
212
190
  export type WebScreen = Pick<TaScreen, 'agent' | 'parts' | 'act' | 'element' | 'where' | 'places' | 'go' | 'pageScroll' | 'scroll'>;
213
- export interface WebExtensionUI extends WebHomeUI, WebPartnersUI, WebEditorsUI, WebDeviceUI, WebPlayUI {
191
+ export interface WebExtensionUI extends WebHomeUI, WebPartnersUI, WebEditorsUI, WebDeviceUI, WebPlayUI, WebShareUI, WebFileViewsUI, WebHostUI {
214
192
  /** A widget around the message box, as pi's, or a card in the workbench on the right; `undefined` removes it. */
215
193
  setWidget(key: string, widget: React.ComponentType | undefined, options?: WidgetOptions): void;
216
194
  /**
@@ -492,12 +470,13 @@ export interface WebExtensionUI extends WebHomeUI, WebPartnersUI, WebEditorsUI,
492
470
  * meeting written down); let it go when it stops. Newer than some Ta apps: `pi.ui.keepAwake?.()`.
493
471
  */
494
472
  readonly keepAwake?: () => () => void;
495
- /** As the conversations show it; `inline`: in a line; `send`, `answer`: a group chat's, for taps in cards (newer). */
473
+ /** As the conversations show it; `inline`: in a line; `send`, `answer`: a group chat's (newer); `whole`: WebCodeRendererProps.whole. */
496
474
  readonly Markdown: React.ComponentType<{
497
475
  text: string;
498
476
  inline?: boolean;
499
477
  send?: WebCodeRendererProps['send'];
500
478
  answer?: string;
479
+ whole?: boolean;
501
480
  }>;
502
481
  /**
503
482
  * A conversation to read, drawn as those of the page are, with what extensions draw in them (cards, plots,
@@ -1,4 +1,4 @@
1
- import { type TaServer, type TaSettingsServer } from '@celljs/ta-protocol';
1
+ import { type TaSettingsServer } from '@celljs/ta-protocol';
2
2
  import * as React from 'react';
3
3
  import type { TaFiles } from '../files/files-protocol.js';
4
4
  import type { TaLinks } from '../links/links-protocol.js';
@@ -9,9 +9,8 @@ import type { TaSettings } from '../settings/settings-protocol.js';
9
9
  import type { TaState } from '../state/state-protocol.js';
10
10
  import { type TaTargets } from '../targets/targets-protocol.js';
11
11
  import type { TaWorkbench } from '../workbench-protocol.js';
12
- import type { WebCodeRendererProps } from './web-api-code.js';
13
12
  import type { WebEditorTabs } from './web-editor-tabs.js';
14
- import type { CodeEditorProps, DiffEditorProps, WebComposerProps, WebExtensionAPI, WebExtensionUI, WebFolderPickerProps, WebHoldToTalkProps, WebModelPickerProps, WebShareSheetProps, WebStorage, WebViewInfo, WebVoice } from './web-extension-api.js';
13
+ import type { CodeEditorProps, DiffEditorProps, WebComposerProps, WebExtensionAPI, WebExtensionUI, WebFolderPickerProps, WebHoldToTalkProps, WebModelPickerProps, WebStorage, WebViewInfo, WebVoice } from './web-extension-api.js';
15
14
  import { type TaWebExtensions, type WebExtensionConversation, type WebSessionSwitcher } from './web-extension-protocol.js';
16
15
  import { type WebExtensionRun } from './web-extension-run.js';
17
16
  /** What the API of an extension asks of the page (TaWebExtensionsImpl), for the extension it is given to. */
@@ -49,10 +48,6 @@ export interface WebExtensionContextHost {
49
48
  export declare class WebExtensionContext {
50
49
  protected readonly host: WebExtensionContextHost;
51
50
  constructor(host: WebExtensionContextHost);
52
- /** The server, whose messages for a conversation say they came from the extension. */
53
- static marked(server: TaServer, mark: (text: string) => string): TaServer;
54
- /** A renderer of code whose `send` (a choice tapped in it) says it came from the extension. */
55
- static replying(Renderer: React.ComponentType<WebCodeRendererProps>, mark: (text: string) => string): React.ComponentType<WebCodeRendererProps>;
56
51
  /** Monaco and the games in the theme and language of the settings, the same component for every extension. */
57
52
  protected readonly codeEditor: (props: CodeEditorProps) => React.FunctionComponentElement<CodeEditorProps & {
58
53
  settings: TaSettings;
@@ -71,7 +66,6 @@ export declare class WebExtensionContext {
71
66
  notices: TaNotices;
72
67
  }>;
73
68
  protected readonly voice: WebVoice;
74
- protected readonly shareSheet: (props: WebShareSheetProps) => React.FunctionComponentElement<WebShareSheetProps & import("../components/share-sheet.js").ShareSheetServices>;
75
69
  protected readonly modelPicker: (props: WebModelPickerProps) => React.FunctionComponentElement<WebModelPickerProps & {
76
70
  settings: TaSettingsServer;
77
71
  }>;