@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,156 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CallSounds = exports.VoiceSoundTap = exports.VoiceReading = void 0;
4
+ const spoken_timeline_1 = require("./spoken-timeline");
5
+ /** How often the captions look where the reading is, in ms. */
6
+ const CAPTION_MS = 80;
7
+ /**
8
+ * What a voice service reads now, on the clock of its sound as it plays (CallReading): it begins where its first sound
9
+ * plays, held as long as the face of a video call asks (RealtimeVoice.hold), and its captions show each sentence as it
10
+ * is heard, by the same timeline the face asks.
11
+ */
12
+ class VoiceReading {
13
+ constructor(say, pieces, context, holdS,
14
+ /** Whether it is still what plays: once not, its captions stop. */
15
+ live, onPiece) {
16
+ this.say = say;
17
+ this.pieces = pieces;
18
+ this.context = context;
19
+ this.holdS = holdS;
20
+ this.live = live;
21
+ this.onPiece = onPiece;
22
+ /** Its sound as it was put to play: from `at` on the clock of the audio context, `from` seconds into it, for `seconds`. */
23
+ this.played = [];
24
+ this.shown = -1;
25
+ this.timeline = new spoken_timeline_1.SpokenTimeline(pieces, spoken_timeline_1.SpokenTimeline.pace(pieces.join('')));
26
+ }
27
+ /**
28
+ * How far into its sound it plays: where the sound playing now is in it, or where the last played ended while what
29
+ * comes next is late (the sound stopped short), so that the words, the clip and the mouth wait with the voice.
30
+ */
31
+ now() {
32
+ if (this.startAt === undefined) {
33
+ return -this.holdS;
34
+ }
35
+ const time = this.context.currentTime;
36
+ for (let i = this.played.length - 1; i >= 0; i--) {
37
+ const sound = this.played[i];
38
+ if (sound.at <= time) {
39
+ return sound.from + Math.min(sound.seconds, time - sound.at);
40
+ }
41
+ }
42
+ return time - this.startAt;
43
+ }
44
+ pieceAt(seconds) {
45
+ return this.timeline.at(Math.max(0, seconds));
46
+ }
47
+ /** More of its sound came: when the first of it plays, and how much of it there is. */
48
+ heard(at, seconds) {
49
+ if (this.startAt === undefined) {
50
+ this.startAt = at;
51
+ this.caption();
52
+ }
53
+ this.played.push({ at, from: this.timeline.received, seconds });
54
+ this.timeline.received += seconds;
55
+ }
56
+ /** Its words, more of them as they came (a voice that thinks says them as it goes): its sentences timed again. */
57
+ words(pieces) {
58
+ if (pieces.join('') === this.pieces.join('')) {
59
+ return;
60
+ }
61
+ const { received, said } = this.timeline;
62
+ this.pieces = pieces;
63
+ this.timeline = new spoken_timeline_1.SpokenTimeline(pieces, spoken_timeline_1.SpokenTimeline.pace(pieces.join('')));
64
+ this.timeline.received = received;
65
+ this.timeline.said = said;
66
+ this.shown = Math.min(this.shown, pieces.length - 1);
67
+ this.lastPieces = undefined;
68
+ }
69
+ /** All of its sound came: the timeline knows how long it is. */
70
+ said() {
71
+ this.timeline.said = true;
72
+ }
73
+ caption() {
74
+ if (!this.onPiece || this.timer) {
75
+ return;
76
+ }
77
+ const tick = () => {
78
+ var _a;
79
+ if (!this.live()) {
80
+ clearInterval(this.timer);
81
+ return;
82
+ }
83
+ const now = this.now();
84
+ // A sentence shown stays until the next is heard, its words timed again or not.
85
+ const index = now < 0 ? -1 : Math.max(this.shown, this.pieceAt(now));
86
+ if (index >= 0 && (index !== this.shown || this.lastPieces !== this.pieces)) {
87
+ this.shown = index;
88
+ this.lastPieces = this.pieces;
89
+ (_a = this.onPiece) === null || _a === void 0 ? void 0 : _a.call(this, [...this.pieces], index);
90
+ }
91
+ };
92
+ this.timer = setInterval(tick, CAPTION_MS);
93
+ tick();
94
+ }
95
+ }
96
+ exports.VoiceReading = VoiceReading;
97
+ /** The sound of what a voice reads, for the face of a video call (CallVoice.onSound), and the hold it asks (hold). */
98
+ class VoiceSoundTap {
99
+ constructor() {
100
+ /** How long each reading waits before it plays, in seconds. */
101
+ this.holdS = 0;
102
+ this.listeners = new Set();
103
+ this.on = (listener) => {
104
+ this.listeners.add(listener);
105
+ return () => this.listeners.delete(listener);
106
+ };
107
+ this.hold = (ms) => {
108
+ var _a, _b;
109
+ this.holdS = Math.max(0, ms) / 1000;
110
+ (_b = (_a = this.voice) === null || _a === void 0 ? void 0 : _a.hold) === null || _b === void 0 ? void 0 : _b.call(_a, ms);
111
+ };
112
+ }
113
+ /** Of a call: the sound of its voice is told here, and the hold asked here goes to it; stops with what it returns. */
114
+ follow(voice) {
115
+ var _a, _b;
116
+ (_a = voice.hold) === null || _a === void 0 ? void 0 : _a.call(voice, this.holdS * 1000);
117
+ this.voice = voice;
118
+ const off = (_b = voice.onSound) === null || _b === void 0 ? void 0 : _b.call(voice, (say, pcm, rate) => this.tell(say, pcm, rate));
119
+ return () => {
120
+ off === null || off === void 0 ? void 0 : off();
121
+ if (this.voice === voice) {
122
+ this.voice = undefined;
123
+ }
124
+ };
125
+ }
126
+ tell(say, pcm, rate = 24000) {
127
+ for (const listener of this.listeners) {
128
+ listener(say, pcm, rate);
129
+ }
130
+ }
131
+ }
132
+ exports.VoiceSoundTap = VoiceSoundTap;
133
+ /**
134
+ * What the face of a call reads of its voice, whichever voice the call has now: how loud it plays (RMS, 0 to 1;
135
+ * undefined for the device's, which cannot tell), what it reads on the clock of its sound, and that sound.
136
+ */
137
+ class CallSounds extends VoiceSoundTap {
138
+ constructor(voiceNow) {
139
+ super();
140
+ this.voiceNow = voiceNow;
141
+ this.level = () => { var _a, _b; return (_b = (_a = this.voiceNow()).level) === null || _b === void 0 ? void 0 : _b.call(_a); };
142
+ this.nowReading = () => { var _a, _b; return (_b = (_a = this.voiceNow()).nowReading) === null || _b === void 0 ? void 0 : _b.call(_a); };
143
+ }
144
+ /** Hears the user cut in while the voice of the call reads, and its sound (follow): stops both with what it returns. */
145
+ heard(voice, cut) {
146
+ var _a;
147
+ const offSound = this.follow(voice);
148
+ const offSpeech = (_a = voice.onSpeech) === null || _a === void 0 ? void 0 : _a.call(voice, cut);
149
+ return () => {
150
+ offSound();
151
+ offSpeech === null || offSpeech === void 0 ? void 0 : offSpeech();
152
+ };
153
+ }
154
+ }
155
+ exports.CallSounds = CallSounds;
156
+ //# sourceMappingURL=voice-reading.js.map
@@ -0,0 +1,16 @@
1
+ import type { Pose } from './dino-avatar';
2
+ /** How long a nod of a close-up that hears the user takes, in seconds. */
3
+ export declare const NOD = 0.55;
4
+ /** How a close-up moves in a call (CallFace): its mouth by the sound it plays, a nod to the words it hears. */
5
+ export declare namespace DinoTalkMotion {
6
+ /**
7
+ * How open the mouth of a close-up in a call is, `dt` seconds after it was `open`, for what plays now as loud as
8
+ * `level` (RMS, 0 to 1): it opens at once with a syllable and closes a little slower, as a mouth does.
9
+ */
10
+ function mouth(open: number, level: number, dt: number): number;
11
+ /** A close-up speaking by the sound it plays: the jaw as open as `open` (0 to 1), the head lifted a little with it. */
12
+ function speak(pose: Pose, open: number): Pose;
13
+ /** A close-up that hears the user nods, `t` seconds into a nod (NOD long). */
14
+ function nod(pose: Pose, t: number): Pose;
15
+ }
16
+ //# sourceMappingURL=dino-talk.d.ts.map
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DinoTalkMotion = exports.NOD = void 0;
4
+ /** How long a nod of a close-up that hears the user takes, in seconds. */
5
+ exports.NOD = 0.55;
6
+ /** How quickly the mouth of a close-up in a call opens with a syllable, and closes after it, in seconds. */
7
+ const MOUTH_OPEN = 0.035;
8
+ const MOUTH_CLOSE = 0.09;
9
+ /** How a close-up moves in a call (CallFace): its mouth by the sound it plays, a nod to the words it hears. */
10
+ var DinoTalkMotion;
11
+ (function (DinoTalkMotion) {
12
+ /**
13
+ * How open the mouth of a close-up in a call is, `dt` seconds after it was `open`, for what plays now as loud as
14
+ * `level` (RMS, 0 to 1): it opens at once with a syllable and closes a little slower, as a mouth does.
15
+ */
16
+ function mouth(open, level, dt) {
17
+ // Speech plays at an RMS of about 0.05 to 0.3: its square root spreads it over the mouth.
18
+ const goal = Math.min(1, Math.sqrt(Math.max(0, level)) * 2.2);
19
+ const k = 1 - Math.exp(-dt / (goal > open ? MOUTH_OPEN : MOUTH_CLOSE));
20
+ return open + (goal - open) * k;
21
+ }
22
+ DinoTalkMotion.mouth = mouth;
23
+ /** A close-up speaking by the sound it plays: the jaw as open as `open` (0 to 1), the head lifted a little with it. */
24
+ function speak(pose, open) {
25
+ return { ...pose, jaw: 2 + 16 * open, head: pose.head - 2.5 * open };
26
+ }
27
+ DinoTalkMotion.speak = speak;
28
+ /** A close-up that hears the user nods, `t` seconds into a nod (NOD long). */
29
+ function nod(pose, t) {
30
+ if (t < 0 || t >= exports.NOD) {
31
+ return pose;
32
+ }
33
+ return { ...pose, head: pose.head + 7 * Math.sin((t / exports.NOD) * Math.PI), y: pose.y + 1.5 * Math.sin((t / exports.NOD) * Math.PI) };
34
+ }
35
+ DinoTalkMotion.nod = nod;
36
+ })(DinoTalkMotion || (exports.DinoTalkMotion = DinoTalkMotion = {}));
37
+ //# sourceMappingURL=dino-talk.js.map
@@ -17,6 +17,8 @@ export interface ChatDraft {
17
17
  sending?: {
18
18
  message: string;
19
19
  images?: ImageContent[];
20
+ /** Of this first message and its opening (openId, clientMessageId): sent again, it opens and runs once. */
21
+ id: string;
20
22
  failed?: string;
21
23
  heldAt?: number;
22
24
  };
@@ -46,7 +46,9 @@ export declare abstract class ChatShown {
46
46
  protected attach({ sessionId, attachment }: {
47
47
  sessionId: string;
48
48
  attachment?: TaAttachResult;
49
- }, send?: (store: SessionStore) => Promise<unknown>, sessionFile?: string): Promise<void>;
49
+ }, send?: (store: SessionStore) => Promise<unknown>, sessionFile?: string, wanted?: () => boolean): Promise<void>;
50
+ /** A store attached for a conversation no longer shown: detached, and kept to show again at once. */
51
+ protected putAway(store: SessionStore, tools: string): void;
50
52
  /**
51
53
  * The conversation picked, at once and whatever the connection, under `key` (what is pending): one this page
52
54
  * showed lately in this very frame, else the one this device kept once read, as a chat app shows a chat before
@@ -75,17 +75,21 @@ class ChatShown {
75
75
  * switching does not flash an empty page. `attachment`: what opening it attached already (ChatStores.open),
76
76
  * taken by the store in the same turn of the event loop, so that no event after it is missed.
77
77
  */
78
- async attach({ sessionId, attachment }, send, sessionFile) {
78
+ async attach({ sessionId, attachment }, send, sessionFile, wanted) {
79
79
  var _a;
80
80
  var _b;
81
81
  const tools = this.stores.toolNames();
82
82
  const file = sessionFile !== null && sessionFile !== void 0 ? sessionFile : this.stores.fileOf(sessionId);
83
+ // Something else picked meanwhile (another conversation, a new one): this one is kept, not shown over it.
84
+ // `wanted`: whether what the caller was asked for is still what is wanted, from before it opened the session.
85
+ const asked = this.wanted;
86
+ const still = wanted !== null && wanted !== void 0 ? wanted : (() => this.wanted === asked);
83
87
  const shown = this.current.store;
84
88
  // Shown already, from the device before the connection: attached now, as it is.
85
89
  const early = (shown === null || shown === void 0 ? void 0 : shown.sessionId) === sessionId && !this.stores.isAttached(shown) && this.stores.toolsOf(shown) === tools ? shown : undefined;
86
90
  const kept = early !== null && early !== void 0 ? early : this.stores.recent.take(sessionId, tools);
87
91
  if (kept && this.stores.listed(sessionId)) {
88
- if (!early) {
92
+ if (!early && still()) {
89
93
  this.enter(kept, file);
90
94
  }
91
95
  try {
@@ -97,6 +101,9 @@ class ChatShown {
97
101
  if (this.current.store === kept) {
98
102
  this.listen(kept);
99
103
  }
104
+ else {
105
+ this.putAway(kept, tools);
106
+ }
100
107
  await sending;
101
108
  return;
102
109
  }
@@ -115,7 +122,7 @@ class ChatShown {
115
122
  // What failed to go there stays.
116
123
  store.carry(standing);
117
124
  }
118
- if (initial) {
125
+ if (initial && still()) {
119
126
  // As this device saw it, at once.
120
127
  this.enter(store, file);
121
128
  }
@@ -135,12 +142,27 @@ class ChatShown {
135
142
  throw error;
136
143
  }
137
144
  this.stores.setAttached(store);
145
+ // Shown from the device and left since, or not shown yet with another picked: not shown over what is.
146
+ if (this.current.store !== store && (initial || !still())) {
147
+ this.putAway(store, tools);
148
+ await sending;
149
+ return;
150
+ }
138
151
  if (!initial) {
139
152
  this.enter(store, file);
140
153
  }
141
154
  this.listen(store);
142
155
  await sending;
143
156
  }
157
+ /** A store attached for a conversation no longer shown: detached, and kept to show again at once. */
158
+ putAway(store, tools) {
159
+ if (this.stores.setDetached(store)) {
160
+ store.detach().catch(() => undefined);
161
+ if (!store.state.closed) {
162
+ this.stores.recent.keep(store, tools);
163
+ }
164
+ }
165
+ }
144
166
  /**
145
167
  * The conversation picked, at once and whatever the connection, under `key` (what is pending): one this page
146
168
  * showed lately in this very frame, else the one this device kept once read, as a chat app shows a chat before
@@ -4,6 +4,10 @@ import { type ChatDraft, type ChatOpening, TaChat } from './chat-protocol';
4
4
  import { ChatShown } from './chat-shown';
5
5
  export declare class TaChatImpl extends ChatShown implements TaChat {
6
6
  start(): Promise<void>;
7
+ /**
8
+ * At once, not behind what is queued (a conversation that waits for the connection, or attaches over a slow one):
9
+ * what was asked last is the new conversation, and what was asked before it does not show over it (`wanted`).
10
+ */
7
11
  draft(): Promise<void>;
8
12
  setDraftCwd(cwd: string): Promise<void>;
9
13
  /** A new conversation is in the default directory, as it changes here or on another device. */
@@ -36,7 +40,7 @@ export declare class TaChatImpl extends ChatShown implements TaChat {
36
40
  * A session of the list that the service closed since the list was read (idle, or a restart): opened
37
41
  * again from its file. One of a package's group is left to its package, which opens it with its role.
38
42
  */
39
- protected reopenClosed(sessionId: string, error: unknown): Promise<void>;
43
+ protected reopenClosed(sessionId: string, error: unknown, wanted?: () => boolean): Promise<void>;
40
44
  /** The conversation shown, opened again from its file; the newest other one if that fails. */
41
45
  protected recover(): Promise<void>;
42
46
  /** The newest other open session, or a new conversation. */
@@ -19,6 +19,8 @@ const chat_util_1 = require("./chat-util");
19
19
  const FILE = { key: 'chat.file', tier: 'user', initial: '', parse: state_protocol_1.StateUtil.string, passive: true };
20
20
  /** That conversation is of a package's group: the page shows it again only while it is open, as its package opens it with a role of its own. */
21
21
  const GROUPED = { key: 'chat.grouped', tier: 'user', initial: false, parse: state_protocol_1.StateUtil.boolean };
22
+ /** What `wanted` is once a new conversation was asked for: no session has it. */
23
+ const DRAFT = 'draft';
22
24
  let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
23
25
  start() {
24
26
  return this.enqueue(async () => {
@@ -65,13 +67,20 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
65
67
  }
66
68
  });
67
69
  }
70
+ /**
71
+ * At once, not behind what is queued (a conversation that waits for the connection, or attaches over a slow one):
72
+ * what was asked last is the new conversation, and what was asked before it does not show over it (`wanted`).
73
+ */
68
74
  draft() {
69
- return this.enqueue(async () => {
70
- if (!this.current.draft) {
71
- this.leave();
72
- this.showDraft();
73
- }
74
- });
75
+ this.wanted = DRAFT;
76
+ if (this.current.pending) {
77
+ this.update({ pending: undefined, opening: undefined });
78
+ }
79
+ if (!this.current.draft) {
80
+ this.leave();
81
+ this.showDraft();
82
+ }
83
+ return Promise.resolve();
75
84
  }
76
85
  async setDraftCwd(cwd) {
77
86
  if (this.current.draft) {
@@ -117,7 +126,7 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
117
126
  if (draft) {
118
127
  // What was sent shows at once, with Ta at work, while the conversation opens.
119
128
  this.stopping = false;
120
- this.update({ draft: { ...draft, sending: { message, images } } });
129
+ this.update({ draft: { ...draft, sending: { message, images, id: crypto.randomUUID() } } });
121
130
  }
122
131
  return this.openDraft();
123
132
  }
@@ -128,14 +137,15 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
128
137
  if (!(draft === null || draft === void 0 ? void 0 : draft.sending)) {
129
138
  return;
130
139
  }
131
- const { message, images } = draft.sending;
140
+ const { message, images, id } = draft.sending;
132
141
  let sessionId;
133
142
  try {
134
- const opened = await this.stores.open({ cwd: draft.cwd, model: draft.model });
143
+ // By the id of this first message: opened and sent again after a lost connection, it opens and runs once.
144
+ const opened = await this.stores.open({ cwd: draft.cwd, model: draft.model, openId: id });
135
145
  sessionId = opened.sessionId;
136
146
  // Sent with the attach, not after it: one round trip less before Ta starts. A failure to send
137
147
  // stays on the message in the conversation.
138
- await this.attach(opened, store => store.send(message, { images }));
148
+ await this.attach(opened, store => store.send(message, { images, clientMessageId: id }));
139
149
  }
140
150
  catch (error) {
141
151
  // No conversation: the message stays, marked, to send again; for a lost connection, once it is back.
@@ -175,8 +185,14 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
175
185
  }
176
186
  resendDraft() {
177
187
  var _a;
178
- const sending = (_a = this.current.draft) === null || _a === void 0 ? void 0 : _a.sending;
179
- return (sending === null || sending === void 0 ? void 0 : sending.failed) ? this.submit(sending.message, sending.images) : Promise.resolve();
188
+ const { draft } = this.current;
189
+ if (!((_a = draft === null || draft === void 0 ? void 0 : draft.sending) === null || _a === void 0 ? void 0 : _a.failed)) {
190
+ return Promise.resolve();
191
+ }
192
+ // With its id: one that opened before the failure was told is not opened again.
193
+ this.stopping = false;
194
+ this.update({ draft: { ...draft, sending: { ...draft.sending, failed: undefined, heldAt: undefined } } });
195
+ return this.openDraft();
180
196
  }
181
197
  discardDraft() {
182
198
  var _a;
@@ -216,7 +232,7 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
216
232
  await chat_util_1.ChatUtil.untilConnected(async () => {
217
233
  const { store } = this.current;
218
234
  if (wanted() && ((store === null || store === void 0 ? void 0 : store.sessionId) !== sessionId || !this.stores.isAttached(store))) {
219
- await this.attach({ sessionId }, undefined, opening === null || opening === void 0 ? void 0 : opening.sessionFile).catch(error => this.reopenClosed(sessionId, error));
235
+ await this.attach({ sessionId }, undefined, opening === null || opening === void 0 ? void 0 : opening.sessionFile, wanted).catch(error => this.reopenClosed(sessionId, error, wanted));
220
236
  }
221
237
  }, () => this.workbench.connected(), wanted);
222
238
  }).finally(() => {
@@ -264,7 +280,7 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
264
280
  if (!wanted() || (open && (store === null || store === void 0 ? void 0 : store.sessionId) === open.sessionId && this.stores.isAttached(store))) {
265
281
  return;
266
282
  }
267
- await this.attach(open !== null && open !== void 0 ? open : (await this.stores.open({ sessionFile, cwd: saved === null || saved === void 0 ? void 0 : saved.cwd })), undefined, sessionFile);
283
+ await this.attach(open !== null && open !== void 0 ? open : (await this.stores.open({ sessionFile, cwd: saved === null || saved === void 0 ? void 0 : saved.cwd })), undefined, sessionFile, wanted);
268
284
  }, () => this.workbench.connected(), wanted);
269
285
  }).finally(() => {
270
286
  if (this.current.pending === sessionFile) {
@@ -316,13 +332,13 @@ let TaChatImpl = class TaChatImpl extends chat_shown_1.ChatShown {
316
332
  * A session of the list that the service closed since the list was read (idle, or a restart): opened
317
333
  * again from its file. One of a package's group is left to its package, which opens it with its role.
318
334
  */
319
- async reopenClosed(sessionId, error) {
335
+ async reopenClosed(sessionId, error, wanted) {
320
336
  const info = this.workbench.state.sessions.find(session => session.sessionId === sessionId);
321
337
  if ((error === null || error === void 0 ? void 0 : error.code) !== ta_protocol_1.TaErrorCode.SESSION_NOT_FOUND || !(info === null || info === void 0 ? void 0 : info.sessionFile) || info.group) {
322
338
  await this.workbench.refresh().catch(() => undefined);
323
339
  throw error;
324
340
  }
325
- await this.attach(await this.stores.open({ sessionFile: info.sessionFile, cwd: info.cwd }), undefined, info.sessionFile);
341
+ await this.attach(await this.stores.open({ sessionFile: info.sessionFile, cwd: info.cwd }), undefined, info.sessionFile, wanted);
326
342
  }
327
343
  /** The conversation shown, opened again from its file; the newest other one if that fails. */
328
344
  async recover() {
@@ -2,13 +2,7 @@ import { type LucideIcon } from 'lucide-react';
2
2
  import * as React from 'react';
3
3
  import type { SettingsSection } from './settings-view';
4
4
  /** What an entry of the account opens over the page. */
5
- export type AccountDialog = 'accounts' | 'directory' | 'relay' | 'devices' | 'profile';
6
- export interface AccountChoice {
7
- key: string;
8
- label: string;
9
- checked: boolean;
10
- pick(): void;
11
- }
5
+ export type AccountDialog = 'accounts' | 'relay' | 'devices' | 'profile';
12
6
  /** An entry of the account: an item of the menu of the rail, a row of Me on a phone. */
13
7
  export interface AccountEntry {
14
8
  key: string;
@@ -18,16 +12,12 @@ export interface AccountEntry {
18
12
  /** The keys that do it too. */
19
13
  keys?: string;
20
14
  danger?: boolean;
21
- /** A second menu beside the first, of the menu; the row of a phone shows the one chosen and opens the settings. */
22
- choices?: AccountChoice[];
15
+ /** Something to do now (restart to a new version, install the app): a row of a phone without a chevron. */
16
+ action?: boolean;
23
17
  /** What the row of a phone shows on its right, muted. */
24
18
  detail?: string;
25
19
  }
26
- /**
27
- * The entries of the account and of the settings, in groups: the settings, the packages and the keys; the model
28
- * accounts, the default directory and the phone; the theme and the language; the pages of extensions that are the
29
- * user's own (WebView.group `me`: their feedback), about, and signing out.
30
- */
20
+ /** The entries of the account: the rows of Me on a phone, the menu of the account on the rail (MeUtil.keys). */
31
21
  export declare function useAccountEntries(onSettings: (section?: SettingsSection) => void, onDialog: (dialog: AccountDialog) => void): AccountEntry[][];
32
22
  /** What the entries of the account open over the page. */
33
23
  export declare function AccountDialogs({ dialog, onClose, onDialog }: {
@@ -62,8 +52,8 @@ export interface AccountMenuProps {
62
52
  }
63
53
  /**
64
54
  * The account at the foot of the rail, with the settings: who is signed in to which machine and whether the
65
- * page is connected (a dot on the figure while it is not), then the entries of useAccountEntries, the theme and
66
- * the language a step away, in a second menu beside the first. A phone has them as its tab Me (me-view.tsx).
55
+ * page is connected (a dot on the figure while it is not), then the entries of useAccountEntries. A phone has them as
56
+ * its tab Me (me-view.tsx).
67
57
  */
68
58
  export declare function AccountMenu({ onSettings, active }: AccountMenuProps): React.JSX.Element;
69
59
  //# sourceMappingURL=account-menu.d.ts.map