@celljs/ta-web 4.27.0 → 4.29.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 (586) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/assistant/assistant-role.d.ts +9 -4
  4. package/esm/browser/assistant/assistant-role.js +17 -5
  5. package/esm/browser/assistant/assistant-task-util.d.ts +6 -0
  6. package/esm/browser/assistant/assistant-task-util.js +12 -1
  7. package/esm/browser/assistant/assistant-thread.js +15 -2
  8. package/esm/browser/assistant/assistant-view.js +4 -1
  9. package/esm/browser/assistant/assistant.d.ts +2 -1
  10. package/esm/browser/assistant/assistant.js +9 -7
  11. package/esm/browser/assistant/call-conversing.d.ts +45 -0
  12. package/esm/browser/assistant/call-conversing.js +91 -0
  13. package/esm/browser/assistant/call-face.d.ts +13 -0
  14. package/esm/browser/assistant/call-face.js +81 -0
  15. package/esm/browser/assistant/call-keeper.d.ts +8 -4
  16. package/esm/browser/assistant/call-keeper.js +32 -11
  17. package/esm/browser/assistant/call-partnering.d.ts +37 -0
  18. package/esm/browser/assistant/call-partnering.js +79 -0
  19. package/esm/browser/assistant/call-scenes.d.ts +26 -0
  20. package/esm/browser/assistant/call-scenes.js +85 -0
  21. package/esm/browser/assistant/call-screen.d.ts +3 -0
  22. package/esm/browser/assistant/call-screen.js +15 -0
  23. package/esm/browser/assistant/mic-sense.d.ts +31 -0
  24. package/esm/browser/assistant/mic-sense.js +119 -0
  25. package/esm/browser/assistant/noise-gate.d.ts +32 -0
  26. package/esm/browser/assistant/noise-gate.js +66 -0
  27. package/esm/browser/assistant/pcm-util.d.ts +10 -0
  28. package/esm/browser/assistant/pcm-util.js +55 -0
  29. package/esm/browser/assistant/read-aloud.d.ts +2 -1
  30. package/esm/browser/assistant/realtime-voice-protocol.d.ts +84 -0
  31. package/esm/browser/assistant/realtime-voice-protocol.js +40 -0
  32. package/esm/browser/assistant/realtime-voice.d.ts +50 -62
  33. package/esm/browser/assistant/realtime-voice.js +213 -134
  34. package/esm/browser/assistant/spoken-timeline.d.ts +27 -0
  35. package/esm/browser/assistant/spoken-timeline.js +49 -0
  36. package/esm/browser/assistant/voice-call-bar.d.ts +9 -2
  37. package/esm/browser/assistant/voice-call-bar.js +81 -31
  38. package/esm/browser/assistant/voice-call-protocol.d.ts +61 -4
  39. package/esm/browser/assistant/voice-call.d.ts +16 -23
  40. package/esm/browser/assistant/voice-call.js +134 -117
  41. package/esm/browser/assistant/voice-reading.d.ts +83 -0
  42. package/esm/browser/assistant/voice-reading.js +150 -0
  43. package/esm/browser/avatar/dino-talk.d.ts +15 -0
  44. package/esm/browser/avatar/dino-talk.js +34 -0
  45. package/esm/browser/chat/chat-protocol.d.ts +2 -0
  46. package/esm/browser/chat/chat-shown.d.ts +3 -1
  47. package/esm/browser/chat/chat-shown.js +25 -3
  48. package/esm/browser/chat/chat.d.ts +5 -1
  49. package/esm/browser/chat/chat.js +32 -16
  50. package/esm/browser/components/account-menu.d.ts +6 -16
  51. package/esm/browser/components/account-menu.js +47 -101
  52. package/esm/browser/components/app-contexts.js +3 -2
  53. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  54. package/esm/browser/components/composer-box-protocol.d.ts +2 -0
  55. package/esm/browser/components/composer-box.js +20 -1
  56. package/esm/browser/components/composer-emoji.d.ts +22 -0
  57. package/esm/browser/components/composer-emoji.js +50 -0
  58. package/esm/browser/components/conversation-scroll-util.d.ts +8 -1
  59. package/esm/browser/components/conversation-scroll-util.js +21 -0
  60. package/esm/browser/components/conversation-scroll.js +10 -11
  61. package/esm/browser/components/discover-view.d.ts +4 -3
  62. package/esm/browser/components/discover-view.js +5 -4
  63. package/esm/browser/components/emoji-panel.d.ts +22 -0
  64. package/esm/browser/components/emoji-panel.js +54 -0
  65. package/esm/browser/components/gallery.js +28 -7
  66. package/esm/browser/components/host-view.d.ts +1 -1
  67. package/esm/browser/components/image-pull.d.ts +64 -0
  68. package/esm/browser/components/image-pull.js +202 -0
  69. package/esm/browser/components/kept-call-bar.js +2 -1
  70. package/esm/browser/components/lightbox.d.ts +1 -1
  71. package/esm/browser/components/lightbox.js +57 -2
  72. package/esm/browser/components/markdown.d.ts +8 -1
  73. package/esm/browser/components/markdown.js +12 -4
  74. package/esm/browser/components/me-rows.d.ts +24 -0
  75. package/esm/browser/components/me-rows.js +19 -0
  76. package/esm/browser/components/me-view.d.ts +2 -1
  77. package/esm/browser/components/me-view.js +3 -2
  78. package/esm/browser/components/message-list.js +47 -7
  79. package/esm/browser/components/message-steps.js +13 -0
  80. package/esm/browser/components/nav-places.js +1 -1
  81. package/esm/browser/components/partner-row.js +2 -1
  82. package/esm/browser/components/relay-services.d.ts +9 -3
  83. package/esm/browser/components/relay-services.js +73 -35
  84. package/esm/browser/components/session-view.js +4 -2
  85. package/esm/browser/components/settings-choices.js +3 -0
  86. package/esm/browser/components/settings-controls.d.ts +13 -0
  87. package/esm/browser/components/settings-controls.js +19 -0
  88. package/esm/browser/components/settings-more.d.ts +1 -1
  89. package/esm/browser/components/settings-more.js +28 -39
  90. package/esm/browser/components/settings-parts.d.ts +4 -2
  91. package/esm/browser/components/settings-parts.js +16 -9
  92. package/esm/browser/components/settings-view.js +2 -6
  93. package/esm/browser/components/ta-avatar.d.ts +15 -1
  94. package/esm/browser/components/ta-avatar.js +38 -5
  95. package/esm/browser/components/voice-services.js +6 -1
  96. package/esm/browser/components/web-composer.d.ts +1 -1
  97. package/esm/browser/components/web-composer.js +2 -2
  98. package/esm/browser/device/file-save.d.ts +31 -0
  99. package/esm/browser/device/file-save.js +80 -0
  100. package/esm/browser/extension/extension-view.d.ts +2 -0
  101. package/esm/browser/extension/extension-view.js +2 -0
  102. package/esm/browser/extension/web-api-call.d.ts +109 -2
  103. package/esm/browser/extension/web-api-components.d.ts +4 -0
  104. package/esm/browser/extension/web-api-contributions.d.ts +14 -14
  105. package/esm/browser/extension/web-api-desktop.d.ts +16 -1
  106. package/esm/browser/extension/web-api-desktop.js +1 -0
  107. package/esm/browser/extension/web-api-partners.d.ts +2 -0
  108. package/esm/browser/extension/web-extension-api.d.ts +8 -10
  109. package/esm/browser/extension/web-extension-code.d.ts +15 -8
  110. package/esm/browser/extension/web-extension-code.js +25 -27
  111. package/esm/browser/extension/web-extension-context.js +4 -0
  112. package/esm/browser/extension/web-extension-protocol.d.ts +10 -1
  113. package/esm/browser/extension/web-extension-protocol.js +1 -0
  114. package/esm/browser/extension/web-extension-run.d.ts +4 -2
  115. package/esm/browser/extension/web-extension-run.js +10 -4
  116. package/esm/browser/extension/web-extensions-running.js +7 -6
  117. package/esm/browser/extension/web-pages.d.ts +2 -0
  118. package/esm/browser/extension/web-pages.js +2 -0
  119. package/esm/browser/i18n/en/account.d.ts +202 -0
  120. package/esm/browser/i18n/en/account.js +205 -0
  121. package/esm/browser/i18n/en/assistant.d.ts +129 -0
  122. package/esm/browser/i18n/en/assistant.js +130 -0
  123. package/esm/browser/i18n/en/call.d.ts +86 -0
  124. package/esm/browser/i18n/en/call.js +87 -0
  125. package/esm/browser/i18n/en/chat.d.ts +213 -0
  126. package/esm/browser/i18n/en/chat.js +214 -0
  127. package/esm/browser/i18n/en/common.d.ts +99 -0
  128. package/esm/browser/i18n/en/common.js +101 -0
  129. package/esm/browser/i18n/en/console.d.ts +230 -0
  130. package/esm/browser/i18n/en/console.js +232 -0
  131. package/esm/browser/i18n/en/discover.d.ts +117 -0
  132. package/esm/browser/i18n/en/discover.js +119 -0
  133. package/esm/browser/i18n/en/service.d.ts +242 -0
  134. package/esm/browser/i18n/en/service.js +245 -0
  135. package/esm/browser/i18n/en/settings.d.ts +213 -0
  136. package/esm/browser/i18n/en/settings.js +214 -0
  137. package/esm/browser/i18n/en/tools.d.ts +85 -0
  138. package/esm/browser/i18n/en/tools.js +87 -0
  139. package/esm/browser/i18n/ja/account.d.ts +2 -0
  140. package/esm/browser/i18n/ja/account.js +202 -0
  141. package/esm/browser/i18n/ja/assistant.d.ts +2 -0
  142. package/esm/browser/i18n/ja/assistant.js +129 -0
  143. package/esm/browser/i18n/ja/call.d.ts +2 -0
  144. package/esm/browser/i18n/ja/call.js +86 -0
  145. package/esm/browser/i18n/ja/chat.d.ts +2 -0
  146. package/esm/browser/i18n/ja/chat.js +213 -0
  147. package/esm/browser/i18n/ja/common.d.ts +2 -0
  148. package/esm/browser/i18n/ja/common.js +99 -0
  149. package/esm/browser/i18n/ja/console.d.ts +2 -0
  150. package/esm/browser/i18n/ja/console.js +230 -0
  151. package/esm/browser/i18n/ja/discover.d.ts +2 -0
  152. package/esm/browser/i18n/ja/discover.js +117 -0
  153. package/esm/browser/i18n/ja/service.d.ts +2 -0
  154. package/esm/browser/i18n/ja/service.js +242 -0
  155. package/esm/browser/i18n/ja/settings.d.ts +2 -0
  156. package/esm/browser/i18n/ja/settings.js +213 -0
  157. package/esm/browser/i18n/ja/tools.d.ts +2 -0
  158. package/esm/browser/i18n/ja/tools.js +85 -0
  159. package/esm/browser/i18n/locales.d.ts +1150 -1131
  160. package/esm/browser/i18n/messages-ja.js +20 -1567
  161. package/esm/browser/i18n/messages-zh-tw.d.ts +0 -1
  162. package/esm/browser/i18n/messages-zh-tw.js +20 -1568
  163. package/esm/browser/i18n/messages.d.ts +1153 -1131
  164. package/esm/browser/i18n/messages.js +44 -3145
  165. package/esm/browser/i18n/zh/account.d.ts +2 -0
  166. package/esm/browser/i18n/zh/account.js +203 -0
  167. package/esm/browser/i18n/zh/assistant.d.ts +2 -0
  168. package/esm/browser/i18n/zh/assistant.js +129 -0
  169. package/esm/browser/i18n/zh/call.d.ts +2 -0
  170. package/esm/browser/i18n/zh/call.js +86 -0
  171. package/esm/browser/i18n/zh/chat.d.ts +2 -0
  172. package/esm/browser/i18n/zh/chat.js +213 -0
  173. package/esm/browser/i18n/zh/common.d.ts +2 -0
  174. package/esm/browser/i18n/zh/common.js +99 -0
  175. package/esm/browser/i18n/zh/console.d.ts +2 -0
  176. package/esm/browser/i18n/zh/console.js +230 -0
  177. package/esm/browser/i18n/zh/discover.d.ts +2 -0
  178. package/esm/browser/i18n/zh/discover.js +117 -0
  179. package/esm/browser/i18n/zh/service.d.ts +2 -0
  180. package/esm/browser/i18n/zh/service.js +242 -0
  181. package/esm/browser/i18n/zh/settings.d.ts +2 -0
  182. package/esm/browser/i18n/zh/settings.js +213 -0
  183. package/esm/browser/i18n/zh/tools.d.ts +2 -0
  184. package/esm/browser/i18n/zh/tools.js +86 -0
  185. package/esm/browser/i18n/zh-tw/account.d.ts +2 -0
  186. package/esm/browser/i18n/zh-tw/account.js +202 -0
  187. package/esm/browser/i18n/zh-tw/assistant.d.ts +2 -0
  188. package/esm/browser/i18n/zh-tw/assistant.js +129 -0
  189. package/esm/browser/i18n/zh-tw/call.d.ts +2 -0
  190. package/esm/browser/i18n/zh-tw/call.js +86 -0
  191. package/esm/browser/i18n/zh-tw/chat.d.ts +2 -0
  192. package/esm/browser/i18n/zh-tw/chat.js +213 -0
  193. package/esm/browser/i18n/zh-tw/common.d.ts +2 -0
  194. package/esm/browser/i18n/zh-tw/common.js +99 -0
  195. package/esm/browser/i18n/zh-tw/console.d.ts +2 -0
  196. package/esm/browser/i18n/zh-tw/console.js +230 -0
  197. package/esm/browser/i18n/zh-tw/discover.d.ts +2 -0
  198. package/esm/browser/i18n/zh-tw/discover.js +117 -0
  199. package/esm/browser/i18n/zh-tw/service.d.ts +2 -0
  200. package/esm/browser/i18n/zh-tw/service.js +242 -0
  201. package/esm/browser/i18n/zh-tw/settings.d.ts +2 -0
  202. package/esm/browser/i18n/zh-tw/settings.js +213 -0
  203. package/esm/browser/i18n/zh-tw/tools.d.ts +2 -0
  204. package/esm/browser/i18n/zh-tw/tools.js +85 -0
  205. package/esm/browser/markdown/code-renderers.d.ts +2 -0
  206. package/esm/browser/markdown/code-renderers.js +2 -0
  207. package/esm/browser/offline/device-values.d.ts +4 -0
  208. package/esm/browser/offline/device-values.js +10 -0
  209. package/esm/browser/pwa/page-build.d.ts +15 -0
  210. package/esm/browser/pwa/page-build.js +45 -0
  211. package/esm/browser/screen/page-answers.d.ts +2 -1
  212. package/esm/browser/screen/page-answers.js +7 -4
  213. package/esm/browser/settings/settings-protocol.d.ts +4 -0
  214. package/esm/browser/settings/settings-protocol.js +4 -0
  215. package/esm/browser/style/base.d.ts +1 -1
  216. package/esm/browser/style/base.js +3 -0
  217. package/esm/browser/style/chat-list.d.ts +1 -1
  218. package/esm/browser/style/chat-list.js +1 -1
  219. package/esm/browser/style/conversation-column.d.ts +1 -1
  220. package/esm/browser/style/conversation-column.js +17 -0
  221. package/esm/browser/style/conversation.d.ts +1 -1
  222. package/esm/browser/style/conversation.js +11 -1
  223. package/esm/browser/style/device.js +1 -0
  224. package/esm/browser/style/dialogs.d.ts +1 -1
  225. package/esm/browser/style/dialogs.js +1 -1
  226. package/esm/browser/style/layout.d.ts +1 -1
  227. package/esm/browser/style/layout.js +135 -57
  228. package/esm/browser/style/pages.d.ts +1 -1
  229. package/esm/browser/style/pages.js +0 -7
  230. package/esm/browser/style/shell.d.ts +1 -1
  231. package/esm/browser/style/shell.js +8 -0
  232. package/esm/browser/style/video-call.d.ts +2 -0
  233. package/esm/browser/style/video-call.js +63 -0
  234. package/esm/browser/style.js +2 -0
  235. package/esm/browser/util/call-transcript.d.ts +16 -0
  236. package/esm/browser/util/call-transcript.js +110 -0
  237. package/esm/browser/util/desktop.d.ts +10 -1
  238. package/esm/browser/util/desktop.js +10 -0
  239. package/esm/browser/util/image-pull.d.ts +61 -0
  240. package/esm/browser/util/image-pull.js +88 -0
  241. package/esm/browser/util/process.d.ts +6 -0
  242. package/esm/browser/util/process.js +18 -5
  243. package/esm/browser/util/spoken.d.ts +3 -3
  244. package/esm/browser/util/spoken.js +4 -4
  245. package/esm/browser/video-call/call-camera.d.ts +59 -0
  246. package/esm/browser/video-call/call-camera.js +188 -0
  247. package/esm/browser/video-call/call-people.d.ts +21 -0
  248. package/esm/browser/video-call/call-people.js +29 -0
  249. package/esm/browser/video-call/call-window.d.ts +19 -0
  250. package/esm/browser/video-call/call-window.js +80 -0
  251. package/esm/browser/video-call/clip-plan.d.ts +56 -0
  252. package/esm/browser/video-call/clip-plan.js +76 -0
  253. package/esm/browser/video-call/face-camera.d.ts +93 -0
  254. package/esm/browser/video-call/face-camera.js +192 -0
  255. package/esm/browser/video-call/face-files.d.ts +69 -0
  256. package/esm/browser/video-call/face-files.js +132 -0
  257. package/esm/browser/video-call/face-moves.d.ts +68 -0
  258. package/esm/browser/video-call/face-moves.js +180 -0
  259. package/esm/browser/video-call/face-stage.d.ts +139 -0
  260. package/esm/browser/video-call/face-stage.js +219 -0
  261. package/esm/browser/video-call/mouth-layer.d.ts +81 -0
  262. package/esm/browser/video-call/mouth-layer.js +241 -0
  263. package/esm/browser/video-call/video-call-view.d.ts +19 -0
  264. package/esm/browser/video-call/video-call-view.js +254 -0
  265. package/esm/browser/video-call/video-face.d.ts +19 -0
  266. package/esm/browser/video-call/video-face.js +471 -0
  267. package/esm/browser/workbench-hosts.d.ts +1 -0
  268. package/esm/browser/workbench-protocol.d.ts +2 -0
  269. package/esm/browser/workbench-util.d.ts +5 -0
  270. package/esm/browser/workbench-util.js +18 -0
  271. package/esm/browser/workbench.d.ts +14 -0
  272. package/esm/browser/workbench.js +73 -6
  273. package/lib/browser/assistant/assistant-role.d.ts +9 -4
  274. package/lib/browser/assistant/assistant-role.js +17 -5
  275. package/lib/browser/assistant/assistant-task-util.d.ts +6 -0
  276. package/lib/browser/assistant/assistant-task-util.js +11 -0
  277. package/lib/browser/assistant/assistant-thread.js +15 -2
  278. package/lib/browser/assistant/assistant-view.js +3 -0
  279. package/lib/browser/assistant/assistant.d.ts +2 -1
  280. package/lib/browser/assistant/assistant.js +9 -7
  281. package/lib/browser/assistant/call-conversing.d.ts +46 -0
  282. package/lib/browser/assistant/call-conversing.js +96 -0
  283. package/lib/browser/assistant/call-face.d.ts +14 -0
  284. package/lib/browser/assistant/call-face.js +117 -0
  285. package/lib/browser/assistant/call-keeper.d.ts +8 -4
  286. package/lib/browser/assistant/call-keeper.js +32 -11
  287. package/lib/browser/assistant/call-partnering.d.ts +38 -0
  288. package/lib/browser/assistant/call-partnering.js +83 -0
  289. package/lib/browser/assistant/call-scenes.d.ts +27 -0
  290. package/lib/browser/assistant/call-scenes.js +88 -0
  291. package/lib/browser/assistant/call-screen.d.ts +3 -0
  292. package/lib/browser/assistant/call-screen.js +15 -0
  293. package/lib/browser/assistant/mic-sense.d.ts +32 -0
  294. package/lib/browser/assistant/mic-sense.js +123 -0
  295. package/lib/browser/assistant/noise-gate.d.ts +33 -0
  296. package/lib/browser/assistant/noise-gate.js +71 -0
  297. package/lib/browser/assistant/pcm-util.d.ts +11 -0
  298. package/lib/browser/assistant/pcm-util.js +58 -0
  299. package/lib/browser/assistant/read-aloud.d.ts +2 -1
  300. package/lib/browser/assistant/realtime-voice-protocol.d.ts +85 -0
  301. package/lib/browser/assistant/realtime-voice-protocol.js +43 -0
  302. package/lib/browser/assistant/realtime-voice.d.ts +50 -62
  303. package/lib/browser/assistant/realtime-voice.js +217 -138
  304. package/lib/browser/assistant/spoken-timeline.d.ts +28 -0
  305. package/lib/browser/assistant/spoken-timeline.js +53 -0
  306. package/lib/browser/assistant/voice-call-bar.d.ts +9 -2
  307. package/lib/browser/assistant/voice-call-bar.js +81 -30
  308. package/lib/browser/assistant/voice-call-protocol.d.ts +61 -4
  309. package/lib/browser/assistant/voice-call.d.ts +16 -23
  310. package/lib/browser/assistant/voice-call.js +134 -117
  311. package/lib/browser/assistant/voice-reading.d.ts +84 -0
  312. package/lib/browser/assistant/voice-reading.js +156 -0
  313. package/lib/browser/avatar/dino-talk.d.ts +16 -0
  314. package/lib/browser/avatar/dino-talk.js +37 -0
  315. package/lib/browser/chat/chat-protocol.d.ts +2 -0
  316. package/lib/browser/chat/chat-shown.d.ts +3 -1
  317. package/lib/browser/chat/chat-shown.js +25 -3
  318. package/lib/browser/chat/chat.d.ts +5 -1
  319. package/lib/browser/chat/chat.js +32 -16
  320. package/lib/browser/components/account-menu.d.ts +6 -16
  321. package/lib/browser/components/account-menu.js +45 -99
  322. package/lib/browser/components/app-contexts.js +2 -1
  323. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  324. package/lib/browser/components/composer-box-protocol.d.ts +2 -0
  325. package/lib/browser/components/composer-box.js +20 -1
  326. package/lib/browser/components/composer-emoji.d.ts +23 -0
  327. package/lib/browser/components/composer-emoji.js +87 -0
  328. package/lib/browser/components/conversation-scroll-util.d.ts +8 -1
  329. package/lib/browser/components/conversation-scroll-util.js +21 -0
  330. package/lib/browser/components/conversation-scroll.js +10 -11
  331. package/lib/browser/components/discover-view.d.ts +4 -3
  332. package/lib/browser/components/discover-view.js +5 -4
  333. package/lib/browser/components/emoji-panel.d.ts +23 -0
  334. package/lib/browser/components/emoji-panel.js +90 -0
  335. package/lib/browser/components/gallery.js +28 -7
  336. package/lib/browser/components/host-view.d.ts +1 -1
  337. package/lib/browser/components/image-pull.d.ts +65 -0
  338. package/lib/browser/components/image-pull.js +206 -0
  339. package/lib/browser/components/kept-call-bar.js +2 -1
  340. package/lib/browser/components/lightbox.d.ts +1 -1
  341. package/lib/browser/components/lightbox.js +57 -2
  342. package/lib/browser/components/markdown.d.ts +8 -1
  343. package/lib/browser/components/markdown.js +11 -3
  344. package/lib/browser/components/me-rows.d.ts +25 -0
  345. package/lib/browser/components/me-rows.js +22 -0
  346. package/lib/browser/components/me-view.d.ts +2 -1
  347. package/lib/browser/components/me-view.js +3 -2
  348. package/lib/browser/components/message-list.js +46 -6
  349. package/lib/browser/components/message-steps.js +13 -0
  350. package/lib/browser/components/nav-places.js +1 -1
  351. package/lib/browser/components/partner-row.js +2 -1
  352. package/lib/browser/components/relay-services.d.ts +9 -3
  353. package/lib/browser/components/relay-services.js +71 -33
  354. package/lib/browser/components/session-view.js +3 -1
  355. package/lib/browser/components/settings-choices.js +3 -0
  356. package/lib/browser/components/settings-controls.d.ts +13 -0
  357. package/lib/browser/components/settings-controls.js +19 -0
  358. package/lib/browser/components/settings-more.d.ts +1 -1
  359. package/lib/browser/components/settings-more.js +27 -38
  360. package/lib/browser/components/settings-parts.d.ts +4 -2
  361. package/lib/browser/components/settings-parts.js +15 -8
  362. package/lib/browser/components/settings-view.js +2 -6
  363. package/lib/browser/components/ta-avatar.d.ts +15 -1
  364. package/lib/browser/components/ta-avatar.js +38 -5
  365. package/lib/browser/components/voice-services.js +5 -0
  366. package/lib/browser/components/web-composer.d.ts +1 -1
  367. package/lib/browser/components/web-composer.js +2 -2
  368. package/lib/browser/device/file-save.d.ts +32 -0
  369. package/lib/browser/device/file-save.js +83 -0
  370. package/lib/browser/extension/extension-view.d.ts +2 -0
  371. package/lib/browser/extension/extension-view.js +3 -1
  372. package/lib/browser/extension/web-api-call.d.ts +109 -2
  373. package/lib/browser/extension/web-api-components.d.ts +4 -0
  374. package/lib/browser/extension/web-api-contributions.d.ts +14 -14
  375. package/lib/browser/extension/web-api-desktop.d.ts +16 -1
  376. package/lib/browser/extension/web-api-desktop.js +1 -0
  377. package/lib/browser/extension/web-api-partners.d.ts +2 -0
  378. package/lib/browser/extension/web-extension-api.d.ts +8 -10
  379. package/lib/browser/extension/web-extension-code.d.ts +15 -8
  380. package/lib/browser/extension/web-extension-code.js +25 -27
  381. package/lib/browser/extension/web-extension-context.js +4 -0
  382. package/lib/browser/extension/web-extension-protocol.d.ts +10 -1
  383. package/lib/browser/extension/web-extension-protocol.js +1 -0
  384. package/lib/browser/extension/web-extension-run.d.ts +4 -2
  385. package/lib/browser/extension/web-extension-run.js +10 -4
  386. package/lib/browser/extension/web-extensions-running.js +7 -6
  387. package/lib/browser/extension/web-pages.d.ts +2 -0
  388. package/lib/browser/extension/web-pages.js +2 -0
  389. package/lib/browser/i18n/en/account.d.ts +203 -0
  390. package/lib/browser/i18n/en/account.js +208 -0
  391. package/lib/browser/i18n/en/assistant.d.ts +130 -0
  392. package/lib/browser/i18n/en/assistant.js +133 -0
  393. package/lib/browser/i18n/en/call.d.ts +87 -0
  394. package/lib/browser/i18n/en/call.js +90 -0
  395. package/lib/browser/i18n/en/chat.d.ts +214 -0
  396. package/lib/browser/i18n/en/chat.js +217 -0
  397. package/lib/browser/i18n/en/common.d.ts +100 -0
  398. package/lib/browser/i18n/en/common.js +104 -0
  399. package/lib/browser/i18n/en/console.d.ts +231 -0
  400. package/lib/browser/i18n/en/console.js +235 -0
  401. package/lib/browser/i18n/en/discover.d.ts +118 -0
  402. package/lib/browser/i18n/en/discover.js +122 -0
  403. package/lib/browser/i18n/en/service.d.ts +243 -0
  404. package/lib/browser/i18n/en/service.js +248 -0
  405. package/lib/browser/i18n/en/settings.d.ts +214 -0
  406. package/lib/browser/i18n/en/settings.js +217 -0
  407. package/lib/browser/i18n/en/tools.d.ts +86 -0
  408. package/lib/browser/i18n/en/tools.js +90 -0
  409. package/lib/browser/i18n/ja/account.d.ts +3 -0
  410. package/lib/browser/i18n/ja/account.js +205 -0
  411. package/lib/browser/i18n/ja/assistant.d.ts +3 -0
  412. package/lib/browser/i18n/ja/assistant.js +132 -0
  413. package/lib/browser/i18n/ja/call.d.ts +3 -0
  414. package/lib/browser/i18n/ja/call.js +89 -0
  415. package/lib/browser/i18n/ja/chat.d.ts +3 -0
  416. package/lib/browser/i18n/ja/chat.js +216 -0
  417. package/lib/browser/i18n/ja/common.d.ts +3 -0
  418. package/lib/browser/i18n/ja/common.js +102 -0
  419. package/lib/browser/i18n/ja/console.d.ts +3 -0
  420. package/lib/browser/i18n/ja/console.js +233 -0
  421. package/lib/browser/i18n/ja/discover.d.ts +3 -0
  422. package/lib/browser/i18n/ja/discover.js +120 -0
  423. package/lib/browser/i18n/ja/service.d.ts +3 -0
  424. package/lib/browser/i18n/ja/service.js +245 -0
  425. package/lib/browser/i18n/ja/settings.d.ts +3 -0
  426. package/lib/browser/i18n/ja/settings.js +216 -0
  427. package/lib/browser/i18n/ja/tools.d.ts +3 -0
  428. package/lib/browser/i18n/ja/tools.js +88 -0
  429. package/lib/browser/i18n/locales.d.ts +1150 -1131
  430. package/lib/browser/i18n/messages-ja.js +20 -1567
  431. package/lib/browser/i18n/messages-zh-tw.d.ts +0 -1
  432. package/lib/browser/i18n/messages-zh-tw.js +20 -1568
  433. package/lib/browser/i18n/messages.d.ts +1153 -1131
  434. package/lib/browser/i18n/messages.js +44 -3145
  435. package/lib/browser/i18n/zh/account.d.ts +3 -0
  436. package/lib/browser/i18n/zh/account.js +206 -0
  437. package/lib/browser/i18n/zh/assistant.d.ts +3 -0
  438. package/lib/browser/i18n/zh/assistant.js +132 -0
  439. package/lib/browser/i18n/zh/call.d.ts +3 -0
  440. package/lib/browser/i18n/zh/call.js +89 -0
  441. package/lib/browser/i18n/zh/chat.d.ts +3 -0
  442. package/lib/browser/i18n/zh/chat.js +216 -0
  443. package/lib/browser/i18n/zh/common.d.ts +3 -0
  444. package/lib/browser/i18n/zh/common.js +102 -0
  445. package/lib/browser/i18n/zh/console.d.ts +3 -0
  446. package/lib/browser/i18n/zh/console.js +233 -0
  447. package/lib/browser/i18n/zh/discover.d.ts +3 -0
  448. package/lib/browser/i18n/zh/discover.js +120 -0
  449. package/lib/browser/i18n/zh/service.d.ts +3 -0
  450. package/lib/browser/i18n/zh/service.js +245 -0
  451. package/lib/browser/i18n/zh/settings.d.ts +3 -0
  452. package/lib/browser/i18n/zh/settings.js +216 -0
  453. package/lib/browser/i18n/zh/tools.d.ts +3 -0
  454. package/lib/browser/i18n/zh/tools.js +89 -0
  455. package/lib/browser/i18n/zh-tw/account.d.ts +3 -0
  456. package/lib/browser/i18n/zh-tw/account.js +205 -0
  457. package/lib/browser/i18n/zh-tw/assistant.d.ts +3 -0
  458. package/lib/browser/i18n/zh-tw/assistant.js +132 -0
  459. package/lib/browser/i18n/zh-tw/call.d.ts +3 -0
  460. package/lib/browser/i18n/zh-tw/call.js +89 -0
  461. package/lib/browser/i18n/zh-tw/chat.d.ts +3 -0
  462. package/lib/browser/i18n/zh-tw/chat.js +216 -0
  463. package/lib/browser/i18n/zh-tw/common.d.ts +3 -0
  464. package/lib/browser/i18n/zh-tw/common.js +102 -0
  465. package/lib/browser/i18n/zh-tw/console.d.ts +3 -0
  466. package/lib/browser/i18n/zh-tw/console.js +233 -0
  467. package/lib/browser/i18n/zh-tw/discover.d.ts +3 -0
  468. package/lib/browser/i18n/zh-tw/discover.js +120 -0
  469. package/lib/browser/i18n/zh-tw/service.d.ts +3 -0
  470. package/lib/browser/i18n/zh-tw/service.js +245 -0
  471. package/lib/browser/i18n/zh-tw/settings.d.ts +3 -0
  472. package/lib/browser/i18n/zh-tw/settings.js +216 -0
  473. package/lib/browser/i18n/zh-tw/tools.d.ts +3 -0
  474. package/lib/browser/i18n/zh-tw/tools.js +88 -0
  475. package/lib/browser/markdown/code-renderers.d.ts +2 -0
  476. package/lib/browser/markdown/code-renderers.js +3 -1
  477. package/lib/browser/offline/device-values.d.ts +4 -0
  478. package/lib/browser/offline/device-values.js +10 -0
  479. package/lib/browser/pwa/page-build.d.ts +16 -0
  480. package/lib/browser/pwa/page-build.js +48 -0
  481. package/lib/browser/screen/page-answers.d.ts +2 -1
  482. package/lib/browser/screen/page-answers.js +7 -4
  483. package/lib/browser/settings/settings-protocol.d.ts +4 -0
  484. package/lib/browser/settings/settings-protocol.js +4 -0
  485. package/lib/browser/style/base.d.ts +1 -1
  486. package/lib/browser/style/base.js +3 -0
  487. package/lib/browser/style/chat-list.d.ts +1 -1
  488. package/lib/browser/style/chat-list.js +1 -1
  489. package/lib/browser/style/conversation-column.d.ts +1 -1
  490. package/lib/browser/style/conversation-column.js +17 -0
  491. package/lib/browser/style/conversation.d.ts +1 -1
  492. package/lib/browser/style/conversation.js +11 -1
  493. package/lib/browser/style/device.js +1 -0
  494. package/lib/browser/style/dialogs.d.ts +1 -1
  495. package/lib/browser/style/dialogs.js +1 -1
  496. package/lib/browser/style/layout.d.ts +1 -1
  497. package/lib/browser/style/layout.js +135 -57
  498. package/lib/browser/style/pages.d.ts +1 -1
  499. package/lib/browser/style/pages.js +0 -7
  500. package/lib/browser/style/shell.d.ts +1 -1
  501. package/lib/browser/style/shell.js +8 -0
  502. package/lib/browser/style/video-call.d.ts +3 -0
  503. package/lib/browser/style/video-call.js +66 -0
  504. package/lib/browser/style.js +2 -0
  505. package/lib/browser/util/call-transcript.d.ts +17 -0
  506. package/lib/browser/util/call-transcript.js +113 -0
  507. package/lib/browser/util/desktop.d.ts +10 -1
  508. package/lib/browser/util/desktop.js +10 -0
  509. package/lib/browser/util/image-pull.d.ts +62 -0
  510. package/lib/browser/util/image-pull.js +91 -0
  511. package/lib/browser/util/process.d.ts +6 -0
  512. package/lib/browser/util/process.js +17 -4
  513. package/lib/browser/util/spoken.d.ts +3 -3
  514. package/lib/browser/util/spoken.js +4 -4
  515. package/lib/browser/video-call/call-camera.d.ts +60 -0
  516. package/lib/browser/video-call/call-camera.js +192 -0
  517. package/lib/browser/video-call/call-people.d.ts +22 -0
  518. package/lib/browser/video-call/call-people.js +32 -0
  519. package/lib/browser/video-call/call-window.d.ts +20 -0
  520. package/lib/browser/video-call/call-window.js +83 -0
  521. package/lib/browser/video-call/clip-plan.d.ts +57 -0
  522. package/lib/browser/video-call/clip-plan.js +80 -0
  523. package/lib/browser/video-call/face-camera.d.ts +94 -0
  524. package/lib/browser/video-call/face-camera.js +197 -0
  525. package/lib/browser/video-call/face-files.d.ts +70 -0
  526. package/lib/browser/video-call/face-files.js +137 -0
  527. package/lib/browser/video-call/face-moves.d.ts +69 -0
  528. package/lib/browser/video-call/face-moves.js +184 -0
  529. package/lib/browser/video-call/face-stage.d.ts +140 -0
  530. package/lib/browser/video-call/face-stage.js +223 -0
  531. package/lib/browser/video-call/mouth-layer.d.ts +82 -0
  532. package/lib/browser/video-call/mouth-layer.js +245 -0
  533. package/lib/browser/video-call/video-call-view.d.ts +20 -0
  534. package/lib/browser/video-call/video-call-view.js +290 -0
  535. package/lib/browser/video-call/video-face.d.ts +20 -0
  536. package/lib/browser/video-call/video-face.js +507 -0
  537. package/lib/browser/workbench-hosts.d.ts +1 -0
  538. package/lib/browser/workbench-protocol.d.ts +2 -0
  539. package/lib/browser/workbench-util.d.ts +5 -0
  540. package/lib/browser/workbench-util.js +18 -0
  541. package/lib/browser/workbench.d.ts +14 -0
  542. package/lib/browser/workbench.js +71 -4
  543. package/package.json +7 -7
  544. package/public/faces/README.md +40 -0
  545. package/public/faces/blonde/clap.mp4 +0 -0
  546. package/public/faces/blonde/dance.mp4 +0 -0
  547. package/public/faces/blonde/face.jpg +0 -0
  548. package/public/faces/blonde/happy.mp4 +0 -0
  549. package/public/faces/blonde/heart.mp4 +0 -0
  550. package/public/faces/blonde/idle-1.mp4 +0 -0
  551. package/public/faces/blonde/idle-2.mp4 +0 -0
  552. package/public/faces/blonde/idle-3.mp4 +0 -0
  553. package/public/faces/blonde/laugh.mp4 +0 -0
  554. package/public/faces/blonde/listening.mp4 +0 -0
  555. package/public/faces/blonde/poster.jpg +0 -0
  556. package/public/faces/blonde/shy.mp4 +0 -0
  557. package/public/faces/blonde/sorry.mp4 +0 -0
  558. package/public/faces/blonde/stretch.mp4 +0 -0
  559. package/public/faces/blonde/surprised.mp4 +0 -0
  560. package/public/faces/blonde/talk-1.mp4 +0 -0
  561. package/public/faces/blonde/talk-2.mp4 +0 -0
  562. package/public/faces/blonde/think-2.mp4 +0 -0
  563. package/public/faces/blonde/thinking.mp4 +0 -0
  564. package/public/faces/blonde/wave.mp4 +0 -0
  565. package/public/faces/clap.mp4 +0 -0
  566. package/public/faces/dance.mp4 +0 -0
  567. package/public/faces/face.jpg +0 -0
  568. package/public/faces/framing.json +1 -0
  569. package/public/faces/happy.mp4 +0 -0
  570. package/public/faces/heart.mp4 +0 -0
  571. package/public/faces/idle-1.mp4 +0 -0
  572. package/public/faces/idle-2.mp4 +0 -0
  573. package/public/faces/idle-3.mp4 +0 -0
  574. package/public/faces/laugh.mp4 +0 -0
  575. package/public/faces/lips.json +1 -0
  576. package/public/faces/listening.mp4 +0 -0
  577. package/public/faces/poster.jpg +0 -0
  578. package/public/faces/shy.mp4 +0 -0
  579. package/public/faces/sorry.mp4 +0 -0
  580. package/public/faces/stretch.mp4 +0 -0
  581. package/public/faces/surprised.mp4 +0 -0
  582. package/public/faces/talk-1.mp4 +0 -0
  583. package/public/faces/talk-2.mp4 +0 -0
  584. package/public/faces/think-2.mp4 +0 -0
  585. package/public/faces/thinking.mp4 +0 -0
  586. package/public/faces/wave.mp4 +0 -0
@@ -0,0 +1,63 @@
1
+ /** A video call (VideoCallView): the whole screen of a phone, a panel or a window of its own on a computer, small and floating elsewhere. */
2
+ export const VIDEO_CALL_STYLE = `
3
+ .ta-video-call { position: fixed; z-index: 70; overflow: hidden; color: #fff; background: radial-gradient(120% 75% at 50% 22%, #444b5b 0%, #23262e 58%, #15171c 100%); -webkit-user-select: none; user-select: none; font-family: var(--ta-font, inherit); }
4
+ .ta-video-full { inset: 0; animation: ta-video-in 260ms var(--ta-ease); }
5
+ .ta-video-panel { right: 24px; bottom: 24px; width: 360px; height: min(640px, calc(100vh - 48px)); border-radius: 22px; box-shadow: var(--ta-shadow-pop); border: 1px solid rgba(255, 255, 255, 0.08); animation: ta-video-in 260ms var(--ta-ease); }
6
+ .ta-video-window { inset: 0; }
7
+ body.ta-video-window { margin: 0; overflow: hidden; background: #15171c; }
8
+ .ta-video-window-host { position: fixed; inset: 0; }
9
+ .ta-video-call.ta-video-window { app-region: drag; -webkit-app-region: drag; }
10
+ .ta-video-window .ta-video-round, .ta-video-window .ta-video-self, .ta-video-window .ta-video-caption { app-region: no-drag; -webkit-app-region: no-drag; }
11
+ .ta-video-window .ta-video-tap { display: none; }
12
+ .ta-video-mini { top: calc(env(safe-area-inset-top, 0px) + 64px); right: 12px; width: 96px; height: 136px; border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); cursor: pointer; touch-action: none; transition: left 260ms var(--ta-ease), right 260ms var(--ta-ease), transform 260ms var(--ta-ease); animation: ta-video-in 220ms var(--ta-ease); }
13
+ .ta-video-mini[data-side='left'] { right: auto; left: 12px; }
14
+ @media (pointer: fine) { .ta-video-mini { width: 150px; height: 212px; top: auto; bottom: 24px; right: 24px; } .ta-video-mini[data-side='left'] { left: 24px; } }
15
+ @keyframes ta-video-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
16
+ .ta-video-person { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
17
+ .ta-video-person::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); pointer-events: none; }
18
+ .ta-video-mini .ta-video-person::after { height: 35%; }
19
+ .ta-video-clips { position: absolute; inset: 0; isolation: isolate; opacity: 0; transition: opacity 400ms var(--ta-ease); }
20
+ .ta-video-person.ta-ready .ta-video-clips { opacity: 1; }
21
+ /* The room behind her, blurred, where the camera drew back past the frame of a clip (FaceCamera). */
22
+ .ta-video-backdrop { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(22px) brightness(0.8); pointer-events: none; }
23
+ /* Placed by its camera once its clip plays (FaceCameras: its frame's size, moved and scaled); until then, the close-up. */
24
+ /* Which layer shows, and how much, is FaceStage's (opacity, z-index): the one coming in over the one in front. */
25
+ .ta-video-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: 0; pointer-events: none; }
26
+ .ta-video-mouth { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; opacity: 0; transition: opacity 150ms linear; pointer-events: none; }
27
+ .ta-video-tap { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; }
28
+ .ta-video-dino { width: 58%; max-width: 280px; aspect-ratio: 1; }
29
+ .ta-video-failed { position: absolute; top: 58%; font-size: calc(13px * var(--ta-font-scale)); opacity: 0.7; }
30
+ .ta-video-top { position: absolute; z-index: 1; top: calc(env(safe-area-inset-top, 0px) + 12px); left: 12px; right: 12px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
31
+ .ta-video-window .ta-video-top { top: 30px; }
32
+ .ta-video-title { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }
33
+ .ta-video-title span { max-width: 100%; font-size: calc(16px * var(--ta-font-scale)); font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
34
+ .ta-video-title small { font-size: calc(12px * var(--ta-font-scale)); opacity: 0.8; }
35
+ .ta-video-round { width: 56px; height: 56px; flex: none; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); cursor: pointer; transition: background 160ms, transform 120ms; }
36
+ .ta-video-round:active { transform: scale(0.94); }
37
+ .ta-video-round:disabled { opacity: 0.4; cursor: default; }
38
+ .ta-video-round.ta-off { background: rgba(255, 255, 255, 0.92); color: #23262e; }
39
+ .ta-video-end { width: 64px; height: 64px; background: #ff3b30; }
40
+ .ta-video-spacer { visibility: hidden; }
41
+ .ta-video-minimize, .ta-video-pin { width: 40px; height: 40px; background: rgba(0, 0, 0, 0.22); }
42
+ .ta-video-pin { grid-column: 3; }
43
+ .ta-video-pin.ta-on { background: rgba(255, 255, 255, 0.92); color: #23262e; }
44
+ .ta-video-self { position: absolute; z-index: 1; top: calc(env(safe-area-inset-top, 0px) + 68px); right: 14px; width: 28%; max-width: 124px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: #0b0c0f; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
45
+ .ta-video-window .ta-video-self { top: 84px; }
46
+ .ta-video-self.ta-mirror { transform: scaleX(-1); }
47
+ .ta-video-caption { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: calc(env(safe-area-inset-bottom, 0px) + 124px); text-align: center; font-size: calc(16px * var(--ta-font-scale)); line-height: 1.5; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
48
+ .ta-video-caption.ta-mine { opacity: 0.78; }
49
+ .ta-video-controls { position: absolute; z-index: 1; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 32px); display: flex; align-items: center; justify-content: center; gap: 36px; }
50
+ .ta-video-panel .ta-video-controls, .ta-video-window .ta-video-controls { gap: 28px; bottom: 24px; }
51
+ .ta-video-panel .ta-video-caption, .ta-video-window .ta-video-caption { bottom: 112px; font-size: calc(15px * var(--ta-font-scale)); }
52
+ /* Who Ta shows as (PeoplePicker): round faces on the right, above the captions; the one shown ringed. */
53
+ .ta-video-people { margin: 0; padding: 0; border: 0; min-width: 0; position: absolute; z-index: 1; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 184px); display: flex; flex-direction: column; gap: 12px; }
54
+ .ta-video-panel .ta-video-people, .ta-video-window .ta-video-people { bottom: 168px; }
55
+ .ta-video-person-pick { width: 46px; height: 46px; padding: 0; border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 50%; overflow: hidden; background: rgba(0, 0, 0, 0.2); cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); transition: border-color 160ms, transform 120ms, opacity 160ms; opacity: 0.82; }
56
+ .ta-video-person-pick img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
57
+ .ta-video-person-pick.ta-on { border-color: #f3dfb4; opacity: 1; }
58
+ .ta-video-person-pick:active { transform: scale(0.94); }
59
+ .ta-video-window .ta-video-person-pick { app-region: no-drag; -webkit-app-region: no-drag; }
60
+ .ta-video-mini-phase { position: absolute; z-index: 1; left: 50%; bottom: 6px; transform: translateX(-50%); max-width: calc(100% - 12px); padding: 2px 8px; border-radius: 999px; font-size: calc(11px * var(--ta-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(0, 0, 0, 0.4); }
61
+ @media (prefers-reduced-motion: reduce) { .ta-video-call { animation: none; } }
62
+ `;
63
+ //# sourceMappingURL=video-call.js.map
@@ -12,6 +12,7 @@ import { SHELL_STYLE } from './style/shell.js';
12
12
  import { SURFACES_STYLE } from './style/surfaces.js';
13
13
  import { TASKS_STYLE } from './style/tasks.js';
14
14
  import { TINTS_STYLE } from './style/tints.js';
15
+ import { VIDEO_CALL_STYLE } from './style/video-call.js';
15
16
  /**
16
17
  * The styles of the web client: neutral surfaces, light and dark, for wide and narrow screens, fingers and
17
18
  * pointers (the breakpoints are DeviceMedia's). In this
@@ -32,5 +33,6 @@ export const STYLE = [
32
33
  SURFACES_STYLE,
33
34
  PHONE_STYLE,
34
35
  SHARED_STYLE,
36
+ VIDEO_CALL_STYLE,
35
37
  ].join('');
36
38
  //# sourceMappingURL=style.js.map
@@ -0,0 +1,16 @@
1
+ import type { ThreadItem, TurnItem } from './process.js';
2
+ /**
3
+ * A conversation a call was answered in as the record of the call (docs/design/ta-call.md 14): what the user and Ta
4
+ * said to each other, as a messenger keeps it. Its messages are the model's: what the user had not done saying
5
+ * (answered at once, dropped as they went on), turns cut short as they spoke, news of the work and Ta's choice to say
6
+ * nothing of it, thoughts. None of those is the call; this keeps what was said, and what Ta did on the way.
7
+ */
8
+ export declare namespace CallTranscript {
9
+ /** The items of the conversation, as the record of the call shows them. */
10
+ function items(items: readonly ThreadItem[]): ThreadItem[];
11
+ /**
12
+ * A turn as the record shows it: without thoughts and Ta's choice to say nothing; undefined when nothing is left
13
+ * of it (cut short as the user spoke, or quiet), unless it failed or goes on.
14
+ */
15
+ function spoken(turn: TurnItem): TurnItem | undefined;
16
+ }
@@ -0,0 +1,110 @@
1
+ import { TA_CALL_QUIET, TaMessageContext, TaSaid } from '@celljs/ta-protocol';
2
+ import { MessageUtil } from './message.js';
3
+ /** Said again this soon, what the user said replaces what they said before it, whatever the words (heard better). */
4
+ const AGAIN_MS = 3000;
5
+ /** Said again this long after, what begins with the words before replaces them (the user went on). */
6
+ const ON_MS = 30000;
7
+ /** What a call of before put in front of what the user said, for the model alone; now in the context. */
8
+ const OLD_MARK = /^\[(?:more|sent)\] /;
9
+ /**
10
+ * A conversation a call was answered in as the record of the call (docs/design/ta-call.md 14): what the user and Ta
11
+ * said to each other, as a messenger keeps it. Its messages are the model's: what the user had not done saying
12
+ * (answered at once, dropped as they went on), turns cut short as they spoke, news of the work and Ta's choice to say
13
+ * nothing of it, thoughts. None of those is the call; this keeps what was said, and what Ta did on the way.
14
+ */
15
+ export var CallTranscript;
16
+ (function (CallTranscript) {
17
+ const cleaned = new WeakMap();
18
+ /** The items of the conversation, as the record of the call shows them. */
19
+ function items(items) {
20
+ const shown = [];
21
+ items.forEach((item, index) => {
22
+ if (item.kind === 'turn') {
23
+ const turn = spoken(item);
24
+ if (turn) {
25
+ shown.push(turn);
26
+ }
27
+ return;
28
+ }
29
+ if (!said(item)) {
30
+ if (!notice(item)) {
31
+ shown.push(item);
32
+ }
33
+ return;
34
+ }
35
+ const next = items[index + 1];
36
+ const answered = (next === null || next === void 0 ? void 0 : next.kind) === 'turn' && spoken(next) !== undefined;
37
+ if (!answered && replaced(items, index)) {
38
+ return;
39
+ }
40
+ shown.push(clean(item));
41
+ });
42
+ return shown;
43
+ }
44
+ CallTranscript.items = items;
45
+ /**
46
+ * A turn as the record shows it: without thoughts and Ta's choice to say nothing; undefined when nothing is left
47
+ * of it (cut short as the user spoke, or quiet), unless it failed or goes on.
48
+ */
49
+ function spoken(turn) {
50
+ const steps = turn.steps.filter(step => step.kind !== 'thinking');
51
+ const reply = turn.reply.filter(text => text.trim() && text.trim() !== TA_CALL_QUIET);
52
+ if (!turn.active && !steps.length && !reply.length && MessageUtil.stopReason(turn.last) !== 'error') {
53
+ return undefined;
54
+ }
55
+ return steps.length === turn.steps.length && reply.length === turn.reply.length ? turn : { ...turn, steps, reply };
56
+ }
57
+ CallTranscript.spoken = spoken;
58
+ /** Whether what the user said at `index` was said again soon after: what they said next replaces it. */
59
+ function replaced(items, index) {
60
+ const item = items[index];
61
+ for (let next = index + 1; next < items.length; next++) {
62
+ const later = items[next];
63
+ if (later.kind !== 'message' || !said(later)) {
64
+ continue;
65
+ }
66
+ const apart = time(later) - time(item);
67
+ return apart <= AGAIN_MS || (apart <= ON_MS && words(later).startsWith(words(item)));
68
+ }
69
+ return false;
70
+ }
71
+ /** What the user said in the call: a message of theirs, not news of the work. */
72
+ function said(item) {
73
+ return item.message.role === 'user' && !notice(item);
74
+ }
75
+ function notice(item) {
76
+ return TaSaid.notice(item.message);
77
+ }
78
+ function time(item) {
79
+ var _a;
80
+ return (_a = item.message.timestamp) !== null && _a !== void 0 ? _a : 0;
81
+ }
82
+ /** The words of what the user said, without marks, stops and spaces: what is heard again as the user goes on. */
83
+ function words(item) {
84
+ return TaSaid.of(item.message)
85
+ .replace(OLD_MARK, '')
86
+ .replace(/[\p{P}\p{S}\s]/gu, '')
87
+ .toLowerCase();
88
+ }
89
+ /**
90
+ * What the user said as they said it: without the context for the model (where it came from: the call, every one
91
+ * of them) and the mark a call of before put in front of the words.
92
+ */
93
+ function clean(item) {
94
+ const { message } = item;
95
+ let kept = cleaned.get(message);
96
+ if (!kept) {
97
+ const content = message.content;
98
+ const strip = (text) => TaMessageContext.strip(text).replace(OLD_MARK, '');
99
+ kept = {
100
+ ...message,
101
+ content: typeof content === 'string'
102
+ ? strip(content)
103
+ : content.map(part => part.type === 'text' && typeof part.text === 'string' ? { ...part, text: strip(part.text) } : part),
104
+ };
105
+ cleaned.set(message, kept);
106
+ }
107
+ return { ...item, message: kept };
108
+ }
109
+ })(CallTranscript || (CallTranscript = {}));
110
+ //# sourceMappingURL=call-transcript.js.map
@@ -1,5 +1,9 @@
1
1
  /** What Ta Desktop can do for the page beyond a tab of a browser. */
2
- export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices' | 'speech' | 'restart' | 'links' | 'call';
2
+ export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices' | 'speech' | 'restart' | 'links' | 'call'
3
+ /** It lets the page open the window of a video call (window.open('about:blank', 'ta-video-call')). */
4
+ | 'callWindow'
5
+ /** It pins the window of a video call above every window, or not (callWindowPin). */
6
+ | 'callWindowPin';
3
7
  /** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
4
8
  export interface DesktopFileManager {
5
9
  /** Node's `process.platform` of the machine: what the file manager is called there. */
@@ -79,6 +83,11 @@ export declare namespace DesktopUtil {
79
83
  /** The sign-ins of the user's browsers, where Ta Desktop can read them (macOS, Windows). */
80
84
  /** Tells Ta Desktop a call goes on, or ended: it does not restart under it. None outside Ta Desktop. */
81
85
  function calling(scope?: object): ((active: boolean) => void) | undefined;
86
+ /**
87
+ * Whether Ta Desktop pins the window of a video call above every window, after pinning or unpinning it when
88
+ * `pinned` is given; it keeps the choice for the next call. None outside Ta Desktop, nor in an older one.
89
+ */
90
+ function callWindowPin(scope?: object): ((pinned?: boolean) => Promise<boolean>) | undefined;
82
91
  function browserData(scope?: object): DesktopBrowserData | undefined;
83
92
  /** `debugWebview` of Ta Desktop; `undefined` elsewhere. */
84
93
  function debugWebview(scope?: object): DebugWebview | undefined;
@@ -42,6 +42,16 @@ export var DesktopUtil;
42
42
  return has('call', scope) && typeof call === 'function' ? active => void Promise.resolve(call(active)).catch(() => undefined) : undefined;
43
43
  }
44
44
  DesktopUtil.calling = calling;
45
+ /**
46
+ * Whether Ta Desktop pins the window of a video call above every window, after pinning or unpinning it when
47
+ * `pinned` is given; it keeps the choice for the next call. None outside Ta Desktop, nor in an older one.
48
+ */
49
+ function callWindowPin(scope = globalThis) {
50
+ var _a;
51
+ const pin = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.callWindowPin;
52
+ return has('callWindowPin', scope) && typeof pin === 'function' ? async (pinned) => (await pin(pinned)) === true : undefined;
53
+ }
54
+ DesktopUtil.callWindowPin = callWindowPin;
45
55
  function browserData(scope = globalThis) {
46
56
  var _a;
47
57
  const data = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.browserData;
@@ -0,0 +1,61 @@
1
+ /** A box on the screen: where it starts and how big it is. */
2
+ export interface PullRect {
3
+ left: number;
4
+ top: number;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ /** How the picture is drawn as the finger pulls it: moved by `x`, `y` and at `scale` about where the finger set off. */
9
+ export interface PullPlace {
10
+ x: number;
11
+ y: number;
12
+ scale: number;
13
+ }
14
+ /**
15
+ * A finger pulls a picture over the page down to close it, as the viewers of pictures of a phone (WeChat, Photos):
16
+ * the picture follows the finger, smaller as it goes down, the page under it shows through; let go far enough,
17
+ * or flicked down, it flies back to where it was opened from (its thumbnail), else it comes back. Pure, for the tests.
18
+ */
19
+ export declare namespace ImagePullUtil {
20
+ /** Down all the height of the screen, it is this much smaller. */
21
+ const SHRINK = 0.5;
22
+ /** Down this much of the height of the screen, the page under it shows through all. */
23
+ const CLEAR = 0.6;
24
+ /** Let go this far down of the height of the screen (at least FAR_PX), it closes. */
25
+ const FAR = 0.12;
26
+ const FAR_PX = 72;
27
+ /** How long it flies back or away, let go slowly. */
28
+ const SETTLE_MS = 300;
29
+ /** How long it fades away, closed with no thumbnail to go back to. */
30
+ const FADE_MS = 180;
31
+ /**
32
+ * Whether the move so far (`dx`, `dy`) pulls the picture: undefined until it is told, false when it goes up or
33
+ * more sideways than down (a swipe to the picture beside), or the picture is zoomed in (the finger scrolls it).
34
+ */
35
+ function claims(dx: number, dy: number, zoomed: boolean): boolean | undefined;
36
+ /** Where the picture is, the finger moved `dx`, `dy` on a screen `height` tall: with it, smaller only as it goes down. */
37
+ function place(dx: number, dy: number, height: number): PullPlace;
38
+ /** How dark the shade over the page is, 1 as at first, the finger moved `dy`. */
39
+ function shade(dy: number, height: number): number;
40
+ /** Whether it closes, let go `dy` down at `speed` down (pixels a millisecond): flicked that way, or far enough not flicked up. */
41
+ function closes(dy: number, speed: number, height: number): boolean;
42
+ /**
43
+ * Where it is drawn to sit on `target` (its thumbnail), covering it as the thumbnail covers its box: the picture is
44
+ * at `rect` now, drawn at `now` about `origin` (a point of its box, which is at `box` drawn as at first).
45
+ */
46
+ function onto(rect: PullRect, target: PullRect, box: {
47
+ left: number;
48
+ top: number;
49
+ }, origin: {
50
+ x: number;
51
+ y: number;
52
+ }, now: PullPlace): PullPlace;
53
+ /** A clip-path that shows of a box `width` × `height` only `rect` of it (in its own pixels), its corners `radius` round. */
54
+ function inset(rect: PullRect, width: number, height: number, radius: number): string;
55
+ /** Of the picture at `image` (in the pixels of its box), the middle its thumbnail shows, `target` large, once drawn at `scale`. */
56
+ function middle(image: PullRect, target: {
57
+ width: number;
58
+ height: number;
59
+ }, scale: number): PullRect;
60
+ function transform({ x, y, scale }: PullPlace): string;
61
+ }
@@ -0,0 +1,88 @@
1
+ import { SwipeUtil } from '../device/swipe-util.js';
2
+ /**
3
+ * A finger pulls a picture over the page down to close it, as the viewers of pictures of a phone (WeChat, Photos):
4
+ * the picture follows the finger, smaller as it goes down, the page under it shows through; let go far enough,
5
+ * or flicked down, it flies back to where it was opened from (its thumbnail), else it comes back. Pure, for the tests.
6
+ */
7
+ export var ImagePullUtil;
8
+ (function (ImagePullUtil) {
9
+ /** Down all the height of the screen, it is this much smaller. */
10
+ ImagePullUtil.SHRINK = 0.5;
11
+ /** Down this much of the height of the screen, the page under it shows through all. */
12
+ ImagePullUtil.CLEAR = 0.6;
13
+ /** Let go this far down of the height of the screen (at least FAR_PX), it closes. */
14
+ ImagePullUtil.FAR = 0.12;
15
+ ImagePullUtil.FAR_PX = 72;
16
+ /** How long it flies back or away, let go slowly. */
17
+ ImagePullUtil.SETTLE_MS = 300;
18
+ /** How long it fades away, closed with no thumbnail to go back to. */
19
+ ImagePullUtil.FADE_MS = 180;
20
+ /**
21
+ * Whether the move so far (`dx`, `dy`) pulls the picture: undefined until it is told, false when it goes up or
22
+ * more sideways than down (a swipe to the picture beside), or the picture is zoomed in (the finger scrolls it).
23
+ */
24
+ function claims(dx, dy, zoomed) {
25
+ if (Math.hypot(dx, dy) < SwipeUtil.SLOP_PX) {
26
+ return undefined;
27
+ }
28
+ return !zoomed && dy > 0 && dy > Math.abs(dx) * 1.2;
29
+ }
30
+ ImagePullUtil.claims = claims;
31
+ /** Where the picture is, the finger moved `dx`, `dy` on a screen `height` tall: with it, smaller only as it goes down. */
32
+ function place(dx, dy, height) {
33
+ const down = Math.min(1, Math.max(0, dy) / Math.max(1, height));
34
+ return { x: dx, y: dy, scale: 1 - down * ImagePullUtil.SHRINK };
35
+ }
36
+ ImagePullUtil.place = place;
37
+ /** How dark the shade over the page is, 1 as at first, the finger moved `dy`. */
38
+ function shade(dy, height) {
39
+ return 1 - Math.min(1, Math.max(0, dy) / Math.max(1, height * ImagePullUtil.CLEAR));
40
+ }
41
+ ImagePullUtil.shade = shade;
42
+ /** Whether it closes, let go `dy` down at `speed` down (pixels a millisecond): flicked that way, or far enough not flicked up. */
43
+ function closes(dy, speed, height) {
44
+ if (Math.abs(speed) > SwipeUtil.FLICK) {
45
+ return speed > 0 && dy > 0;
46
+ }
47
+ return dy > Math.max(ImagePullUtil.FAR_PX, height * ImagePullUtil.FAR);
48
+ }
49
+ ImagePullUtil.closes = closes;
50
+ /**
51
+ * Where it is drawn to sit on `target` (its thumbnail), covering it as the thumbnail covers its box: the picture is
52
+ * at `rect` now, drawn at `now` about `origin` (a point of its box, which is at `box` drawn as at first).
53
+ */
54
+ function onto(rect, target, box, origin, now) {
55
+ const by = Math.max(target.width / Math.max(1, rect.width), target.height / Math.max(1, rect.height));
56
+ const around = { x: box.left + origin.x, y: box.top + origin.y };
57
+ const middle = (r) => ({ x: r.left + r.width / 2, y: r.top + r.height / 2 });
58
+ const from = middle(rect);
59
+ const to = middle(target);
60
+ return {
61
+ x: to.x - around.x - by * (from.x - around.x - now.x),
62
+ y: to.y - around.y - by * (from.y - around.y - now.y),
63
+ scale: now.scale * by,
64
+ };
65
+ }
66
+ ImagePullUtil.onto = onto;
67
+ /** A clip-path that shows of a box `width` × `height` only `rect` of it (in its own pixels), its corners `radius` round. */
68
+ function inset(rect, width, height, radius) {
69
+ const top = Math.max(0, rect.top);
70
+ const left = Math.max(0, rect.left);
71
+ const bottom = Math.max(0, height - rect.top - rect.height);
72
+ const right = Math.max(0, width - rect.left - rect.width);
73
+ return `inset(${top}px ${right}px ${bottom}px ${left}px round ${radius}px)`;
74
+ }
75
+ ImagePullUtil.inset = inset;
76
+ /** Of the picture at `image` (in the pixels of its box), the middle its thumbnail shows, `target` large, once drawn at `scale`. */
77
+ function middle(image, target, scale) {
78
+ const width = Math.min(image.width, target.width / scale);
79
+ const height = Math.min(image.height, target.height / scale);
80
+ return { left: image.left + (image.width - width) / 2, top: image.top + (image.height - height) / 2, width, height };
81
+ }
82
+ ImagePullUtil.middle = middle;
83
+ function transform({ x, y, scale }) {
84
+ return `translate3d(${x}px, ${y}px, 0) scale(${scale})`;
85
+ }
86
+ ImagePullUtil.transform = transform;
87
+ })(ImagePullUtil || (ImagePullUtil = {}));
88
+ //# sourceMappingURL=image-pull.js.map
@@ -16,6 +16,12 @@ export type ProcessStep = {
16
16
  kind: 'summary';
17
17
  key: string;
18
18
  text: string;
19
+ }
20
+ /** What it wrote of the pictures attached, for Ta to keep (TaPictureNote): folded among the steps, never words of the reply. */
21
+ | {
22
+ kind: 'pictures';
23
+ key: string;
24
+ told: [number, string][];
19
25
  } | {
20
26
  kind: 'tool';
21
27
  key: string;
@@ -1,4 +1,4 @@
1
- import { TA_RESUME_MESSAGE, TaAgentSummary } from '@celljs/ta-protocol';
1
+ import { TA_RESUME_MESSAGE, TaAgentSummary, TaPictureNote } from '@celljs/ta-protocol';
2
2
  import { MessageUtil } from './message.js';
3
3
  /** While the agent works, only the latest steps show; the earlier ones fold into one row. */
4
4
  export const VISIBLE_STEPS = 8;
@@ -141,7 +141,17 @@ export var ProcessUtil;
141
141
  }
142
142
  else if (block.type === 'text' && ((_b = block.text) === null || _b === void 0 ? void 0 : _b.trim())) {
143
143
  const summary = TaAgentSummary.read(block.text);
144
- steps.push(summary === undefined ? { kind: 'text', key, text: block.text } : { kind: 'summary', key, text: summary });
144
+ if (summary !== undefined) {
145
+ steps.push({ kind: 'summary', key, text: summary });
146
+ return;
147
+ }
148
+ const { said, told } = TaPictureNote.take(block.text);
149
+ if (told.size) {
150
+ steps.push({ kind: 'pictures', key: `${key}.p`, told: [...told] });
151
+ }
152
+ if (said.trim()) {
153
+ steps.push({ kind: 'text', key, text: said });
154
+ }
145
155
  }
146
156
  else if (block.type === 'toolCall') {
147
157
  steps.push({ kind: 'tool', key: block.id || key, call: block });
@@ -149,15 +159,18 @@ export var ProcessUtil;
149
159
  });
150
160
  });
151
161
  let end = steps.length;
152
- while (end > 0 && steps[end - 1].kind === 'text') {
162
+ while (end > 0 && (steps[end - 1].kind === 'text' || steps[end - 1].kind === 'pictures')) {
153
163
  end--;
154
164
  }
155
165
  // While ta works after steps, what it says is one more step: a tool may follow it. The reply is what it ends with.
156
166
  if (active && end > 0) {
157
167
  end = steps.length;
158
168
  }
159
- const reply = steps.slice(end).map(step => (step.kind === 'text' ? step.text : ''));
160
- return { kind: 'turn', key: `t${start}`, messages, steps: steps.slice(0, end), reply, last, active };
169
+ const tail = steps.slice(end);
170
+ // What it wrote of the pictures after its last tool stays a step: the reply is its words.
171
+ const reply = tail.flatMap(step => (step.kind === 'text' ? [step.text] : []));
172
+ const kept = [...steps.slice(0, end), ...tail.filter(step => step.kind === 'pictures')];
173
+ return { kind: 'turn', key: `t${start}`, messages, steps: kept, reply, last, active };
161
174
  }
162
175
  /**
163
176
  * Words on the way with a fenced block a web extension draws (WebExtensionAPI.registerCodeRenderer,
@@ -13,9 +13,9 @@ export declare namespace SpokenReply {
13
13
  /** The language of the block for the ear. */
14
14
  const LANGUAGE = "ta-say";
15
15
  /** What the model is told with what the user says in a call, in the context of their message: to write the block. */
16
- const NOTE = "[ta-call] The user talks with you in a voice call: your reply is shown, and Ta reads aloud only a block of language ta-say you end it with. Write one: one to three short sentences in the user's language, as you would say it on the phone: the answer, and what they must decide or know (a question, a failure, a risk). No code, paths, links, tables or lists; say the rest is on the screen when there is more.";
17
- /** What the user said in a call, as sent to the conversation: with the note, which pages leave out. */
18
- function asked(text: string): string;
16
+ const NOTE = "[ta-call] The user talks with you in a call: your reply is shown, and Ta reads aloud only a block of language ta-say you end it with. Write one: one to three short sentences in the user's language, as you would say it on the phone: the answer, and what they must decide or know (a question, a failure, a risk). No code, paths, links, tables or lists; say the rest is on the screen when there is more.";
17
+ /** What the user said in a call, as sent to the conversation: with the note, and what is new of the call (`scene`, TaCallSceneUtil.next), which pages leave out. */
18
+ function asked(text: string, scene?: string): string;
19
19
  interface Words {
20
20
  /** Said after the rest when something of the reply is only on the screen. */
21
21
  onScreen: string;
@@ -18,10 +18,10 @@ export var SpokenReply;
18
18
  const SENTENCES = 3;
19
19
  const CHARS = 160;
20
20
  /** What the model is told with what the user says in a call, in the context of their message: to write the block. */
21
- SpokenReply.NOTE = `[ta-call] The user talks with you in a voice call: your reply is shown, and Ta reads aloud only a block of language ${SpokenReply.LANGUAGE} you end it with. Write one: one to three short sentences in the user's language, as you would say it on the phone: the answer, and what they must decide or know (a question, a failure, a risk). No code, paths, links, tables or lists; say the rest is on the screen when there is more.`;
22
- /** What the user said in a call, as sent to the conversation: with the note, which pages leave out. */
23
- function asked(text) {
24
- return TaMessageContext.wrap(SpokenReply.NOTE, text);
21
+ SpokenReply.NOTE = `[ta-call] The user talks with you in a call: your reply is shown, and Ta reads aloud only a block of language ${SpokenReply.LANGUAGE} you end it with. Write one: one to three short sentences in the user's language, as you would say it on the phone: the answer, and what they must decide or know (a question, a failure, a risk). No code, paths, links, tables or lists; say the rest is on the screen when there is more.`;
22
+ /** What the user said in a call, as sent to the conversation: with the note, and what is new of the call (`scene`, TaCallSceneUtil.next), which pages leave out. */
23
+ function asked(text, scene) {
24
+ return TaMessageContext.wrap(scene ? `${SpokenReply.NOTE}\n${scene}` : SpokenReply.NOTE, text);
25
25
  }
26
26
  SpokenReply.asked = asked;
27
27
  /**
@@ -0,0 +1,59 @@
1
+ import type { ImageContent } from '@celljs/ta-protocol';
2
+ import type { VoiceCall } from '../assistant/voice-call.js';
3
+ /** When a picture of the camera goes with what the user says (docs/design/ta-call.md 12). */
4
+ export declare namespace CallLook {
5
+ /** How long after one picture another goes with a change, in ms; and with none, at the latest. */
6
+ const CHANGED_MS = 6000;
7
+ const STALE_MS = 90000;
8
+ /** How much a frame must differ from the one sent (the mean of grey levels, 0 to 255) to be a change. */
9
+ const CHANGE = 14;
10
+ /**
11
+ * Whether to send the frame now with `text`: the first one, one the words ask to look at, one that changed since
12
+ * the last sent (not more often than CHANGED_MS), and one now and then; else the model has seen it already.
13
+ */
14
+ function due(text: string, now: number, last: {
15
+ at: number;
16
+ print: Uint8Array;
17
+ } | undefined, print: Uint8Array): boolean;
18
+ /** The mean difference of two prints. */
19
+ function differ(a: Uint8Array, b: Uint8Array): number;
20
+ }
21
+ /**
22
+ * The user's camera in a video call: what they see of themselves (`stream`), and what Ta sees of them, a picture of
23
+ * now with what they say (`frame`). It begins off, asking for no camera until the user turns it on (start does
24
+ * nothing while off); turned off, it lets go of the camera.
25
+ */
26
+ export declare class CallCamera {
27
+ stream?: MediaStream;
28
+ facing: 'user' | 'environment';
29
+ protected video?: HTMLVideoElement;
30
+ protected sent?: {
31
+ at: number;
32
+ print: Uint8Array;
33
+ };
34
+ protected readonly listeners: Set<() => void>;
35
+ protected opening?: Promise<void>;
36
+ /** Off until the user turns it on, or turned off again, or it could not open. */
37
+ off: boolean;
38
+ denied: boolean;
39
+ subscribe(listener: () => void): () => void;
40
+ protected changed(): void;
41
+ start(): Promise<void>;
42
+ /** On or off, as the user taps. */
43
+ toggle(): void;
44
+ /** The other camera of a phone: the user's face, or what is in front of them. */
45
+ flip(): void;
46
+ stop(): void;
47
+ /** A picture of now to go with `text`, when one is due (CallLook.due); undefined when off, not ready or not due. */
48
+ frame(text: string, now?: number): ImageContent | undefined;
49
+ protected static print(canvas: HTMLCanvasElement): Uint8Array;
50
+ protected static release(stream: MediaStream): void;
51
+ }
52
+ /** The camera of each video call, as long as it goes on. */
53
+ export declare namespace CallCameras {
54
+ function of(call: VoiceCall): CallCamera;
55
+ /** The picture to go with what the user said in `call`, when it is a video call with its camera on. */
56
+ function frame(call: VoiceCall, text: string): ImageContent | undefined;
57
+ /** The call ended: its camera lets go, and the next video call begins with it off. */
58
+ function end(call: VoiceCall): void;
59
+ }