@celljs/ta-web 4.9.0 → 4.10.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 (376) hide show
  1. package/README.en.md +4 -3
  2. package/README.md +4 -3
  3. package/esm/browser/assistant/assistant-chat-list.js +8 -2
  4. package/esm/browser/assistant/assistant-extension.d.ts +8 -1
  5. package/esm/browser/assistant/assistant-extension.js +33 -5
  6. package/esm/browser/assistant/assistant-protocol.d.ts +3 -1
  7. package/esm/browser/assistant/assistant-task-source.d.ts +2 -0
  8. package/esm/browser/assistant/assistant-task-source.js +2 -0
  9. package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
  10. package/esm/browser/assistant/assistant-task-util.js +13 -3
  11. package/esm/browser/assistant/assistant-tasks.js +3 -2
  12. package/esm/browser/assistant/assistant-view.js +81 -56
  13. package/esm/browser/assistant/assistant.d.ts +30 -1
  14. package/esm/browser/assistant/assistant.js +89 -6
  15. package/esm/browser/assistant/task-views.d.ts +40 -6
  16. package/esm/browser/assistant/task-views.js +73 -21
  17. package/esm/browser/avatar/dino-avatar.d.ts +3 -4
  18. package/esm/browser/avatar/dino-avatar.js +4 -178
  19. package/esm/browser/avatar/dino-face.d.ts +19 -0
  20. package/esm/browser/avatar/dino-face.js +142 -0
  21. package/esm/browser/avatar/dino-geometry.d.ts +11 -0
  22. package/esm/browser/avatar/dino-geometry.js +38 -0
  23. package/esm/browser/avatar/dino-kinds.d.ts +15 -0
  24. package/esm/browser/avatar/dino-kinds.js +544 -0
  25. package/esm/browser/avatar/dino-motion.js +1 -1
  26. package/esm/browser/avatar/dino-shape.d.ts +80 -0
  27. package/esm/browser/avatar/dino-shape.js +113 -0
  28. package/esm/browser/avatar/dino-species.d.ts +1 -61
  29. package/esm/browser/avatar/dino-species.js +2 -653
  30. package/esm/browser/chat/chat-packages.d.ts +39 -0
  31. package/esm/browser/chat/chat-packages.js +70 -0
  32. package/esm/browser/chat/chat-protocol.d.ts +23 -1
  33. package/esm/browser/chat/chat-stores.d.ts +59 -0
  34. package/esm/browser/chat/chat-stores.js +121 -0
  35. package/esm/browser/chat/chat-util.d.ts +17 -0
  36. package/esm/browser/chat/chat-util.js +61 -0
  37. package/esm/browser/chat/chat-view.js +33 -12
  38. package/esm/browser/chat/chat.d.ts +31 -39
  39. package/esm/browser/chat/chat.js +226 -175
  40. package/esm/browser/components/access-view.js +1 -1
  41. package/esm/browser/components/account-menu.js +1 -1
  42. package/esm/browser/components/app-nav.d.ts +6 -3
  43. package/esm/browser/components/app-nav.js +19 -10
  44. package/esm/browser/components/app-shell-hooks.d.ts +47 -0
  45. package/esm/browser/components/app-shell-hooks.js +169 -0
  46. package/esm/browser/components/app-view.js +81 -172
  47. package/esm/browser/components/auth-view.js +1 -1
  48. package/esm/browser/components/chat-list.d.ts +20 -2
  49. package/esm/browser/components/chat-list.js +138 -22
  50. package/esm/browser/components/composer-box.d.ts +5 -5
  51. package/esm/browser/components/composer-box.js +111 -4
  52. package/esm/browser/components/composer.d.ts +7 -0
  53. package/esm/browser/components/composer.js +22 -14
  54. package/esm/browser/components/connection-bar.js +50 -17
  55. package/esm/browser/components/context-menu.d.ts +30 -4
  56. package/esm/browser/components/context-menu.js +199 -37
  57. package/esm/browser/components/conversation-scroll.d.ts +129 -6
  58. package/esm/browser/components/conversation-scroll.js +429 -109
  59. package/esm/browser/components/dino.js +1 -1
  60. package/esm/browser/components/earlier-messages.d.ts +2 -1
  61. package/esm/browser/components/earlier-messages.js +2 -17
  62. package/esm/browser/components/editor-area.d.ts +3 -1
  63. package/esm/browser/components/editor-area.js +6 -5
  64. package/esm/browser/components/empty-pictures.d.ts +0 -2
  65. package/esm/browser/components/empty-pictures.js +0 -16
  66. package/esm/browser/components/folder-picker.d.ts +5 -2
  67. package/esm/browser/components/folder-picker.js +30 -9
  68. package/esm/browser/components/held-talk.d.ts +28 -0
  69. package/esm/browser/components/held-talk.js +76 -0
  70. package/esm/browser/components/host-view.d.ts +1 -1
  71. package/esm/browser/components/host-view.js +1 -1
  72. package/esm/browser/components/icon.d.ts +2 -2
  73. package/esm/browser/components/icon.js +5 -6
  74. package/esm/browser/components/image-viewer.d.ts +124 -0
  75. package/esm/browser/components/image-viewer.js +397 -0
  76. package/esm/browser/components/lightbox.d.ts +11 -0
  77. package/esm/browser/components/lightbox.js +24 -0
  78. package/esm/browser/components/markdown.d.ts +6 -2
  79. package/esm/browser/components/markdown.js +24 -10
  80. package/esm/browser/components/media.js +1 -10
  81. package/esm/browser/components/message-footer.d.ts +16 -2
  82. package/esm/browser/components/message-footer.js +29 -12
  83. package/esm/browser/components/message-list.d.ts +24 -3
  84. package/esm/browser/components/message-list.js +149 -20
  85. package/esm/browser/components/message-menu.d.ts +3 -1
  86. package/esm/browser/components/message-menu.js +18 -3
  87. package/esm/browser/components/nav-places.d.ts +16 -1
  88. package/esm/browser/components/nav-places.js +12 -3
  89. package/esm/browser/components/phone-shell.d.ts +4 -1
  90. package/esm/browser/components/phone-shell.js +3 -1
  91. package/esm/browser/components/run-status.js +3 -3
  92. package/esm/browser/components/select-bar.d.ts +9 -0
  93. package/esm/browser/components/select-bar.js +24 -0
  94. package/esm/browser/components/session-settings.d.ts +6 -0
  95. package/esm/browser/components/session-settings.js +14 -1
  96. package/esm/browser/components/session-view.js +8 -4
  97. package/esm/browser/components/settings-choices.d.ts +35 -0
  98. package/esm/browser/components/settings-choices.js +117 -0
  99. package/esm/browser/components/settings-parts.d.ts +21 -0
  100. package/esm/browser/components/settings-parts.js +323 -0
  101. package/esm/browser/components/settings-view.d.ts +0 -6
  102. package/esm/browser/components/settings-view.js +4 -406
  103. package/esm/browser/components/swipe-row.d.ts +2 -2
  104. package/esm/browser/components/swipe-row.js +7 -3
  105. package/esm/browser/components/tool-view.js +14 -12
  106. package/esm/browser/components/voice-button.d.ts +1 -1
  107. package/esm/browser/components/voice-button.js +1 -1
  108. package/esm/browser/components/voice-talk.d.ts +43 -0
  109. package/esm/browser/components/voice-talk.js +222 -0
  110. package/esm/browser/components/workbench-view.js +1 -1
  111. package/esm/browser/device/device.d.ts +3 -0
  112. package/esm/browser/device/device.js +11 -1
  113. package/esm/browser/device/hold.d.ts +42 -0
  114. package/esm/browser/device/hold.js +136 -0
  115. package/esm/browser/device/launch-screen.d.ts +1 -1
  116. package/esm/browser/device/launch-screen.js +1 -1
  117. package/esm/browser/device/long-press.d.ts +2 -0
  118. package/esm/browser/device/long-press.js +16 -1
  119. package/esm/browser/device/pull-down.d.ts +4 -2
  120. package/esm/browser/device/pull-down.js +64 -76
  121. package/esm/browser/device/row-swipe.d.ts +35 -10
  122. package/esm/browser/device/row-swipe.js +149 -71
  123. package/esm/browser/device/shake-undo.d.ts +16 -0
  124. package/esm/browser/device/shake-undo.js +59 -0
  125. package/esm/browser/device/sheet-swipe.d.ts +118 -18
  126. package/esm/browser/device/sheet-swipe.js +406 -107
  127. package/esm/browser/extension/icons.js +2 -1
  128. package/esm/browser/extension/web-extension-api.d.ts +135 -2
  129. package/esm/browser/extension/web-extension-code.d.ts +6 -0
  130. package/esm/browser/extension/web-extension-code.js +24 -0
  131. package/esm/browser/extension/web-extension-protocol.d.ts +23 -1
  132. package/esm/browser/extension/web-extension-protocol.js +8 -0
  133. package/esm/browser/extension/web-extensions.d.ts +14 -1
  134. package/esm/browser/extension/web-extensions.js +128 -24
  135. package/esm/browser/extension/web-tasks.d.ts +9 -1
  136. package/esm/browser/extension/web-tasks.js +24 -0
  137. package/esm/browser/files/files-protocol.d.ts +25 -0
  138. package/esm/browser/files/files-protocol.js +2 -0
  139. package/esm/browser/files/files.d.ts +35 -0
  140. package/esm/browser/files/files.js +119 -0
  141. package/esm/browser/hooks.d.ts +3 -1
  142. package/esm/browser/hooks.js +8 -0
  143. package/esm/browser/i18n/locales.d.ts +29 -2
  144. package/esm/browser/i18n/messages.d.ts +28 -1
  145. package/esm/browser/i18n/messages.js +58 -4
  146. package/esm/browser/index.d.ts +6 -0
  147. package/esm/browser/index.js +6 -0
  148. package/esm/browser/notices/notices-protocol.d.ts +9 -1
  149. package/esm/browser/notices/notices.d.ts +2 -0
  150. package/esm/browser/notices/notices.js +20 -10
  151. package/esm/browser/offline/device-values.d.ts +55 -0
  152. package/esm/browser/offline/device-values.js +142 -0
  153. package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
  154. package/esm/browser/offline/kept-chats-protocol.js +2 -0
  155. package/esm/browser/offline/kept-chats.d.ts +47 -0
  156. package/esm/browser/offline/kept-chats.js +146 -0
  157. package/esm/browser/offline/offline-reads.d.ts +44 -0
  158. package/esm/browser/offline/offline-reads.js +107 -0
  159. package/esm/browser/settings/settings-protocol.d.ts +2 -0
  160. package/esm/browser/settings/settings-protocol.js +2 -0
  161. package/esm/browser/style/conversation.d.ts +1 -1
  162. package/esm/browser/style/conversation.js +57 -17
  163. package/esm/browser/style/device.js +43 -4
  164. package/esm/browser/style/layout.d.ts +1 -1
  165. package/esm/browser/style/layout.js +67 -15
  166. package/esm/browser/style/pages.d.ts +1 -1
  167. package/esm/browser/style/pages.js +2 -1
  168. package/esm/browser/style/shell.d.ts +1 -1
  169. package/esm/browser/style/shell.js +47 -3
  170. package/esm/browser/style/tasks.d.ts +1 -1
  171. package/esm/browser/style/tasks.js +2 -0
  172. package/esm/browser/util/frame.d.ts +5 -4
  173. package/esm/browser/util/frame.js +5 -4
  174. package/esm/browser/util/markdown.d.ts +18 -1
  175. package/esm/browser/util/markdown.js +119 -5
  176. package/esm/browser/util/process.d.ts +21 -0
  177. package/esm/browser/util/process.js +45 -1
  178. package/esm/browser/util/voice.d.ts +5 -2
  179. package/esm/browser/util/voice.js +6 -3
  180. package/esm/browser/util/zoom.d.ts +46 -0
  181. package/esm/browser/util/zoom.js +96 -0
  182. package/esm/browser/workbench-calls.d.ts +59 -0
  183. package/esm/browser/workbench-calls.js +141 -0
  184. package/esm/browser/workbench-protocol.d.ts +5 -1
  185. package/esm/browser/workbench-util.d.ts +68 -0
  186. package/esm/browser/workbench-util.js +145 -0
  187. package/esm/browser/workbench.d.ts +15 -42
  188. package/esm/browser/workbench.js +53 -167
  189. package/lib/browser/assistant/assistant-chat-list.js +8 -2
  190. package/lib/browser/assistant/assistant-extension.d.ts +8 -1
  191. package/lib/browser/assistant/assistant-extension.js +33 -5
  192. package/lib/browser/assistant/assistant-protocol.d.ts +3 -1
  193. package/lib/browser/assistant/assistant-task-source.d.ts +2 -0
  194. package/lib/browser/assistant/assistant-task-source.js +2 -0
  195. package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
  196. package/lib/browser/assistant/assistant-task-util.js +13 -3
  197. package/lib/browser/assistant/assistant-tasks.js +2 -1
  198. package/lib/browser/assistant/assistant-view.js +78 -53
  199. package/lib/browser/assistant/assistant.d.ts +30 -1
  200. package/lib/browser/assistant/assistant.js +89 -6
  201. package/lib/browser/assistant/task-views.d.ts +40 -6
  202. package/lib/browser/assistant/task-views.js +74 -21
  203. package/lib/browser/avatar/dino-avatar.d.ts +3 -4
  204. package/lib/browser/avatar/dino-avatar.js +27 -202
  205. package/lib/browser/avatar/dino-face.d.ts +20 -0
  206. package/lib/browser/avatar/dino-face.js +148 -0
  207. package/lib/browser/avatar/dino-geometry.d.ts +12 -0
  208. package/lib/browser/avatar/dino-geometry.js +47 -0
  209. package/lib/browser/avatar/dino-kinds.d.ts +16 -0
  210. package/lib/browser/avatar/dino-kinds.js +547 -0
  211. package/lib/browser/avatar/dino-motion.js +2 -2
  212. package/lib/browser/avatar/dino-shape.d.ts +81 -0
  213. package/lib/browser/avatar/dino-shape.js +126 -0
  214. package/lib/browser/avatar/dino-species.d.ts +1 -61
  215. package/lib/browser/avatar/dino-species.js +34 -687
  216. package/lib/browser/chat/chat-packages.d.ts +40 -0
  217. package/lib/browser/chat/chat-packages.js +74 -0
  218. package/lib/browser/chat/chat-protocol.d.ts +23 -1
  219. package/lib/browser/chat/chat-stores.d.ts +60 -0
  220. package/lib/browser/chat/chat-stores.js +125 -0
  221. package/lib/browser/chat/chat-util.d.ts +18 -0
  222. package/lib/browser/chat/chat-util.js +64 -0
  223. package/lib/browser/chat/chat-view.js +33 -12
  224. package/lib/browser/chat/chat.d.ts +31 -39
  225. package/lib/browser/chat/chat.js +227 -176
  226. package/lib/browser/components/access-view.js +2 -2
  227. package/lib/browser/components/account-menu.js +2 -2
  228. package/lib/browser/components/app-nav.d.ts +6 -3
  229. package/lib/browser/components/app-nav.js +17 -8
  230. package/lib/browser/components/app-shell-hooks.d.ts +48 -0
  231. package/lib/browser/components/app-shell-hooks.js +211 -0
  232. package/lib/browser/components/app-view.js +89 -180
  233. package/lib/browser/components/auth-view.js +3 -3
  234. package/lib/browser/components/chat-list.d.ts +20 -2
  235. package/lib/browser/components/chat-list.js +137 -21
  236. package/lib/browser/components/composer-box.d.ts +5 -5
  237. package/lib/browser/components/composer-box.js +111 -4
  238. package/lib/browser/components/composer.d.ts +7 -0
  239. package/lib/browser/components/composer.js +22 -14
  240. package/lib/browser/components/connection-bar.js +48 -15
  241. package/lib/browser/components/context-menu.d.ts +30 -4
  242. package/lib/browser/components/context-menu.js +198 -36
  243. package/lib/browser/components/conversation-scroll.d.ts +129 -6
  244. package/lib/browser/components/conversation-scroll.js +431 -110
  245. package/lib/browser/components/dino.js +3 -3
  246. package/lib/browser/components/earlier-messages.d.ts +2 -1
  247. package/lib/browser/components/earlier-messages.js +2 -17
  248. package/lib/browser/components/editor-area.d.ts +3 -1
  249. package/lib/browser/components/editor-area.js +5 -4
  250. package/lib/browser/components/empty-pictures.d.ts +0 -2
  251. package/lib/browser/components/empty-pictures.js +0 -17
  252. package/lib/browser/components/folder-picker.d.ts +5 -2
  253. package/lib/browser/components/folder-picker.js +30 -9
  254. package/lib/browser/components/held-talk.d.ts +29 -0
  255. package/lib/browser/components/held-talk.js +79 -0
  256. package/lib/browser/components/host-view.d.ts +1 -1
  257. package/lib/browser/components/host-view.js +5 -5
  258. package/lib/browser/components/icon.d.ts +2 -2
  259. package/lib/browser/components/icon.js +7 -6
  260. package/lib/browser/components/image-viewer.d.ts +125 -0
  261. package/lib/browser/components/image-viewer.js +435 -0
  262. package/lib/browser/components/lightbox.d.ts +12 -0
  263. package/lib/browser/components/lightbox.js +60 -0
  264. package/lib/browser/components/markdown.d.ts +6 -2
  265. package/lib/browser/components/markdown.js +24 -10
  266. package/lib/browser/components/media.js +2 -11
  267. package/lib/browser/components/message-footer.d.ts +16 -2
  268. package/lib/browser/components/message-footer.js +31 -12
  269. package/lib/browser/components/message-list.d.ts +24 -3
  270. package/lib/browser/components/message-list.js +146 -16
  271. package/lib/browser/components/message-menu.d.ts +3 -1
  272. package/lib/browser/components/message-menu.js +17 -2
  273. package/lib/browser/components/nav-places.d.ts +16 -1
  274. package/lib/browser/components/nav-places.js +13 -3
  275. package/lib/browser/components/phone-shell.d.ts +4 -1
  276. package/lib/browser/components/phone-shell.js +3 -1
  277. package/lib/browser/components/run-status.js +3 -3
  278. package/lib/browser/components/select-bar.d.ts +10 -0
  279. package/lib/browser/components/select-bar.js +61 -0
  280. package/lib/browser/components/session-settings.d.ts +6 -0
  281. package/lib/browser/components/session-settings.js +14 -1
  282. package/lib/browser/components/session-view.js +7 -3
  283. package/lib/browser/components/settings-choices.d.ts +36 -0
  284. package/lib/browser/components/settings-choices.js +156 -0
  285. package/lib/browser/components/settings-parts.d.ts +22 -0
  286. package/lib/browser/components/settings-parts.js +359 -0
  287. package/lib/browser/components/settings-view.d.ts +0 -6
  288. package/lib/browser/components/settings-view.js +2 -405
  289. package/lib/browser/components/swipe-row.d.ts +2 -2
  290. package/lib/browser/components/swipe-row.js +7 -3
  291. package/lib/browser/components/tool-view.js +14 -12
  292. package/lib/browser/components/voice-button.d.ts +1 -1
  293. package/lib/browser/components/voice-button.js +1 -1
  294. package/lib/browser/components/voice-talk.d.ts +44 -0
  295. package/lib/browser/components/voice-talk.js +260 -0
  296. package/lib/browser/components/workbench-view.js +3 -3
  297. package/lib/browser/device/device.d.ts +3 -0
  298. package/lib/browser/device/device.js +11 -1
  299. package/lib/browser/device/hold.d.ts +43 -0
  300. package/lib/browser/device/hold.js +173 -0
  301. package/lib/browser/device/launch-screen.d.ts +1 -1
  302. package/lib/browser/device/launch-screen.js +1 -1
  303. package/lib/browser/device/long-press.d.ts +2 -0
  304. package/lib/browser/device/long-press.js +16 -1
  305. package/lib/browser/device/pull-down.d.ts +4 -2
  306. package/lib/browser/device/pull-down.js +63 -75
  307. package/lib/browser/device/row-swipe.d.ts +35 -10
  308. package/lib/browser/device/row-swipe.js +148 -70
  309. package/lib/browser/device/shake-undo.d.ts +17 -0
  310. package/lib/browser/device/shake-undo.js +63 -0
  311. package/lib/browser/device/sheet-swipe.d.ts +118 -18
  312. package/lib/browser/device/sheet-swipe.js +410 -108
  313. package/lib/browser/extension/icons.js +1 -0
  314. package/lib/browser/extension/web-extension-api.d.ts +135 -2
  315. package/lib/browser/extension/web-extension-code.d.ts +6 -0
  316. package/lib/browser/extension/web-extension-code.js +24 -0
  317. package/lib/browser/extension/web-extension-protocol.d.ts +23 -1
  318. package/lib/browser/extension/web-extension-protocol.js +9 -1
  319. package/lib/browser/extension/web-extensions.d.ts +14 -1
  320. package/lib/browser/extension/web-extensions.js +125 -21
  321. package/lib/browser/extension/web-tasks.d.ts +9 -1
  322. package/lib/browser/extension/web-tasks.js +24 -0
  323. package/lib/browser/files/files-protocol.d.ts +26 -0
  324. package/lib/browser/files/files-protocol.js +5 -0
  325. package/lib/browser/files/files.d.ts +36 -0
  326. package/lib/browser/files/files.js +122 -0
  327. package/lib/browser/hooks.d.ts +3 -1
  328. package/lib/browser/hooks.js +9 -0
  329. package/lib/browser/i18n/locales.d.ts +29 -2
  330. package/lib/browser/i18n/messages.d.ts +28 -1
  331. package/lib/browser/i18n/messages.js +58 -4
  332. package/lib/browser/index.d.ts +6 -0
  333. package/lib/browser/index.js +6 -0
  334. package/lib/browser/notices/notices-protocol.d.ts +9 -1
  335. package/lib/browser/notices/notices.d.ts +2 -0
  336. package/lib/browser/notices/notices.js +20 -10
  337. package/lib/browser/offline/device-values.d.ts +56 -0
  338. package/lib/browser/offline/device-values.js +148 -0
  339. package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
  340. package/lib/browser/offline/kept-chats-protocol.js +5 -0
  341. package/lib/browser/offline/kept-chats.d.ts +48 -0
  342. package/lib/browser/offline/kept-chats.js +149 -0
  343. package/lib/browser/offline/offline-reads.d.ts +45 -0
  344. package/lib/browser/offline/offline-reads.js +111 -0
  345. package/lib/browser/settings/settings-protocol.d.ts +2 -0
  346. package/lib/browser/settings/settings-protocol.js +2 -0
  347. package/lib/browser/style/conversation.d.ts +1 -1
  348. package/lib/browser/style/conversation.js +57 -17
  349. package/lib/browser/style/device.js +43 -4
  350. package/lib/browser/style/layout.d.ts +1 -1
  351. package/lib/browser/style/layout.js +67 -15
  352. package/lib/browser/style/pages.d.ts +1 -1
  353. package/lib/browser/style/pages.js +2 -1
  354. package/lib/browser/style/shell.d.ts +1 -1
  355. package/lib/browser/style/shell.js +47 -3
  356. package/lib/browser/style/tasks.d.ts +1 -1
  357. package/lib/browser/style/tasks.js +2 -0
  358. package/lib/browser/util/frame.d.ts +5 -4
  359. package/lib/browser/util/frame.js +5 -4
  360. package/lib/browser/util/markdown.d.ts +18 -1
  361. package/lib/browser/util/markdown.js +119 -5
  362. package/lib/browser/util/process.d.ts +21 -0
  363. package/lib/browser/util/process.js +46 -2
  364. package/lib/browser/util/voice.d.ts +5 -2
  365. package/lib/browser/util/voice.js +6 -3
  366. package/lib/browser/util/zoom.d.ts +47 -0
  367. package/lib/browser/util/zoom.js +99 -0
  368. package/lib/browser/workbench-calls.d.ts +60 -0
  369. package/lib/browser/workbench-calls.js +145 -0
  370. package/lib/browser/workbench-protocol.d.ts +5 -1
  371. package/lib/browser/workbench-util.d.ts +69 -0
  372. package/lib/browser/workbench-util.js +151 -0
  373. package/lib/browser/workbench.d.ts +15 -42
  374. package/lib/browser/workbench.js +74 -189
  375. package/package.json +10 -10
  376. package/public/launch.svg +46 -42
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { type WebViewEntry } from '../extension/web-extension-protocol.js';
3
- import { type Navigation } from './nav-places.js';
3
+ import { type EntryHolds, type Navigation } from './nav-places.js';
4
4
  import type { PhoneSurface } from './phone-shell.js';
5
5
  import type { SettingsSection } from './settings-view.js';
6
6
  import type { SideList } from './side-lists.js';
@@ -27,12 +27,15 @@ export interface RailProps {
27
27
  /** The one open in its flyout. */
28
28
  surface?: PhoneSurface;
29
29
  onSurface(surface: PhoneSurface | undefined): void;
30
+ /** What a held entry does: the double listens, the chats open a new one (entryHold). */
31
+ holds: EntryHolds;
30
32
  }
31
33
  /**
32
34
  * The navigation on the left, as the tabs of a phone: the logo; the lists of the sidebar; the pages, and Discover
33
- * once some are under it; the account with the settings at the bottom. A page's menu (a right click) puts it under Discover.
35
+ * once some are under it; the account with the settings at the bottom. A page's menu (a right click) puts it under
36
+ * Discover; that of the double talks to it, and that of the chats opens a new one (entryMenu).
34
37
  */
35
- export declare function Rail({ lists, list, onList, navigation, current, onPage, onDiscover, onSettings, settingsShown, surfaces, surface, onSurface }: RailProps): React.JSX.Element;
38
+ export declare function Rail({ lists, list, onList, navigation, current, onPage, onDiscover, onSettings, settingsShown, surfaces, surface, onSurface, holds, }: RailProps): React.JSX.Element;
36
39
  /** A sidebar view of a web extension, under its title or its own top bar. */
37
40
  export declare function SidebarView({ view }: {
38
41
  view: WebViewEntry;
@@ -1,18 +1,21 @@
1
1
  import { Compass, Grip, LayoutDashboard, PanelTop } from 'lucide-react';
2
2
  import * as React from 'react';
3
3
  import { useDevice } from '../device/device.js';
4
+ import { useHeld } from '../device/hold.js';
4
5
  import { ExtensionBoundary } from '../extension/extension-view.js';
5
6
  import { WebLabelUtil } from '../extension/web-extension-protocol.js';
6
7
  import { useSettings, useWorkbench } from '../hooks.js';
7
8
  import { useT } from '../i18n/use-t.js';
9
+ import { ShortcutUtil } from '../settings/agent-settings.js';
8
10
  import { NavigationUtil } from '../settings/navigation.js';
9
11
  import { AccountMenu } from './account-menu.js';
10
12
  import { ConnectionBanner } from './connection-bar.js';
11
13
  import { useContextMenu } from './context-menu.js';
12
14
  import { Dino } from './dino.js';
13
- import { DISCOVER, places } from './nav-places.js';
15
+ import { SidebarRight } from './icon.js';
16
+ import { DISCOVER, entryHold, places } from './nav-places.js';
14
17
  import { DinoFace } from './ta-avatar.js';
15
- import { WorkbenchToggle } from './workbench-toggle.js';
18
+ import { WorkbenchToggle, WorkbenchToggleContext } from './workbench-toggle.js';
16
19
  /* The navigation of the app: the rail, a sidebar view, a page of the main area. */
17
20
  /** Where the pages of the rail go on this device: a phone has the room its tabs leave. */
18
21
  export function useNavigation(views) {
@@ -28,36 +31,42 @@ export function useNavigation(views) {
28
31
  update,
29
32
  };
30
33
  }
31
- function RailItem({ label, active, onClick, onContextMenu, children }) {
32
- return (React.createElement("button", { type: "button", className: `ta-rail-item ${active ? 'ta-active' : ''}`, title: label, "aria-label": label, "aria-pressed": active, onClick: onClick, onContextMenu: onContextMenu }, children));
34
+ function RailItem({ label, active, onClick, onContextMenu, onPointerDown, 'data-held': held, children }) {
35
+ return (React.createElement("button", { type: "button", className: `ta-rail-item ${active ? 'ta-active' : ''}`, title: label, "aria-label": label, "aria-pressed": active, onClick: onClick, onContextMenu: onContextMenu, onPointerDown: onPointerDown, "data-held": held }, children));
33
36
  }
34
37
  /**
35
38
  * The navigation on the left, as the tabs of a phone: the logo; the lists of the sidebar; the pages, and Discover
36
- * once some are under it; the account with the settings at the bottom. A page's menu (a right click) puts it under Discover.
39
+ * once some are under it; the account with the settings at the bottom. A page's menu (a right click) puts it under
40
+ * Discover; that of the double talks to it, and that of the chats opens a new one (entryMenu).
37
41
  */
38
- export function Rail({ lists, list, onList, navigation, current, onPage, onDiscover, onSettings, settingsShown, surfaces, surface, onSurface }) {
42
+ export function Rail({ lists, list, onList, navigation, current, onPage, onDiscover, onSettings, settingsShown, surfaces, surface, onSurface, holds, }) {
39
43
  const t = useT();
40
44
  const [{ server }] = useWorkbench();
41
45
  const [menu, openMenu] = useContextMenu();
46
+ const held = useHeld();
42
47
  const settingsItem = { label: t('ta.nav.settings'), run: () => onSettings('navigation') };
43
- /** A page of the rail; the double's (`double`) is its face and stays out of Discover. */
48
+ /** A page of the rail; the double's (`double`) is its face and stays out of Discover, and talks while it is held. */
44
49
  const item = (view, foldable = true, double = false) => {
45
50
  var _a;
46
51
  const Glyph = (_a = view.icon) !== null && _a !== void 0 ? _a : PanelTop;
47
- return (React.createElement(RailItem, { key: view.id, label: WebLabelUtil.text(view.title), active: !settingsShown && current === view.id, onClick: () => onPage(view.id), onContextMenu: foldable ? event => openMenu(event, [{ label: t('ta.nav.fold'), run: () => navigation.fold(view.id) }, '-', settingsItem]) : undefined }, double ? React.createElement(DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(Glyph, { size: 20, strokeWidth: 1.6 })));
52
+ return (React.createElement(RailItem, { key: view.id, label: WebLabelUtil.text(view.title), active: !settingsShown && current === view.id, onClick: () => onPage(view.id), onContextMenu: foldable ? event => openMenu(event, [{ label: t('ta.nav.fold'), run: () => navigation.fold(view.id) }, '-', settingsItem]) : undefined, ...held(double ? holds.double : undefined) }, double ? React.createElement(DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(Glyph, { size: 20, strokeWidth: 1.6 })));
48
53
  };
49
54
  const discover = navigation.discover.length > 0 || current === DISCOVER;
55
+ // The workbench from anywhere, a page or the settings too, as the launcher and the board.
56
+ const workbench = React.useContext(WorkbenchToggleContext);
50
57
  return (React.createElement("nav", { className: "ta-rail", "aria-label": t('ta.menu') },
51
58
  React.createElement("div", { className: "ta-rail-logo", title: server ? `Ta v${server.version}` : 'Ta' },
52
59
  React.createElement(Dino, { size: 26 })),
53
60
  React.createElement("div", { className: "ta-rail-items" },
54
61
  navigation.home && item(navigation.home, false, true),
55
- lists.map(entry => (React.createElement(RailItem, { key: entry.id, label: entry.label, active: list === entry.id, onClick: () => onList(entry.id) }, entry.double ? React.createElement(DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(entry.icon, { size: 20, strokeWidth: 1.6 })))),
62
+ lists.map(entry => (React.createElement(RailItem, { key: entry.id, label: entry.label, active: list === entry.id, onClick: () => onList(entry.id), ...held(entryHold(entry.id, entry.double, holds)) }, entry.double ? React.createElement(DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(entry.icon, { size: 20, strokeWidth: 1.6 })))),
56
63
  (navigation.nav.length > 0 || discover) && React.createElement("hr", { className: "ta-rail-divider" }),
57
64
  navigation.nav.map(view => item(view)),
58
65
  discover && (React.createElement(RailItem, { label: t('ta.discover'), active: !settingsShown && current === DISCOVER, onClick: onDiscover, onContextMenu: event => openMenu(event, [settingsItem]) },
59
66
  React.createElement(Compass, { size: 20, strokeWidth: 1.6 })))),
60
- (surfaces.launcher || surfaces.board) && (React.createElement("div", { className: "ta-rail-tools" },
67
+ (workbench || surfaces.launcher || surfaces.board) && (React.createElement("div", { className: "ta-rail-tools" },
68
+ workbench && (React.createElement(RailItem, { label: `${t('ta.workbench')} (${ShortcutUtil.keys('Mod+J').join(ShortcutUtil.isMac() ? '' : '+')})`, active: workbench.open, onClick: workbench.toggle },
69
+ React.createElement(SidebarRight, { size: 20, strokeWidth: 1.6 }))),
61
70
  surfaces.launcher && (React.createElement(SurfaceButton, { label: t('ta.launcher'), active: surface === 'launcher', onClick: () => onSurface(surface === 'launcher' ? undefined : 'launcher') },
62
71
  React.createElement(Grip, { size: 20, strokeWidth: 1.6 }))),
63
72
  surfaces.board && (React.createElement(SurfaceButton, { label: t('ta.board'), active: surface === 'board', onClick: () => onSurface(surface === 'board' ? undefined : 'board') },
@@ -0,0 +1,47 @@
1
+ import type { WebViewEntry } from '../extension/web-extension-protocol.js';
2
+ import type { Theme } from '../settings/settings-protocol.js';
3
+ import { type StateSpec } from '../state/state-protocol.js';
4
+ import type { PaneSpec } from '../util/layout.js';
5
+ /**
6
+ * What the sidebar shows in this tab: `` for the chats, else the id of a sidebar view. Until the user picks
7
+ * a tab, the first sidebar view of web extensions (the agents), or the chats if there is none.
8
+ */
9
+ export declare const FIRST_SIDE = "*";
10
+ /** A page of ta's own in place of the conversation: Discover (a tab of a phone, a page of the rail), Me (a tab of a phone). */
11
+ export type TabPage = 'discover' | 'me';
12
+ /** The user put off signing in to a model, in this tab: the page shows the app until the tab is reopened. */
13
+ export declare const LOGIN_LATER: StateSpec<boolean>;
14
+ export declare const SIDE: StateSpec<string>;
15
+ export declare const SIDEBAR: PaneSpec;
16
+ export declare const EDITOR: PaneSpec;
17
+ /** The width of the navigation rail, in style.ts. */
18
+ export declare const RAIL = 56;
19
+ /** The cards of web extensions, as a tool of the workbench and its tab. */
20
+ export declare const CARDS_ID = "ta/cards";
21
+ /**
22
+ * Whether the right of the page (editors and cards) shows; on narrow screens it starts hidden. The last of
23
+ * them hides it where it lies over the conversation, the user's choice kept.
24
+ */
25
+ export declare function useRight(): [boolean, () => void, () => void, () => void];
26
+ /** Cmd/Ctrl+B shows or hides the sidebar, Cmd/Ctrl+J the workbench, and Cmd/Ctrl+, opens the settings, as in an IDE. */
27
+ export declare function useKeys(toggle: () => void, openSettings: () => void, toggleWorkbench: () => void): void;
28
+ /**
29
+ * The installed app with its title bar hidden draws the bar itself (see .ta-titlebar), but the browser
30
+ * paints the corners of the window's buttons with theme-color: the traffic lights at the left over the
31
+ * side columns, its own buttons at the right. So the bar is the colour of the side columns throughout, the
32
+ * conversation below it too. Otherwise the whole title bar has the conversation's colour, as the sign-in page.
33
+ */
34
+ export declare function useTitlebarColor(signedIn: boolean, theme: Theme): void;
35
+ /** Reads the open sessions and the web extensions again while the tab is visible: other clients change them too. */
36
+ export declare function useRefresh(online: boolean): void;
37
+ /** The drawer of a compact layout comes out from the left edge under the finger, and goes the same way. */
38
+ export declare function useDrawerSwipe(enabled: boolean, open: boolean, setOpen: (open: boolean) => void): void;
39
+ /**
40
+ * The cards of web extensions as a tool of the workbench and its tab: the tab opens when the first card
41
+ * comes while the workbench `shown` has nothing else open, and goes with the last card.
42
+ */
43
+ export declare function useWorkbenchCards(shown: boolean): {
44
+ hasCards: boolean;
45
+ openCards(): void;
46
+ cardsTool: WebViewEntry;
47
+ };
@@ -0,0 +1,169 @@
1
+ import { LayoutGrid } from 'lucide-react';
2
+ import * as React from 'react';
3
+ import { useDevice } from '../device/device.js';
4
+ import { useSheetSwipe } from '../device/sheet-swipe.js';
5
+ import { usePersisted, useSettings, useWebExtensions, useWorkbench } from '../hooks.js';
6
+ import { message } from '../i18n/messages.js';
7
+ import { THEME_COLORS } from '../settings/settings.js';
8
+ import { StateUtil } from '../state/state-protocol.js';
9
+ import { WorkbenchCards } from './editor-area.js';
10
+ /**
11
+ * What the sidebar shows in this tab: `` for the chats, else the id of a sidebar view. Until the user picks
12
+ * a tab, the first sidebar view of web extensions (the agents), or the chats if there is none.
13
+ */
14
+ export const FIRST_SIDE = '*';
15
+ /** The user put off signing in to a model, in this tab: the page shows the app until the tab is reopened. */
16
+ export const LOGIN_LATER = { key: 'login.later', tier: 'tab', initial: false, parse: StateUtil.boolean };
17
+ export const SIDE = { key: 'side', tier: 'tab', initial: FIRST_SIDE, parse: StateUtil.string };
18
+ export const SIDEBAR = { key: 'sidebar', initial: 300, min: 200, max: 520 };
19
+ export const EDITOR = { key: 'editor', initial: 480, min: 320, max: 1200 };
20
+ /** The width of the navigation rail, in style.ts. */
21
+ export const RAIL = 56;
22
+ /** Whether the workbench on the right shows, in this browser, whose screen decides. */
23
+ const RIGHT = { key: 'panel', tier: 'device', initial: true, parse: StateUtil.boolean };
24
+ /** Sessions change with other clients too; while the tab is visible they are read again now and then. */
25
+ const REFRESH_MS = 5000;
26
+ /** The cards of web extensions, as a tool of the workbench and its tab. */
27
+ export const CARDS_ID = 'ta/cards';
28
+ const CARDS_TAB_ID = `view:${CARDS_ID}`;
29
+ function cardsTab(title) {
30
+ return { id: CARDS_TAB_ID, extension: 'ta', title, icon: LayoutGrid, render: WorkbenchCards };
31
+ }
32
+ /**
33
+ * Whether the right of the page (editors and cards) shows; on narrow screens it starts hidden. The last of
34
+ * them hides it where it lies over the conversation, the user's choice kept.
35
+ */
36
+ export function useRight() {
37
+ const [kept, keep] = usePersisted(RIGHT);
38
+ // Where it does not fit beside the conversation it opens over it: only when asked, in this page.
39
+ const inline = useDevice(device => device.layout) === 'expanded';
40
+ const [asked, setAsked] = React.useState(false);
41
+ const open = kept && (inline || asked);
42
+ const set = React.useCallback((next) => {
43
+ setAsked(next);
44
+ keep(next);
45
+ }, [keep]);
46
+ const toggle = React.useCallback(() => set(!open), [set, open]);
47
+ const reveal = React.useCallback(() => set(true), [set]);
48
+ const uncover = React.useCallback(() => setAsked(false), []);
49
+ // `set` is stable, so `reveal` is too: effects may depend on it.
50
+ return [open, toggle, reveal, uncover];
51
+ }
52
+ /** Cmd/Ctrl+B shows or hides the sidebar, Cmd/Ctrl+J the workbench, and Cmd/Ctrl+, opens the settings, as in an IDE. */
53
+ export function useKeys(toggle, openSettings, toggleWorkbench) {
54
+ React.useEffect(() => {
55
+ const onKey = (event) => {
56
+ if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) {
57
+ return;
58
+ }
59
+ const key = event.key.toLowerCase();
60
+ if (key === 'b') {
61
+ event.preventDefault();
62
+ toggle();
63
+ }
64
+ else if (key === ',') {
65
+ event.preventDefault();
66
+ openSettings();
67
+ }
68
+ else if (key === 'j') {
69
+ event.preventDefault();
70
+ toggleWorkbench();
71
+ }
72
+ };
73
+ window.addEventListener('keydown', onKey);
74
+ return () => window.removeEventListener('keydown', onKey);
75
+ }, [toggle, openSettings, toggleWorkbench]);
76
+ }
77
+ /**
78
+ * The installed app with its title bar hidden draws the bar itself (see .ta-titlebar), but the browser
79
+ * paints the corners of the window's buttons with theme-color: the traffic lights at the left over the
80
+ * side columns, its own buttons at the right. So the bar is the colour of the side columns throughout, the
81
+ * conversation below it too. Otherwise the whole title bar has the conversation's colour, as the sign-in page.
82
+ */
83
+ export function useTitlebarColor(signedIn, theme) {
84
+ React.useEffect(() => {
85
+ const overlay = matchMedia('(display-mode: window-controls-overlay)');
86
+ const apply = () => {
87
+ const meta = document.querySelector('meta[name="theme-color"]');
88
+ if (meta) {
89
+ meta.content = THEME_COLORS[theme][overlay.matches && signedIn ? 'side' : 'main'];
90
+ }
91
+ };
92
+ apply();
93
+ overlay.addEventListener('change', apply);
94
+ return () => overlay.removeEventListener('change', apply);
95
+ }, [signedIn, theme]);
96
+ }
97
+ /** Reads the open sessions and the web extensions again while the tab is visible: other clients change them too. */
98
+ export function useRefresh(online) {
99
+ const [, workbench] = useWorkbench();
100
+ const [, extensions] = useWebExtensions();
101
+ React.useEffect(() => {
102
+ if (!online) {
103
+ return;
104
+ }
105
+ const sessions = () => document.visibilityState === 'visible' && workbench.refresh().catch(() => undefined);
106
+ const shown = () => {
107
+ sessions();
108
+ if (document.visibilityState === 'visible') {
109
+ extensions.refresh().catch(() => undefined);
110
+ }
111
+ };
112
+ const timer = setInterval(sessions, REFRESH_MS);
113
+ document.addEventListener('visibilitychange', shown);
114
+ return () => {
115
+ clearInterval(timer);
116
+ document.removeEventListener('visibilitychange', shown);
117
+ };
118
+ }, [online, workbench, extensions]);
119
+ }
120
+ /** The drawer of a compact layout comes out from the left edge under the finger, and goes the same way. */
121
+ export function useDrawerSwipe(enabled, open, setOpen) {
122
+ useSheetSwipe({
123
+ enabled,
124
+ open,
125
+ setOpen,
126
+ side: 'left',
127
+ opensFrom: 'edge',
128
+ closesFrom: 'anywhere',
129
+ sheet: '.ta-nav',
130
+ scrim: '.ta-scrim',
131
+ settleMs: 240,
132
+ });
133
+ }
134
+ /**
135
+ * The cards of web extensions as a tool of the workbench and its tab: the tab opens when the first card
136
+ * comes while the workbench `shown` has nothing else open, and goes with the last card.
137
+ */
138
+ export function useWorkbenchCards(shown) {
139
+ const [extensions, host] = useWebExtensions();
140
+ const [, settingsStore] = useSettings();
141
+ // The cards of web extensions are a tab of the workbench: it opens when the first card comes, if nothing else is open there, and goes with the last.
142
+ const hasCards = extensions.widgets.some(widget => widget.placement === 'panel');
143
+ const cardsOpen = extensions.editors.some(candidate => candidate.id === CARDS_TAB_ID);
144
+ const openCards = React.useCallback(() => host.open(cardsTab(() => message(settingsStore.state.language, 'ta.workbench.cards'))), [host, settingsStore]);
145
+ const quiet = extensions.editors.length === 0 && shown;
146
+ // Only when cards come: not when the user closes their tab.
147
+ // biome-ignore lint/correctness/useExhaustiveDependencies: follows whether there are cards
148
+ React.useEffect(() => {
149
+ if (hasCards && !cardsOpen && quiet) {
150
+ openCards();
151
+ }
152
+ }, [hasCards]);
153
+ React.useEffect(() => {
154
+ if (!hasCards && cardsOpen) {
155
+ void host.closeEditor(CARDS_TAB_ID);
156
+ }
157
+ }, [hasCards, cardsOpen, host]);
158
+ const cardsTool = {
159
+ id: CARDS_ID,
160
+ extension: 'ta',
161
+ title: () => message(settingsStore.state.language, 'ta.workbench.cards'),
162
+ component: WorkbenchCards,
163
+ icon: LayoutGrid,
164
+ location: 'panel',
165
+ order: 0,
166
+ };
167
+ return { hasCards, openCards, cardsTool };
168
+ }
169
+ //# sourceMappingURL=app-shell-hooks.js.map