@celljs/ta-web 4.10.0 → 4.12.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 (559) hide show
  1. package/README.en.md +7 -7
  2. package/README.md +7 -7
  3. package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
  4. package/esm/browser/assistant/assistant-chat-list.js +12 -0
  5. package/esm/browser/assistant/assistant-extension.js +5 -0
  6. package/esm/browser/assistant/assistant-protocol.d.ts +2 -1
  7. package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
  8. package/esm/browser/assistant/assistant-task-book.js +23 -4
  9. package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
  10. package/esm/browser/assistant/assistant-task-source.js +5 -10
  11. package/esm/browser/assistant/assistant-task-util.d.ts +13 -3
  12. package/esm/browser/assistant/assistant-task-util.js +59 -12
  13. package/esm/browser/assistant/assistant-view.js +48 -24
  14. package/esm/browser/assistant/assistant.d.ts +18 -4
  15. package/esm/browser/assistant/assistant.js +52 -17
  16. package/esm/browser/avatar/dino-face.js +1 -2
  17. package/esm/browser/chat/chat-protocol.d.ts +5 -0
  18. package/esm/browser/chat/chat-stores.d.ts +8 -5
  19. package/esm/browser/chat/chat-stores.js +17 -9
  20. package/esm/browser/chat/chat-view.js +23 -15
  21. package/esm/browser/chat/chat.d.ts +16 -8
  22. package/esm/browser/chat/chat.js +86 -51
  23. package/esm/browser/components/account-menu.d.ts +0 -2
  24. package/esm/browser/components/account-menu.js +1 -27
  25. package/esm/browser/components/agent-settings-view.d.ts +3 -2
  26. package/esm/browser/components/agent-settings-view.js +2 -1
  27. package/esm/browser/components/app-nav.d.ts +5 -2
  28. package/esm/browser/components/app-nav.js +22 -9
  29. package/esm/browser/components/app-shell-hooks.js +5 -3
  30. package/esm/browser/components/app-view.js +84 -20
  31. package/esm/browser/components/busy.d.ts +25 -0
  32. package/esm/browser/components/busy.js +52 -0
  33. package/esm/browser/components/chat-icon.d.ts +29 -0
  34. package/esm/browser/components/chat-icon.js +78 -0
  35. package/esm/browser/components/chat-list.d.ts +73 -6
  36. package/esm/browser/components/chat-list.js +295 -60
  37. package/esm/browser/components/chat-seen.d.ts +53 -0
  38. package/esm/browser/components/chat-seen.js +101 -0
  39. package/esm/browser/components/composer-box.d.ts +15 -4
  40. package/esm/browser/components/composer-box.js +139 -77
  41. package/esm/browser/components/composer.d.ts +9 -6
  42. package/esm/browser/components/composer.js +32 -4
  43. package/esm/browser/components/conversation-scroll-hooks.d.ts +16 -0
  44. package/esm/browser/components/conversation-scroll-hooks.js +98 -0
  45. package/esm/browser/components/conversation-scroll-util.d.ts +30 -0
  46. package/esm/browser/components/conversation-scroll-util.js +56 -0
  47. package/esm/browser/components/conversation-scroll.d.ts +52 -31
  48. package/esm/browser/components/conversation-scroll.js +170 -129
  49. package/esm/browser/components/custom-host.d.ts +3 -0
  50. package/esm/browser/components/custom-host.js +14 -0
  51. package/esm/browser/components/directory-commands.d.ts +6 -0
  52. package/esm/browser/components/directory-commands.js +34 -0
  53. package/esm/browser/components/discover-view.d.ts +11 -4
  54. package/esm/browser/components/discover-view.js +20 -11
  55. package/esm/browser/components/dismiss.d.ts +3 -0
  56. package/esm/browser/components/dismiss.js +29 -0
  57. package/esm/browser/components/earlier-messages.d.ts +34 -3
  58. package/esm/browser/components/earlier-messages.js +42 -8
  59. package/esm/browser/components/editor-area.d.ts +6 -22
  60. package/esm/browser/components/editor-area.js +10 -97
  61. package/esm/browser/components/face.d.ts +24 -0
  62. package/esm/browser/components/face.js +42 -0
  63. package/esm/browser/components/fold-text.d.ts +20 -0
  64. package/esm/browser/components/fold-text.js +66 -0
  65. package/esm/browser/components/folder-picker.d.ts +1 -1
  66. package/esm/browser/components/folder-picker.js +1 -1
  67. package/esm/browser/components/full-screen.d.ts +9 -0
  68. package/esm/browser/components/full-screen.js +26 -0
  69. package/esm/browser/components/grow-box.d.ts +9 -0
  70. package/esm/browser/components/grow-box.js +50 -0
  71. package/esm/browser/components/hold-to-talk.d.ts +22 -0
  72. package/esm/browser/components/hold-to-talk.js +29 -0
  73. package/esm/browser/components/host-view.d.ts +1 -1
  74. package/esm/browser/components/icon.d.ts +3 -1
  75. package/esm/browser/components/icon.js +4 -3
  76. package/esm/browser/components/image-viewer.d.ts +10 -2
  77. package/esm/browser/components/image-viewer.js +48 -11
  78. package/esm/browser/components/launcher-search-util.d.ts +4 -3
  79. package/esm/browser/components/launcher-search-util.js +12 -4
  80. package/esm/browser/components/lightbox.d.ts +5 -2
  81. package/esm/browser/components/lightbox.js +4 -3
  82. package/esm/browser/components/list-rows.d.ts +9 -1
  83. package/esm/browser/components/list-rows.js +17 -3
  84. package/esm/browser/components/markdown.js +36 -4
  85. package/esm/browser/components/media.js +73 -7
  86. package/esm/browser/components/message-actions.js +3 -0
  87. package/esm/browser/components/message-footer.d.ts +8 -0
  88. package/esm/browser/components/message-footer.js +20 -3
  89. package/esm/browser/components/message-list.d.ts +60 -7
  90. package/esm/browser/components/message-list.js +206 -58
  91. package/esm/browser/components/message-menu.js +6 -1
  92. package/esm/browser/components/model-picker.js +1 -0
  93. package/esm/browser/components/nav-places.d.ts +21 -2
  94. package/esm/browser/components/nav-places.js +20 -4
  95. package/esm/browser/components/notice-center.js +34 -0
  96. package/esm/browser/components/notice-face.d.ts +10 -0
  97. package/esm/browser/components/notice-face.js +28 -0
  98. package/esm/browser/components/phone-shell.d.ts +23 -1
  99. package/esm/browser/components/phone-shell.js +98 -9
  100. package/esm/browser/components/picture.d.ts +8 -1
  101. package/esm/browser/components/picture.js +12 -1
  102. package/esm/browser/components/plus-menu.d.ts +23 -0
  103. package/esm/browser/components/plus-menu.js +90 -0
  104. package/esm/browser/components/recent-shot.d.ts +15 -0
  105. package/esm/browser/components/recent-shot.js +174 -0
  106. package/esm/browser/components/relay-view.js +10 -3
  107. package/esm/browser/components/run-status.d.ts +1 -1
  108. package/esm/browser/components/run-status.js +17 -29
  109. package/esm/browser/components/said-text.d.ts +6 -0
  110. package/esm/browser/components/said-text.js +14 -0
  111. package/esm/browser/components/scan-screen.d.ts +10 -0
  112. package/esm/browser/components/scan-screen.js +230 -0
  113. package/esm/browser/components/search-page.js +10 -6
  114. package/esm/browser/components/session-settings.d.ts +2 -3
  115. package/esm/browser/components/session-settings.js +1 -0
  116. package/esm/browser/components/session-view.d.ts +3 -1
  117. package/esm/browser/components/session-view.js +35 -21
  118. package/esm/browser/components/settings-choices.d.ts +1 -0
  119. package/esm/browser/components/settings-choices.js +3 -2
  120. package/esm/browser/components/settings-controls.d.ts +5 -3
  121. package/esm/browser/components/settings-controls.js +10 -1
  122. package/esm/browser/components/settings-parts.js +45 -14
  123. package/esm/browser/components/stop-times.d.ts +47 -0
  124. package/esm/browser/components/stop-times.js +81 -0
  125. package/esm/browser/components/tool-view.js +7 -2
  126. package/esm/browser/components/unseen-drop.d.ts +39 -0
  127. package/esm/browser/components/unseen-drop.js +219 -0
  128. package/esm/browser/components/use-seen-chats.d.ts +8 -0
  129. package/esm/browser/components/use-seen-chats.js +49 -0
  130. package/esm/browser/components/use-stop-times.d.ts +3 -0
  131. package/esm/browser/components/use-stop-times.js +17 -0
  132. package/esm/browser/components/voice-button.d.ts +7 -1
  133. package/esm/browser/components/voice-button.js +15 -2
  134. package/esm/browser/components/voice-picker.d.ts +6 -0
  135. package/esm/browser/components/voice-picker.js +53 -0
  136. package/esm/browser/components/voice-talk.d.ts +11 -3
  137. package/esm/browser/components/voice-talk.js +24 -4
  138. package/esm/browser/components/web-composer.d.ts +4 -2
  139. package/esm/browser/components/web-composer.js +8 -4
  140. package/esm/browser/components/workbench-tabs.d.ts +41 -0
  141. package/esm/browser/components/workbench-tabs.js +193 -0
  142. package/esm/browser/components/workbench-toggle.d.ts +0 -13
  143. package/esm/browser/components/workbench-toggle.js +1 -28
  144. package/esm/browser/device/code-scan.d.ts +55 -0
  145. package/esm/browser/device/code-scan.js +137 -0
  146. package/esm/browser/device/code-vision.d.ts +51 -0
  147. package/esm/browser/device/code-vision.js +100 -0
  148. package/esm/browser/device/hold.js +4 -6
  149. package/esm/browser/device/long-press.d.ts +10 -0
  150. package/esm/browser/device/long-press.js +28 -12
  151. package/esm/browser/device/own-gestures.d.ts +25 -0
  152. package/esm/browser/device/own-gestures.js +39 -0
  153. package/esm/browser/device/photo-picker.d.ts +14 -0
  154. package/esm/browser/device/photo-picker.js +48 -0
  155. package/esm/browser/device/pull-down.js +3 -2
  156. package/esm/browser/device/recent-shots.d.ts +45 -0
  157. package/esm/browser/device/recent-shots.js +142 -0
  158. package/esm/browser/device/row-swipe.d.ts +2 -0
  159. package/esm/browser/device/row-swipe.js +14 -3
  160. package/esm/browser/device/sheet-swipe.d.ts +1 -1
  161. package/esm/browser/device/sheet-swipe.js +25 -4
  162. package/esm/browser/extension/extension-view.d.ts +10 -0
  163. package/esm/browser/extension/extension-view.js +6 -0
  164. package/esm/browser/extension/icons.js +16 -2
  165. package/esm/browser/extension/web-api-components.d.ts +287 -0
  166. package/esm/browser/extension/web-api-components.js +2 -0
  167. package/esm/browser/extension/web-api-contributions.d.ts +394 -0
  168. package/esm/browser/extension/web-api-contributions.js +2 -0
  169. package/esm/browser/extension/web-api-desktop.d.ts +55 -0
  170. package/esm/browser/extension/web-api-desktop.js +2 -0
  171. package/esm/browser/extension/web-api-terminal.d.ts +71 -0
  172. package/esm/browser/extension/web-api-terminal.js +2 -0
  173. package/esm/browser/extension/web-editor-tabs.d.ts +42 -0
  174. package/esm/browser/extension/web-editor-tabs.js +137 -0
  175. package/esm/browser/extension/web-extension-api.d.ts +186 -565
  176. package/esm/browser/extension/web-extension-context.d.ts +78 -0
  177. package/esm/browser/extension/web-extension-context.js +354 -0
  178. package/esm/browser/extension/web-extension-protocol.d.ts +57 -7
  179. package/esm/browser/extension/web-extension-protocol.js +34 -0
  180. package/esm/browser/extension/web-extension-run.d.ts +54 -0
  181. package/esm/browser/extension/web-extension-run.js +120 -0
  182. package/esm/browser/extension/web-extensions.d.ts +29 -69
  183. package/esm/browser/extension/web-extensions.js +121 -516
  184. package/esm/browser/extension/web-home.d.ts +19 -0
  185. package/esm/browser/extension/web-home.js +72 -0
  186. package/esm/browser/extension/web-pages.d.ts +13 -3
  187. package/esm/browser/extension/web-pages.js +23 -3
  188. package/esm/browser/extension/web-session-notices.d.ts +36 -0
  189. package/esm/browser/extension/web-session-notices.js +174 -0
  190. package/esm/browser/extension/web-sharing.d.ts +2 -0
  191. package/esm/browser/extension/web-sharing.js +4 -0
  192. package/esm/browser/game/game-host.d.ts +27 -0
  193. package/esm/browser/game/game-host.js +127 -0
  194. package/esm/browser/game/game-loader.d.ts +10 -0
  195. package/esm/browser/game/game-loader.js +28 -0
  196. package/esm/browser/game/game-protocol.d.ts +49 -0
  197. package/esm/browser/game/game-protocol.js +2 -0
  198. package/esm/browser/game/game-runner.d.ts +27 -0
  199. package/esm/browser/game/game-runner.js +60 -0
  200. package/esm/browser/game/game-util.d.ts +29 -0
  201. package/esm/browser/game/game-util.js +180 -0
  202. package/esm/browser/game/game-view.d.ts +12 -0
  203. package/esm/browser/game/game-view.js +31 -0
  204. package/esm/browser/game/game3d-protocol.d.ts +51 -0
  205. package/esm/browser/game/game3d-protocol.js +2 -0
  206. package/esm/browser/game/game3d-runner.d.ts +27 -0
  207. package/esm/browser/game/game3d-runner.js +149 -0
  208. package/esm/browser/hooks.d.ts +5 -1
  209. package/esm/browser/hooks.js +13 -2
  210. package/esm/browser/i18n/locales.d.ts +92 -2
  211. package/esm/browser/i18n/messages.d.ts +91 -1
  212. package/esm/browser/i18n/messages.js +187 -7
  213. package/esm/browser/index.d.ts +9 -0
  214. package/esm/browser/index.js +9 -0
  215. package/esm/browser/links/links-protocol.d.ts +7 -0
  216. package/esm/browser/links/links.d.ts +24 -7
  217. package/esm/browser/links/links.js +64 -11
  218. package/esm/browser/markdown/code-renderers.d.ts +4 -0
  219. package/esm/browser/markdown/code-renderers.js +4 -0
  220. package/esm/browser/notices/notices-protocol.d.ts +17 -0
  221. package/esm/browser/notices/notices.d.ts +1 -1
  222. package/esm/browser/notices/notices.js +6 -2
  223. package/esm/browser/notices/session-notices.d.ts +69 -0
  224. package/esm/browser/notices/session-notices.js +92 -0
  225. package/esm/browser/offline/device-values.js +12 -3
  226. package/esm/browser/offline/offline-reads.js +3 -1
  227. package/esm/browser/settings/navigation.d.ts +3 -2
  228. package/esm/browser/settings/navigation.js +4 -3
  229. package/esm/browser/settings/settings-protocol.d.ts +15 -0
  230. package/esm/browser/settings/settings-protocol.js +18 -4
  231. package/esm/browser/state/state-protocol.d.ts +8 -1
  232. package/esm/browser/state/state.d.ts +2 -0
  233. package/esm/browser/state/state.js +21 -2
  234. package/esm/browser/style/base.d.ts +1 -1
  235. package/esm/browser/style/base.js +27 -1
  236. package/esm/browser/style/conversation.d.ts +1 -1
  237. package/esm/browser/style/conversation.js +45 -5
  238. package/esm/browser/style/device.js +15 -1
  239. package/esm/browser/style/layout.d.ts +1 -1
  240. package/esm/browser/style/layout.js +192 -56
  241. package/esm/browser/style/pages.d.ts +1 -1
  242. package/esm/browser/style/pages.js +39 -1
  243. package/esm/browser/style/phone.d.ts +1 -1
  244. package/esm/browser/style/phone.js +15 -0
  245. package/esm/browser/style/shell.d.ts +1 -1
  246. package/esm/browser/style/shell.js +32 -6
  247. package/esm/browser/style/surfaces.d.ts +1 -1
  248. package/esm/browser/style/surfaces.js +21 -2
  249. package/esm/browser/style/tints.d.ts +27 -0
  250. package/esm/browser/style/tints.js +56 -0
  251. package/esm/browser/style.js +13 -1
  252. package/esm/browser/util/composer.d.ts +6 -0
  253. package/esm/browser/util/composer.js +16 -0
  254. package/esm/browser/util/desktop.d.ts +19 -1
  255. package/esm/browser/util/desktop.js +15 -0
  256. package/esm/browser/util/frame.d.ts +2 -0
  257. package/esm/browser/util/frame.js +2 -0
  258. package/esm/browser/util/link.d.ts +18 -0
  259. package/esm/browser/util/link.js +66 -1
  260. package/esm/browser/util/markdown.d.ts +4 -1
  261. package/esm/browser/util/markdown.js +1 -1
  262. package/esm/browser/util/message.d.ts +5 -0
  263. package/esm/browser/util/message.js +30 -0
  264. package/esm/browser/util/process.d.ts +57 -3
  265. package/esm/browser/util/process.js +123 -11
  266. package/esm/browser/util/progress.d.ts +19 -1
  267. package/esm/browser/util/progress.js +57 -4
  268. package/esm/browser/util/quote.d.ts +19 -0
  269. package/esm/browser/util/quote.js +58 -0
  270. package/esm/browser/util/tool.d.ts +19 -2
  271. package/esm/browser/util/tool.js +70 -2
  272. package/esm/browser/util/voice.d.ts +47 -7
  273. package/esm/browser/util/voice.js +269 -27
  274. package/esm/browser/workbench-calls.d.ts +6 -4
  275. package/esm/browser/workbench-calls.js +15 -10
  276. package/esm/browser/workbench-protocol.d.ts +31 -2
  277. package/esm/browser/workbench-util.d.ts +15 -4
  278. package/esm/browser/workbench-util.js +28 -5
  279. package/esm/browser/workbench.d.ts +33 -1
  280. package/esm/browser/workbench.js +142 -14
  281. package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
  282. package/lib/browser/assistant/assistant-chat-list.js +13 -0
  283. package/lib/browser/assistant/assistant-extension.js +5 -0
  284. package/lib/browser/assistant/assistant-protocol.d.ts +2 -1
  285. package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
  286. package/lib/browser/assistant/assistant-task-book.js +23 -4
  287. package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
  288. package/lib/browser/assistant/assistant-task-source.js +5 -10
  289. package/lib/browser/assistant/assistant-task-util.d.ts +13 -3
  290. package/lib/browser/assistant/assistant-task-util.js +59 -12
  291. package/lib/browser/assistant/assistant-view.js +46 -22
  292. package/lib/browser/assistant/assistant.d.ts +18 -4
  293. package/lib/browser/assistant/assistant.js +52 -17
  294. package/lib/browser/avatar/dino-face.js +1 -2
  295. package/lib/browser/chat/chat-protocol.d.ts +5 -0
  296. package/lib/browser/chat/chat-stores.d.ts +8 -5
  297. package/lib/browser/chat/chat-stores.js +17 -9
  298. package/lib/browser/chat/chat-view.js +22 -14
  299. package/lib/browser/chat/chat.d.ts +16 -8
  300. package/lib/browser/chat/chat.js +86 -51
  301. package/lib/browser/components/account-menu.d.ts +0 -2
  302. package/lib/browser/components/account-menu.js +2 -29
  303. package/lib/browser/components/agent-settings-view.d.ts +3 -2
  304. package/lib/browser/components/agent-settings-view.js +2 -1
  305. package/lib/browser/components/app-nav.d.ts +5 -2
  306. package/lib/browser/components/app-nav.js +18 -5
  307. package/lib/browser/components/app-shell-hooks.js +5 -3
  308. package/lib/browser/components/app-view.js +80 -16
  309. package/lib/browser/components/busy.d.ts +26 -0
  310. package/lib/browser/components/busy.js +91 -0
  311. package/lib/browser/components/chat-icon.d.ts +30 -0
  312. package/lib/browser/components/chat-icon.js +117 -0
  313. package/lib/browser/components/chat-list.d.ts +73 -6
  314. package/lib/browser/components/chat-list.js +295 -59
  315. package/lib/browser/components/chat-seen.d.ts +54 -0
  316. package/lib/browser/components/chat-seen.js +104 -0
  317. package/lib/browser/components/composer-box.d.ts +15 -4
  318. package/lib/browser/components/composer-box.js +136 -74
  319. package/lib/browser/components/composer.d.ts +9 -6
  320. package/lib/browser/components/composer.js +31 -3
  321. package/lib/browser/components/conversation-scroll-hooks.d.ts +17 -0
  322. package/lib/browser/components/conversation-scroll-hooks.js +135 -0
  323. package/lib/browser/components/conversation-scroll-util.d.ts +31 -0
  324. package/lib/browser/components/conversation-scroll-util.js +60 -0
  325. package/lib/browser/components/conversation-scroll.d.ts +52 -31
  326. package/lib/browser/components/conversation-scroll.js +171 -164
  327. package/lib/browser/components/custom-host.d.ts +4 -0
  328. package/lib/browser/components/custom-host.js +50 -0
  329. package/lib/browser/components/directory-commands.d.ts +7 -0
  330. package/lib/browser/components/directory-commands.js +70 -0
  331. package/lib/browser/components/discover-view.d.ts +11 -4
  332. package/lib/browser/components/discover-view.js +19 -10
  333. package/lib/browser/components/dismiss.d.ts +4 -0
  334. package/lib/browser/components/dismiss.js +65 -0
  335. package/lib/browser/components/earlier-messages.d.ts +34 -3
  336. package/lib/browser/components/earlier-messages.js +44 -9
  337. package/lib/browser/components/editor-area.d.ts +6 -22
  338. package/lib/browser/components/editor-area.js +11 -98
  339. package/lib/browser/components/face.d.ts +25 -0
  340. package/lib/browser/components/face.js +79 -0
  341. package/lib/browser/components/fold-text.d.ts +21 -0
  342. package/lib/browser/components/fold-text.js +103 -0
  343. package/lib/browser/components/folder-picker.d.ts +1 -1
  344. package/lib/browser/components/folder-picker.js +1 -1
  345. package/lib/browser/components/full-screen.d.ts +10 -0
  346. package/lib/browser/components/full-screen.js +62 -0
  347. package/lib/browser/components/grow-box.d.ts +10 -0
  348. package/lib/browser/components/grow-box.js +86 -0
  349. package/lib/browser/components/hold-to-talk.d.ts +23 -0
  350. package/lib/browser/components/hold-to-talk.js +65 -0
  351. package/lib/browser/components/host-view.d.ts +1 -1
  352. package/lib/browser/components/icon.d.ts +3 -1
  353. package/lib/browser/components/icon.js +4 -3
  354. package/lib/browser/components/image-viewer.d.ts +10 -2
  355. package/lib/browser/components/image-viewer.js +47 -10
  356. package/lib/browser/components/launcher-search-util.d.ts +4 -3
  357. package/lib/browser/components/launcher-search-util.js +12 -4
  358. package/lib/browser/components/lightbox.d.ts +5 -2
  359. package/lib/browser/components/lightbox.js +4 -3
  360. package/lib/browser/components/list-rows.d.ts +9 -1
  361. package/lib/browser/components/list-rows.js +18 -3
  362. package/lib/browser/components/markdown.js +36 -4
  363. package/lib/browser/components/media.js +73 -7
  364. package/lib/browser/components/message-actions.js +3 -0
  365. package/lib/browser/components/message-footer.d.ts +8 -0
  366. package/lib/browser/components/message-footer.js +20 -2
  367. package/lib/browser/components/message-list.d.ts +60 -7
  368. package/lib/browser/components/message-list.js +206 -55
  369. package/lib/browser/components/message-menu.js +6 -1
  370. package/lib/browser/components/model-picker.js +1 -0
  371. package/lib/browser/components/nav-places.d.ts +21 -2
  372. package/lib/browser/components/nav-places.js +22 -4
  373. package/lib/browser/components/notice-center.js +34 -0
  374. package/lib/browser/components/notice-face.d.ts +11 -0
  375. package/lib/browser/components/notice-face.js +64 -0
  376. package/lib/browser/components/phone-shell.d.ts +23 -1
  377. package/lib/browser/components/phone-shell.js +99 -10
  378. package/lib/browser/components/picture.d.ts +8 -1
  379. package/lib/browser/components/picture.js +13 -1
  380. package/lib/browser/components/plus-menu.d.ts +24 -0
  381. package/lib/browser/components/plus-menu.js +126 -0
  382. package/lib/browser/components/recent-shot.d.ts +16 -0
  383. package/lib/browser/components/recent-shot.js +210 -0
  384. package/lib/browser/components/relay-view.js +10 -3
  385. package/lib/browser/components/run-status.d.ts +1 -1
  386. package/lib/browser/components/run-status.js +17 -29
  387. package/lib/browser/components/said-text.d.ts +7 -0
  388. package/lib/browser/components/said-text.js +50 -0
  389. package/lib/browser/components/scan-screen.d.ts +11 -0
  390. package/lib/browser/components/scan-screen.js +266 -0
  391. package/lib/browser/components/search-page.js +10 -6
  392. package/lib/browser/components/session-settings.d.ts +2 -3
  393. package/lib/browser/components/session-settings.js +1 -0
  394. package/lib/browser/components/session-view.d.ts +3 -1
  395. package/lib/browser/components/session-view.js +32 -18
  396. package/lib/browser/components/settings-choices.d.ts +1 -0
  397. package/lib/browser/components/settings-choices.js +2 -1
  398. package/lib/browser/components/settings-controls.d.ts +5 -3
  399. package/lib/browser/components/settings-controls.js +10 -1
  400. package/lib/browser/components/settings-parts.js +43 -12
  401. package/lib/browser/components/stop-times.d.ts +48 -0
  402. package/lib/browser/components/stop-times.js +85 -0
  403. package/lib/browser/components/tool-view.js +7 -2
  404. package/lib/browser/components/unseen-drop.d.ts +40 -0
  405. package/lib/browser/components/unseen-drop.js +256 -0
  406. package/lib/browser/components/use-seen-chats.d.ts +9 -0
  407. package/lib/browser/components/use-seen-chats.js +85 -0
  408. package/lib/browser/components/use-stop-times.d.ts +4 -0
  409. package/lib/browser/components/use-stop-times.js +53 -0
  410. package/lib/browser/components/voice-button.d.ts +7 -1
  411. package/lib/browser/components/voice-button.js +16 -2
  412. package/lib/browser/components/voice-picker.d.ts +7 -0
  413. package/lib/browser/components/voice-picker.js +89 -0
  414. package/lib/browser/components/voice-talk.d.ts +11 -3
  415. package/lib/browser/components/voice-talk.js +25 -4
  416. package/lib/browser/components/web-composer.d.ts +4 -2
  417. package/lib/browser/components/web-composer.js +7 -3
  418. package/lib/browser/components/workbench-tabs.d.ts +42 -0
  419. package/lib/browser/components/workbench-tabs.js +232 -0
  420. package/lib/browser/components/workbench-toggle.d.ts +0 -13
  421. package/lib/browser/components/workbench-toggle.js +1 -29
  422. package/lib/browser/device/code-scan.d.ts +56 -0
  423. package/lib/browser/device/code-scan.js +141 -0
  424. package/lib/browser/device/code-vision.d.ts +52 -0
  425. package/lib/browser/device/code-vision.js +103 -0
  426. package/lib/browser/device/hold.js +4 -6
  427. package/lib/browser/device/long-press.d.ts +10 -0
  428. package/lib/browser/device/long-press.js +28 -12
  429. package/lib/browser/device/own-gestures.d.ts +26 -0
  430. package/lib/browser/device/own-gestures.js +42 -0
  431. package/lib/browser/device/photo-picker.d.ts +15 -0
  432. package/lib/browser/device/photo-picker.js +51 -0
  433. package/lib/browser/device/pull-down.js +3 -2
  434. package/lib/browser/device/recent-shots.d.ts +46 -0
  435. package/lib/browser/device/recent-shots.js +145 -0
  436. package/lib/browser/device/row-swipe.d.ts +2 -0
  437. package/lib/browser/device/row-swipe.js +14 -3
  438. package/lib/browser/device/sheet-swipe.d.ts +1 -1
  439. package/lib/browser/device/sheet-swipe.js +25 -4
  440. package/lib/browser/extension/extension-view.d.ts +10 -0
  441. package/lib/browser/extension/extension-view.js +7 -1
  442. package/lib/browser/extension/icons.js +15 -1
  443. package/lib/browser/extension/web-api-components.d.ts +288 -0
  444. package/lib/browser/extension/web-api-components.js +3 -0
  445. package/lib/browser/extension/web-api-contributions.d.ts +395 -0
  446. package/lib/browser/extension/web-api-contributions.js +3 -0
  447. package/lib/browser/extension/web-api-desktop.d.ts +56 -0
  448. package/lib/browser/extension/web-api-desktop.js +3 -0
  449. package/lib/browser/extension/web-api-terminal.d.ts +72 -0
  450. package/lib/browser/extension/web-api-terminal.js +3 -0
  451. package/lib/browser/extension/web-editor-tabs.d.ts +43 -0
  452. package/lib/browser/extension/web-editor-tabs.js +141 -0
  453. package/lib/browser/extension/web-extension-api.d.ts +186 -565
  454. package/lib/browser/extension/web-extension-context.d.ts +79 -0
  455. package/lib/browser/extension/web-extension-context.js +391 -0
  456. package/lib/browser/extension/web-extension-protocol.d.ts +57 -7
  457. package/lib/browser/extension/web-extension-protocol.js +35 -1
  458. package/lib/browser/extension/web-extension-run.d.ts +55 -0
  459. package/lib/browser/extension/web-extension-run.js +123 -0
  460. package/lib/browser/extension/web-extensions.d.ts +29 -69
  461. package/lib/browser/extension/web-extensions.js +117 -545
  462. package/lib/browser/extension/web-home.d.ts +20 -0
  463. package/lib/browser/extension/web-home.js +76 -0
  464. package/lib/browser/extension/web-pages.d.ts +13 -3
  465. package/lib/browser/extension/web-pages.js +23 -3
  466. package/lib/browser/extension/web-session-notices.d.ts +37 -0
  467. package/lib/browser/extension/web-session-notices.js +177 -0
  468. package/lib/browser/extension/web-sharing.d.ts +2 -0
  469. package/lib/browser/extension/web-sharing.js +4 -0
  470. package/lib/browser/game/game-host.d.ts +28 -0
  471. package/lib/browser/game/game-host.js +163 -0
  472. package/lib/browser/game/game-loader.d.ts +11 -0
  473. package/lib/browser/game/game-loader.js +31 -0
  474. package/lib/browser/game/game-protocol.d.ts +50 -0
  475. package/lib/browser/game/game-protocol.js +3 -0
  476. package/lib/browser/game/game-runner.d.ts +28 -0
  477. package/lib/browser/game/game-runner.js +64 -0
  478. package/lib/browser/game/game-util.d.ts +30 -0
  479. package/lib/browser/game/game-util.js +183 -0
  480. package/lib/browser/game/game-view.d.ts +13 -0
  481. package/lib/browser/game/game-view.js +68 -0
  482. package/lib/browser/game/game3d-protocol.d.ts +52 -0
  483. package/lib/browser/game/game3d-protocol.js +3 -0
  484. package/lib/browser/game/game3d-runner.d.ts +28 -0
  485. package/lib/browser/game/game3d-runner.js +153 -0
  486. package/lib/browser/hooks.d.ts +5 -1
  487. package/lib/browser/hooks.js +14 -2
  488. package/lib/browser/i18n/locales.d.ts +92 -2
  489. package/lib/browser/i18n/messages.d.ts +91 -1
  490. package/lib/browser/i18n/messages.js +187 -7
  491. package/lib/browser/index.d.ts +9 -0
  492. package/lib/browser/index.js +9 -0
  493. package/lib/browser/links/links-protocol.d.ts +7 -0
  494. package/lib/browser/links/links.d.ts +24 -7
  495. package/lib/browser/links/links.js +64 -11
  496. package/lib/browser/markdown/code-renderers.d.ts +5 -0
  497. package/lib/browser/markdown/code-renderers.js +40 -0
  498. package/lib/browser/notices/notices-protocol.d.ts +17 -0
  499. package/lib/browser/notices/notices.d.ts +1 -1
  500. package/lib/browser/notices/notices.js +6 -2
  501. package/lib/browser/notices/session-notices.d.ts +70 -0
  502. package/lib/browser/notices/session-notices.js +96 -0
  503. package/lib/browser/offline/device-values.js +12 -3
  504. package/lib/browser/offline/offline-reads.js +3 -1
  505. package/lib/browser/settings/navigation.d.ts +3 -2
  506. package/lib/browser/settings/navigation.js +4 -3
  507. package/lib/browser/settings/settings-protocol.d.ts +15 -0
  508. package/lib/browser/settings/settings-protocol.js +19 -5
  509. package/lib/browser/state/state-protocol.d.ts +8 -1
  510. package/lib/browser/state/state.d.ts +2 -0
  511. package/lib/browser/state/state.js +21 -2
  512. package/lib/browser/style/base.d.ts +1 -1
  513. package/lib/browser/style/base.js +27 -1
  514. package/lib/browser/style/conversation.d.ts +1 -1
  515. package/lib/browser/style/conversation.js +45 -5
  516. package/lib/browser/style/device.js +15 -1
  517. package/lib/browser/style/layout.d.ts +1 -1
  518. package/lib/browser/style/layout.js +192 -56
  519. package/lib/browser/style/pages.d.ts +1 -1
  520. package/lib/browser/style/pages.js +39 -1
  521. package/lib/browser/style/phone.d.ts +1 -1
  522. package/lib/browser/style/phone.js +15 -0
  523. package/lib/browser/style/shell.d.ts +1 -1
  524. package/lib/browser/style/shell.js +32 -6
  525. package/lib/browser/style/surfaces.d.ts +1 -1
  526. package/lib/browser/style/surfaces.js +21 -2
  527. package/lib/browser/style/tints.d.ts +28 -0
  528. package/lib/browser/style/tints.js +59 -0
  529. package/lib/browser/style.js +13 -1
  530. package/lib/browser/util/composer.d.ts +6 -0
  531. package/lib/browser/util/composer.js +16 -0
  532. package/lib/browser/util/desktop.d.ts +19 -1
  533. package/lib/browser/util/desktop.js +15 -0
  534. package/lib/browser/util/frame.d.ts +2 -0
  535. package/lib/browser/util/frame.js +2 -0
  536. package/lib/browser/util/link.d.ts +18 -0
  537. package/lib/browser/util/link.js +66 -1
  538. package/lib/browser/util/markdown.d.ts +4 -1
  539. package/lib/browser/util/markdown.js +1 -1
  540. package/lib/browser/util/message.d.ts +5 -0
  541. package/lib/browser/util/message.js +30 -0
  542. package/lib/browser/util/process.d.ts +57 -3
  543. package/lib/browser/util/process.js +125 -12
  544. package/lib/browser/util/progress.d.ts +19 -1
  545. package/lib/browser/util/progress.js +57 -4
  546. package/lib/browser/util/quote.d.ts +20 -0
  547. package/lib/browser/util/quote.js +61 -0
  548. package/lib/browser/util/tool.d.ts +19 -2
  549. package/lib/browser/util/tool.js +70 -2
  550. package/lib/browser/util/voice.d.ts +47 -7
  551. package/lib/browser/util/voice.js +269 -27
  552. package/lib/browser/workbench-calls.d.ts +6 -4
  553. package/lib/browser/workbench-calls.js +15 -10
  554. package/lib/browser/workbench-protocol.d.ts +31 -2
  555. package/lib/browser/workbench-util.d.ts +15 -4
  556. package/lib/browser/workbench-util.js +28 -5
  557. package/lib/browser/workbench.d.ts +33 -1
  558. package/lib/browser/workbench.js +140 -12
  559. package/package.json +11 -8
@@ -73,6 +73,7 @@ function useHeld() {
73
73
  current.current = undefined;
74
74
  clearTimeout(press.timer);
75
75
  press.off();
76
+ long_press_1.LongPressUtil.release(document);
76
77
  if (!press.held || how === 'none') {
77
78
  return;
78
79
  }
@@ -97,23 +98,21 @@ function useHeld() {
97
98
  };
98
99
  // Held, the finger drags nothing: no scroll, which would take it from the hold (pointercancel).
99
100
  const onTouchMove = (touch) => press.held && touch.cancelable && touch.preventDefault();
100
- const onSelect = (select) => press.held && select.preventDefault();
101
101
  const press = {
102
102
  hold,
103
103
  held: false,
104
104
  timer: setTimeout(() => {
105
- var _a, _b;
105
+ var _a;
106
106
  press.held = true;
107
- (_a = document.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
107
+ long_press_1.LongPressUtil.take(document);
108
108
  hold.start();
109
- (_b = hold.move) === null || _b === void 0 ? void 0 : _b.call(hold, from.x, from.y);
109
+ (_a = hold.move) === null || _a === void 0 ? void 0 : _a.call(hold, from.x, from.y);
110
110
  }, long_press_1.LongPressUtil.PRESS_MS),
111
111
  off: () => {
112
112
  document.removeEventListener('pointerup', onUp);
113
113
  document.removeEventListener('pointercancel', onCancel);
114
114
  document.removeEventListener('pointermove', onMove);
115
115
  document.removeEventListener('touchmove', onTouchMove);
116
- document.removeEventListener('selectstart', onSelect, true);
117
116
  },
118
117
  };
119
118
  current.current = press;
@@ -121,7 +120,6 @@ function useHeld() {
121
120
  document.addEventListener('pointercancel', onCancel);
122
121
  document.addEventListener('pointermove', onMove);
123
122
  document.addEventListener('touchmove', onTouchMove, { passive: false });
124
- document.addEventListener('selectstart', onSelect, true);
125
123
  },
126
124
  // The long press of a finger (the system's, or startLongPress's) is the hold's: no menu. Taken, it is
127
125
  // also what gives the light tap of the haptic engine in the app. A right click is the browser's.
@@ -20,6 +20,16 @@ export declare namespace LongPressUtil {
20
20
  x: number;
21
21
  y: number;
22
22
  }): boolean;
23
+ /**
24
+ * Set on the root while a press is the page's (a menu took it, a hold holds it): nothing on the page is
25
+ * selectable then (style/device.ts). iOS selects the word under a held finger some 200ms after the menu
26
+ * opened, firing no `selectstart`, and asks the styles of that moment: a selection cleared or a
27
+ * `selectstart` stopped does not keep it away, `user-select` does.
28
+ */
29
+ const TAKEN = "data-long-press";
30
+ function take(doc: Document): void;
31
+ /** The finger let go: the page is selectable again, and what the system selected meanwhile is let go too. */
32
+ function release(doc: Document): void;
23
33
  /** Where a held finger is the system's: it moves the caret, selects, and pastes there. Mark more with `data-native-press`. */
24
34
  function native(target: Element | null): boolean;
25
35
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LongPressUtil = void 0;
4
4
  exports.startLongPress = startLongPress;
5
+ const own_gestures_1 = require("./own-gestures");
5
6
  /** What a long press that opened a menu pressed, while the finger is still down: it may slide onto an entry (ContextMenuUtil.attach). */
6
7
  let holding;
7
8
  /**
@@ -26,6 +27,28 @@ var LongPressUtil;
26
27
  return Math.hypot(to.x - from.x, to.y - from.y) > LongPressUtil.MOVE_PX;
27
28
  }
28
29
  LongPressUtil.moved = moved;
30
+ /**
31
+ * Set on the root while a press is the page's (a menu took it, a hold holds it): nothing on the page is
32
+ * selectable then (style/device.ts). iOS selects the word under a held finger some 200ms after the menu
33
+ * opened, firing no `selectstart`, and asks the styles of that moment: a selection cleared or a
34
+ * `selectstart` stopped does not keep it away, `user-select` does.
35
+ */
36
+ LongPressUtil.TAKEN = 'data-long-press';
37
+ function take(doc) {
38
+ var _a;
39
+ doc.documentElement.setAttribute(LongPressUtil.TAKEN, '');
40
+ (_a = doc.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
41
+ }
42
+ LongPressUtil.take = take;
43
+ /** The finger let go: the page is selectable again, and what the system selected meanwhile is let go too. */
44
+ function release(doc) {
45
+ var _a;
46
+ if (doc.documentElement.hasAttribute(LongPressUtil.TAKEN)) {
47
+ doc.documentElement.removeAttribute(LongPressUtil.TAKEN);
48
+ (_a = doc.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
49
+ }
50
+ }
51
+ LongPressUtil.release = release;
29
52
  /** Where a held finger is the system's: it moves the caret, selects, and pastes there. Mark more with `data-native-press`. */
30
53
  function native(target) {
31
54
  return !!(target === null || target === void 0 ? void 0 : target.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], .xterm, .monaco-editor, [data-native-press]'));
@@ -46,17 +69,11 @@ function startLongPress(doc, native) {
46
69
  /** The press under way opened a menu: what the system does with it after is not wanted. */
47
70
  let taken = false;
48
71
  const end = () => {
49
- var _a;
50
72
  cancel();
51
73
  holding = undefined;
52
74
  if (taken) {
53
75
  taken = false;
54
- (_a = doc.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
55
- }
56
- };
57
- const onSelectStart = (event) => {
58
- if (taken) {
59
- event.preventDefault();
76
+ LongPressUtil.release(doc);
60
77
  }
61
78
  };
62
79
  const cancel = () => {
@@ -66,7 +83,6 @@ function startLongPress(doc, native) {
66
83
  }
67
84
  };
68
85
  const fire = () => {
69
- var _a;
70
86
  const current = press;
71
87
  press = undefined;
72
88
  if (!(current === null || current === void 0 ? void 0 : current.target.isConnected)) {
@@ -81,7 +97,7 @@ function startLongPress(doc, native) {
81
97
  guardUntil = Date.now() + LongPressUtil.CLICK_GUARD_MS;
82
98
  // The system selects the word under a held finger a moment later: not when a menu took the press.
83
99
  taken = true;
84
- (_a = doc.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
100
+ LongPressUtil.take(doc);
85
101
  native === null || native === void 0 ? void 0 : native('Haptics', 'impact', { style: 'LIGHT' }).catch(() => undefined);
86
102
  }
87
103
  else {
@@ -95,7 +111,8 @@ function startLongPress(doc, native) {
95
111
  holding = undefined;
96
112
  const touch = event.touches[0];
97
113
  const target = event.target instanceof Element ? event.target : null;
98
- if (event.touches.length !== 1 || !touch || !target || LongPressUtil.native(target)) {
114
+ // A game holds a finger for itself (OwnGestures): no menu.
115
+ if (event.touches.length !== 1 || !touch || !target || LongPressUtil.native(target) || own_gestures_1.OwnGestures.within(target)) {
99
116
  return;
100
117
  }
101
118
  press = { x: touch.clientX, y: touch.clientY, target, timer: setTimeout(fire, LongPressUtil.PRESS_MS) };
@@ -132,17 +149,16 @@ function startLongPress(doc, native) {
132
149
  doc.addEventListener('touchmove', onMove, { passive: true });
133
150
  doc.addEventListener('touchend', end, { passive: true });
134
151
  doc.addEventListener('touchcancel', end, { passive: true });
135
- doc.addEventListener('selectstart', onSelectStart, true);
136
152
  doc.addEventListener('scroll', cancel, { passive: true, capture: true });
137
153
  doc.addEventListener('contextmenu', onContextMenu, true);
138
154
  doc.addEventListener('click', onClick, true);
139
155
  return () => {
140
156
  cancel();
157
+ LongPressUtil.release(doc);
141
158
  doc.removeEventListener('touchstart', onStart);
142
159
  doc.removeEventListener('touchmove', onMove);
143
160
  doc.removeEventListener('touchend', end);
144
161
  doc.removeEventListener('touchcancel', end);
145
- doc.removeEventListener('selectstart', onSelectStart, true);
146
162
  doc.removeEventListener('scroll', cancel, { capture: true });
147
163
  doc.removeEventListener('contextmenu', onContextMenu, true);
148
164
  doc.removeEventListener('click', onClick, true);
@@ -0,0 +1,26 @@
1
+ import type { SheetSwipe } from './sheet-swipe';
2
+ /**
3
+ * An element that takes the touches that start on it (a game, a canvas to draw on, a joystick of a web
4
+ * extension): the shell lets it have them. `ui.Game` and `ui.Game3D` mark theirs; web extensions mark their
5
+ * own with the attribute. In it:
6
+ *
7
+ * - a sheet of the shell (back to the list, the workbench, the board, the drawer) moves only from an edge of
8
+ * the screen, as the system's gestures of a phone keep the edges: the rest of a slide is the element's;
9
+ * - a held finger is no menu, a pull from it does not open Quick open, a row around it does not swipe;
10
+ * - with the value `whole` (`ui.FullScreen`), no sheet moves from it at all, not even from an edge.
11
+ *
12
+ * What the browser does with a touch (scroll, zoom) the element says itself with `touch-action`.
13
+ */
14
+ export declare namespace OwnGestures {
15
+ const ATTRIBUTE = "data-own-gestures";
16
+ const SELECTOR = "[data-own-gestures]";
17
+ /** The value of an element that takes even the edges: what is shown over all of the page (`ui.FullScreen`). */
18
+ const WHOLE = "whole";
19
+ /** Whether a touch on `target` starts where even the edges are not the shell's. */
20
+ function whole(target: EventTarget | null): boolean;
21
+ /** Whether a touch on `target` starts in such an element. */
22
+ function within(target: EventTarget | null): boolean;
23
+ /** The sheet as it may move from such an element: from an edge, where it moved from anywhere. */
24
+ function edgesOnly<T extends SheetSwipe>(sheet: T): T;
25
+ }
26
+ //# sourceMappingURL=own-gestures.d.ts.map
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OwnGestures = void 0;
4
+ /**
5
+ * An element that takes the touches that start on it (a game, a canvas to draw on, a joystick of a web
6
+ * extension): the shell lets it have them. `ui.Game` and `ui.Game3D` mark theirs; web extensions mark their
7
+ * own with the attribute. In it:
8
+ *
9
+ * - a sheet of the shell (back to the list, the workbench, the board, the drawer) moves only from an edge of
10
+ * the screen, as the system's gestures of a phone keep the edges: the rest of a slide is the element's;
11
+ * - a held finger is no menu, a pull from it does not open Quick open, a row around it does not swipe;
12
+ * - with the value `whole` (`ui.FullScreen`), no sheet moves from it at all, not even from an edge.
13
+ *
14
+ * What the browser does with a touch (scroll, zoom) the element says itself with `touch-action`.
15
+ */
16
+ var OwnGestures;
17
+ (function (OwnGestures) {
18
+ OwnGestures.ATTRIBUTE = 'data-own-gestures';
19
+ OwnGestures.SELECTOR = `[${OwnGestures.ATTRIBUTE}]`;
20
+ /** The value of an element that takes even the edges: what is shown over all of the page (`ui.FullScreen`). */
21
+ OwnGestures.WHOLE = 'whole';
22
+ /** Whether a touch on `target` starts where even the edges are not the shell's. */
23
+ function whole(target) {
24
+ const element = (target === null || target === void 0 ? void 0 : target.nodeType) === 1 ? target : null;
25
+ return !!(element === null || element === void 0 ? void 0 : element.closest(`[${OwnGestures.ATTRIBUTE}="${OwnGestures.WHOLE}"]`));
26
+ }
27
+ OwnGestures.whole = whole;
28
+ /** Whether a touch on `target` starts in such an element. */
29
+ function within(target) {
30
+ // Node.ELEMENT_NODE; an element of a frame is of another window, not `instanceof Element` here.
31
+ const element = (target === null || target === void 0 ? void 0 : target.nodeType) === 1 ? target : null;
32
+ return !!(element === null || element === void 0 ? void 0 : element.closest(OwnGestures.SELECTOR));
33
+ }
34
+ OwnGestures.within = within;
35
+ /** The sheet as it may move from such an element: from an edge, where it moved from anywhere. */
36
+ function edgesOnly(sheet) {
37
+ const edge = (from) => (from === 'anywhere' ? 'edge' : from);
38
+ return { ...sheet, opensFrom: edge(sheet.opensFrom), closesFrom: edge(sheet.closesFrom) };
39
+ }
40
+ OwnGestures.edgesOnly = edgesOnly;
41
+ })(OwnGestures || (exports.OwnGestures = OwnGestures = {}));
42
+ //# sourceMappingURL=own-gestures.js.map
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The photos of the device, picked in the library itself as WeChat's Album does: the Ta app on iOS opens it at once
3
+ * (PHPicker, which asks for no permission), where a file field shows a menu first (Photo Library, Take Photo,
4
+ * Choose File). A browser has no such picker: the message box uses its file field there.
5
+ */
6
+ export declare namespace PhotoPicker {
7
+ /** Whether the library opens at once here. */
8
+ function available(): boolean;
9
+ /**
10
+ * Up to `limit` photos, in the order picked; none when the user cancels. Not timed out: the user takes the time
11
+ * they need, and a pick started again ends the one before with none.
12
+ */
13
+ function pick(limit: number): Promise<File[]>;
14
+ }
15
+ //# sourceMappingURL=photo-picker.d.ts.map
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PhotoPicker = void 0;
4
+ const recent_shots_1 = require("./recent-shots");
5
+ /**
6
+ * The photos of the device, picked in the library itself as WeChat's Album does: the Ta app on iOS opens it at once
7
+ * (PHPicker, which asks for no permission), where a file field shows a menu first (Photo Library, Take Photo,
8
+ * Choose File). A browser has no such picker: the message box uses its file field there.
9
+ */
10
+ var PhotoPicker;
11
+ (function (PhotoPicker) {
12
+ let next = 0;
13
+ function native() {
14
+ var _a, _b;
15
+ return (_b = (_a = globalThis.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taShots;
16
+ }
17
+ /** Whether the library opens at once here. */
18
+ function available() {
19
+ return native() !== undefined;
20
+ }
21
+ PhotoPicker.available = available;
22
+ /**
23
+ * Up to `limit` photos, in the order picked; none when the user cancels. Not timed out: the user takes the time
24
+ * they need, and a pick started again ends the one before with none.
25
+ */
26
+ function pick(limit) {
27
+ const photos = native();
28
+ if (!photos) {
29
+ return Promise.resolve([]);
30
+ }
31
+ const id = `p${++next}`;
32
+ return new Promise(resolve => {
33
+ const onEvent = (event) => {
34
+ const detail = event.detail;
35
+ if ((detail === null || detail === void 0 ? void 0 : detail.id) !== id) {
36
+ return;
37
+ }
38
+ globalThis.removeEventListener(recent_shots_1.RecentShots.EVENT, onEvent);
39
+ const images = Array.isArray(detail.images) ? detail.images : [];
40
+ resolve(images
41
+ .filter((image) => typeof image === 'string')
42
+ .map((image, index) => recent_shots_1.RecentShots.file(image, `photo-${index + 1}`))
43
+ .filter((file) => file !== undefined));
44
+ };
45
+ globalThis.addEventListener(recent_shots_1.RecentShots.EVENT, onEvent);
46
+ photos.postMessage({ id, action: 'pick', limit: Math.max(1, limit) });
47
+ });
48
+ }
49
+ PhotoPicker.pick = pick;
50
+ })(PhotoPicker || (exports.PhotoPicker = PhotoPicker = {}));
51
+ //# sourceMappingURL=photo-picker.js.map
@@ -37,6 +37,7 @@ exports.PullUtil = void 0;
37
37
  exports.usePullDown = usePullDown;
38
38
  const React = __importStar(require("react"));
39
39
  const device_1 = require("./device");
40
+ const own_gestures_1 = require("./own-gestures");
40
41
  const sheet_swipe_1 = require("./sheet-swipe");
41
42
  /**
42
43
  * What a finger pulls down from the top of a list, as the launcher of WeChat over its chats (ta-launcher.md):
@@ -110,9 +111,9 @@ function atEnd(target, area) {
110
111
  }
111
112
  return true;
112
113
  }
113
- /** Inputs keep their own gestures (selecting, moving the caret). */
114
+ /** Inputs keep their own gestures (selecting, moving the caret), and so does a game (OwnGestures). */
114
115
  function editable(target) {
115
- return target instanceof Element && !!target.closest('input, textarea, [contenteditable="true"], [data-native-press]');
116
+ return target instanceof Element && (!!target.closest('input, textarea, [contenteditable="true"], [data-native-press]') || own_gestures_1.OwnGestures.within(target));
116
117
  }
117
118
  /** The light tap of the app when the pull passes where it opens. */
118
119
  function tick() {
@@ -0,0 +1,46 @@
1
+ import { type DesktopShot, type DesktopShots } from '../util/desktop';
2
+ /** The latest screenshot of this device: when it was taken and a small picture of it. */
3
+ export type RecentShot = DesktopShot;
4
+ /**
5
+ * Where the screenshots of this device are: Ta Desktop (the screenshot folder of the system), the Ta app on iOS
6
+ * (screenshots of the photo library). A browser has none.
7
+ */
8
+ export interface RecentShotSource extends DesktopShots {
9
+ /** Asks the user for what the source reads, where the system asks (the photos of iOS); nothing where it does not. */
10
+ ask?(): void;
11
+ }
12
+ /** What is kept of the screenshots offered, in this browser: each is offered once, wherever. */
13
+ interface ShotStorage {
14
+ getItem(key: string): string | null;
15
+ setItem(key: string, value: string): void;
16
+ }
17
+ /**
18
+ * The screenshot just taken, offered once above the message box as WeChat does: tapped, it goes into the box
19
+ * with what is typed. Offered once on this device, whatever box shows it first: it is marked offered as it shows
20
+ * (`claim`), so that the next conversation opened does not offer it again; a newer one is offered anew.
21
+ */
22
+ export declare namespace RecentShots {
23
+ /** A screenshot older than this is not offered. */
24
+ const WINDOW_MS: number;
25
+ /** How long the offer stays when nothing is done with it. */
26
+ const SHOWN_MS = 8000;
27
+ /** The window event the Ta app answers with, and the one it tells of a change of the photos with. */
28
+ const EVENT = "ta-shots";
29
+ const CHANGE_EVENT = "ta-shots-change";
30
+ /** Where the screenshots offered are kept (localStorage, of the device rather than of a computer). */
31
+ const KEY = "ta-recent-shots";
32
+ /** The screenshots of this device, where Ta can read them. */
33
+ function source(scope?: object): RecentShotSource | undefined;
34
+ /** Taken in the last `WINDOW_MS` (a clock a little ahead too). */
35
+ function fresh(shot: RecentShot, now?: number): boolean;
36
+ /** Whether `id` was offered on this device. */
37
+ function wasOffered(id: string, store?: ShotStorage | undefined): boolean;
38
+ /** Marks `id` offered; `false` when it already was, by this page or another. */
39
+ function claim(id: string, store?: ShotStorage | undefined): boolean;
40
+ /** A data URL as a file the message box takes. */
41
+ function file(dataUrl: string, name?: string): File | undefined;
42
+ /** What the app answered as a screenshot, only one with all its parts. */
43
+ function shotOf(shot: unknown): RecentShot | undefined;
44
+ }
45
+ export {};
46
+ //# sourceMappingURL=recent-shots.d.ts.map
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RecentShots = void 0;
4
+ const desktop_1 = require("../util/desktop");
5
+ /**
6
+ * The screenshot just taken, offered once above the message box as WeChat does: tapped, it goes into the box
7
+ * with what is typed. Offered once on this device, whatever box shows it first: it is marked offered as it shows
8
+ * (`claim`), so that the next conversation opened does not offer it again; a newer one is offered anew.
9
+ */
10
+ var RecentShots;
11
+ (function (RecentShots) {
12
+ /** A screenshot older than this is not offered. */
13
+ RecentShots.WINDOW_MS = 2 * 60000;
14
+ /** How long the offer stays when nothing is done with it. */
15
+ RecentShots.SHOWN_MS = 8000;
16
+ /** The window event the Ta app answers with, and the one it tells of a change of the photos with. */
17
+ RecentShots.EVENT = 'ta-shots';
18
+ RecentShots.CHANGE_EVENT = 'ta-shots-change';
19
+ /** Where the screenshots offered are kept (localStorage, of the device rather than of a computer). */
20
+ RecentShots.KEY = 'ta-recent-shots';
21
+ /** How many of them are kept: more than are taken in `WINDOW_MS`. */
22
+ const KEPT = 20;
23
+ /** An answer of the app not there in this long is none (an app gone to the background). */
24
+ const WAIT_MS = 5000;
25
+ /** What is offered when the storage cannot be written (a private window): kept for the page. */
26
+ const offered = new Set();
27
+ let next = 0;
28
+ function native() {
29
+ var _a, _b;
30
+ return (_b = (_a = globalThis.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taShots;
31
+ }
32
+ /** The screenshots of this device, where Ta can read them. */
33
+ function source(scope = globalThis) {
34
+ if (scope === globalThis && native()) {
35
+ return NATIVE;
36
+ }
37
+ return desktop_1.DesktopUtil.recentShots(scope);
38
+ }
39
+ RecentShots.source = source;
40
+ /** Taken in the last `WINDOW_MS` (a clock a little ahead too). */
41
+ function fresh(shot, now = Date.now()) {
42
+ return Number.isFinite(shot.takenAt) && now - shot.takenAt <= RecentShots.WINDOW_MS && shot.takenAt - now <= 60000;
43
+ }
44
+ RecentShots.fresh = fresh;
45
+ function storage() {
46
+ try {
47
+ return globalThis.localStorage;
48
+ }
49
+ catch (_a) {
50
+ return undefined;
51
+ }
52
+ }
53
+ function read(store) {
54
+ var _a;
55
+ try {
56
+ const kept = JSON.parse((_a = store === null || store === void 0 ? void 0 : store.getItem(RecentShots.KEY)) !== null && _a !== void 0 ? _a : '[]');
57
+ return Array.isArray(kept) ? kept.filter((id) => typeof id === 'string') : [];
58
+ }
59
+ catch (_b) {
60
+ return [];
61
+ }
62
+ }
63
+ /** Whether `id` was offered on this device. */
64
+ function wasOffered(id, store = storage()) {
65
+ return offered.has(id) || read(store).includes(id);
66
+ }
67
+ RecentShots.wasOffered = wasOffered;
68
+ /** Marks `id` offered; `false` when it already was, by this page or another. */
69
+ function claim(id, store = storage()) {
70
+ if (wasOffered(id, store)) {
71
+ return false;
72
+ }
73
+ offered.add(id);
74
+ try {
75
+ store === null || store === void 0 ? void 0 : store.setItem(RecentShots.KEY, JSON.stringify([...read(store), id].slice(-KEPT)));
76
+ }
77
+ catch (_a) {
78
+ // Kept for the page only.
79
+ }
80
+ return true;
81
+ }
82
+ RecentShots.claim = claim;
83
+ /** A data URL as a file the message box takes. */
84
+ function file(dataUrl, name = 'screenshot') {
85
+ var _a;
86
+ const match = /^data:([^;,]+);base64,(.*)$/s.exec(dataUrl);
87
+ if (!match) {
88
+ return undefined;
89
+ }
90
+ const [, type, data] = match;
91
+ const binary = atob(data);
92
+ const bytes = new Uint8Array(binary.length);
93
+ for (let index = 0; index < binary.length; index++) {
94
+ bytes[index] = binary.charCodeAt(index);
95
+ }
96
+ return new File([bytes], `${name}.${type.split('/')[1] === 'jpeg' ? 'jpg' : ((_a = type.split('/')[1]) !== null && _a !== void 0 ? _a : 'png')}`, { type });
97
+ }
98
+ RecentShots.file = file;
99
+ function call(action, shot) {
100
+ const shots = native();
101
+ if (!shots) {
102
+ return Promise.resolve(undefined);
103
+ }
104
+ const id = `s${++next}`;
105
+ return new Promise(resolve => {
106
+ const done = (answer) => {
107
+ clearTimeout(timer);
108
+ globalThis.removeEventListener(RecentShots.EVENT, onEvent);
109
+ resolve(answer);
110
+ };
111
+ const onEvent = (event) => {
112
+ const detail = event.detail;
113
+ if ((detail === null || detail === void 0 ? void 0 : detail.id) === id) {
114
+ done(detail);
115
+ }
116
+ };
117
+ const timer = setTimeout(() => done(undefined), WAIT_MS);
118
+ globalThis.addEventListener(RecentShots.EVENT, onEvent);
119
+ shots.postMessage({ id, action, shot });
120
+ });
121
+ }
122
+ /** What the app answered as a screenshot, only one with all its parts. */
123
+ function shotOf(shot) {
124
+ const { id, takenAt, thumbnail } = (shot !== null && shot !== void 0 ? shot : {});
125
+ return typeof id === 'string' && id && typeof takenAt === 'number' && typeof thumbnail === 'string' && thumbnail.startsWith('data:image/')
126
+ ? { id, takenAt, thumbnail }
127
+ : undefined;
128
+ }
129
+ RecentShots.shotOf = shotOf;
130
+ /** The photos of the Ta app on iOS: screenshots of the library, once the user let Ta read it. */
131
+ const NATIVE = Object.freeze({
132
+ latest: async () => { var _a; return shotOf((_a = (await call('latest'))) === null || _a === void 0 ? void 0 : _a.shot); },
133
+ read: async (id) => {
134
+ var _a;
135
+ const image = (_a = (await call('read', id))) === null || _a === void 0 ? void 0 : _a.image;
136
+ return typeof image === 'string' && image.startsWith('data:image/') ? image : undefined;
137
+ },
138
+ onChange: (listener) => {
139
+ globalThis.addEventListener(RecentShots.CHANGE_EVENT, listener);
140
+ return () => globalThis.removeEventListener(RecentShots.CHANGE_EVENT, listener);
141
+ },
142
+ ask: () => { var _a; return (_a = native()) === null || _a === void 0 ? void 0 : _a.postMessage({ id: `s${++next}`, action: 'ask' }); },
143
+ });
144
+ })(RecentShots || (exports.RecentShots = RecentShots = {}));
145
+ //# sourceMappingURL=recent-shots.js.map
@@ -33,6 +33,8 @@ export declare namespace RowSwipeUtil {
33
33
  * of how many there are: 1 for the first, less for those after).
34
34
  */
35
35
  function shift(offset: number, width: number, share: number): number;
36
+ /** Whether a touch at `x`, on a screen `width` wide, is at an edge a sheet comes from (`sides`: the root's `data-edge-swipe`), which rows leave to it. */
37
+ function atSheetEdge(sides: string | undefined, x: number, width: number): boolean;
36
38
  /** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
37
39
  function claims(dx: number, dy: number, open: boolean): boolean | undefined;
38
40
  }
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.RowSwipeUtil = void 0;
37
37
  exports.useRowSwipe = useRowSwipe;
38
38
  const React = __importStar(require("react"));
39
+ const own_gestures_1 = require("./own-gestures");
39
40
  const sheet_swipe_1 = require("./sheet-swipe");
40
41
  /**
41
42
  * A row of a list a finger swipes to the left to show its actions behind it, as the chats of WeChat: it
@@ -102,6 +103,13 @@ var RowSwipeUtil;
102
103
  return (width + offset) * share;
103
104
  }
104
105
  RowSwipeUtil.shift = shift;
106
+ /** Whether a touch at `x`, on a screen `width` wide, is at an edge a sheet comes from (`sides`: the root's `data-edge-swipe`), which rows leave to it. */
107
+ function atSheetEdge(sides, x, width) {
108
+ var _a;
109
+ const list = (_a = sides === null || sides === void 0 ? void 0 : sides.split(' ')) !== null && _a !== void 0 ? _a : [];
110
+ return (list.includes('right') && x >= width - sheet_swipe_1.SwipeUtil.EDGE_PX) || (list.includes('left') && x <= sheet_swipe_1.SwipeUtil.EDGE_PX);
111
+ }
112
+ RowSwipeUtil.atSheetEdge = atSheetEdge;
105
113
  /** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
106
114
  function claims(dx, dy, open) {
107
115
  if (Math.hypot(dx, dy) < sheet_swipe_1.SwipeUtil.SLOP_PX) {
@@ -244,9 +252,12 @@ function useRowSwipe(ref, enabled) {
244
252
  const touch = event.touches[0];
245
253
  claimed = undefined;
246
254
  // A swipe from the edge a sheet comes from is the sheet's (useSheetSwipe's edgeOver), not the row's.
247
- const side = document.documentElement.dataset.edgeSwipe;
248
- const edge = !!touch && (side === 'right' ? touch.clientX >= window.innerWidth - sheet_swipe_1.SwipeUtil.EDGE_PX : side === 'left' && touch.clientX <= sheet_swipe_1.SwipeUtil.EDGE_PX);
249
- start = touch && !edge && finger.follow(event, row) ? { x: touch.clientX, y: touch.clientY, t: event.timeStamp } : undefined;
255
+ const edge = !!touch && RowSwipeUtil.atSheetEdge(document.documentElement.dataset.edgeSwipe, touch.clientX, window.innerWidth);
256
+ // A game in the row slides for itself (OwnGestures).
257
+ start =
258
+ touch && !edge && !own_gestures_1.OwnGestures.within(event.target) && finger.follow(event, row)
259
+ ? { x: touch.clientX, y: touch.clientY, t: event.timeStamp }
260
+ : undefined;
250
261
  if (start) {
251
262
  velocity.start(start);
252
263
  }
@@ -191,7 +191,7 @@ export interface SheetSwipeOptions extends SheetSwipe {
191
191
  scrim?: string;
192
192
  /**
193
193
  * Over these (rows a finger swipes, SwipeRow), a sheet that opens from anywhere opens only from the edge:
194
- * the row has the swipe. The root then carries `data-edge-swipe` (the side), whose edge rows leave to it.
194
+ * the row has the swipe. The root then carries `data-edge-swipe` (the sides, as a list), whose edges rows leave to it.
195
195
  */
196
196
  edgeOver?: string;
197
197
  /** What the root's `data-sheet-drag` says while the finger moves it, for styles that tell one sheet from another. */
@@ -40,6 +40,7 @@ exports.useSheetSwipe = useSheetSwipe;
40
40
  const React = __importStar(require("react"));
41
41
  const frame_1 = require("../util/frame");
42
42
  const device_protocol_1 = require("./device-protocol");
43
+ const own_gestures_1 = require("./own-gestures");
43
44
  /** It follows the finger and, let go, ends where it was flicked to, or the nearer side. Pure, for the tests. */
44
45
  var SwipeUtil;
45
46
  (function (SwipeUtil) {
@@ -680,8 +681,14 @@ function useSheetSwipe(options) {
680
681
  source = from;
681
682
  const touch = event.touches[0];
682
683
  const target = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.ELEMENT_NODE ? event.target : null;
684
+ // Over all of the page (ui.FullScreen), even the edges are its own.
685
+ if (own_gestures_1.OwnGestures.whole(target)) {
686
+ source = undefined;
687
+ return;
688
+ }
683
689
  const fromEdge = !current.open && !!current.edgeOver && !!(target === null || target === void 0 ? void 0 : target.closest(current.edgeOver));
684
- const sheet = fromEdge ? { ...current, opensFrom: 'edge' } : current;
690
+ // In a game (an element that takes its touches), the shell keeps only the edges of the screen.
691
+ const sheet = own_gestures_1.OwnGestures.within(target) ? own_gestures_1.OwnGestures.edgesOnly(current) : fromEdge ? { ...current, opensFrom: 'edge' } : current;
685
692
  if (event.touches.length !== 1 || !touch) {
686
693
  return;
687
694
  }
@@ -699,13 +706,27 @@ function useSheetSwipe(options) {
699
706
  from.doc.addEventListener('touchstart', begin, { passive: true });
700
707
  return () => from.doc.removeEventListener('touchstart', begin);
701
708
  });
702
- const edge = !!latest.current.edgeOver;
709
+ // Of the sheets of both sides (the board, the workbench), each says its own.
710
+ const edge = latest.current.edgeOver ? latest.current.side : undefined;
711
+ const sides = (change) => {
712
+ var _a;
713
+ const next = change(((_a = root.dataset.edgeSwipe) !== null && _a !== void 0 ? _a : '').split(' ').filter(Boolean));
714
+ if (next.length) {
715
+ root.dataset.edgeSwipe = next.join(' ');
716
+ }
717
+ else {
718
+ delete root.dataset.edgeSwipe;
719
+ }
720
+ };
703
721
  if (edge) {
704
- root.dataset.edgeSwipe = latest.current.side;
722
+ sides(list => [...list, edge]);
705
723
  }
706
724
  return () => {
707
725
  if (edge) {
708
- delete root.dataset.edgeSwipe;
726
+ sides(list => {
727
+ const at = list.indexOf(edge);
728
+ return at < 0 ? list : [...list.slice(0, at), ...list.slice(at + 1)];
729
+ });
709
730
  }
710
731
  sources.dispose();
711
732
  finger.stop();
@@ -1,11 +1,21 @@
1
1
  import * as React from 'react';
2
2
  import type { WebCustomMessage } from './web-extension-api';
3
+ import type { WebExtensionsState } from './web-extension-protocol';
3
4
  /** The renderers of custom messages that web extensions registered. */
4
5
  export declare const MessageRenderers: React.Context<Record<string, React.ComponentType<{
5
6
  message: WebCustomMessage;
6
7
  }>>>;
8
+ /** How the calls of the tools of web extensions read (WebExtensionAPI.registerToolRenderer). */
9
+ export declare const ToolRenderers: React.Context<import("./web-api-contributions").WebToolRendererResolver[]>;
10
+ /** The icons web extensions give conversations of theirs, and a count of their changes (ChatIconUtil). */
11
+ export declare const ChatIcons: React.Context<{
12
+ entries: WebExtensionsState['chatIcons'];
13
+ version: number;
14
+ }>;
7
15
  /** The avatars that web extensions registered for the sessions of their groups. */
8
16
  export declare const SessionAvatars: React.Context<Record<string, React.ComponentType<import("./web-extension-api").WebAvatarProps>>>;
17
+ /** What web extensions add to the menu of a conversation of a list (WebExtensionAPI.registerSessionMenu). */
18
+ export declare const SessionMenus: React.Context<import("./web-extension-api").WebSessionMenu[]>;
9
19
  interface BoundaryProps {
10
20
  name: string;
11
21
  /** A new value (a new component) tries again after a failure. */