@celljs/ta-web 4.9.1 → 4.11.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 (614) hide show
  1. package/README.en.md +8 -7
  2. package/README.md +8 -7
  3. package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
  4. package/esm/browser/assistant/assistant-chat-list.js +20 -2
  5. package/esm/browser/assistant/assistant-extension.d.ts +8 -1
  6. package/esm/browser/assistant/assistant-extension.js +25 -0
  7. package/esm/browser/assistant/assistant-protocol.d.ts +5 -2
  8. package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
  9. package/esm/browser/assistant/assistant-task-book.js +23 -4
  10. package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
  11. package/esm/browser/assistant/assistant-task-source.js +5 -10
  12. package/esm/browser/assistant/assistant-task-util.d.ts +14 -2
  13. package/esm/browser/assistant/assistant-task-util.js +62 -13
  14. package/esm/browser/assistant/assistant-view.js +117 -71
  15. package/esm/browser/assistant/assistant.d.ts +28 -5
  16. package/esm/browser/assistant/assistant.js +96 -22
  17. package/esm/browser/avatar/dino-face.js +1 -2
  18. package/esm/browser/chat/chat-packages.d.ts +39 -0
  19. package/esm/browser/chat/chat-packages.js +70 -0
  20. package/esm/browser/chat/chat-protocol.d.ts +28 -1
  21. package/esm/browser/chat/chat-stores.d.ts +62 -0
  22. package/esm/browser/chat/chat-stores.js +129 -0
  23. package/esm/browser/chat/chat-util.d.ts +17 -0
  24. package/esm/browser/chat/chat-util.js +61 -0
  25. package/esm/browser/chat/chat-view.js +45 -17
  26. package/esm/browser/chat/chat.d.ts +41 -41
  27. package/esm/browser/chat/chat.js +276 -190
  28. package/esm/browser/components/account-menu.d.ts +0 -2
  29. package/esm/browser/components/account-menu.js +1 -27
  30. package/esm/browser/components/agent-settings-view.d.ts +3 -2
  31. package/esm/browser/components/agent-settings-view.js +2 -1
  32. package/esm/browser/components/app-nav.d.ts +11 -5
  33. package/esm/browser/components/app-nav.js +39 -17
  34. package/esm/browser/components/app-shell-hooks.d.ts +2 -2
  35. package/esm/browser/components/app-shell-hooks.js +12 -6
  36. package/esm/browser/components/app-view.js +150 -36
  37. package/esm/browser/components/busy.d.ts +25 -0
  38. package/esm/browser/components/busy.js +52 -0
  39. package/esm/browser/components/chat-icon.d.ts +29 -0
  40. package/esm/browser/components/chat-icon.js +78 -0
  41. package/esm/browser/components/chat-list.d.ts +93 -8
  42. package/esm/browser/components/chat-list.js +411 -60
  43. package/esm/browser/components/chat-seen.d.ts +53 -0
  44. package/esm/browser/components/chat-seen.js +101 -0
  45. package/esm/browser/components/composer-box.d.ts +18 -8
  46. package/esm/browser/components/composer-box.js +199 -52
  47. package/esm/browser/components/composer.d.ts +13 -6
  48. package/esm/browser/components/composer.js +8 -5
  49. package/esm/browser/components/connection-bar.js +50 -17
  50. package/esm/browser/components/context-menu.d.ts +30 -4
  51. package/esm/browser/components/context-menu.js +199 -37
  52. package/esm/browser/components/conversation-scroll.d.ts +136 -6
  53. package/esm/browser/components/conversation-scroll.js +467 -108
  54. package/esm/browser/components/custom-host.d.ts +3 -0
  55. package/esm/browser/components/custom-host.js +14 -0
  56. package/esm/browser/components/directory-commands.d.ts +6 -0
  57. package/esm/browser/components/directory-commands.js +34 -0
  58. package/esm/browser/components/discover-view.d.ts +11 -4
  59. package/esm/browser/components/discover-view.js +20 -11
  60. package/esm/browser/components/dismiss.d.ts +3 -0
  61. package/esm/browser/components/dismiss.js +29 -0
  62. package/esm/browser/components/earlier-messages.d.ts +34 -2
  63. package/esm/browser/components/earlier-messages.js +42 -23
  64. package/esm/browser/components/editor-area.d.ts +6 -20
  65. package/esm/browser/components/editor-area.js +10 -96
  66. package/esm/browser/components/empty-pictures.d.ts +0 -2
  67. package/esm/browser/components/empty-pictures.js +0 -16
  68. package/esm/browser/components/fold-text.d.ts +20 -0
  69. package/esm/browser/components/fold-text.js +66 -0
  70. package/esm/browser/components/folder-picker.d.ts +6 -3
  71. package/esm/browser/components/folder-picker.js +27 -9
  72. package/esm/browser/components/full-screen.d.ts +9 -0
  73. package/esm/browser/components/full-screen.js +26 -0
  74. package/esm/browser/components/grow-box.d.ts +9 -0
  75. package/esm/browser/components/grow-box.js +50 -0
  76. package/esm/browser/components/held-talk.d.ts +28 -0
  77. package/esm/browser/components/held-talk.js +76 -0
  78. package/esm/browser/components/hold-to-talk.d.ts +22 -0
  79. package/esm/browser/components/hold-to-talk.js +29 -0
  80. package/esm/browser/components/host-view.d.ts +1 -1
  81. package/esm/browser/components/icon.d.ts +5 -3
  82. package/esm/browser/components/icon.js +9 -9
  83. package/esm/browser/components/image-viewer.d.ts +132 -0
  84. package/esm/browser/components/image-viewer.js +434 -0
  85. package/esm/browser/components/launcher-search-util.d.ts +4 -3
  86. package/esm/browser/components/launcher-search-util.js +12 -4
  87. package/esm/browser/components/lightbox.d.ts +14 -0
  88. package/esm/browser/components/lightbox.js +25 -0
  89. package/esm/browser/components/list-rows.d.ts +9 -1
  90. package/esm/browser/components/list-rows.js +17 -3
  91. package/esm/browser/components/markdown.d.ts +6 -2
  92. package/esm/browser/components/markdown.js +60 -14
  93. package/esm/browser/components/media.js +20 -12
  94. package/esm/browser/components/message-actions.js +2 -0
  95. package/esm/browser/components/message-footer.d.ts +22 -2
  96. package/esm/browser/components/message-footer.js +47 -13
  97. package/esm/browser/components/message-list.d.ts +78 -6
  98. package/esm/browser/components/message-list.js +281 -36
  99. package/esm/browser/components/message-menu.d.ts +3 -1
  100. package/esm/browser/components/message-menu.js +24 -4
  101. package/esm/browser/components/model-picker.js +1 -0
  102. package/esm/browser/components/nav-places.d.ts +37 -3
  103. package/esm/browser/components/nav-places.js +32 -7
  104. package/esm/browser/components/notice-center.js +34 -0
  105. package/esm/browser/components/notice-face.d.ts +10 -0
  106. package/esm/browser/components/notice-face.js +28 -0
  107. package/esm/browser/components/phone-shell.d.ts +27 -2
  108. package/esm/browser/components/phone-shell.js +98 -9
  109. package/esm/browser/components/picture.d.ts +8 -1
  110. package/esm/browser/components/picture.js +12 -1
  111. package/esm/browser/components/plus-menu.d.ts +23 -0
  112. package/esm/browser/components/plus-menu.js +90 -0
  113. package/esm/browser/components/recent-shot.d.ts +15 -0
  114. package/esm/browser/components/recent-shot.js +174 -0
  115. package/esm/browser/components/relay-view.js +10 -3
  116. package/esm/browser/components/run-status.d.ts +1 -1
  117. package/esm/browser/components/run-status.js +17 -29
  118. package/esm/browser/components/said-text.d.ts +6 -0
  119. package/esm/browser/components/said-text.js +14 -0
  120. package/esm/browser/components/scan-screen.d.ts +10 -0
  121. package/esm/browser/components/scan-screen.js +230 -0
  122. package/esm/browser/components/search-page.js +10 -6
  123. package/esm/browser/components/session-settings.d.ts +8 -3
  124. package/esm/browser/components/session-settings.js +15 -1
  125. package/esm/browser/components/session-view.js +36 -22
  126. package/esm/browser/components/settings-choices.d.ts +1 -0
  127. package/esm/browser/components/settings-choices.js +3 -2
  128. package/esm/browser/components/settings-controls.d.ts +5 -3
  129. package/esm/browser/components/settings-controls.js +10 -1
  130. package/esm/browser/components/settings-parts.d.ts +2 -2
  131. package/esm/browser/components/settings-parts.js +69 -15
  132. package/esm/browser/components/swipe-row.d.ts +2 -2
  133. package/esm/browser/components/swipe-row.js +7 -3
  134. package/esm/browser/components/tool-view.js +21 -14
  135. package/esm/browser/components/unseen-drop.d.ts +39 -0
  136. package/esm/browser/components/unseen-drop.js +219 -0
  137. package/esm/browser/components/use-seen-chats.d.ts +8 -0
  138. package/esm/browser/components/use-seen-chats.js +49 -0
  139. package/esm/browser/components/voice-button.d.ts +7 -1
  140. package/esm/browser/components/voice-button.js +15 -2
  141. package/esm/browser/components/voice-picker.d.ts +6 -0
  142. package/esm/browser/components/voice-picker.js +53 -0
  143. package/esm/browser/components/voice-talk.d.ts +51 -0
  144. package/esm/browser/components/voice-talk.js +242 -0
  145. package/esm/browser/components/web-composer.d.ts +4 -2
  146. package/esm/browser/components/web-composer.js +8 -4
  147. package/esm/browser/components/workbench-tabs.d.ts +41 -0
  148. package/esm/browser/components/workbench-tabs.js +193 -0
  149. package/esm/browser/components/workbench-toggle.d.ts +0 -13
  150. package/esm/browser/components/workbench-toggle.js +1 -28
  151. package/esm/browser/device/code-scan.d.ts +55 -0
  152. package/esm/browser/device/code-scan.js +137 -0
  153. package/esm/browser/device/code-vision.d.ts +51 -0
  154. package/esm/browser/device/code-vision.js +100 -0
  155. package/esm/browser/device/device.d.ts +3 -0
  156. package/esm/browser/device/device.js +11 -1
  157. package/esm/browser/device/hold.d.ts +42 -0
  158. package/esm/browser/device/hold.js +134 -0
  159. package/esm/browser/device/launch-screen.d.ts +1 -1
  160. package/esm/browser/device/launch-screen.js +1 -1
  161. package/esm/browser/device/long-press.d.ts +12 -0
  162. package/esm/browser/device/long-press.js +44 -13
  163. package/esm/browser/device/own-gestures.d.ts +25 -0
  164. package/esm/browser/device/own-gestures.js +39 -0
  165. package/esm/browser/device/pull-down.d.ts +4 -2
  166. package/esm/browser/device/pull-down.js +67 -78
  167. package/esm/browser/device/recent-shots.d.ts +45 -0
  168. package/esm/browser/device/recent-shots.js +142 -0
  169. package/esm/browser/device/row-swipe.d.ts +35 -10
  170. package/esm/browser/device/row-swipe.js +154 -71
  171. package/esm/browser/device/shake-undo.d.ts +16 -0
  172. package/esm/browser/device/shake-undo.js +59 -0
  173. package/esm/browser/device/sheet-swipe.d.ts +118 -18
  174. package/esm/browser/device/sheet-swipe.js +414 -108
  175. package/esm/browser/extension/extension-view.d.ts +10 -0
  176. package/esm/browser/extension/extension-view.js +6 -0
  177. package/esm/browser/extension/icons.js +15 -2
  178. package/esm/browser/extension/web-api-components.d.ts +269 -0
  179. package/esm/browser/extension/web-api-components.js +2 -0
  180. package/esm/browser/extension/web-api-contributions.d.ts +385 -0
  181. package/esm/browser/extension/web-api-contributions.js +2 -0
  182. package/esm/browser/extension/web-api-desktop.d.ts +55 -0
  183. package/esm/browser/extension/web-api-desktop.js +2 -0
  184. package/esm/browser/extension/web-api-terminal.d.ts +71 -0
  185. package/esm/browser/extension/web-api-terminal.js +2 -0
  186. package/esm/browser/extension/web-editor-tabs.d.ts +42 -0
  187. package/esm/browser/extension/web-editor-tabs.js +137 -0
  188. package/esm/browser/extension/web-extension-api.d.ts +218 -521
  189. package/esm/browser/extension/web-extension-code.d.ts +6 -0
  190. package/esm/browser/extension/web-extension-code.js +24 -0
  191. package/esm/browser/extension/web-extension-context.d.ts +78 -0
  192. package/esm/browser/extension/web-extension-context.js +346 -0
  193. package/esm/browser/extension/web-extension-protocol.d.ts +66 -6
  194. package/esm/browser/extension/web-extension-protocol.js +41 -0
  195. package/esm/browser/extension/web-extension-run.d.ts +54 -0
  196. package/esm/browser/extension/web-extension-run.js +120 -0
  197. package/esm/browser/extension/web-extensions.d.ts +41 -68
  198. package/esm/browser/extension/web-extensions.js +188 -487
  199. package/esm/browser/extension/web-home.d.ts +19 -0
  200. package/esm/browser/extension/web-home.js +72 -0
  201. package/esm/browser/extension/web-pages.d.ts +13 -3
  202. package/esm/browser/extension/web-pages.js +23 -3
  203. package/esm/browser/extension/web-session-notices.d.ts +36 -0
  204. package/esm/browser/extension/web-session-notices.js +174 -0
  205. package/esm/browser/extension/web-sharing.d.ts +2 -0
  206. package/esm/browser/extension/web-sharing.js +4 -0
  207. package/esm/browser/files/files-protocol.d.ts +25 -0
  208. package/esm/browser/files/files-protocol.js +2 -0
  209. package/esm/browser/files/files.d.ts +35 -0
  210. package/esm/browser/files/files.js +119 -0
  211. package/esm/browser/game/game-host.d.ts +27 -0
  212. package/esm/browser/game/game-host.js +127 -0
  213. package/esm/browser/game/game-loader.d.ts +10 -0
  214. package/esm/browser/game/game-loader.js +28 -0
  215. package/esm/browser/game/game-protocol.d.ts +49 -0
  216. package/esm/browser/game/game-protocol.js +2 -0
  217. package/esm/browser/game/game-runner.d.ts +27 -0
  218. package/esm/browser/game/game-runner.js +60 -0
  219. package/esm/browser/game/game-util.d.ts +29 -0
  220. package/esm/browser/game/game-util.js +180 -0
  221. package/esm/browser/game/game-view.d.ts +12 -0
  222. package/esm/browser/game/game-view.js +31 -0
  223. package/esm/browser/game/game3d-protocol.d.ts +51 -0
  224. package/esm/browser/game/game3d-protocol.js +2 -0
  225. package/esm/browser/game/game3d-runner.d.ts +27 -0
  226. package/esm/browser/game/game3d-runner.js +149 -0
  227. package/esm/browser/hooks.d.ts +5 -1
  228. package/esm/browser/hooks.js +13 -2
  229. package/esm/browser/i18n/locales.d.ts +105 -3
  230. package/esm/browser/i18n/messages.d.ts +104 -2
  231. package/esm/browser/i18n/messages.js +215 -11
  232. package/esm/browser/index.d.ts +15 -0
  233. package/esm/browser/index.js +15 -0
  234. package/esm/browser/links/links-protocol.d.ts +5 -0
  235. package/esm/browser/links/links.d.ts +19 -7
  236. package/esm/browser/links/links.js +57 -11
  237. package/esm/browser/markdown/code-renderers.d.ts +4 -0
  238. package/esm/browser/markdown/code-renderers.js +4 -0
  239. package/esm/browser/notices/notices-protocol.d.ts +26 -1
  240. package/esm/browser/notices/notices.d.ts +3 -1
  241. package/esm/browser/notices/notices.js +26 -12
  242. package/esm/browser/notices/session-notices.d.ts +69 -0
  243. package/esm/browser/notices/session-notices.js +92 -0
  244. package/esm/browser/offline/device-values.d.ts +55 -0
  245. package/esm/browser/offline/device-values.js +151 -0
  246. package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
  247. package/esm/browser/offline/kept-chats-protocol.js +2 -0
  248. package/esm/browser/offline/kept-chats.d.ts +47 -0
  249. package/esm/browser/offline/kept-chats.js +146 -0
  250. package/esm/browser/offline/offline-reads.d.ts +44 -0
  251. package/esm/browser/offline/offline-reads.js +109 -0
  252. package/esm/browser/settings/navigation.d.ts +3 -2
  253. package/esm/browser/settings/navigation.js +4 -3
  254. package/esm/browser/settings/settings-protocol.d.ts +17 -0
  255. package/esm/browser/settings/settings-protocol.js +20 -4
  256. package/esm/browser/state/state-protocol.d.ts +8 -1
  257. package/esm/browser/state/state.d.ts +2 -0
  258. package/esm/browser/state/state.js +21 -2
  259. package/esm/browser/style/base.d.ts +1 -1
  260. package/esm/browser/style/base.js +27 -1
  261. package/esm/browser/style/conversation.d.ts +1 -1
  262. package/esm/browser/style/conversation.js +95 -17
  263. package/esm/browser/style/device.js +42 -5
  264. package/esm/browser/style/layout.d.ts +1 -1
  265. package/esm/browser/style/layout.js +252 -67
  266. package/esm/browser/style/pages.d.ts +1 -1
  267. package/esm/browser/style/pages.js +38 -2
  268. package/esm/browser/style/phone.d.ts +1 -1
  269. package/esm/browser/style/phone.js +15 -0
  270. package/esm/browser/style/shell.d.ts +1 -1
  271. package/esm/browser/style/shell.js +76 -9
  272. package/esm/browser/style/surfaces.d.ts +1 -1
  273. package/esm/browser/style/surfaces.js +2 -2
  274. package/esm/browser/style/tints.d.ts +27 -0
  275. package/esm/browser/style/tints.js +56 -0
  276. package/esm/browser/style.js +13 -1
  277. package/esm/browser/util/composer.d.ts +6 -0
  278. package/esm/browser/util/composer.js +16 -0
  279. package/esm/browser/util/desktop.d.ts +19 -1
  280. package/esm/browser/util/desktop.js +15 -0
  281. package/esm/browser/util/frame.d.ts +5 -4
  282. package/esm/browser/util/frame.js +5 -4
  283. package/esm/browser/util/link.d.ts +18 -0
  284. package/esm/browser/util/link.js +66 -1
  285. package/esm/browser/util/markdown.d.ts +22 -2
  286. package/esm/browser/util/markdown.js +120 -6
  287. package/esm/browser/util/message.d.ts +5 -0
  288. package/esm/browser/util/message.js +30 -0
  289. package/esm/browser/util/process.d.ts +35 -2
  290. package/esm/browser/util/process.js +79 -4
  291. package/esm/browser/util/progress.d.ts +19 -1
  292. package/esm/browser/util/progress.js +57 -4
  293. package/esm/browser/util/quote.d.ts +19 -0
  294. package/esm/browser/util/quote.js +58 -0
  295. package/esm/browser/util/tool.d.ts +19 -2
  296. package/esm/browser/util/tool.js +70 -2
  297. package/esm/browser/util/voice.d.ts +49 -6
  298. package/esm/browser/util/voice.js +271 -26
  299. package/esm/browser/util/zoom.d.ts +46 -0
  300. package/esm/browser/util/zoom.js +96 -0
  301. package/esm/browser/workbench-calls.d.ts +61 -0
  302. package/esm/browser/workbench-calls.js +146 -0
  303. package/esm/browser/workbench-protocol.d.ts +36 -3
  304. package/esm/browser/workbench-util.d.ts +22 -4
  305. package/esm/browser/workbench-util.js +37 -7
  306. package/esm/browser/workbench.d.ts +47 -6
  307. package/esm/browser/workbench.js +191 -43
  308. package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
  309. package/lib/browser/assistant/assistant-chat-list.js +21 -2
  310. package/lib/browser/assistant/assistant-extension.d.ts +8 -1
  311. package/lib/browser/assistant/assistant-extension.js +25 -0
  312. package/lib/browser/assistant/assistant-protocol.d.ts +5 -2
  313. package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
  314. package/lib/browser/assistant/assistant-task-book.js +23 -4
  315. package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
  316. package/lib/browser/assistant/assistant-task-source.js +5 -10
  317. package/lib/browser/assistant/assistant-task-util.d.ts +14 -2
  318. package/lib/browser/assistant/assistant-task-util.js +62 -13
  319. package/lib/browser/assistant/assistant-view.js +113 -67
  320. package/lib/browser/assistant/assistant.d.ts +28 -5
  321. package/lib/browser/assistant/assistant.js +96 -22
  322. package/lib/browser/avatar/dino-face.js +1 -2
  323. package/lib/browser/chat/chat-packages.d.ts +40 -0
  324. package/lib/browser/chat/chat-packages.js +74 -0
  325. package/lib/browser/chat/chat-protocol.d.ts +28 -1
  326. package/lib/browser/chat/chat-stores.d.ts +63 -0
  327. package/lib/browser/chat/chat-stores.js +133 -0
  328. package/lib/browser/chat/chat-util.d.ts +18 -0
  329. package/lib/browser/chat/chat-util.js +64 -0
  330. package/lib/browser/chat/chat-view.js +44 -16
  331. package/lib/browser/chat/chat.d.ts +41 -41
  332. package/lib/browser/chat/chat.js +277 -191
  333. package/lib/browser/components/account-menu.d.ts +0 -2
  334. package/lib/browser/components/account-menu.js +2 -29
  335. package/lib/browser/components/agent-settings-view.d.ts +3 -2
  336. package/lib/browser/components/agent-settings-view.js +2 -1
  337. package/lib/browser/components/app-nav.d.ts +11 -5
  338. package/lib/browser/components/app-nav.js +35 -13
  339. package/lib/browser/components/app-shell-hooks.d.ts +2 -2
  340. package/lib/browser/components/app-shell-hooks.js +12 -6
  341. package/lib/browser/components/app-view.js +145 -31
  342. package/lib/browser/components/busy.d.ts +26 -0
  343. package/lib/browser/components/busy.js +91 -0
  344. package/lib/browser/components/chat-icon.d.ts +30 -0
  345. package/lib/browser/components/chat-icon.js +117 -0
  346. package/lib/browser/components/chat-list.d.ts +93 -8
  347. package/lib/browser/components/chat-list.js +412 -60
  348. package/lib/browser/components/chat-seen.d.ts +54 -0
  349. package/lib/browser/components/chat-seen.js +104 -0
  350. package/lib/browser/components/composer-box.d.ts +18 -8
  351. package/lib/browser/components/composer-box.js +198 -51
  352. package/lib/browser/components/composer.d.ts +13 -6
  353. package/lib/browser/components/composer.js +7 -4
  354. package/lib/browser/components/connection-bar.js +48 -15
  355. package/lib/browser/components/context-menu.d.ts +30 -4
  356. package/lib/browser/components/context-menu.js +198 -36
  357. package/lib/browser/components/conversation-scroll.d.ts +136 -6
  358. package/lib/browser/components/conversation-scroll.js +469 -109
  359. package/lib/browser/components/custom-host.d.ts +4 -0
  360. package/lib/browser/components/custom-host.js +50 -0
  361. package/lib/browser/components/directory-commands.d.ts +7 -0
  362. package/lib/browser/components/directory-commands.js +70 -0
  363. package/lib/browser/components/discover-view.d.ts +11 -4
  364. package/lib/browser/components/discover-view.js +19 -10
  365. package/lib/browser/components/dismiss.d.ts +4 -0
  366. package/lib/browser/components/dismiss.js +65 -0
  367. package/lib/browser/components/earlier-messages.d.ts +34 -2
  368. package/lib/browser/components/earlier-messages.js +44 -24
  369. package/lib/browser/components/editor-area.d.ts +6 -20
  370. package/lib/browser/components/editor-area.js +11 -97
  371. package/lib/browser/components/empty-pictures.d.ts +0 -2
  372. package/lib/browser/components/empty-pictures.js +0 -17
  373. package/lib/browser/components/fold-text.d.ts +21 -0
  374. package/lib/browser/components/fold-text.js +103 -0
  375. package/lib/browser/components/folder-picker.d.ts +6 -3
  376. package/lib/browser/components/folder-picker.js +27 -9
  377. package/lib/browser/components/full-screen.d.ts +10 -0
  378. package/lib/browser/components/full-screen.js +62 -0
  379. package/lib/browser/components/grow-box.d.ts +10 -0
  380. package/lib/browser/components/grow-box.js +86 -0
  381. package/lib/browser/components/held-talk.d.ts +29 -0
  382. package/lib/browser/components/held-talk.js +79 -0
  383. package/lib/browser/components/hold-to-talk.d.ts +23 -0
  384. package/lib/browser/components/hold-to-talk.js +65 -0
  385. package/lib/browser/components/host-view.d.ts +1 -1
  386. package/lib/browser/components/icon.d.ts +5 -3
  387. package/lib/browser/components/icon.js +11 -9
  388. package/lib/browser/components/image-viewer.d.ts +133 -0
  389. package/lib/browser/components/image-viewer.js +472 -0
  390. package/lib/browser/components/launcher-search-util.d.ts +4 -3
  391. package/lib/browser/components/launcher-search-util.js +12 -4
  392. package/lib/browser/components/lightbox.d.ts +15 -0
  393. package/lib/browser/components/lightbox.js +61 -0
  394. package/lib/browser/components/list-rows.d.ts +9 -1
  395. package/lib/browser/components/list-rows.js +18 -3
  396. package/lib/browser/components/markdown.d.ts +6 -2
  397. package/lib/browser/components/markdown.js +60 -14
  398. package/lib/browser/components/media.js +21 -13
  399. package/lib/browser/components/message-actions.js +2 -0
  400. package/lib/browser/components/message-footer.d.ts +22 -2
  401. package/lib/browser/components/message-footer.js +49 -12
  402. package/lib/browser/components/message-list.d.ts +78 -6
  403. package/lib/browser/components/message-list.js +281 -32
  404. package/lib/browser/components/message-menu.d.ts +3 -1
  405. package/lib/browser/components/message-menu.js +23 -3
  406. package/lib/browser/components/model-picker.js +1 -0
  407. package/lib/browser/components/nav-places.d.ts +37 -3
  408. package/lib/browser/components/nav-places.js +35 -7
  409. package/lib/browser/components/notice-center.js +34 -0
  410. package/lib/browser/components/notice-face.d.ts +11 -0
  411. package/lib/browser/components/notice-face.js +64 -0
  412. package/lib/browser/components/phone-shell.d.ts +27 -2
  413. package/lib/browser/components/phone-shell.js +99 -10
  414. package/lib/browser/components/picture.d.ts +8 -1
  415. package/lib/browser/components/picture.js +13 -1
  416. package/lib/browser/components/plus-menu.d.ts +24 -0
  417. package/lib/browser/components/plus-menu.js +126 -0
  418. package/lib/browser/components/recent-shot.d.ts +16 -0
  419. package/lib/browser/components/recent-shot.js +210 -0
  420. package/lib/browser/components/relay-view.js +10 -3
  421. package/lib/browser/components/run-status.d.ts +1 -1
  422. package/lib/browser/components/run-status.js +17 -29
  423. package/lib/browser/components/said-text.d.ts +7 -0
  424. package/lib/browser/components/said-text.js +50 -0
  425. package/lib/browser/components/scan-screen.d.ts +11 -0
  426. package/lib/browser/components/scan-screen.js +266 -0
  427. package/lib/browser/components/search-page.js +10 -6
  428. package/lib/browser/components/session-settings.d.ts +8 -3
  429. package/lib/browser/components/session-settings.js +15 -1
  430. package/lib/browser/components/session-view.js +32 -18
  431. package/lib/browser/components/settings-choices.d.ts +1 -0
  432. package/lib/browser/components/settings-choices.js +2 -1
  433. package/lib/browser/components/settings-controls.d.ts +5 -3
  434. package/lib/browser/components/settings-controls.js +10 -1
  435. package/lib/browser/components/settings-parts.d.ts +2 -2
  436. package/lib/browser/components/settings-parts.js +67 -13
  437. package/lib/browser/components/swipe-row.d.ts +2 -2
  438. package/lib/browser/components/swipe-row.js +7 -3
  439. package/lib/browser/components/tool-view.js +21 -14
  440. package/lib/browser/components/unseen-drop.d.ts +40 -0
  441. package/lib/browser/components/unseen-drop.js +256 -0
  442. package/lib/browser/components/use-seen-chats.d.ts +9 -0
  443. package/lib/browser/components/use-seen-chats.js +85 -0
  444. package/lib/browser/components/voice-button.d.ts +7 -1
  445. package/lib/browser/components/voice-button.js +16 -2
  446. package/lib/browser/components/voice-picker.d.ts +7 -0
  447. package/lib/browser/components/voice-picker.js +89 -0
  448. package/lib/browser/components/voice-talk.d.ts +52 -0
  449. package/lib/browser/components/voice-talk.js +281 -0
  450. package/lib/browser/components/web-composer.d.ts +4 -2
  451. package/lib/browser/components/web-composer.js +7 -3
  452. package/lib/browser/components/workbench-tabs.d.ts +42 -0
  453. package/lib/browser/components/workbench-tabs.js +232 -0
  454. package/lib/browser/components/workbench-toggle.d.ts +0 -13
  455. package/lib/browser/components/workbench-toggle.js +1 -29
  456. package/lib/browser/device/code-scan.d.ts +56 -0
  457. package/lib/browser/device/code-scan.js +141 -0
  458. package/lib/browser/device/code-vision.d.ts +52 -0
  459. package/lib/browser/device/code-vision.js +103 -0
  460. package/lib/browser/device/device.d.ts +3 -0
  461. package/lib/browser/device/device.js +11 -1
  462. package/lib/browser/device/hold.d.ts +43 -0
  463. package/lib/browser/device/hold.js +171 -0
  464. package/lib/browser/device/launch-screen.d.ts +1 -1
  465. package/lib/browser/device/launch-screen.js +1 -1
  466. package/lib/browser/device/long-press.d.ts +12 -0
  467. package/lib/browser/device/long-press.js +44 -13
  468. package/lib/browser/device/own-gestures.d.ts +26 -0
  469. package/lib/browser/device/own-gestures.js +42 -0
  470. package/lib/browser/device/pull-down.d.ts +4 -2
  471. package/lib/browser/device/pull-down.js +66 -77
  472. package/lib/browser/device/recent-shots.d.ts +46 -0
  473. package/lib/browser/device/recent-shots.js +145 -0
  474. package/lib/browser/device/row-swipe.d.ts +35 -10
  475. package/lib/browser/device/row-swipe.js +153 -70
  476. package/lib/browser/device/shake-undo.d.ts +17 -0
  477. package/lib/browser/device/shake-undo.js +63 -0
  478. package/lib/browser/device/sheet-swipe.d.ts +118 -18
  479. package/lib/browser/device/sheet-swipe.js +418 -109
  480. package/lib/browser/extension/extension-view.d.ts +10 -0
  481. package/lib/browser/extension/extension-view.js +7 -1
  482. package/lib/browser/extension/icons.js +14 -1
  483. package/lib/browser/extension/web-api-components.d.ts +270 -0
  484. package/lib/browser/extension/web-api-components.js +3 -0
  485. package/lib/browser/extension/web-api-contributions.d.ts +386 -0
  486. package/lib/browser/extension/web-api-contributions.js +3 -0
  487. package/lib/browser/extension/web-api-desktop.d.ts +56 -0
  488. package/lib/browser/extension/web-api-desktop.js +3 -0
  489. package/lib/browser/extension/web-api-terminal.d.ts +72 -0
  490. package/lib/browser/extension/web-api-terminal.js +3 -0
  491. package/lib/browser/extension/web-editor-tabs.d.ts +43 -0
  492. package/lib/browser/extension/web-editor-tabs.js +141 -0
  493. package/lib/browser/extension/web-extension-api.d.ts +218 -521
  494. package/lib/browser/extension/web-extension-code.d.ts +6 -0
  495. package/lib/browser/extension/web-extension-code.js +24 -0
  496. package/lib/browser/extension/web-extension-context.d.ts +79 -0
  497. package/lib/browser/extension/web-extension-context.js +383 -0
  498. package/lib/browser/extension/web-extension-protocol.d.ts +66 -6
  499. package/lib/browser/extension/web-extension-protocol.js +42 -1
  500. package/lib/browser/extension/web-extension-run.d.ts +55 -0
  501. package/lib/browser/extension/web-extension-run.js +123 -0
  502. package/lib/browser/extension/web-extensions.d.ts +41 -68
  503. package/lib/browser/extension/web-extensions.js +184 -516
  504. package/lib/browser/extension/web-home.d.ts +20 -0
  505. package/lib/browser/extension/web-home.js +76 -0
  506. package/lib/browser/extension/web-pages.d.ts +13 -3
  507. package/lib/browser/extension/web-pages.js +23 -3
  508. package/lib/browser/extension/web-session-notices.d.ts +37 -0
  509. package/lib/browser/extension/web-session-notices.js +177 -0
  510. package/lib/browser/extension/web-sharing.d.ts +2 -0
  511. package/lib/browser/extension/web-sharing.js +4 -0
  512. package/lib/browser/files/files-protocol.d.ts +26 -0
  513. package/lib/browser/files/files-protocol.js +5 -0
  514. package/lib/browser/files/files.d.ts +36 -0
  515. package/lib/browser/files/files.js +122 -0
  516. package/lib/browser/game/game-host.d.ts +28 -0
  517. package/lib/browser/game/game-host.js +163 -0
  518. package/lib/browser/game/game-loader.d.ts +11 -0
  519. package/lib/browser/game/game-loader.js +31 -0
  520. package/lib/browser/game/game-protocol.d.ts +50 -0
  521. package/lib/browser/game/game-protocol.js +3 -0
  522. package/lib/browser/game/game-runner.d.ts +28 -0
  523. package/lib/browser/game/game-runner.js +64 -0
  524. package/lib/browser/game/game-util.d.ts +30 -0
  525. package/lib/browser/game/game-util.js +183 -0
  526. package/lib/browser/game/game-view.d.ts +13 -0
  527. package/lib/browser/game/game-view.js +68 -0
  528. package/lib/browser/game/game3d-protocol.d.ts +52 -0
  529. package/lib/browser/game/game3d-protocol.js +3 -0
  530. package/lib/browser/game/game3d-runner.d.ts +28 -0
  531. package/lib/browser/game/game3d-runner.js +153 -0
  532. package/lib/browser/hooks.d.ts +5 -1
  533. package/lib/browser/hooks.js +14 -2
  534. package/lib/browser/i18n/locales.d.ts +105 -3
  535. package/lib/browser/i18n/messages.d.ts +104 -2
  536. package/lib/browser/i18n/messages.js +215 -11
  537. package/lib/browser/index.d.ts +15 -0
  538. package/lib/browser/index.js +15 -0
  539. package/lib/browser/links/links-protocol.d.ts +5 -0
  540. package/lib/browser/links/links.d.ts +19 -7
  541. package/lib/browser/links/links.js +57 -11
  542. package/lib/browser/markdown/code-renderers.d.ts +5 -0
  543. package/lib/browser/markdown/code-renderers.js +40 -0
  544. package/lib/browser/notices/notices-protocol.d.ts +26 -1
  545. package/lib/browser/notices/notices.d.ts +3 -1
  546. package/lib/browser/notices/notices.js +26 -12
  547. package/lib/browser/notices/session-notices.d.ts +70 -0
  548. package/lib/browser/notices/session-notices.js +96 -0
  549. package/lib/browser/offline/device-values.d.ts +56 -0
  550. package/lib/browser/offline/device-values.js +157 -0
  551. package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
  552. package/lib/browser/offline/kept-chats-protocol.js +5 -0
  553. package/lib/browser/offline/kept-chats.d.ts +48 -0
  554. package/lib/browser/offline/kept-chats.js +149 -0
  555. package/lib/browser/offline/offline-reads.d.ts +45 -0
  556. package/lib/browser/offline/offline-reads.js +113 -0
  557. package/lib/browser/settings/navigation.d.ts +3 -2
  558. package/lib/browser/settings/navigation.js +4 -3
  559. package/lib/browser/settings/settings-protocol.d.ts +17 -0
  560. package/lib/browser/settings/settings-protocol.js +21 -5
  561. package/lib/browser/state/state-protocol.d.ts +8 -1
  562. package/lib/browser/state/state.d.ts +2 -0
  563. package/lib/browser/state/state.js +21 -2
  564. package/lib/browser/style/base.d.ts +1 -1
  565. package/lib/browser/style/base.js +27 -1
  566. package/lib/browser/style/conversation.d.ts +1 -1
  567. package/lib/browser/style/conversation.js +95 -17
  568. package/lib/browser/style/device.js +42 -5
  569. package/lib/browser/style/layout.d.ts +1 -1
  570. package/lib/browser/style/layout.js +252 -67
  571. package/lib/browser/style/pages.d.ts +1 -1
  572. package/lib/browser/style/pages.js +38 -2
  573. package/lib/browser/style/phone.d.ts +1 -1
  574. package/lib/browser/style/phone.js +15 -0
  575. package/lib/browser/style/shell.d.ts +1 -1
  576. package/lib/browser/style/shell.js +76 -9
  577. package/lib/browser/style/surfaces.d.ts +1 -1
  578. package/lib/browser/style/surfaces.js +2 -2
  579. package/lib/browser/style/tints.d.ts +28 -0
  580. package/lib/browser/style/tints.js +59 -0
  581. package/lib/browser/style.js +13 -1
  582. package/lib/browser/util/composer.d.ts +6 -0
  583. package/lib/browser/util/composer.js +16 -0
  584. package/lib/browser/util/desktop.d.ts +19 -1
  585. package/lib/browser/util/desktop.js +15 -0
  586. package/lib/browser/util/frame.d.ts +5 -4
  587. package/lib/browser/util/frame.js +5 -4
  588. package/lib/browser/util/link.d.ts +18 -0
  589. package/lib/browser/util/link.js +66 -1
  590. package/lib/browser/util/markdown.d.ts +22 -2
  591. package/lib/browser/util/markdown.js +120 -6
  592. package/lib/browser/util/message.d.ts +5 -0
  593. package/lib/browser/util/message.js +30 -0
  594. package/lib/browser/util/process.d.ts +35 -2
  595. package/lib/browser/util/process.js +80 -5
  596. package/lib/browser/util/progress.d.ts +19 -1
  597. package/lib/browser/util/progress.js +57 -4
  598. package/lib/browser/util/quote.d.ts +20 -0
  599. package/lib/browser/util/quote.js +61 -0
  600. package/lib/browser/util/tool.d.ts +19 -2
  601. package/lib/browser/util/tool.js +70 -2
  602. package/lib/browser/util/voice.d.ts +49 -6
  603. package/lib/browser/util/voice.js +271 -26
  604. package/lib/browser/util/zoom.d.ts +47 -0
  605. package/lib/browser/util/zoom.js +99 -0
  606. package/lib/browser/workbench-calls.d.ts +62 -0
  607. package/lib/browser/workbench-calls.js +150 -0
  608. package/lib/browser/workbench-protocol.d.ts +36 -3
  609. package/lib/browser/workbench-util.d.ts +22 -4
  610. package/lib/browser/workbench-util.js +38 -8
  611. package/lib/browser/workbench.d.ts +47 -6
  612. package/lib/browser/workbench.js +189 -41
  613. package/package.json +14 -11
  614. package/public/launch.svg +46 -42
@@ -5,22 +5,47 @@ import * as React from 'react';
5
5
  * anywhere else, or another row opened. Pure, for the tests.
6
6
  */
7
7
  export declare namespace RowSwipeUtil {
8
- /** Past the actions, the row follows the finger this much, as a list pulled past its end. */
9
- const STRETCH = 0.3;
8
+ /** Past the actions, the row follows the finger this much at first, then less and less, as a list of iOS pulled past its end. */
9
+ const RUBBER = 0.55;
10
10
  /** How long its style slides the row (style/device.ts). */
11
11
  const SETTLE_MS = 300;
12
- /** Where the row is, from 0 (closed) to `-width` (its actions shown), when the finger moved `dx`. */
13
- function offset(dx: number, width: number, open: boolean): number;
14
- /** Whether it stays open, let go at `speed` (pixels a millisecond, SwipeVelocity) after moving `dx`. */
15
- function settle(dx: number, width: number, open: boolean, speed: number): boolean;
12
+ /** How far past its actions it ever goes, however far the finger: less than what the actions fill past their edge (style/device.ts). */
13
+ const BEYOND_PX = 100;
14
+ /** Told a swipe, the row catches up with the finger over this much of its way, not at once. */
15
+ const CATCH_PX = 40;
16
+ /** Let go, where it is headed is where it would be this much later at the finger's speed: a short quick swipe opens it too. */
17
+ const PROJECT_MS = 150;
18
+ /** Where the row is, from 0 (closed) to `-width` (its actions shown) and a little past, the finger at `x` (where it took the row, and how far it moved since). */
19
+ function offset(x: number, width: number): number;
20
+ /** Where the finger would be for the row at `offset`: the other way from `offset`, so that a row taken past its actions does not jump. */
21
+ function finger(offset: number, width: number): number;
22
+ /** Whether it stays open, let go at `offset` at `speed` (pixels a millisecond, SwipeVelocity): flicked, the way it was; else where it is headed. */
23
+ function settle(offset: number, width: number, speed: number): boolean;
24
+ /**
25
+ * How far the finger has moved the row, `dx` since the move was told a swipe, `lag` before (the few pixels
26
+ * that told it): from where it was, without a jump, a little faster than the finger until it is where the
27
+ * finger says (CATCH_PX), as if it had followed it from the start.
28
+ */
29
+ function follow(dx: number, lag: number): number;
30
+ /**
31
+ * How far each action is pushed to the right of where it rests, the row at `offset`: they come out with the
32
+ * row's edge, as iOS's, the first one at it, the others spread over what is shown (`share`, 1 - its index
33
+ * of how many there are: 1 for the first, less for those after).
34
+ */
35
+ function shift(offset: number, width: number, share: number): number;
16
36
  /** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
17
37
  function claims(dx: number, dy: number, open: boolean): boolean | undefined;
18
38
  }
19
39
  /**
20
40
  * Lets a finger swipe the row of `ref` (a SwipeRow) while `enabled`: its content moves over its actions, whose
21
- * width is the way to go, and slides on at the speed the finger left it. Its listeners are passive (the row has
22
- * `touch-action: pan-y`), so the list scrolls on the compositor; each move only sets a transform. The style says
23
- * where an open row rests (`data-swiped`); the row clips what slides out of it only while it is moved, open or
24
- * on its way back (`data-swipe-clip`), so that a menu of the row is not cut at its edges.
41
+ * width is the way to go, and they come out with its edge (RowSwipeUtil.shift); let go, all slide on as on a
42
+ * spring from the speed the finger left them (SwipeSettle). The row sets off from where the move is told a swipe
43
+ * and catches up with the finger (RowSwipeUtil.follow), so it never jumps under it; past its actions it stretches less and
44
+ * less. Open, it closes when the finger scrolls the list from it, or holds it for its menu. Its
45
+ * listeners are passive (the row has `touch-action: pan-y`), so the list scrolls on the compositor; each move
46
+ * only sets a transform. The finger is followed on what it touched (SwipeFinger), so that a row drawn again
47
+ * under it does not stop half way. The style says where an open row rests (`data-swiped`); the row clips
48
+ * what slides out of it only while it is moved, open or on its way back (`data-swipe-clip`), so that a menu
49
+ * of the row is not cut at its edges.
25
50
  */
26
51
  export declare function useRowSwipe(ref: React.RefObject<HTMLElement | null>, enabled: boolean): [boolean, () => void];
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { SwipeSettle, SwipeUtil, SwipeVelocity } from './sheet-swipe.js';
2
+ import { OwnGestures } from './own-gestures.js';
3
+ import { SwipeFinger, SwipeSettle, SwipeUtil, SwipeVelocity, translated } from './sheet-swipe.js';
3
4
  /**
4
5
  * A row of a list a finger swipes to the left to show its actions behind it, as the chats of WeChat: it
5
6
  * follows the finger, stays open past half of them or flicked, and closes on a swipe back, a tap on it or
@@ -7,27 +8,64 @@ import { SwipeSettle, SwipeUtil, SwipeVelocity } from './sheet-swipe.js';
7
8
  */
8
9
  export var RowSwipeUtil;
9
10
  (function (RowSwipeUtil) {
10
- /** Past the actions, the row follows the finger this much, as a list pulled past its end. */
11
- RowSwipeUtil.STRETCH = 0.3;
11
+ /** Past the actions, the row follows the finger this much at first, then less and less, as a list of iOS pulled past its end. */
12
+ RowSwipeUtil.RUBBER = 0.55;
12
13
  /** How long its style slides the row (style/device.ts). */
13
14
  RowSwipeUtil.SETTLE_MS = 300;
14
- /** Where the row is, from 0 (closed) to `-width` (its actions shown), when the finger moved `dx`. */
15
- function offset(dx, width, open) {
16
- const x = (open ? -width : 0) + dx;
15
+ /** How far past its actions it ever goes, however far the finger: less than what the actions fill past their edge (style/device.ts). */
16
+ RowSwipeUtil.BEYOND_PX = 100;
17
+ /** Told a swipe, the row catches up with the finger over this much of its way, not at once. */
18
+ RowSwipeUtil.CATCH_PX = 40;
19
+ /** Let go, where it is headed is where it would be this much later at the finger's speed: a short quick swipe opens it too. */
20
+ RowSwipeUtil.PROJECT_MS = 150;
21
+ /** Where the row is, from 0 (closed) to `-width` (its actions shown) and a little past, the finger at `x` (where it took the row, and how far it moved since). */
22
+ function offset(x, width) {
17
23
  if (x > 0) {
18
24
  return 0;
19
25
  }
20
- return x < -width ? -width + (x + width) * RowSwipeUtil.STRETCH : x;
26
+ if (x >= -width) {
27
+ return x;
28
+ }
29
+ // The rubber band of iOS: as fast as RUBBER at first, never as far as BEYOND_PX; its slope has no kink past the start.
30
+ const past = -width - x;
31
+ return -width - RowSwipeUtil.BEYOND_PX * (1 - 1 / ((past * RowSwipeUtil.RUBBER) / RowSwipeUtil.BEYOND_PX + 1));
21
32
  }
22
33
  RowSwipeUtil.offset = offset;
23
- /** Whether it stays open, let go at `speed` (pixels a millisecond, SwipeVelocity) after moving `dx`. */
24
- function settle(dx, width, open, speed) {
34
+ /** Where the finger would be for the row at `offset`: the other way from `offset`, so that a row taken past its actions does not jump. */
35
+ function finger(offset, width) {
36
+ if (offset >= -width) {
37
+ return offset;
38
+ }
39
+ const past = Math.min(-width - offset, RowSwipeUtil.BEYOND_PX - 0.01);
40
+ return -width - (RowSwipeUtil.BEYOND_PX / RowSwipeUtil.RUBBER) * (1 / (1 - past / RowSwipeUtil.BEYOND_PX) - 1);
41
+ }
42
+ RowSwipeUtil.finger = finger;
43
+ /** Whether it stays open, let go at `offset` at `speed` (pixels a millisecond, SwipeVelocity): flicked, the way it was; else where it is headed. */
44
+ function settle(offset, width, speed) {
25
45
  if (Math.abs(speed) > SwipeUtil.FLICK) {
26
46
  return speed < 0;
27
47
  }
28
- return offset(dx, width, open) < -width / 2;
48
+ return offset + speed * RowSwipeUtil.PROJECT_MS < -width / 2;
29
49
  }
30
50
  RowSwipeUtil.settle = settle;
51
+ /**
52
+ * How far the finger has moved the row, `dx` since the move was told a swipe, `lag` before (the few pixels
53
+ * that told it): from where it was, without a jump, a little faster than the finger until it is where the
54
+ * finger says (CATCH_PX), as if it had followed it from the start.
55
+ */
56
+ function follow(dx, lag) {
57
+ return dx + lag * Math.min(1, Math.abs(dx) / RowSwipeUtil.CATCH_PX);
58
+ }
59
+ RowSwipeUtil.follow = follow;
60
+ /**
61
+ * How far each action is pushed to the right of where it rests, the row at `offset`: they come out with the
62
+ * row's edge, as iOS's, the first one at it, the others spread over what is shown (`share`, 1 - its index
63
+ * of how many there are: 1 for the first, less for those after).
64
+ */
65
+ function shift(offset, width, share) {
66
+ return (width + offset) * share;
67
+ }
68
+ RowSwipeUtil.shift = shift;
31
69
  /** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
32
70
  function claims(dx, dy, open) {
33
71
  if (Math.hypot(dx, dy) < SwipeUtil.SLOP_PX) {
@@ -41,15 +79,27 @@ export var RowSwipeUtil;
41
79
  let opened;
42
80
  /** What slides in a row (SwipeRow): its content, over its actions. */
43
81
  const CONTENT = ':scope > .ta-swipe-content';
44
- const ACTIONS = ':scope > .ta-swipe-actions';
82
+ const ACTION = ':scope > .ta-swipe-actions > .ta-swipe-action';
45
83
  /** A tap: from the finger down to its click, at most. */
46
84
  const TAP_MS = 600;
85
+ /** Where each of `buttons` is, the row at `offset` (RowSwipeUtil.shift). */
86
+ function actionTargets(buttons, offset, width) {
87
+ return buttons.map((element, index) => ({
88
+ element,
89
+ transform: `translate3d(${RowSwipeUtil.shift(offset, width, 1 - index / buttons.length)}px, 0, 0)`,
90
+ }));
91
+ }
47
92
  /**
48
93
  * Lets a finger swipe the row of `ref` (a SwipeRow) while `enabled`: its content moves over its actions, whose
49
- * width is the way to go, and slides on at the speed the finger left it. Its listeners are passive (the row has
50
- * `touch-action: pan-y`), so the list scrolls on the compositor; each move only sets a transform. The style says
51
- * where an open row rests (`data-swiped`); the row clips what slides out of it only while it is moved, open or
52
- * on its way back (`data-swipe-clip`), so that a menu of the row is not cut at its edges.
94
+ * width is the way to go, and they come out with its edge (RowSwipeUtil.shift); let go, all slide on as on a
95
+ * spring from the speed the finger left them (SwipeSettle). The row sets off from where the move is told a swipe
96
+ * and catches up with the finger (RowSwipeUtil.follow), so it never jumps under it; past its actions it stretches less and
97
+ * less. Open, it closes when the finger scrolls the list from it, or holds it for its menu. Its
98
+ * listeners are passive (the row has `touch-action: pan-y`), so the list scrolls on the compositor; each move
99
+ * only sets a transform. The finger is followed on what it touched (SwipeFinger), so that a row drawn again
100
+ * under it does not stop half way. The style says where an open row rests (`data-swiped`); the row clips
101
+ * what slides out of it only while it is moved, open or on its way back (`data-swipe-clip`), so that a menu
102
+ * of the row is not cut at its edges.
53
103
  */
54
104
  export function useRowSwipe(ref, enabled) {
55
105
  const [open, setOpen] = React.useState(false);
@@ -62,15 +112,12 @@ export function useRowSwipe(ref, enabled) {
62
112
  return;
63
113
  }
64
114
  let start;
115
+ let last;
65
116
  let claimed;
66
117
  let moved;
67
118
  let unclip;
68
119
  const velocity = new SwipeVelocity();
69
120
  const settle = new SwipeSettle();
70
- const release = (element) => {
71
- delete row.dataset.swiping;
72
- element === null || element === void 0 ? void 0 : element.style.removeProperty('transform');
73
- };
74
121
  const clip = (on, after = 0) => {
75
122
  clearTimeout(unclip);
76
123
  if (on) {
@@ -80,38 +127,38 @@ export function useRowSwipe(ref, enabled) {
80
127
  unclip = setTimeout(() => delete row.dataset.swipeClip, after);
81
128
  }
82
129
  };
83
- const onStart = (event) => {
84
- const touch = event.touches[0];
85
- claimed = undefined;
86
- // A swipe from the edge a sheet comes from is the sheet's (useSheetSwipe's edgeOver), not the row's.
87
- const side = document.documentElement.dataset.edgeSwipe;
88
- const edge = !!touch && (side === 'right' ? touch.clientX >= window.innerWidth - SwipeUtil.EDGE_PX : side === 'left' && touch.clientX <= SwipeUtil.EDGE_PX);
89
- start = event.touches.length === 1 && touch && !edge ? { x: touch.clientX, y: touch.clientY, t: event.timeStamp } : undefined;
90
- if (start) {
91
- velocity.start(start);
92
- }
93
- };
94
- const onMove = (event) => {
95
- var _a;
96
- var _b;
97
- const touch = event.touches[0];
98
- if (!start || !touch || claimed === false) {
130
+ const onMove = (event, touch) => {
131
+ if (!start || claimed === false) {
99
132
  return;
100
133
  }
101
- const dx = touch.clientX - start.x;
102
134
  if (claimed === undefined) {
103
- claimed = RowSwipeUtil.claims(dx, touch.clientY - start.y, state.current);
104
- if (!claimed) {
135
+ claimed = RowSwipeUtil.claims(touch.clientX - start.x, touch.clientY - start.y, state.current);
136
+ if (claimed === undefined) {
105
137
  return;
106
138
  }
107
139
  const element = row.querySelector(CONTENT);
108
- const width = (_b = (_a = row.querySelector(ACTIONS)) === null || _a === void 0 ? void 0 : _a.offsetWidth) !== null && _b !== void 0 ? _b : 0;
109
- if (!element || !width) {
140
+ const buttons = [...row.querySelectorAll(ACTION)];
141
+ // The way to go is what the actions fill (their box spans the row, to clip them: style/device.ts).
142
+ const width = buttons.reduce((sum, button) => sum + button.offsetWidth, 0);
143
+ if (!claimed || !element || !width) {
110
144
  claimed = false;
145
+ finger.stop();
146
+ // Open, a scroll from it closes it, as a touch elsewhere does.
147
+ if (state.current) {
148
+ close();
149
+ }
111
150
  return;
112
151
  }
113
- moved = { content: element, width };
114
- settle.clear();
152
+ // From where it is (at rest, or still sliding), and from where the finger is now.
153
+ moved = {
154
+ content: element,
155
+ buttons,
156
+ width,
157
+ from: RowSwipeUtil.finger(translated(element), width),
158
+ x: touch.clientX,
159
+ lag: touch.clientX - start.x,
160
+ };
161
+ settle.hold([element, ...buttons]);
115
162
  clip(true);
116
163
  row.dataset.swiping = '';
117
164
  if (opened && opened !== handle) {
@@ -119,38 +166,77 @@ export function useRowSwipe(ref, enabled) {
119
166
  }
120
167
  }
121
168
  if (moved) {
122
- velocity.add({ x: touch.clientX, y: touch.clientY, t: event.timeStamp });
123
- moved.content.style.transform = `translate3d(${RowSwipeUtil.offset(dx, moved.width, state.current)}px, 0, 0)`;
169
+ last = { x: touch.clientX, y: touch.clientY, t: event.timeStamp };
170
+ velocity.add(last);
171
+ const x = RowSwipeUtil.offset(moved.from + RowSwipeUtil.follow(touch.clientX - moved.x, moved.lag), moved.width);
172
+ moved.content.style.transform = `translate3d(${x}px, 0, 0)`;
173
+ for (const { element, transform } of actionTargets(moved.buttons, x, moved.width)) {
174
+ element.style.transform = transform;
175
+ }
124
176
  }
125
177
  };
126
- const onEnd = (event) => {
127
- var _a, _b;
178
+ const onEnd = (event, touch) => {
128
179
  if (start && moved) {
129
- const end = event.changedTouches[0];
130
- const x = (_a = end === null || end === void 0 ? void 0 : end.clientX) !== null && _a !== void 0 ? _a : start.x;
131
- velocity.add({ x, y: (_b = end === null || end === void 0 ? void 0 : end.clientY) !== null && _b !== void 0 ? _b : start.y, t: event.timeStamp });
132
- const speed = velocity.speed;
133
- const next = RowSwipeUtil.settle(x - start.x, moved.width, state.current, speed);
134
- const from = RowSwipeUtil.offset(x - start.x, moved.width, state.current);
135
- const ms = SwipeUtil.duration((next ? -moved.width : 0) - from, speed, RowSwipeUtil.SETTLE_MS);
136
- show(next, ms);
137
- // Released in the frame the row takes its place, so that it slides on from where the finger left it, at its speed.
138
- const element = moved.content;
139
- requestAnimationFrame(() => {
140
- settle.run(ms, [element]);
141
- release(element);
142
- });
180
+ const end = touch ? { x: touch.clientX, y: touch.clientY, t: event.timeStamp } : (last !== null && last !== void 0 ? last : start);
181
+ if (touch) {
182
+ velocity.add(end);
183
+ }
184
+ // Taken by the system (a call, the app put away), it goes to the nearer side, not the way it was going.
185
+ const speed = touch && event.type !== 'touchcancel' ? velocity.speed : 0;
186
+ const { content, buttons, width } = moved;
187
+ const from = RowSwipeUtil.offset(moved.from + RowSwipeUtil.follow(end.x - moved.x, moved.lag), width);
188
+ // Where it ends is told by where the finger is, which the row may not have caught up with yet.
189
+ const next = RowSwipeUtil.settle(RowSwipeUtil.offset(moved.from + end.x - start.x, width), width, speed);
190
+ const rest = next ? -width : 0;
191
+ // Stretched past its actions, the row went slower than the finger: it goes back as fast as it went.
192
+ const along = from < -width ? speed * RowSwipeUtil.RUBBER : speed;
193
+ const motion = SwipeUtil.motion(from, rest, along, RowSwipeUtil.SETTLE_MS, [-width - RowSwipeUtil.BEYOND_PX, 0]);
194
+ settle.run(motion, [{ element: content, transform: `translate3d(${rest}px, 0, 0)` }, ...actionTargets(buttons, rest, width)], () => state.current === next, () => delete row.dataset.swiping);
195
+ show(next, motion.ms);
143
196
  }
144
197
  start = undefined;
198
+ last = undefined;
145
199
  moved = undefined;
146
200
  };
147
- const handle = { close: () => show(false) };
148
- closer.current = handle.close;
201
+ const finger = new SwipeFinger({ move: onMove, end: onEnd });
202
+ const onStart = (event) => {
203
+ // Another finger beside the one that swipes it changes nothing.
204
+ if (finger.down && !finger.follow(event, row)) {
205
+ return;
206
+ }
207
+ finger.stop();
208
+ const touch = event.touches[0];
209
+ claimed = undefined;
210
+ // A swipe from the edge a sheet comes from is the sheet's (useSheetSwipe's edgeOver), not the row's.
211
+ const side = document.documentElement.dataset.edgeSwipe;
212
+ const edge = !!touch && (side === 'right' ? touch.clientX >= window.innerWidth - SwipeUtil.EDGE_PX : side === 'left' && touch.clientX <= SwipeUtil.EDGE_PX);
213
+ // A game in the row slides for itself (OwnGestures).
214
+ start =
215
+ touch && !edge && !OwnGestures.within(event.target) && finger.follow(event, row)
216
+ ? { x: touch.clientX, y: touch.clientY, t: event.timeStamp }
217
+ : undefined;
218
+ if (start) {
219
+ velocity.start(start);
220
+ }
221
+ };
222
+ // Closed while it still slides (a tap on it, or elsewhere), it goes back from where it is.
223
+ const close = () => {
224
+ settle.release();
225
+ show(false);
226
+ };
227
+ // Held for its menu (LongPress), it closes first, as the menu is of the row, not of its actions.
228
+ const onMenu = () => {
229
+ if (state.current) {
230
+ close();
231
+ }
232
+ };
233
+ const handle = { close };
234
+ closer.current = close;
149
235
  // Open, a touch anywhere else closes it, and that is all the tap does, as in WeChat; a tap on the row too (SwipeRow).
150
236
  let swallowUntil = 0;
151
237
  const onOutside = (event) => {
152
238
  if (!row.contains(event.target)) {
153
- show(false);
239
+ close();
154
240
  swallowUntil = event.timeStamp + TAP_MS;
155
241
  document.addEventListener('click', swallow, true);
156
242
  }
@@ -178,14 +264,11 @@ export function useRowSwipe(ref, enabled) {
178
264
  }
179
265
  };
180
266
  row.addEventListener('touchstart', onStart, { passive: true });
181
- row.addEventListener('touchmove', onMove, { passive: true });
182
- row.addEventListener('touchend', onEnd, { passive: true });
183
- row.addEventListener('touchcancel', onEnd, { passive: true });
267
+ row.addEventListener('contextmenu', onMenu);
184
268
  return () => {
185
269
  row.removeEventListener('touchstart', onStart);
186
- row.removeEventListener('touchmove', onMove);
187
- row.removeEventListener('touchend', onEnd);
188
- row.removeEventListener('touchcancel', onEnd);
270
+ row.removeEventListener('contextmenu', onMenu);
271
+ finger.stop();
189
272
  document.removeEventListener('touchstart', onOutside);
190
273
  document.removeEventListener('click', swallow, true);
191
274
  if (opened === handle) {
@@ -193,8 +276,8 @@ export function useRowSwipe(ref, enabled) {
193
276
  }
194
277
  clearTimeout(unclip);
195
278
  delete row.dataset.swipeClip;
196
- settle.clear();
197
- release(moved === null || moved === void 0 ? void 0 : moved.content);
279
+ delete row.dataset.swiping;
280
+ settle.finish();
198
281
  closer.current = () => setOpen(false);
199
282
  };
200
283
  }, [ref, enabled]);
@@ -0,0 +1,16 @@
1
+ /** What the app's web view gives the page to tell it whether a shake may offer to undo (TaBridgeViewController of apps/ta-mobile). */
2
+ export interface ShakeUndoBridge {
3
+ postMessage(undo: boolean): void;
4
+ }
5
+ export declare namespace ShakeUndoUtil {
6
+ /** A field of text being edited that has text in it: what a shake may undo is there to see. */
7
+ function hasText(element: Element | null): boolean;
8
+ }
9
+ /**
10
+ * Shake to Undo in the Ta app on iOS only while a field being edited has text in it. The web view keeps what
11
+ * was typed and sent, or typed and put away, to undo: the system would offer to undo it with the field empty,
12
+ * or on a page without a field. The page tells the app when that changes: focus, typing, the selection, and
13
+ * after a key, a tap or a finger let go, which may have the page empty a field itself (a message sent) with no
14
+ * event of the field. Returns how to stop.
15
+ */
16
+ export declare function startShakeUndo(doc: Document, bridge: ShakeUndoBridge): () => void;
@@ -0,0 +1,59 @@
1
+ /** Fields of text: not a checkbox, a slider or a button. */
2
+ const TEXT_FIELD = 'textarea, input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=button], [type=submit], [type=reset], [type=image], [type=hidden])';
3
+ export var ShakeUndoUtil;
4
+ (function (ShakeUndoUtil) {
5
+ /** A field of text being edited that has text in it: what a shake may undo is there to see. */
6
+ function hasText(element) {
7
+ if (!element) {
8
+ return false;
9
+ }
10
+ if (element.matches(TEXT_FIELD)) {
11
+ return element.value !== '';
12
+ }
13
+ return element.isContentEditable === true && !!element.textContent;
14
+ }
15
+ ShakeUndoUtil.hasText = hasText;
16
+ })(ShakeUndoUtil || (ShakeUndoUtil = {}));
17
+ /** What the field may have been told by: at once. */
18
+ const NOW = ['focusin', 'focusout', 'input', 'selectionchange'];
19
+ /** What the page may empty a field after (a message sent with Return, the send button, a talk let go): once it has. */
20
+ const AFTER = ['keyup', 'click', 'touchend'];
21
+ /**
22
+ * Shake to Undo in the Ta app on iOS only while a field being edited has text in it. The web view keeps what
23
+ * was typed and sent, or typed and put away, to undo: the system would offer to undo it with the field empty,
24
+ * or on a page without a field. The page tells the app when that changes: focus, typing, the selection, and
25
+ * after a key, a tap or a finger let go, which may have the page empty a field itself (a message sent) with no
26
+ * event of the field. Returns how to stop.
27
+ */
28
+ export function startShakeUndo(doc, bridge) {
29
+ let told;
30
+ let timer;
31
+ const tell = () => {
32
+ const undo = ShakeUndoUtil.hasText(doc.activeElement);
33
+ if (undo !== told) {
34
+ told = undo;
35
+ bridge.postMessage(undo);
36
+ }
37
+ };
38
+ const later = () => {
39
+ clearTimeout(timer);
40
+ timer = setTimeout(tell, 0);
41
+ };
42
+ for (const type of NOW) {
43
+ doc.addEventListener(type, tell, true);
44
+ }
45
+ for (const type of AFTER) {
46
+ doc.addEventListener(type, later, { capture: true, passive: true });
47
+ }
48
+ tell();
49
+ return () => {
50
+ clearTimeout(timer);
51
+ for (const type of NOW) {
52
+ doc.removeEventListener(type, tell, true);
53
+ }
54
+ for (const type of AFTER) {
55
+ doc.removeEventListener(type, later, { capture: true });
56
+ }
57
+ };
58
+ }
59
+ //# sourceMappingURL=shake-undo.js.map
@@ -41,18 +41,46 @@ export declare namespace SwipeUtil {
41
41
  * the finger scrolls sideways (`sideways`, asked only then: a tap or a scroll never reads the styles).
42
42
  */
43
43
  function takes(sheet: SheetSwipe, start: TouchPoint, now: TouchPoint, open: boolean, sideways: () => boolean): boolean | undefined;
44
- /** Where the sheet is, from 0 (out) to `∓width` (away on its side), when the finger moved `dx`. */
45
- function offset(sheet: SheetSwipe, dx: number, width: number, open: boolean): number;
46
- /** Whether it ends out, let go at `speed` (pixels a millisecond, SwipeVelocity) after moving `dx`. */
47
- function settle(sheet: SheetSwipe, dx: number, width: number, open: boolean, speed: number): boolean;
44
+ /** Where the sheet rests away: `∓width`, on its side; out, it rests at 0. */
45
+ function away(sheet: SheetSwipe, width: number): number;
46
+ /** Where the sheet is, between 0 (out) and away, when the finger moved `dx` from where it took it (`from`). */
47
+ function position(sheet: SheetSwipe, from: number, dx: number, width: number): number;
48
+ /** Whether it ends out, let go at `x` at `speed` (pixels a millisecond, SwipeVelocity): the way it was flicked, or the nearer side. */
49
+ function settle(sheet: SheetSwipe, x: number, width: number, speed: number): boolean;
48
50
  /**
49
- * How long it slides on to where it rests, `distance` away (signed), let go at `speed`: as fast at first as
50
- * the finger was, so that a flick goes on at its speed rather than at that of the style; `longest` (the
51
- * style's) when the finger was slow, or going the other way.
51
+ * How long it slides on to where it rests, `distance` away (signed), let go at `speed`, where the curves of
52
+ * `linear()` are not (SwipeSpring): on CURVE, as fast at first as the finger was; `longest` (the style's)
53
+ * when the finger was slow, or going the other way.
52
54
  */
53
55
  function duration(distance: number, speed: number, longest: number): number;
54
- /** The transitions of an element that slides on from where the finger left it, for `ms`; it hides at its end. */
55
- function transition(ms: number, property?: 'transform' | 'opacity'): string;
56
+ /** Whether the page draws the curves of `linear()` (iOS 17.2, Chrome 113 on): a spring then, else CURVE. */
57
+ const springs: boolean;
58
+ /**
59
+ * How what the finger let go at `from` at `speed` slides on to `to`, never past `bounds`: a spring that starts at
60
+ * the speed of the finger where the page draws it (SwipeSpring), else CURVE for `duration`. `longest` is how long
61
+ * its style slides it.
62
+ */
63
+ function motion(from: number, to: number, speed: number, longest: number, bounds?: [number, number]): SwipeMotion;
64
+ }
65
+ /** How something let go slides on: for `ms`, on `easing`. */
66
+ export interface SwipeMotion {
67
+ ms: number;
68
+ easing: string;
69
+ }
70
+ /**
71
+ * What a finger lets go slides on as on a spring, as the sheets of iOS: at the speed the finger had, slowing
72
+ * down to where it rests, never past it; going the other way, it goes on a little that way first, as far as it
73
+ * may. A sheet let go near where it rests settles there quickly, one let go far away takes its time. Drawn by
74
+ * the compositor as a CSS transition, its curve a `linear()` of the spring's points. Pure, for the tests.
75
+ */
76
+ export declare namespace SwipeSpring {
77
+ /** How stiff, for what its style slides in `longest` ms: ω = STIFFNESS / longest, 95% of the way in about 0.6 × longest from rest. */
78
+ const STIFFNESS = 8;
79
+ /** It rests once nearer than this, in pixels. */
80
+ const REST_PX = 0.5;
81
+ /** How far it still is from where it rests, of the way, after `t` ms: critically damped, at `speed` (of the way a millisecond) at first. */
82
+ function left(t: number, omega: number, speed: number): number;
83
+ function motion(from: number, to: number, speed: number, longest: number, bounds?: [number, number]): SwipeMotion;
56
84
  }
57
85
  /**
58
86
  * The speed of a finger along x, in pixels a millisecond, of its last moves (SwipeUtil.VELOCITY_MS): let go
@@ -67,17 +95,87 @@ export declare class SwipeVelocity {
67
95
  add(point: TouchPoint): void;
68
96
  get speed(): number;
69
97
  }
98
+ /** What an element let go goes to: a transform, an opacity. */
99
+ export interface SettleTarget {
100
+ element: HTMLElement | null | undefined;
101
+ transform?: string;
102
+ opacity?: number;
103
+ }
70
104
  /**
71
- * What slides on, let go, at the speed of the finger (SwipeUtil.duration) rather than of its style; the
72
- * style's again once it rests, or as soon as a finger takes it again.
105
+ * The elements a finger moves, then lets go (SwipeMotion): while it moves them their styles do not slide
106
+ * them; let go, they slide on to where they rest with transitions of their own, and only once they are there,
107
+ * and the state has them there too (`ready`), they are their styles' again. So the slide starts in the frame
108
+ * the finger lets go, before the page draws what the state changed (which may take a while: a long
109
+ * conversation), and never jumps if it takes longer than the slide. A finger that takes one of them again, or
110
+ * another swipe that moves it, stops it where it is now.
73
111
  */
74
112
  export declare class SwipeSettle {
113
+ /** How long it waits for the state, past the slide, before giving the elements back anyway. */
114
+ static readonly READY_MS = 1000;
115
+ protected readonly elements: Set<HTMLElement>;
75
116
  protected timer?: ReturnType<typeof setTimeout>;
76
- protected elements: HTMLElement[];
77
- run(ms: number, slides: (HTMLElement | null | undefined)[], fades?: (HTMLElement | null | undefined)[]): void;
78
- clear(): void;
79
- /** An element that both slides and fades takes both transitions. */
80
- protected set(element: HTMLElement | null | undefined, transition: string): void;
117
+ protected done?: () => void;
118
+ /** Whether some of its elements are still its own: moved, or sliding on. */
119
+ get busy(): boolean;
120
+ /** A finger moves these: each stops where it is, whatever slid it, and its style no longer slides it. */
121
+ hold(elements: (HTMLElement | null | undefined)[]): void;
122
+ /**
123
+ * Let go, each slides on to its target as `motion` says; once there and `ready()`, they are their styles'
124
+ * again and `done` runs.
125
+ */
126
+ run(motion: SwipeMotion, targets: SettleTarget[], ready: () => boolean, done?: () => void): void;
127
+ /** They are their styles' again at once, where those say they rest, without sliding there. */
128
+ finish(): void;
129
+ /** They are their styles' again from where they are now: the styles slide them on to where they rest. */
130
+ release(): void;
131
+ protected giveBack(slide: boolean): void;
132
+ protected static clean(element: HTMLElement, holder: SwipeSettle): void;
133
+ /** Takes `element` from the settle that has it, stopped where it is. */
134
+ protected take(element: HTMLElement): void;
135
+ /** What slides stops where it is now. */
136
+ protected freeze(element: HTMLElement): void;
137
+ }
138
+ /**
139
+ * What a swipe let go changes in the state of the page, once the frame it was let go in is drawn and its slide
140
+ * set off (FrameUtil.painted), or after a while where frames are not drawn (a page out of sight); only if it
141
+ * changes something: the workbench is put away by the same call that brings it out.
142
+ */
143
+ export declare function afterLetGo(open: boolean, current: () => {
144
+ open: boolean;
145
+ setOpen(open: boolean): void;
146
+ }): void;
147
+ /** Where `element` is moved along `axis` now, by its transform: wherever a style or a slide has it. */
148
+ export declare function translated(element: HTMLElement, axis?: 'x' | 'y'): number;
149
+ /** Where and when a finger is, of a touch. */
150
+ export interface SwipeFingerHandlers {
151
+ move(event: TouchEvent, touch: Touch): void;
152
+ /** Lifted, or taken by the system; `touch` is none when its end was never seen (a finger put down after it). */
153
+ end(event: TouchEvent, touch: Touch | undefined): void;
154
+ }
155
+ /**
156
+ * The one finger a swipe follows, from its touchstart. Its moves and its end are listened to on the element
157
+ * it was put down on, which keeps getting them when it leaves the page (a row or a message drawn again under
158
+ * the finger) while the document no longer does, and on the document too, each event once. Another finger put
159
+ * down or lifted beside it is not its own; its end never seen, the next finger put down ends it.
160
+ */
161
+ export declare class SwipeFinger {
162
+ protected readonly on: SwipeFingerHandlers;
163
+ protected readonly blocking: boolean;
164
+ protected id?: number;
165
+ protected targets: EventTarget[];
166
+ protected last?: Event;
167
+ /** `blocking`: its moves may be held back (preventDefault), so their listener is not passive. */
168
+ constructor(on: SwipeFingerHandlers, blocking?: boolean);
169
+ get down(): boolean;
170
+ /**
171
+ * Follows the finger `event` (a touchstart in `doc`) put down, alone on the screen; false while it follows
172
+ * another, which is still down, or when several are.
173
+ */
174
+ follow(event: TouchEvent, doc: EventTarget): boolean;
175
+ stop(): void;
176
+ protected find(touches: TouchList): Touch | undefined;
177
+ protected readonly onMove: (event: TouchEvent) => void;
178
+ protected readonly onEnd: (event: TouchEvent) => void;
81
179
  }
82
180
  export interface SheetSwipeOptions extends SheetSwipe {
83
181
  enabled: boolean;
@@ -103,7 +201,9 @@ export interface SheetSwipeOptions extends SheetSwipe {
103
201
  * Lets the finger move a sheet while `enabled`, then `setOpen` says where it ended; its style says where it
104
202
  * rests. Smooth on a long conversation: each move only sets transforms and an opacity, which the compositor
105
203
  * draws, never a style the page inherits; the page keeps scrolling on the compositor too, as the listener that
106
- * may hold a move back is only there while a touch may be the sheet's. A touch in a frame the page may read
107
- * moves it as well (TouchSources).
204
+ * may hold a move back is only there while a touch may be the sheet's. Let go, it slides on at once, as on a
205
+ * spring (SwipeSettle, SwipeSpring), and the state changes in the frames after, so that what the page draws
206
+ * for it never holds the sheet still half way. A sheet still sliding, the finger takes it where it is. A touch
207
+ * in a frame the page may read moves it as well (TouchSources).
108
208
  */
109
209
  export declare function useSheetSwipe(options: SheetSwipeOptions): void;