@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,117 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.CallFace = CallFace;
37
+ const React = __importStar(require("react"));
38
+ const ta_avatar_1 = require("../components/ta-avatar");
39
+ const hooks_1 = require("../hooks");
40
+ const use_t_1 = require("../i18n/use-t");
41
+ const call_screen_1 = require("./call-screen");
42
+ /** How far a finger or the mouse moves before the window of the face is dragged rather than tapped, in pixels. */
43
+ const DRAG_PX = 6;
44
+ /** The side of the conversation the face of a call keeps to, as the user last dragged it: the same in every call. */
45
+ let side = 'right';
46
+ /**
47
+ * Ta's face in a call (docs/design/ta-call.md 11): a small window at a top corner of the conversation, as the other side
48
+ * of a video call is. Drawn here on the device from what plays, nothing of video goes over the connection: its mouth
49
+ * moves by the sound of Ta's voice, it nods to the user's words, listens, thinks and dozes as the call does. Dragged, it
50
+ * keeps to the nearer side; tapped while Ta speaks, Ta stops for the user.
51
+ */
52
+ function CallFace({ state, call }) {
53
+ const t = (0, use_t_1.useT)();
54
+ const [{ settings }] = (0, hooks_1.useSettings)();
55
+ const [at, setAt] = React.useState(side);
56
+ const [drag, setDrag] = React.useState(undefined);
57
+ const start = React.useRef(undefined);
58
+ const box = React.useRef(null);
59
+ // The user's words as they come: each change may be a nod.
60
+ const nods = state.phase === 'listening' ? state.heard.length : 0;
61
+ const talk = React.useMemo(() => ({ level: () => call.level(), nods }), [call, nods]);
62
+ if (!state.active || state.video || !settings.callFace) {
63
+ return null;
64
+ }
65
+ const mood = call_screen_1.CallScreen.mood(state);
66
+ const cut = !state.paused && state.phase === 'speaking';
67
+ const label = call_screen_1.CallScreen.phase(t, { phase: state.phase, paused: state.paused, heard: !!state.heard.trim() });
68
+ const down = (event) => {
69
+ var _a, _b;
70
+ start.current = { x: event.clientX, id: event.pointerId, moved: false };
71
+ // Its moves are its own until it is let go, though the pointer leaves it as it drags.
72
+ (_b = (_a = event.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, event.pointerId);
73
+ };
74
+ const move = (event) => {
75
+ const begun = start.current;
76
+ if (!begun || begun.id !== event.pointerId) {
77
+ return;
78
+ }
79
+ const dx = event.clientX - begun.x;
80
+ if (!begun.moved && Math.abs(dx) < DRAG_PX) {
81
+ return;
82
+ }
83
+ begun.moved = true;
84
+ setDrag(dx);
85
+ };
86
+ const up = (event) => {
87
+ const begun = start.current;
88
+ start.current = undefined;
89
+ if (!begun || begun.id !== event.pointerId) {
90
+ return;
91
+ }
92
+ if (!begun.moved) {
93
+ if (cut) {
94
+ call.interrupt();
95
+ }
96
+ return;
97
+ }
98
+ // It goes to the side its middle is nearer.
99
+ const element = box.current;
100
+ const parent = element === null || element === void 0 ? void 0 : element.offsetParent;
101
+ if (element && parent) {
102
+ const rect = element.getBoundingClientRect();
103
+ const room = parent.getBoundingClientRect();
104
+ const next = rect.left + rect.width / 2 < room.left + room.width / 2 ? 'left' : 'right';
105
+ side = next;
106
+ setAt(next);
107
+ }
108
+ setDrag(undefined);
109
+ };
110
+ return (React.createElement("div", { ref: box, className: `ta-call-face ta-call-face-${at}${drag === undefined ? '' : ' ta-dragging'}`, style: drag === undefined ? undefined : { transform: `translate3d(${drag}px, 0, 0)` }, role: "img", "aria-label": label, title: cut ? t('ta.call.interrupt') : label, onPointerDown: down, onPointerMove: move, onPointerUp: up, onPointerCancel: () => {
111
+ start.current = undefined;
112
+ setDrag(undefined);
113
+ } },
114
+ React.createElement(ta_avatar_1.DinoFace, { mood: mood, size: 160, talk: talk, fill: true, className: "ta-call-face-dino" }),
115
+ React.createElement("span", { className: "ta-call-face-phase" }, label)));
116
+ }
117
+ //# sourceMappingURL=call-face.js.map
@@ -14,6 +14,8 @@ export interface CallSpot {
14
14
  sessionId: string;
15
15
  double?: boolean;
16
16
  title: string;
17
+ /** A video call: called again as one. */
18
+ video?: boolean;
17
19
  }
18
20
  /** The call going on, noted as it changes: the page that loads again (the app restarted) calls again. */
19
21
  export interface NotedCall extends CallSpot {
@@ -82,10 +84,10 @@ export interface TaCallKeeper {
82
84
  */
83
85
  readonly resuming: CallSpot | undefined;
84
86
  /**
85
- * The view of a conversation showed: whether to call it again, as its call went on as the page went away; asked
86
- * once. The double's is called again by whichever conversation is the double's now.
87
+ * The view of a conversation showed: the call to make again (a video call as one), as its call went on as the page
88
+ * went away; undefined when none. Asked once. The double's is called again by whichever conversation is the double's now.
87
89
  */
88
- resume(sessionId: string, double?: boolean): boolean;
90
+ resume(sessionId: string, double?: boolean): CallSpot | undefined;
89
91
  hangUp(): void;
90
92
  /**
91
93
  * The call going on in another page of the user (on their phone, another computer), as it says of itself
@@ -123,11 +125,13 @@ export declare class TaCallKeeperImpl implements TaCallKeeper {
123
125
  keep(call: KeptCall): void;
124
126
  take(sessionId: string): HeldCall | undefined;
125
127
  get resuming(): CallSpot | undefined;
126
- resume(sessionId: string, double?: boolean): boolean;
128
+ resume(sessionId: string, double?: boolean): CallSpot | undefined;
127
129
  hangUp(): void;
128
130
  subscribe(listener: () => void): () => void;
129
131
  /** The call going on now: the one before, of another conversation, hangs up. */
130
132
  protected watch(call: KeptCall): void;
133
+ /** Notes the call going on now, as it is. */
134
+ protected noteKept(): void;
131
135
  /** Notes the call going on, for the page that loads next (resuming); undefined once it is over. */
132
136
  protected note(spot: CallSpot | undefined): void;
133
137
  /** Tells the user's other pages how the call going on is: as it changes, and every SHARE_MS. */
@@ -15,6 +15,7 @@ const device_protocol_1 = require("../device/device-protocol");
15
15
  const screen_awake_1 = require("../device/screen-awake");
16
16
  const state_protocol_1 = require("../state/state-protocol");
17
17
  const desktop_1 = require("../util/desktop");
18
+ const call_window_1 = require("../video-call/call-window");
18
19
  exports.TaCallKeeper = Symbol('TaCallKeeper');
19
20
  var CallKeeperUtil;
20
21
  (function (CallKeeperUtil) {
@@ -31,7 +32,13 @@ var CallKeeperUtil;
31
32
  var _a;
32
33
  const call = value;
33
34
  return call && typeof call.sessionId === 'string' && typeof call.at === 'number'
34
- ? { sessionId: call.sessionId, double: call.double === true, title: String((_a = call.title) !== null && _a !== void 0 ? _a : ''), at: call.at }
35
+ ? {
36
+ sessionId: call.sessionId,
37
+ double: call.double === true,
38
+ title: String((_a = call.title) !== null && _a !== void 0 ? _a : ''),
39
+ ...(call.video ? { video: true } : {}),
40
+ at: call.at,
41
+ }
35
42
  : undefined;
36
43
  },
37
44
  };
@@ -71,7 +78,7 @@ var CallKeeperUtil;
71
78
  /** The call noted, if it went on lately enough to call again. */
72
79
  function resumable(noted, now) {
73
80
  return noted && now - noted.at >= 0 && now - noted.at <= CallKeeperUtil.RESUME_MS
74
- ? { sessionId: noted.sessionId, double: noted.double, title: noted.title }
81
+ ? { sessionId: noted.sessionId, double: noted.double, title: noted.title, ...(noted.video ? { video: true } : {}) }
75
82
  : undefined;
76
83
  }
77
84
  CallKeeperUtil.resumable = resumable;
@@ -108,8 +115,16 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
108
115
  }
109
116
  }
110
117
  begin(call) {
111
- var _a;
112
- if (((_a = this.current) === null || _a === void 0 ? void 0 : _a.held.call) === call.held.call) {
118
+ const current = this.current;
119
+ if ((current === null || current === void 0 ? void 0 : current.held.call) === call.held.call) {
120
+ // Its conversation took its own id (one loaded again is known by its file until it loads), or a new title.
121
+ if (current.sessionId !== call.sessionId || current.title !== call.title) {
122
+ this.current = { ...current, sessionId: call.sessionId, title: call.title };
123
+ this.noteKept();
124
+ this.sharedAs = undefined;
125
+ this.share(this.current);
126
+ this.changed();
127
+ }
113
128
  return;
114
129
  }
115
130
  this.watch(call);
@@ -126,7 +141,7 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
126
141
  (_b = this.offShown) === null || _b === void 0 ? void 0 : _b.call(this);
127
142
  // As the view did: another app in front or the screen locked, the call waits.
128
143
  const voice = call.held.call;
129
- const shown = () => (document.visibilityState === 'hidden' ? voice.pause() : voice.resume());
144
+ const shown = () => (call_window_1.CallWindow.hidden() ? voice.pause() : voice.resume());
130
145
  if (typeof document !== 'undefined') {
131
146
  document.addEventListener('visibilitychange', shown);
132
147
  window.addEventListener('pagehide', shown);
@@ -158,10 +173,10 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
158
173
  resume(sessionId, double) {
159
174
  const before = this.resuming;
160
175
  if (!before || (before.double ? !double : before.sessionId !== sessionId)) {
161
- return false;
176
+ return undefined;
162
177
  }
163
178
  this.before = null;
164
- return true;
179
+ return before;
165
180
  }
166
181
  hangUp() {
167
182
  const kept = this.current;
@@ -188,8 +203,7 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
188
203
  this.current = call;
189
204
  this.notedAt = 0;
190
205
  this.sharedAs = undefined;
191
- const noted = () => this.note({ sessionId: call.sessionId, double: call.double, title: call.title });
192
- noted();
206
+ this.noteKept();
193
207
  this.share(call);
194
208
  this.offState = voice.subscribe(() => {
195
209
  var _a;
@@ -204,13 +218,20 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
204
218
  }
205
219
  if (voice.state.paused || Date.now() - this.notedAt >= CallKeeperUtil.NOTE_MS) {
206
220
  // As the page goes to the background, where it may be closed, and now and then while it goes on.
207
- noted();
221
+ this.noteKept();
208
222
  }
209
- this.share(call);
223
+ this.share(this.current);
210
224
  });
211
225
  before === null || before === void 0 ? void 0 : before.held.call.hangUp();
212
226
  this.changed();
213
227
  }
228
+ /** Notes the call going on now, as it is. */
229
+ noteKept() {
230
+ const kept = this.current;
231
+ if (kept) {
232
+ this.note({ sessionId: kept.sessionId, double: kept.double, title: kept.title, ...(kept.held.call.state.video ? { video: true } : {}) });
233
+ }
234
+ }
214
235
  /** Notes the call going on, for the page that loads next (resuming); undefined once it is over. */
215
236
  note(spot) {
216
237
  var _a;
@@ -0,0 +1,38 @@
1
+ import type { CallDraft, CallOptions, CallPartner, CallState } from './voice-call-protocol';
2
+ /** What of a call (VoiceCall) its partner answers in. */
3
+ export interface PartneredCall {
4
+ /** Of the call now: what comes for a call hung up is let go. */
5
+ readonly calls: number;
6
+ readonly state: CallState;
7
+ set(change: Partial<CallState>): void;
8
+ /** The answer to say, as a turn's is. */
9
+ turnEnded(reply: string | undefined): void;
10
+ /** What the user said did not go: Ta listens again. */
11
+ unsent(): void;
12
+ announce(text: string): void;
13
+ }
14
+ /**
15
+ * Who answers in a call in place of the conversation (CallOptions.openPartner, docs/design/ta-call.md): it is asked
16
+ * what the user said, opened again once when it does not answer, and given way to the conversation when it cannot.
17
+ */
18
+ export declare class CallPartnering {
19
+ protected readonly call: PartneredCall;
20
+ protected readonly options: CallOptions;
21
+ partner?: CallPartner;
22
+ constructor(call: PartneredCall, options: CallOptions);
23
+ /** The partner of the call now: what it says by itself is said as news is, in a silence, and cut into as any answer. */
24
+ adopt(partner: CallPartner | undefined): void;
25
+ close(): void;
26
+ /** A partner opened for a voice service to answer, which does not: one that answers itself takes its place. */
27
+ unvoice(): void;
28
+ /** The partner answers what the user said; its reply is read as a turn's is. */
29
+ ask(text: string, sent?: boolean): void;
30
+ /** The user was done with the words of the draft: its answer is the reply; failing, the partner is asked as usual. */
31
+ kept(draft: CallDraft, said: string): void;
32
+ /**
33
+ * The partner did not answer (the Ta service restarted, its side of the call is gone): it opens again once and
34
+ * answers what was said; failing that, the conversation answers from then on. The call goes on either way.
35
+ */
36
+ protected reopen(failed: CallPartner, text: string, sent?: boolean): void;
37
+ }
38
+ //# sourceMappingURL=call-partnering.d.ts.map
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CallPartnering = void 0;
4
+ /**
5
+ * Who answers in a call in place of the conversation (CallOptions.openPartner, docs/design/ta-call.md): it is asked
6
+ * what the user said, opened again once when it does not answer, and given way to the conversation when it cannot.
7
+ */
8
+ class CallPartnering {
9
+ constructor(call, options) {
10
+ this.call = call;
11
+ this.options = options;
12
+ }
13
+ /** The partner of the call now: what it says by itself is said as news is, in a silence, and cut into as any answer. */
14
+ adopt(partner) {
15
+ var _a;
16
+ const calls = this.call.calls;
17
+ this.partner = partner;
18
+ (_a = partner === null || partner === void 0 ? void 0 : partner.news) === null || _a === void 0 ? void 0 : _a.call(partner, text => calls === this.call.calls && this.call.announce(text));
19
+ this.call.set({ partnered: !!partner });
20
+ }
21
+ close() {
22
+ var _a;
23
+ (_a = this.partner) === null || _a === void 0 ? void 0 : _a.close();
24
+ this.partner = undefined;
25
+ }
26
+ /** A partner opened for a voice service to answer, which does not: one that answers itself takes its place. */
27
+ unvoice() {
28
+ var _a, _b, _c, _d;
29
+ if (!((_a = this.partner) === null || _a === void 0 ? void 0 : _a.brain)) {
30
+ return;
31
+ }
32
+ const calls = this.call.calls;
33
+ this.close();
34
+ void ((_d = (_c = (_b = this.options).openPartner) === null || _c === void 0 ? void 0 : _c.call(_b, true)) === null || _d === void 0 ? void 0 : _d.then(partner => (calls === this.call.calls && this.call.state.active ? this.adopt(partner) : partner === null || partner === void 0 ? void 0 : partner.close()), () => calls === this.call.calls && this.call.set({ partnered: false })));
35
+ }
36
+ /** The partner answers what the user said; its reply is read as a turn's is. */
37
+ ask(text, sent) {
38
+ const calls = this.call.calls;
39
+ const partner = this.partner;
40
+ partner === null || partner === void 0 ? void 0 : partner.say(text, sent ? { sent } : undefined).then(reply => calls === this.call.calls && this.call.turnEnded(reply), () => calls === this.call.calls && this.call.state.active && this.reopen(partner, text, sent));
41
+ }
42
+ /** The user was done with the words of the draft: its answer is the reply; failing, the partner is asked as usual. */
43
+ kept(draft, said) {
44
+ const calls = this.call.calls;
45
+ const partner = this.partner;
46
+ draft.keep();
47
+ draft.reply.then(reply => calls === this.call.calls && this.call.turnEnded(reply), () => calls === this.call.calls && this.call.state.active && this.partner === partner && this.ask(said));
48
+ }
49
+ /**
50
+ * The partner did not answer (the Ta service restarted, its side of the call is gone): it opens again once and
51
+ * answers what was said; failing that, the conversation answers from then on. The call goes on either way.
52
+ */
53
+ reopen(failed, text, sent) {
54
+ var _a, _b, _c;
55
+ var _d;
56
+ const calls = this.call.calls;
57
+ if (this.partner !== failed) {
58
+ return;
59
+ }
60
+ this.close();
61
+ const again = (_d = (_c = (_b = (_a = this.options).openPartner) === null || _b === void 0 ? void 0 : _b.call(_a, true)) === null || _c === void 0 ? void 0 : _c.catch(() => undefined)) !== null && _d !== void 0 ? _d : Promise.resolve(undefined);
62
+ void again.then(partner => {
63
+ if (calls !== this.call.calls || !this.call.state.active) {
64
+ partner === null || partner === void 0 ? void 0 : partner.close();
65
+ return;
66
+ }
67
+ if (!partner) {
68
+ this.call.set({ partnered: false });
69
+ if (sent) {
70
+ this.call.unsent();
71
+ }
72
+ else {
73
+ this.options.send(text).catch(() => this.call.state.active && this.call.unsent());
74
+ }
75
+ return;
76
+ }
77
+ this.adopt(partner);
78
+ partner.say(text, sent ? { sent } : undefined).then(reply => calls === this.call.calls && this.call.turnEnded(reply), () => calls === this.call.calls && this.call.state.active && this.call.unsent());
79
+ });
80
+ }
81
+ }
82
+ exports.CallPartnering = CallPartnering;
83
+ //# sourceMappingURL=call-partnering.js.map
@@ -0,0 +1,27 @@
1
+ import { type TaCallOwnMove, type TaCallScene, type TaCallView } from '@celljs/ta-protocol';
2
+ import type { VoiceCall } from './voice-call';
3
+ /** What the view of a call shows of it now (VideoCallView): the user's camera, how the call shows, what she can do (VideoFace). */
4
+ interface Shown {
5
+ camera?: boolean;
6
+ view?: TaCallView;
7
+ moves?: TaCallOwnMove[];
8
+ }
9
+ /**
10
+ * How a call is for the user (TaCallScene, docs/design/ta-call.md 13), from the call (video or voice, when it began),
11
+ * the device and what its view shows (the camera, full screen or small): given to the partner as the call opens and as
12
+ * it changes, and to the conversation itself in a direct call. The words are TaCallSceneUtil's alone.
13
+ */
14
+ export declare namespace CallScenes {
15
+ function of(call: VoiceCall, device: TaCallScene['device']): TaCallScene;
16
+ /** The view of the call shows this now (what it names; the rest as it was). */
17
+ function show(call: VoiceCall, part: Shown): void;
18
+ /** Tells `changed` the scene of `call` as it changes and stays so a moment; until what it returns is called. */
19
+ function watch(call: VoiceCall, device: TaCallScene['device'], changed: (scene: TaCallScene) => void): () => void;
20
+ /**
21
+ * What a direct call tells the conversation with what the user said (SpokenReply.asked): what is new of the call
22
+ * since it last told it (TaCallSceneUtil.next). The conversation sees no picture of the camera.
23
+ */
24
+ function next(call: VoiceCall, device: TaCallScene['device']): string | undefined;
25
+ }
26
+ export {};
27
+ //# sourceMappingURL=call-scenes.d.ts.map
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CallScenes = void 0;
4
+ const ta_protocol_1 = require("@celljs/ta-protocol");
5
+ /** How long the scene must stay before it is told: a window that only passes (full, then small) is not. */
6
+ const SETTLE_MS = 800;
7
+ /**
8
+ * How a call is for the user (TaCallScene, docs/design/ta-call.md 13), from the call (video or voice, when it began),
9
+ * the device and what its view shows (the camera, full screen or small): given to the partner as the call opens and as
10
+ * it changes, and to the conversation itself in a direct call. The words are TaCallSceneUtil's alone.
11
+ */
12
+ var CallScenes;
13
+ (function (CallScenes) {
14
+ const shown = new WeakMap();
15
+ const listeners = new WeakMap();
16
+ /** What a direct call told its conversation, of the call that began then. */
17
+ const told = new WeakMap();
18
+ function of(call, device) {
19
+ var _a, _b;
20
+ const { camera, view, moves } = (_a = shown.get(call)) !== null && _a !== void 0 ? _a : {};
21
+ return {
22
+ video: call.state.video === true,
23
+ ...(call.state.video && camera ? { camera } : {}),
24
+ ...(call.state.video && view ? { view } : {}),
25
+ ...(device ? { device } : {}),
26
+ since: (_b = call.state.since) !== null && _b !== void 0 ? _b : Date.now(),
27
+ ...(call.state.video && (moves === null || moves === void 0 ? void 0 : moves.length) ? { moves } : {}),
28
+ };
29
+ }
30
+ CallScenes.of = of;
31
+ /** The view of the call shows this now (what it names; the rest as it was). */
32
+ function show(call, part) {
33
+ var _a, _b;
34
+ const before = (_a = shown.get(call)) !== null && _a !== void 0 ? _a : {};
35
+ const now = { ...before, ...part };
36
+ const key = (value) => JSON.stringify([value.camera, value.view, value.moves]);
37
+ if (key(before) === key(now)) {
38
+ return;
39
+ }
40
+ shown.set(call, now);
41
+ for (const listener of [...((_b = listeners.get(call)) !== null && _b !== void 0 ? _b : [])]) {
42
+ listener();
43
+ }
44
+ }
45
+ CallScenes.show = show;
46
+ /** Tells `changed` the scene of `call` as it changes and stays so a moment; until what it returns is called. */
47
+ function watch(call, device, changed) {
48
+ var _a;
49
+ let last = ta_protocol_1.TaCallSceneUtil.key(of(call, device));
50
+ let timer;
51
+ const look = () => {
52
+ clearTimeout(timer);
53
+ timer = setTimeout(() => {
54
+ const scene = of(call, device);
55
+ const key = ta_protocol_1.TaCallSceneUtil.key(scene);
56
+ if (call.state.active && key !== last) {
57
+ last = key;
58
+ changed(scene);
59
+ }
60
+ }, SETTLE_MS);
61
+ };
62
+ const own = (_a = listeners.get(call)) !== null && _a !== void 0 ? _a : new Set();
63
+ listeners.set(call, own);
64
+ own.add(look);
65
+ const offCall = call.subscribe(look);
66
+ return () => {
67
+ clearTimeout(timer);
68
+ own.delete(look);
69
+ offCall();
70
+ };
71
+ }
72
+ CallScenes.watch = watch;
73
+ /**
74
+ * What a direct call tells the conversation with what the user said (SpokenReply.asked): what is new of the call
75
+ * since it last told it (TaCallSceneUtil.next). The conversation sees no picture of the camera.
76
+ */
77
+ function next(call, device) {
78
+ const scene = of(call, device);
79
+ let was = told.get(call);
80
+ if ((was === null || was === void 0 ? void 0 : was.since) !== scene.since) {
81
+ was = { since: scene.since, told: {} };
82
+ told.set(call, was);
83
+ }
84
+ return ta_protocol_1.TaCallSceneUtil.next(scene, was.told, false, Date.now());
85
+ }
86
+ CallScenes.next = next;
87
+ })(CallScenes || (exports.CallScenes = CallScenes = {}));
88
+ //# sourceMappingURL=call-scenes.js.map
@@ -1,3 +1,4 @@
1
+ import type { Mood } from '../avatar/dino-avatar';
1
2
  import type { Translate } from '../i18n/use-t';
2
3
  import { type ScreenPartSpec, type TaScreen } from '../screen/screen-protocol';
3
4
  import type { CallPhase } from './voice-call-protocol';
@@ -32,6 +33,8 @@ export declare namespace CallScreen {
32
33
  }
33
34
  /** What the call is at, as its bar says. */
34
35
  function phase(t: Translate, seen: Pick<Seen, 'phase' | 'paused' | 'heard'>): string;
36
+ /** How Ta's face looks for what the call is at (CallFace). */
37
+ function mood(seen: Pick<Seen, 'phase' | 'paused'>): Mood;
35
38
  /** Presses the button of an action of the call where it shows, as the user would; else does what it does. */
36
39
  function press(screen: Pick<TaScreen, 'element'>, name: string, otherwise: () => void): void;
37
40
  /** The part of the screen of the call: its state in a line, and what its buttons do now. */
@@ -27,6 +27,21 @@ var CallScreen;
27
27
  }
28
28
  }
29
29
  CallScreen.phase = phase;
30
+ /** How Ta's face looks for what the call is at (CallFace). */
31
+ function mood(seen) {
32
+ if (seen.paused) {
33
+ return 'sleeping';
34
+ }
35
+ switch (seen.phase) {
36
+ case 'speaking':
37
+ return 'speaking';
38
+ case 'listening':
39
+ return 'listening';
40
+ default:
41
+ return 'thinking';
42
+ }
43
+ }
44
+ CallScreen.mood = mood;
30
45
  /** Presses the button of an action of the call where it shows, as the user would; else does what it does. */
31
46
  function press(screen, name, otherwise) {
32
47
  const button = screen.element(CallScreen.PART, undefined, name);
@@ -0,0 +1,32 @@
1
+ import type { TaBargeIn } from '@celljs/ta-protocol';
2
+ import { type Doubt } from './realtime-voice-protocol';
3
+ /** What a piece of the microphone is (MicSense.measure). */
4
+ export interface MicPiece {
5
+ /** How loud (RMS, 0 to 1). */
6
+ level: number;
7
+ /** Periodic at the pitch of a voice: a vowel of someone speaking, not a cough, a knock, a fan. */
8
+ voiced: boolean;
9
+ }
10
+ /**
11
+ * What the microphone hears, piece by piece (docs/design/ta-voice.md 10): whether a piece is voiced, and the floor of
12
+ * the room, as minimum statistics do: it falls at once to a quieter piece, and rises only to what is not voiced (a fan,
13
+ * the hum of a room), so that the user speaking on and on never becomes the room.
14
+ */
15
+ export declare class MicSense {
16
+ /** The floor of the room: the quietest it was lately, of what is not speech. */
17
+ floor: number;
18
+ measure(samples: Float32Array, rate: number): MicPiece;
19
+ /**
20
+ * A piece of the microphone while Ta reads and a sound may be the user cutting in (docs/design/ta-voice.md 10):
21
+ * voiced speech louder than `speech` in a run (gaps under GAP_MS) lowers the reading after DUCK_MS ('duck') and cuts
22
+ * in after speechMs ('cut'), unless it is no louder than `echo` (Ta's own voice heard back). What is not voiced (a
23
+ * cough, a knock) only counts as a gap.
24
+ */
25
+ static weigh(doubt: Doubt, piece: MicPiece, ms: number, speech: number, echo: number, barge: TaBargeIn): 'duck' | 'cut' | undefined;
26
+ /**
27
+ * How periodic `samples` are at the pitch of a voice: the highest normalized autocorrelation over the lags of
28
+ * PITCH_LOW to PITCH_HIGH, on samples averaged down to about VOICING_RATE; 0 for silence or noise, near 1 for a vowel.
29
+ */
30
+ static voicing(samples: Float32Array, rate: number): number;
31
+ }
32
+ //# sourceMappingURL=mic-sense.d.ts.map