@celljs/ta-web 4.9.0 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/README.en.md +4 -3
  2. package/README.md +4 -3
  3. package/esm/browser/assistant/assistant-chat-list.js +8 -2
  4. package/esm/browser/assistant/assistant-extension.d.ts +8 -1
  5. package/esm/browser/assistant/assistant-extension.js +33 -5
  6. package/esm/browser/assistant/assistant-protocol.d.ts +3 -1
  7. package/esm/browser/assistant/assistant-task-source.d.ts +2 -0
  8. package/esm/browser/assistant/assistant-task-source.js +2 -0
  9. package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
  10. package/esm/browser/assistant/assistant-task-util.js +13 -3
  11. package/esm/browser/assistant/assistant-tasks.js +3 -2
  12. package/esm/browser/assistant/assistant-view.js +81 -56
  13. package/esm/browser/assistant/assistant.d.ts +30 -1
  14. package/esm/browser/assistant/assistant.js +89 -6
  15. package/esm/browser/assistant/task-views.d.ts +40 -6
  16. package/esm/browser/assistant/task-views.js +73 -21
  17. package/esm/browser/avatar/dino-avatar.d.ts +3 -4
  18. package/esm/browser/avatar/dino-avatar.js +4 -178
  19. package/esm/browser/avatar/dino-face.d.ts +19 -0
  20. package/esm/browser/avatar/dino-face.js +142 -0
  21. package/esm/browser/avatar/dino-geometry.d.ts +11 -0
  22. package/esm/browser/avatar/dino-geometry.js +38 -0
  23. package/esm/browser/avatar/dino-kinds.d.ts +15 -0
  24. package/esm/browser/avatar/dino-kinds.js +544 -0
  25. package/esm/browser/avatar/dino-motion.js +1 -1
  26. package/esm/browser/avatar/dino-shape.d.ts +80 -0
  27. package/esm/browser/avatar/dino-shape.js +113 -0
  28. package/esm/browser/avatar/dino-species.d.ts +1 -61
  29. package/esm/browser/avatar/dino-species.js +2 -653
  30. package/esm/browser/chat/chat-packages.d.ts +39 -0
  31. package/esm/browser/chat/chat-packages.js +70 -0
  32. package/esm/browser/chat/chat-protocol.d.ts +23 -1
  33. package/esm/browser/chat/chat-stores.d.ts +59 -0
  34. package/esm/browser/chat/chat-stores.js +121 -0
  35. package/esm/browser/chat/chat-util.d.ts +17 -0
  36. package/esm/browser/chat/chat-util.js +61 -0
  37. package/esm/browser/chat/chat-view.js +33 -12
  38. package/esm/browser/chat/chat.d.ts +31 -39
  39. package/esm/browser/chat/chat.js +226 -175
  40. package/esm/browser/components/access-view.js +1 -1
  41. package/esm/browser/components/account-menu.js +1 -1
  42. package/esm/browser/components/app-nav.d.ts +6 -3
  43. package/esm/browser/components/app-nav.js +19 -10
  44. package/esm/browser/components/app-shell-hooks.d.ts +47 -0
  45. package/esm/browser/components/app-shell-hooks.js +169 -0
  46. package/esm/browser/components/app-view.js +81 -172
  47. package/esm/browser/components/auth-view.js +1 -1
  48. package/esm/browser/components/chat-list.d.ts +20 -2
  49. package/esm/browser/components/chat-list.js +138 -22
  50. package/esm/browser/components/composer-box.d.ts +5 -5
  51. package/esm/browser/components/composer-box.js +111 -4
  52. package/esm/browser/components/composer.d.ts +7 -0
  53. package/esm/browser/components/composer.js +22 -14
  54. package/esm/browser/components/connection-bar.js +50 -17
  55. package/esm/browser/components/context-menu.d.ts +30 -4
  56. package/esm/browser/components/context-menu.js +199 -37
  57. package/esm/browser/components/conversation-scroll.d.ts +129 -6
  58. package/esm/browser/components/conversation-scroll.js +429 -109
  59. package/esm/browser/components/dino.js +1 -1
  60. package/esm/browser/components/earlier-messages.d.ts +2 -1
  61. package/esm/browser/components/earlier-messages.js +2 -17
  62. package/esm/browser/components/editor-area.d.ts +3 -1
  63. package/esm/browser/components/editor-area.js +6 -5
  64. package/esm/browser/components/empty-pictures.d.ts +0 -2
  65. package/esm/browser/components/empty-pictures.js +0 -16
  66. package/esm/browser/components/folder-picker.d.ts +5 -2
  67. package/esm/browser/components/folder-picker.js +30 -9
  68. package/esm/browser/components/held-talk.d.ts +28 -0
  69. package/esm/browser/components/held-talk.js +76 -0
  70. package/esm/browser/components/host-view.d.ts +1 -1
  71. package/esm/browser/components/host-view.js +1 -1
  72. package/esm/browser/components/icon.d.ts +2 -2
  73. package/esm/browser/components/icon.js +5 -6
  74. package/esm/browser/components/image-viewer.d.ts +124 -0
  75. package/esm/browser/components/image-viewer.js +397 -0
  76. package/esm/browser/components/lightbox.d.ts +11 -0
  77. package/esm/browser/components/lightbox.js +24 -0
  78. package/esm/browser/components/markdown.d.ts +6 -2
  79. package/esm/browser/components/markdown.js +24 -10
  80. package/esm/browser/components/media.js +1 -10
  81. package/esm/browser/components/message-footer.d.ts +16 -2
  82. package/esm/browser/components/message-footer.js +29 -12
  83. package/esm/browser/components/message-list.d.ts +24 -3
  84. package/esm/browser/components/message-list.js +149 -20
  85. package/esm/browser/components/message-menu.d.ts +3 -1
  86. package/esm/browser/components/message-menu.js +18 -3
  87. package/esm/browser/components/nav-places.d.ts +16 -1
  88. package/esm/browser/components/nav-places.js +12 -3
  89. package/esm/browser/components/phone-shell.d.ts +4 -1
  90. package/esm/browser/components/phone-shell.js +3 -1
  91. package/esm/browser/components/run-status.js +3 -3
  92. package/esm/browser/components/select-bar.d.ts +9 -0
  93. package/esm/browser/components/select-bar.js +24 -0
  94. package/esm/browser/components/session-settings.d.ts +6 -0
  95. package/esm/browser/components/session-settings.js +14 -1
  96. package/esm/browser/components/session-view.js +8 -4
  97. package/esm/browser/components/settings-choices.d.ts +35 -0
  98. package/esm/browser/components/settings-choices.js +117 -0
  99. package/esm/browser/components/settings-parts.d.ts +21 -0
  100. package/esm/browser/components/settings-parts.js +323 -0
  101. package/esm/browser/components/settings-view.d.ts +0 -6
  102. package/esm/browser/components/settings-view.js +4 -406
  103. package/esm/browser/components/swipe-row.d.ts +2 -2
  104. package/esm/browser/components/swipe-row.js +7 -3
  105. package/esm/browser/components/tool-view.js +14 -12
  106. package/esm/browser/components/voice-button.d.ts +1 -1
  107. package/esm/browser/components/voice-button.js +1 -1
  108. package/esm/browser/components/voice-talk.d.ts +43 -0
  109. package/esm/browser/components/voice-talk.js +222 -0
  110. package/esm/browser/components/workbench-view.js +1 -1
  111. package/esm/browser/device/device.d.ts +3 -0
  112. package/esm/browser/device/device.js +11 -1
  113. package/esm/browser/device/hold.d.ts +42 -0
  114. package/esm/browser/device/hold.js +136 -0
  115. package/esm/browser/device/launch-screen.d.ts +1 -1
  116. package/esm/browser/device/launch-screen.js +1 -1
  117. package/esm/browser/device/long-press.d.ts +2 -0
  118. package/esm/browser/device/long-press.js +16 -1
  119. package/esm/browser/device/pull-down.d.ts +4 -2
  120. package/esm/browser/device/pull-down.js +64 -76
  121. package/esm/browser/device/row-swipe.d.ts +35 -10
  122. package/esm/browser/device/row-swipe.js +149 -71
  123. package/esm/browser/device/shake-undo.d.ts +16 -0
  124. package/esm/browser/device/shake-undo.js +59 -0
  125. package/esm/browser/device/sheet-swipe.d.ts +118 -18
  126. package/esm/browser/device/sheet-swipe.js +406 -107
  127. package/esm/browser/extension/icons.js +2 -1
  128. package/esm/browser/extension/web-extension-api.d.ts +135 -2
  129. package/esm/browser/extension/web-extension-code.d.ts +6 -0
  130. package/esm/browser/extension/web-extension-code.js +24 -0
  131. package/esm/browser/extension/web-extension-protocol.d.ts +23 -1
  132. package/esm/browser/extension/web-extension-protocol.js +8 -0
  133. package/esm/browser/extension/web-extensions.d.ts +14 -1
  134. package/esm/browser/extension/web-extensions.js +128 -24
  135. package/esm/browser/extension/web-tasks.d.ts +9 -1
  136. package/esm/browser/extension/web-tasks.js +24 -0
  137. package/esm/browser/files/files-protocol.d.ts +25 -0
  138. package/esm/browser/files/files-protocol.js +2 -0
  139. package/esm/browser/files/files.d.ts +35 -0
  140. package/esm/browser/files/files.js +119 -0
  141. package/esm/browser/hooks.d.ts +3 -1
  142. package/esm/browser/hooks.js +8 -0
  143. package/esm/browser/i18n/locales.d.ts +29 -2
  144. package/esm/browser/i18n/messages.d.ts +28 -1
  145. package/esm/browser/i18n/messages.js +58 -4
  146. package/esm/browser/index.d.ts +6 -0
  147. package/esm/browser/index.js +6 -0
  148. package/esm/browser/notices/notices-protocol.d.ts +9 -1
  149. package/esm/browser/notices/notices.d.ts +2 -0
  150. package/esm/browser/notices/notices.js +20 -10
  151. package/esm/browser/offline/device-values.d.ts +55 -0
  152. package/esm/browser/offline/device-values.js +142 -0
  153. package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
  154. package/esm/browser/offline/kept-chats-protocol.js +2 -0
  155. package/esm/browser/offline/kept-chats.d.ts +47 -0
  156. package/esm/browser/offline/kept-chats.js +146 -0
  157. package/esm/browser/offline/offline-reads.d.ts +44 -0
  158. package/esm/browser/offline/offline-reads.js +107 -0
  159. package/esm/browser/settings/settings-protocol.d.ts +2 -0
  160. package/esm/browser/settings/settings-protocol.js +2 -0
  161. package/esm/browser/style/conversation.d.ts +1 -1
  162. package/esm/browser/style/conversation.js +57 -17
  163. package/esm/browser/style/device.js +43 -4
  164. package/esm/browser/style/layout.d.ts +1 -1
  165. package/esm/browser/style/layout.js +67 -15
  166. package/esm/browser/style/pages.d.ts +1 -1
  167. package/esm/browser/style/pages.js +2 -1
  168. package/esm/browser/style/shell.d.ts +1 -1
  169. package/esm/browser/style/shell.js +47 -3
  170. package/esm/browser/style/tasks.d.ts +1 -1
  171. package/esm/browser/style/tasks.js +2 -0
  172. package/esm/browser/util/frame.d.ts +5 -4
  173. package/esm/browser/util/frame.js +5 -4
  174. package/esm/browser/util/markdown.d.ts +18 -1
  175. package/esm/browser/util/markdown.js +119 -5
  176. package/esm/browser/util/process.d.ts +21 -0
  177. package/esm/browser/util/process.js +45 -1
  178. package/esm/browser/util/voice.d.ts +5 -2
  179. package/esm/browser/util/voice.js +6 -3
  180. package/esm/browser/util/zoom.d.ts +46 -0
  181. package/esm/browser/util/zoom.js +96 -0
  182. package/esm/browser/workbench-calls.d.ts +59 -0
  183. package/esm/browser/workbench-calls.js +141 -0
  184. package/esm/browser/workbench-protocol.d.ts +5 -1
  185. package/esm/browser/workbench-util.d.ts +68 -0
  186. package/esm/browser/workbench-util.js +145 -0
  187. package/esm/browser/workbench.d.ts +15 -42
  188. package/esm/browser/workbench.js +53 -167
  189. package/lib/browser/assistant/assistant-chat-list.js +8 -2
  190. package/lib/browser/assistant/assistant-extension.d.ts +8 -1
  191. package/lib/browser/assistant/assistant-extension.js +33 -5
  192. package/lib/browser/assistant/assistant-protocol.d.ts +3 -1
  193. package/lib/browser/assistant/assistant-task-source.d.ts +2 -0
  194. package/lib/browser/assistant/assistant-task-source.js +2 -0
  195. package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
  196. package/lib/browser/assistant/assistant-task-util.js +13 -3
  197. package/lib/browser/assistant/assistant-tasks.js +2 -1
  198. package/lib/browser/assistant/assistant-view.js +78 -53
  199. package/lib/browser/assistant/assistant.d.ts +30 -1
  200. package/lib/browser/assistant/assistant.js +89 -6
  201. package/lib/browser/assistant/task-views.d.ts +40 -6
  202. package/lib/browser/assistant/task-views.js +74 -21
  203. package/lib/browser/avatar/dino-avatar.d.ts +3 -4
  204. package/lib/browser/avatar/dino-avatar.js +27 -202
  205. package/lib/browser/avatar/dino-face.d.ts +20 -0
  206. package/lib/browser/avatar/dino-face.js +148 -0
  207. package/lib/browser/avatar/dino-geometry.d.ts +12 -0
  208. package/lib/browser/avatar/dino-geometry.js +47 -0
  209. package/lib/browser/avatar/dino-kinds.d.ts +16 -0
  210. package/lib/browser/avatar/dino-kinds.js +547 -0
  211. package/lib/browser/avatar/dino-motion.js +2 -2
  212. package/lib/browser/avatar/dino-shape.d.ts +81 -0
  213. package/lib/browser/avatar/dino-shape.js +126 -0
  214. package/lib/browser/avatar/dino-species.d.ts +1 -61
  215. package/lib/browser/avatar/dino-species.js +34 -687
  216. package/lib/browser/chat/chat-packages.d.ts +40 -0
  217. package/lib/browser/chat/chat-packages.js +74 -0
  218. package/lib/browser/chat/chat-protocol.d.ts +23 -1
  219. package/lib/browser/chat/chat-stores.d.ts +60 -0
  220. package/lib/browser/chat/chat-stores.js +125 -0
  221. package/lib/browser/chat/chat-util.d.ts +18 -0
  222. package/lib/browser/chat/chat-util.js +64 -0
  223. package/lib/browser/chat/chat-view.js +33 -12
  224. package/lib/browser/chat/chat.d.ts +31 -39
  225. package/lib/browser/chat/chat.js +227 -176
  226. package/lib/browser/components/access-view.js +2 -2
  227. package/lib/browser/components/account-menu.js +2 -2
  228. package/lib/browser/components/app-nav.d.ts +6 -3
  229. package/lib/browser/components/app-nav.js +17 -8
  230. package/lib/browser/components/app-shell-hooks.d.ts +48 -0
  231. package/lib/browser/components/app-shell-hooks.js +211 -0
  232. package/lib/browser/components/app-view.js +89 -180
  233. package/lib/browser/components/auth-view.js +3 -3
  234. package/lib/browser/components/chat-list.d.ts +20 -2
  235. package/lib/browser/components/chat-list.js +137 -21
  236. package/lib/browser/components/composer-box.d.ts +5 -5
  237. package/lib/browser/components/composer-box.js +111 -4
  238. package/lib/browser/components/composer.d.ts +7 -0
  239. package/lib/browser/components/composer.js +22 -14
  240. package/lib/browser/components/connection-bar.js +48 -15
  241. package/lib/browser/components/context-menu.d.ts +30 -4
  242. package/lib/browser/components/context-menu.js +198 -36
  243. package/lib/browser/components/conversation-scroll.d.ts +129 -6
  244. package/lib/browser/components/conversation-scroll.js +431 -110
  245. package/lib/browser/components/dino.js +3 -3
  246. package/lib/browser/components/earlier-messages.d.ts +2 -1
  247. package/lib/browser/components/earlier-messages.js +2 -17
  248. package/lib/browser/components/editor-area.d.ts +3 -1
  249. package/lib/browser/components/editor-area.js +5 -4
  250. package/lib/browser/components/empty-pictures.d.ts +0 -2
  251. package/lib/browser/components/empty-pictures.js +0 -17
  252. package/lib/browser/components/folder-picker.d.ts +5 -2
  253. package/lib/browser/components/folder-picker.js +30 -9
  254. package/lib/browser/components/held-talk.d.ts +29 -0
  255. package/lib/browser/components/held-talk.js +79 -0
  256. package/lib/browser/components/host-view.d.ts +1 -1
  257. package/lib/browser/components/host-view.js +5 -5
  258. package/lib/browser/components/icon.d.ts +2 -2
  259. package/lib/browser/components/icon.js +7 -6
  260. package/lib/browser/components/image-viewer.d.ts +125 -0
  261. package/lib/browser/components/image-viewer.js +435 -0
  262. package/lib/browser/components/lightbox.d.ts +12 -0
  263. package/lib/browser/components/lightbox.js +60 -0
  264. package/lib/browser/components/markdown.d.ts +6 -2
  265. package/lib/browser/components/markdown.js +24 -10
  266. package/lib/browser/components/media.js +2 -11
  267. package/lib/browser/components/message-footer.d.ts +16 -2
  268. package/lib/browser/components/message-footer.js +31 -12
  269. package/lib/browser/components/message-list.d.ts +24 -3
  270. package/lib/browser/components/message-list.js +146 -16
  271. package/lib/browser/components/message-menu.d.ts +3 -1
  272. package/lib/browser/components/message-menu.js +17 -2
  273. package/lib/browser/components/nav-places.d.ts +16 -1
  274. package/lib/browser/components/nav-places.js +13 -3
  275. package/lib/browser/components/phone-shell.d.ts +4 -1
  276. package/lib/browser/components/phone-shell.js +3 -1
  277. package/lib/browser/components/run-status.js +3 -3
  278. package/lib/browser/components/select-bar.d.ts +10 -0
  279. package/lib/browser/components/select-bar.js +61 -0
  280. package/lib/browser/components/session-settings.d.ts +6 -0
  281. package/lib/browser/components/session-settings.js +14 -1
  282. package/lib/browser/components/session-view.js +7 -3
  283. package/lib/browser/components/settings-choices.d.ts +36 -0
  284. package/lib/browser/components/settings-choices.js +156 -0
  285. package/lib/browser/components/settings-parts.d.ts +22 -0
  286. package/lib/browser/components/settings-parts.js +359 -0
  287. package/lib/browser/components/settings-view.d.ts +0 -6
  288. package/lib/browser/components/settings-view.js +2 -405
  289. package/lib/browser/components/swipe-row.d.ts +2 -2
  290. package/lib/browser/components/swipe-row.js +7 -3
  291. package/lib/browser/components/tool-view.js +14 -12
  292. package/lib/browser/components/voice-button.d.ts +1 -1
  293. package/lib/browser/components/voice-button.js +1 -1
  294. package/lib/browser/components/voice-talk.d.ts +44 -0
  295. package/lib/browser/components/voice-talk.js +260 -0
  296. package/lib/browser/components/workbench-view.js +3 -3
  297. package/lib/browser/device/device.d.ts +3 -0
  298. package/lib/browser/device/device.js +11 -1
  299. package/lib/browser/device/hold.d.ts +43 -0
  300. package/lib/browser/device/hold.js +173 -0
  301. package/lib/browser/device/launch-screen.d.ts +1 -1
  302. package/lib/browser/device/launch-screen.js +1 -1
  303. package/lib/browser/device/long-press.d.ts +2 -0
  304. package/lib/browser/device/long-press.js +16 -1
  305. package/lib/browser/device/pull-down.d.ts +4 -2
  306. package/lib/browser/device/pull-down.js +63 -75
  307. package/lib/browser/device/row-swipe.d.ts +35 -10
  308. package/lib/browser/device/row-swipe.js +148 -70
  309. package/lib/browser/device/shake-undo.d.ts +17 -0
  310. package/lib/browser/device/shake-undo.js +63 -0
  311. package/lib/browser/device/sheet-swipe.d.ts +118 -18
  312. package/lib/browser/device/sheet-swipe.js +410 -108
  313. package/lib/browser/extension/icons.js +1 -0
  314. package/lib/browser/extension/web-extension-api.d.ts +135 -2
  315. package/lib/browser/extension/web-extension-code.d.ts +6 -0
  316. package/lib/browser/extension/web-extension-code.js +24 -0
  317. package/lib/browser/extension/web-extension-protocol.d.ts +23 -1
  318. package/lib/browser/extension/web-extension-protocol.js +9 -1
  319. package/lib/browser/extension/web-extensions.d.ts +14 -1
  320. package/lib/browser/extension/web-extensions.js +125 -21
  321. package/lib/browser/extension/web-tasks.d.ts +9 -1
  322. package/lib/browser/extension/web-tasks.js +24 -0
  323. package/lib/browser/files/files-protocol.d.ts +26 -0
  324. package/lib/browser/files/files-protocol.js +5 -0
  325. package/lib/browser/files/files.d.ts +36 -0
  326. package/lib/browser/files/files.js +122 -0
  327. package/lib/browser/hooks.d.ts +3 -1
  328. package/lib/browser/hooks.js +9 -0
  329. package/lib/browser/i18n/locales.d.ts +29 -2
  330. package/lib/browser/i18n/messages.d.ts +28 -1
  331. package/lib/browser/i18n/messages.js +58 -4
  332. package/lib/browser/index.d.ts +6 -0
  333. package/lib/browser/index.js +6 -0
  334. package/lib/browser/notices/notices-protocol.d.ts +9 -1
  335. package/lib/browser/notices/notices.d.ts +2 -0
  336. package/lib/browser/notices/notices.js +20 -10
  337. package/lib/browser/offline/device-values.d.ts +56 -0
  338. package/lib/browser/offline/device-values.js +148 -0
  339. package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
  340. package/lib/browser/offline/kept-chats-protocol.js +5 -0
  341. package/lib/browser/offline/kept-chats.d.ts +48 -0
  342. package/lib/browser/offline/kept-chats.js +149 -0
  343. package/lib/browser/offline/offline-reads.d.ts +45 -0
  344. package/lib/browser/offline/offline-reads.js +111 -0
  345. package/lib/browser/settings/settings-protocol.d.ts +2 -0
  346. package/lib/browser/settings/settings-protocol.js +2 -0
  347. package/lib/browser/style/conversation.d.ts +1 -1
  348. package/lib/browser/style/conversation.js +57 -17
  349. package/lib/browser/style/device.js +43 -4
  350. package/lib/browser/style/layout.d.ts +1 -1
  351. package/lib/browser/style/layout.js +67 -15
  352. package/lib/browser/style/pages.d.ts +1 -1
  353. package/lib/browser/style/pages.js +2 -1
  354. package/lib/browser/style/shell.d.ts +1 -1
  355. package/lib/browser/style/shell.js +47 -3
  356. package/lib/browser/style/tasks.d.ts +1 -1
  357. package/lib/browser/style/tasks.js +2 -0
  358. package/lib/browser/util/frame.d.ts +5 -4
  359. package/lib/browser/util/frame.js +5 -4
  360. package/lib/browser/util/markdown.d.ts +18 -1
  361. package/lib/browser/util/markdown.js +119 -5
  362. package/lib/browser/util/process.d.ts +21 -0
  363. package/lib/browser/util/process.js +46 -2
  364. package/lib/browser/util/voice.d.ts +5 -2
  365. package/lib/browser/util/voice.js +6 -3
  366. package/lib/browser/util/zoom.d.ts +47 -0
  367. package/lib/browser/util/zoom.js +99 -0
  368. package/lib/browser/workbench-calls.d.ts +60 -0
  369. package/lib/browser/workbench-calls.js +145 -0
  370. package/lib/browser/workbench-protocol.d.ts +5 -1
  371. package/lib/browser/workbench-util.d.ts +69 -0
  372. package/lib/browser/workbench-util.js +151 -0
  373. package/lib/browser/workbench.d.ts +15 -42
  374. package/lib/browser/workbench.js +74 -189
  375. package/package.json +10 -10
  376. package/public/launch.svg +46 -42
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ShakeUndoUtil = void 0;
4
+ exports.startShakeUndo = startShakeUndo;
5
+ /** Fields of text: not a checkbox, a slider or a button. */
6
+ 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])';
7
+ var ShakeUndoUtil;
8
+ (function (ShakeUndoUtil) {
9
+ /** A field of text being edited that has text in it: what a shake may undo is there to see. */
10
+ function hasText(element) {
11
+ if (!element) {
12
+ return false;
13
+ }
14
+ if (element.matches(TEXT_FIELD)) {
15
+ return element.value !== '';
16
+ }
17
+ return element.isContentEditable === true && !!element.textContent;
18
+ }
19
+ ShakeUndoUtil.hasText = hasText;
20
+ })(ShakeUndoUtil || (exports.ShakeUndoUtil = ShakeUndoUtil = {}));
21
+ /** What the field may have been told by: at once. */
22
+ const NOW = ['focusin', 'focusout', 'input', 'selectionchange'];
23
+ /** What the page may empty a field after (a message sent with Return, the send button, a talk let go): once it has. */
24
+ const AFTER = ['keyup', 'click', 'touchend'];
25
+ /**
26
+ * Shake to Undo in the Ta app on iOS only while a field being edited has text in it. The web view keeps what
27
+ * was typed and sent, or typed and put away, to undo: the system would offer to undo it with the field empty,
28
+ * or on a page without a field. The page tells the app when that changes: focus, typing, the selection, and
29
+ * after a key, a tap or a finger let go, which may have the page empty a field itself (a message sent) with no
30
+ * event of the field. Returns how to stop.
31
+ */
32
+ function startShakeUndo(doc, bridge) {
33
+ let told;
34
+ let timer;
35
+ const tell = () => {
36
+ const undo = ShakeUndoUtil.hasText(doc.activeElement);
37
+ if (undo !== told) {
38
+ told = undo;
39
+ bridge.postMessage(undo);
40
+ }
41
+ };
42
+ const later = () => {
43
+ clearTimeout(timer);
44
+ timer = setTimeout(tell, 0);
45
+ };
46
+ for (const type of NOW) {
47
+ doc.addEventListener(type, tell, true);
48
+ }
49
+ for (const type of AFTER) {
50
+ doc.addEventListener(type, later, { capture: true, passive: true });
51
+ }
52
+ tell();
53
+ return () => {
54
+ clearTimeout(timer);
55
+ for (const type of NOW) {
56
+ doc.removeEventListener(type, tell, true);
57
+ }
58
+ for (const type of AFTER) {
59
+ doc.removeEventListener(type, later, { capture: true });
60
+ }
61
+ };
62
+ }
63
+ //# 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,8 +201,10 @@ 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;
110
210
  //# sourceMappingURL=sheet-swipe.d.ts.map