@celljs/ta-web 4.9.1 → 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 (302) 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 +20 -0
  6. package/esm/browser/assistant/assistant-protocol.d.ts +3 -1
  7. package/esm/browser/assistant/assistant-task-util.d.ts +2 -0
  8. package/esm/browser/assistant/assistant-task-util.js +5 -3
  9. package/esm/browser/assistant/assistant-view.js +81 -56
  10. package/esm/browser/assistant/assistant.d.ts +10 -1
  11. package/esm/browser/assistant/assistant.js +44 -5
  12. package/esm/browser/chat/chat-packages.d.ts +39 -0
  13. package/esm/browser/chat/chat-packages.js +70 -0
  14. package/esm/browser/chat/chat-protocol.d.ts +23 -1
  15. package/esm/browser/chat/chat-stores.d.ts +59 -0
  16. package/esm/browser/chat/chat-stores.js +121 -0
  17. package/esm/browser/chat/chat-util.d.ts +17 -0
  18. package/esm/browser/chat/chat-util.js +61 -0
  19. package/esm/browser/chat/chat-view.js +33 -12
  20. package/esm/browser/chat/chat.d.ts +31 -39
  21. package/esm/browser/chat/chat.js +226 -175
  22. package/esm/browser/components/app-nav.d.ts +6 -3
  23. package/esm/browser/components/app-nav.js +19 -10
  24. package/esm/browser/components/app-shell-hooks.d.ts +2 -2
  25. package/esm/browser/components/app-shell-hooks.js +7 -3
  26. package/esm/browser/components/app-view.js +75 -21
  27. package/esm/browser/components/chat-list.d.ts +20 -2
  28. package/esm/browser/components/chat-list.js +138 -22
  29. package/esm/browser/components/composer-box.d.ts +5 -5
  30. package/esm/browser/components/composer-box.js +111 -4
  31. package/esm/browser/components/composer.d.ts +7 -0
  32. package/esm/browser/components/composer.js +5 -4
  33. package/esm/browser/components/connection-bar.js +50 -17
  34. package/esm/browser/components/context-menu.d.ts +30 -4
  35. package/esm/browser/components/context-menu.js +199 -37
  36. package/esm/browser/components/conversation-scroll.d.ts +129 -6
  37. package/esm/browser/components/conversation-scroll.js +429 -109
  38. package/esm/browser/components/earlier-messages.d.ts +2 -1
  39. package/esm/browser/components/earlier-messages.js +2 -17
  40. package/esm/browser/components/editor-area.d.ts +3 -1
  41. package/esm/browser/components/editor-area.js +6 -5
  42. package/esm/browser/components/empty-pictures.d.ts +0 -2
  43. package/esm/browser/components/empty-pictures.js +0 -16
  44. package/esm/browser/components/folder-picker.d.ts +5 -2
  45. package/esm/browser/components/folder-picker.js +26 -8
  46. package/esm/browser/components/held-talk.d.ts +28 -0
  47. package/esm/browser/components/held-talk.js +76 -0
  48. package/esm/browser/components/host-view.d.ts +1 -1
  49. package/esm/browser/components/icon.d.ts +2 -2
  50. package/esm/browser/components/icon.js +5 -6
  51. package/esm/browser/components/image-viewer.d.ts +124 -0
  52. package/esm/browser/components/image-viewer.js +397 -0
  53. package/esm/browser/components/lightbox.d.ts +11 -0
  54. package/esm/browser/components/lightbox.js +24 -0
  55. package/esm/browser/components/markdown.d.ts +6 -2
  56. package/esm/browser/components/markdown.js +24 -10
  57. package/esm/browser/components/media.js +1 -10
  58. package/esm/browser/components/message-footer.d.ts +16 -2
  59. package/esm/browser/components/message-footer.js +29 -12
  60. package/esm/browser/components/message-list.d.ts +24 -3
  61. package/esm/browser/components/message-list.js +149 -20
  62. package/esm/browser/components/message-menu.d.ts +3 -1
  63. package/esm/browser/components/message-menu.js +18 -3
  64. package/esm/browser/components/nav-places.d.ts +16 -1
  65. package/esm/browser/components/nav-places.js +12 -3
  66. package/esm/browser/components/phone-shell.d.ts +4 -1
  67. package/esm/browser/components/phone-shell.js +3 -1
  68. package/esm/browser/components/run-status.js +3 -3
  69. package/esm/browser/components/session-settings.d.ts +6 -0
  70. package/esm/browser/components/session-settings.js +14 -1
  71. package/esm/browser/components/session-view.js +8 -4
  72. package/esm/browser/components/settings-parts.d.ts +2 -2
  73. package/esm/browser/components/settings-parts.js +24 -1
  74. package/esm/browser/components/swipe-row.d.ts +2 -2
  75. package/esm/browser/components/swipe-row.js +7 -3
  76. package/esm/browser/components/tool-view.js +14 -12
  77. package/esm/browser/components/voice-button.d.ts +1 -1
  78. package/esm/browser/components/voice-button.js +1 -1
  79. package/esm/browser/components/voice-talk.d.ts +43 -0
  80. package/esm/browser/components/voice-talk.js +222 -0
  81. package/esm/browser/device/device.d.ts +3 -0
  82. package/esm/browser/device/device.js +11 -1
  83. package/esm/browser/device/hold.d.ts +42 -0
  84. package/esm/browser/device/hold.js +136 -0
  85. package/esm/browser/device/launch-screen.d.ts +1 -1
  86. package/esm/browser/device/launch-screen.js +1 -1
  87. package/esm/browser/device/long-press.d.ts +2 -0
  88. package/esm/browser/device/long-press.js +16 -1
  89. package/esm/browser/device/pull-down.d.ts +4 -2
  90. package/esm/browser/device/pull-down.js +64 -76
  91. package/esm/browser/device/row-swipe.d.ts +35 -10
  92. package/esm/browser/device/row-swipe.js +149 -71
  93. package/esm/browser/device/shake-undo.d.ts +16 -0
  94. package/esm/browser/device/shake-undo.js +59 -0
  95. package/esm/browser/device/sheet-swipe.d.ts +118 -18
  96. package/esm/browser/device/sheet-swipe.js +406 -107
  97. package/esm/browser/extension/web-extension-api.d.ts +97 -1
  98. package/esm/browser/extension/web-extension-code.d.ts +6 -0
  99. package/esm/browser/extension/web-extension-code.js +24 -0
  100. package/esm/browser/extension/web-extension-protocol.d.ts +23 -1
  101. package/esm/browser/extension/web-extension-protocol.js +8 -0
  102. package/esm/browser/extension/web-extensions.d.ts +14 -1
  103. package/esm/browser/extension/web-extensions.js +122 -23
  104. package/esm/browser/files/files-protocol.d.ts +25 -0
  105. package/esm/browser/files/files-protocol.js +2 -0
  106. package/esm/browser/files/files.d.ts +35 -0
  107. package/esm/browser/files/files.js +119 -0
  108. package/esm/browser/i18n/locales.d.ts +24 -2
  109. package/esm/browser/i18n/messages.d.ts +23 -1
  110. package/esm/browser/i18n/messages.js +48 -4
  111. package/esm/browser/index.d.ts +6 -0
  112. package/esm/browser/index.js +6 -0
  113. package/esm/browser/notices/notices-protocol.d.ts +9 -1
  114. package/esm/browser/notices/notices.d.ts +2 -0
  115. package/esm/browser/notices/notices.js +20 -10
  116. package/esm/browser/offline/device-values.d.ts +55 -0
  117. package/esm/browser/offline/device-values.js +142 -0
  118. package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
  119. package/esm/browser/offline/kept-chats-protocol.js +2 -0
  120. package/esm/browser/offline/kept-chats.d.ts +47 -0
  121. package/esm/browser/offline/kept-chats.js +146 -0
  122. package/esm/browser/offline/offline-reads.d.ts +44 -0
  123. package/esm/browser/offline/offline-reads.js +107 -0
  124. package/esm/browser/settings/settings-protocol.d.ts +2 -0
  125. package/esm/browser/settings/settings-protocol.js +2 -0
  126. package/esm/browser/style/conversation.d.ts +1 -1
  127. package/esm/browser/style/conversation.js +57 -17
  128. package/esm/browser/style/device.js +27 -4
  129. package/esm/browser/style/layout.d.ts +1 -1
  130. package/esm/browser/style/layout.js +67 -15
  131. package/esm/browser/style/pages.d.ts +1 -1
  132. package/esm/browser/style/pages.js +2 -1
  133. package/esm/browser/style/shell.d.ts +1 -1
  134. package/esm/browser/style/shell.js +46 -3
  135. package/esm/browser/util/frame.d.ts +5 -4
  136. package/esm/browser/util/frame.js +5 -4
  137. package/esm/browser/util/markdown.d.ts +18 -1
  138. package/esm/browser/util/markdown.js +119 -5
  139. package/esm/browser/util/process.d.ts +21 -0
  140. package/esm/browser/util/process.js +45 -1
  141. package/esm/browser/util/voice.d.ts +5 -2
  142. package/esm/browser/util/voice.js +6 -3
  143. package/esm/browser/util/zoom.d.ts +46 -0
  144. package/esm/browser/util/zoom.js +96 -0
  145. package/esm/browser/workbench-calls.d.ts +59 -0
  146. package/esm/browser/workbench-calls.js +141 -0
  147. package/esm/browser/workbench-protocol.d.ts +5 -1
  148. package/esm/browser/workbench-util.d.ts +7 -0
  149. package/esm/browser/workbench-util.js +9 -2
  150. package/esm/browser/workbench.d.ts +14 -5
  151. package/esm/browser/workbench.js +51 -31
  152. package/lib/browser/assistant/assistant-chat-list.js +8 -2
  153. package/lib/browser/assistant/assistant-extension.d.ts +8 -1
  154. package/lib/browser/assistant/assistant-extension.js +20 -0
  155. package/lib/browser/assistant/assistant-protocol.d.ts +3 -1
  156. package/lib/browser/assistant/assistant-task-util.d.ts +2 -0
  157. package/lib/browser/assistant/assistant-task-util.js +5 -3
  158. package/lib/browser/assistant/assistant-view.js +78 -53
  159. package/lib/browser/assistant/assistant.d.ts +10 -1
  160. package/lib/browser/assistant/assistant.js +44 -5
  161. package/lib/browser/chat/chat-packages.d.ts +40 -0
  162. package/lib/browser/chat/chat-packages.js +74 -0
  163. package/lib/browser/chat/chat-protocol.d.ts +23 -1
  164. package/lib/browser/chat/chat-stores.d.ts +60 -0
  165. package/lib/browser/chat/chat-stores.js +125 -0
  166. package/lib/browser/chat/chat-util.d.ts +18 -0
  167. package/lib/browser/chat/chat-util.js +64 -0
  168. package/lib/browser/chat/chat-view.js +33 -12
  169. package/lib/browser/chat/chat.d.ts +31 -39
  170. package/lib/browser/chat/chat.js +227 -176
  171. package/lib/browser/components/app-nav.d.ts +6 -3
  172. package/lib/browser/components/app-nav.js +17 -8
  173. package/lib/browser/components/app-shell-hooks.d.ts +2 -2
  174. package/lib/browser/components/app-shell-hooks.js +7 -3
  175. package/lib/browser/components/app-view.js +74 -20
  176. package/lib/browser/components/chat-list.d.ts +20 -2
  177. package/lib/browser/components/chat-list.js +137 -21
  178. package/lib/browser/components/composer-box.d.ts +5 -5
  179. package/lib/browser/components/composer-box.js +111 -4
  180. package/lib/browser/components/composer.d.ts +7 -0
  181. package/lib/browser/components/composer.js +5 -4
  182. package/lib/browser/components/connection-bar.js +48 -15
  183. package/lib/browser/components/context-menu.d.ts +30 -4
  184. package/lib/browser/components/context-menu.js +198 -36
  185. package/lib/browser/components/conversation-scroll.d.ts +129 -6
  186. package/lib/browser/components/conversation-scroll.js +431 -110
  187. package/lib/browser/components/earlier-messages.d.ts +2 -1
  188. package/lib/browser/components/earlier-messages.js +2 -17
  189. package/lib/browser/components/editor-area.d.ts +3 -1
  190. package/lib/browser/components/editor-area.js +5 -4
  191. package/lib/browser/components/empty-pictures.d.ts +0 -2
  192. package/lib/browser/components/empty-pictures.js +0 -17
  193. package/lib/browser/components/folder-picker.d.ts +5 -2
  194. package/lib/browser/components/folder-picker.js +26 -8
  195. package/lib/browser/components/held-talk.d.ts +29 -0
  196. package/lib/browser/components/held-talk.js +79 -0
  197. package/lib/browser/components/host-view.d.ts +1 -1
  198. package/lib/browser/components/icon.d.ts +2 -2
  199. package/lib/browser/components/icon.js +7 -6
  200. package/lib/browser/components/image-viewer.d.ts +125 -0
  201. package/lib/browser/components/image-viewer.js +435 -0
  202. package/lib/browser/components/lightbox.d.ts +12 -0
  203. package/lib/browser/components/lightbox.js +60 -0
  204. package/lib/browser/components/markdown.d.ts +6 -2
  205. package/lib/browser/components/markdown.js +24 -10
  206. package/lib/browser/components/media.js +2 -11
  207. package/lib/browser/components/message-footer.d.ts +16 -2
  208. package/lib/browser/components/message-footer.js +31 -12
  209. package/lib/browser/components/message-list.d.ts +24 -3
  210. package/lib/browser/components/message-list.js +146 -16
  211. package/lib/browser/components/message-menu.d.ts +3 -1
  212. package/lib/browser/components/message-menu.js +17 -2
  213. package/lib/browser/components/nav-places.d.ts +16 -1
  214. package/lib/browser/components/nav-places.js +13 -3
  215. package/lib/browser/components/phone-shell.d.ts +4 -1
  216. package/lib/browser/components/phone-shell.js +3 -1
  217. package/lib/browser/components/run-status.js +3 -3
  218. package/lib/browser/components/session-settings.d.ts +6 -0
  219. package/lib/browser/components/session-settings.js +14 -1
  220. package/lib/browser/components/session-view.js +7 -3
  221. package/lib/browser/components/settings-parts.d.ts +2 -2
  222. package/lib/browser/components/settings-parts.js +24 -1
  223. package/lib/browser/components/swipe-row.d.ts +2 -2
  224. package/lib/browser/components/swipe-row.js +7 -3
  225. package/lib/browser/components/tool-view.js +14 -12
  226. package/lib/browser/components/voice-button.d.ts +1 -1
  227. package/lib/browser/components/voice-button.js +1 -1
  228. package/lib/browser/components/voice-talk.d.ts +44 -0
  229. package/lib/browser/components/voice-talk.js +260 -0
  230. package/lib/browser/device/device.d.ts +3 -0
  231. package/lib/browser/device/device.js +11 -1
  232. package/lib/browser/device/hold.d.ts +43 -0
  233. package/lib/browser/device/hold.js +173 -0
  234. package/lib/browser/device/launch-screen.d.ts +1 -1
  235. package/lib/browser/device/launch-screen.js +1 -1
  236. package/lib/browser/device/long-press.d.ts +2 -0
  237. package/lib/browser/device/long-press.js +16 -1
  238. package/lib/browser/device/pull-down.d.ts +4 -2
  239. package/lib/browser/device/pull-down.js +63 -75
  240. package/lib/browser/device/row-swipe.d.ts +35 -10
  241. package/lib/browser/device/row-swipe.js +148 -70
  242. package/lib/browser/device/shake-undo.d.ts +17 -0
  243. package/lib/browser/device/shake-undo.js +63 -0
  244. package/lib/browser/device/sheet-swipe.d.ts +118 -18
  245. package/lib/browser/device/sheet-swipe.js +410 -108
  246. package/lib/browser/extension/web-extension-api.d.ts +97 -1
  247. package/lib/browser/extension/web-extension-code.d.ts +6 -0
  248. package/lib/browser/extension/web-extension-code.js +24 -0
  249. package/lib/browser/extension/web-extension-protocol.d.ts +23 -1
  250. package/lib/browser/extension/web-extension-protocol.js +9 -1
  251. package/lib/browser/extension/web-extensions.d.ts +14 -1
  252. package/lib/browser/extension/web-extensions.js +120 -21
  253. package/lib/browser/files/files-protocol.d.ts +26 -0
  254. package/lib/browser/files/files-protocol.js +5 -0
  255. package/lib/browser/files/files.d.ts +36 -0
  256. package/lib/browser/files/files.js +122 -0
  257. package/lib/browser/i18n/locales.d.ts +24 -2
  258. package/lib/browser/i18n/messages.d.ts +23 -1
  259. package/lib/browser/i18n/messages.js +48 -4
  260. package/lib/browser/index.d.ts +6 -0
  261. package/lib/browser/index.js +6 -0
  262. package/lib/browser/notices/notices-protocol.d.ts +9 -1
  263. package/lib/browser/notices/notices.d.ts +2 -0
  264. package/lib/browser/notices/notices.js +20 -10
  265. package/lib/browser/offline/device-values.d.ts +56 -0
  266. package/lib/browser/offline/device-values.js +148 -0
  267. package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
  268. package/lib/browser/offline/kept-chats-protocol.js +5 -0
  269. package/lib/browser/offline/kept-chats.d.ts +48 -0
  270. package/lib/browser/offline/kept-chats.js +149 -0
  271. package/lib/browser/offline/offline-reads.d.ts +45 -0
  272. package/lib/browser/offline/offline-reads.js +111 -0
  273. package/lib/browser/settings/settings-protocol.d.ts +2 -0
  274. package/lib/browser/settings/settings-protocol.js +2 -0
  275. package/lib/browser/style/conversation.d.ts +1 -1
  276. package/lib/browser/style/conversation.js +57 -17
  277. package/lib/browser/style/device.js +27 -4
  278. package/lib/browser/style/layout.d.ts +1 -1
  279. package/lib/browser/style/layout.js +67 -15
  280. package/lib/browser/style/pages.d.ts +1 -1
  281. package/lib/browser/style/pages.js +2 -1
  282. package/lib/browser/style/shell.d.ts +1 -1
  283. package/lib/browser/style/shell.js +46 -3
  284. package/lib/browser/util/frame.d.ts +5 -4
  285. package/lib/browser/util/frame.js +5 -4
  286. package/lib/browser/util/markdown.d.ts +18 -1
  287. package/lib/browser/util/markdown.js +119 -5
  288. package/lib/browser/util/process.d.ts +21 -0
  289. package/lib/browser/util/process.js +46 -2
  290. package/lib/browser/util/voice.d.ts +5 -2
  291. package/lib/browser/util/voice.js +6 -3
  292. package/lib/browser/util/zoom.d.ts +47 -0
  293. package/lib/browser/util/zoom.js +99 -0
  294. package/lib/browser/workbench-calls.d.ts +60 -0
  295. package/lib/browser/workbench-calls.js +145 -0
  296. package/lib/browser/workbench-protocol.d.ts +5 -1
  297. package/lib/browser/workbench-util.d.ts +7 -0
  298. package/lib/browser/workbench-util.js +10 -3
  299. package/lib/browser/workbench.d.ts +14 -5
  300. package/lib/browser/workbench.js +51 -31
  301. package/package.json +10 -10
  302. package/public/launch.svg +46 -42
@@ -42,6 +42,7 @@ const device_protocol_1 = require("./device-protocol");
42
42
  const field_dismiss_1 = require("./field-dismiss");
43
43
  const long_press_1 = require("./long-press");
44
44
  const new_line_1 = require("./new-line");
45
+ const shake_undo_1 = require("./shake-undo");
45
46
  /** How much of the height the keyboard has to take before it counts as open: more than the bars of a browser. */
46
47
  const KEYBOARD_PX = 80;
47
48
  var DeviceUtil;
@@ -134,6 +135,9 @@ class DeviceObserver {
134
135
  if (env.newLine) {
135
136
  (0, new_line_1.startNewLine)(env.document, env.newLine);
136
137
  }
138
+ if (env.shakeUndo) {
139
+ (0, shake_undo_1.startShakeUndo)(env.document, env.shakeUndo);
140
+ }
137
141
  }
138
142
  if (env.keyboard) {
139
143
  env.keyboard(height => this.moveKeyboard(height));
@@ -234,9 +238,15 @@ function browser() {
234
238
  root: document.documentElement,
235
239
  native: nativeBridge(),
236
240
  keyboard: nativeKeyboard(),
237
- newLine: (_b = (_a = window.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taEditing,
241
+ newLine: (_a = messageHandlers()) === null || _a === void 0 ? void 0 : _a.taEditing,
242
+ shakeUndo: (_b = messageHandlers()) === null || _b === void 0 ? void 0 : _b.taUndo,
238
243
  };
239
244
  }
245
+ /** What the Ta app on iOS listens to from the page (TaBridgeViewController of apps/ta-mobile); none elsewhere. */
246
+ function messageHandlers() {
247
+ var _a;
248
+ return (_a = window.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers;
249
+ }
240
250
  /** One plugin of the Ta app (Capacitor), when the app has it; none in a browser, or in an app built before it. */
241
251
  function nativePlugin(name) {
242
252
  var _a;
@@ -0,0 +1,43 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * What a held finger does, as the talk button of a phone's chat: it starts once the finger has been kept still
4
+ * for PRESS_MS, follows the finger while it stays, and ends when it lets go.
5
+ */
6
+ export interface Hold {
7
+ /** Whether a press is the hold's (a field, a button of its own are not); every press is, without it. */
8
+ accepts?(event: React.PointerEvent): boolean;
9
+ start(): void;
10
+ /** Where the finger is while it is held, in the coordinates of the page. */
11
+ move?(x: number, y: number): void;
12
+ /** The finger let go. */
13
+ end(): void;
14
+ /** The system took the finger (a gesture of its own, a call): nothing is given. */
15
+ cancel(): void;
16
+ }
17
+ /**
18
+ * What an element takes of the pointer, for the hold it has. `data-held` takes the panning of a finger from the
19
+ * browser (style/device.ts): it decides that as the finger lands, too early for a hold, and a pan it began takes
20
+ * the finger from the page (pointercancel) as soon as it slides toward 取消.
21
+ */
22
+ export interface HeldProps {
23
+ onPointerDown?(event: React.PointerEvent): void;
24
+ onContextMenu?(event: React.MouseEvent): void;
25
+ 'data-held'?: '';
26
+ }
27
+ /**
28
+ * Something done while an element is held. A press that moves first scrolls, and one let go before PRESS_MS
29
+ * starts nothing, so that a tap stays a tap. Once held, the finger is the hold's until it lets go: the page does
30
+ * not scroll under it, the system's menu and selection do not come, the click of the finger let go is not a tap
31
+ * of what was under it, and the hold outlives the element (a tab bar that a page slides over).
32
+ */
33
+ export declare function useHeld(): (hold: Hold | undefined) => HeldProps;
34
+ export declare namespace HeldUtil {
35
+ /** A light tap of the haptic engine as a held finger comes onto something (取消, 编辑): the app's, or a phone's. */
36
+ function tick(): void;
37
+ /**
38
+ * The click that follows a finger let go after a hold: not a tap of what was under it. A browser that sends
39
+ * none (a long press is no tap to it) leaves the next press its own.
40
+ */
41
+ function swallowClick(): void;
42
+ }
43
+ //# sourceMappingURL=hold.d.ts.map
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.HeldUtil = void 0;
37
+ exports.useHeld = useHeld;
38
+ const React = __importStar(require("react"));
39
+ const device_1 = require("./device");
40
+ const long_press_1 = require("./long-press");
41
+ /**
42
+ * Something done while an element is held. A press that moves first scrolls, and one let go before PRESS_MS
43
+ * starts nothing, so that a tap stays a tap. Once held, the finger is the hold's until it lets go: the page does
44
+ * not scroll under it, the system's menu and selection do not come, the click of the finger let go is not a tap
45
+ * of what was under it, and the hold outlives the element (a tab bar that a page slides over).
46
+ */
47
+ function useHeld() {
48
+ const current = React.useRef(undefined);
49
+ // Gone before it held, the press is nothing; once held, it ends when the finger lets go.
50
+ React.useEffect(() => () => {
51
+ const press = current.current;
52
+ if (press && !press.held) {
53
+ clearTimeout(press.timer);
54
+ press.off();
55
+ current.current = undefined;
56
+ }
57
+ }, []);
58
+ return React.useCallback((hold) => {
59
+ if (!hold) {
60
+ return {};
61
+ }
62
+ return {
63
+ 'data-held': '',
64
+ onPointerDown: event => {
65
+ if (current.current || !event.isPrimary || event.button !== 0 || (hold.accepts && !hold.accepts(event))) {
66
+ return;
67
+ }
68
+ const from = { x: event.clientX, y: event.clientY };
69
+ const finish = (how) => {
70
+ if (current.current !== press) {
71
+ return;
72
+ }
73
+ current.current = undefined;
74
+ clearTimeout(press.timer);
75
+ press.off();
76
+ if (!press.held || how === 'none') {
77
+ return;
78
+ }
79
+ HeldUtil.swallowClick();
80
+ if (how === 'end') {
81
+ hold.end();
82
+ }
83
+ else {
84
+ hold.cancel();
85
+ }
86
+ };
87
+ const onUp = () => finish('end');
88
+ const onCancel = () => finish('cancel');
89
+ const onMove = (moved) => {
90
+ var _a;
91
+ if (press.held) {
92
+ (_a = hold.move) === null || _a === void 0 ? void 0 : _a.call(hold, moved.clientX, moved.clientY);
93
+ }
94
+ else if (long_press_1.LongPressUtil.moved(from, moved)) {
95
+ finish('none');
96
+ }
97
+ };
98
+ // Held, the finger drags nothing: no scroll, which would take it from the hold (pointercancel).
99
+ const onTouchMove = (touch) => press.held && touch.cancelable && touch.preventDefault();
100
+ const onSelect = (select) => press.held && select.preventDefault();
101
+ const press = {
102
+ hold,
103
+ held: false,
104
+ timer: setTimeout(() => {
105
+ var _a, _b;
106
+ press.held = true;
107
+ (_a = document.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
108
+ hold.start();
109
+ (_b = hold.move) === null || _b === void 0 ? void 0 : _b.call(hold, from.x, from.y);
110
+ }, long_press_1.LongPressUtil.PRESS_MS),
111
+ off: () => {
112
+ document.removeEventListener('pointerup', onUp);
113
+ document.removeEventListener('pointercancel', onCancel);
114
+ document.removeEventListener('pointermove', onMove);
115
+ document.removeEventListener('touchmove', onTouchMove);
116
+ document.removeEventListener('selectstart', onSelect, true);
117
+ },
118
+ };
119
+ current.current = press;
120
+ document.addEventListener('pointerup', onUp);
121
+ document.addEventListener('pointercancel', onCancel);
122
+ document.addEventListener('pointermove', onMove);
123
+ document.addEventListener('touchmove', onTouchMove, { passive: false });
124
+ document.addEventListener('selectstart', onSelect, true);
125
+ },
126
+ // The long press of a finger (the system's, or startLongPress's) is the hold's: no menu. Taken, it is
127
+ // also what gives the light tap of the haptic engine in the app. A right click is the browser's.
128
+ onContextMenu: event => {
129
+ if (current.current) {
130
+ event.preventDefault();
131
+ }
132
+ },
133
+ };
134
+ }, []);
135
+ }
136
+ var HeldUtil;
137
+ (function (HeldUtil) {
138
+ /** A light tap of the haptic engine as a held finger comes onto something (取消, 编辑): the app's, or a phone's. */
139
+ function tick() {
140
+ var _a, _b;
141
+ const haptics = (0, device_1.nativePlugin)('Haptics');
142
+ if (haptics) {
143
+ haptics('impact', { style: 'LIGHT' }).catch(() => undefined);
144
+ }
145
+ else {
146
+ (_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.vibrate) === null || _b === void 0 ? void 0 : _b.call(_a, 8);
147
+ }
148
+ }
149
+ HeldUtil.tick = tick;
150
+ /**
151
+ * The click that follows a finger let go after a hold: not a tap of what was under it. A browser that sends
152
+ * none (a long press is no tap to it) leaves the next press its own.
153
+ */
154
+ function swallowClick() {
155
+ const until = Date.now() + long_press_1.LongPressUtil.CLICK_GUARD_MS;
156
+ const off = () => {
157
+ document.removeEventListener('click', swallow, true);
158
+ document.removeEventListener('pointerdown', off, true);
159
+ };
160
+ const swallow = (event) => {
161
+ off();
162
+ if (Date.now() < until) {
163
+ event.preventDefault();
164
+ event.stopPropagation();
165
+ }
166
+ };
167
+ document.addEventListener('click', swallow, true);
168
+ document.addEventListener('pointerdown', off, true);
169
+ setTimeout(off, long_press_1.LongPressUtil.CLICK_GUARD_MS);
170
+ }
171
+ HeldUtil.swallowClick = swallowClick;
172
+ })(HeldUtil || (exports.HeldUtil = HeldUtil = {}));
173
+ //# sourceMappingURL=hold.js.map
@@ -17,7 +17,7 @@ export interface LaunchEnvironment {
17
17
  */
18
18
  export declare class LaunchScreen {
19
19
  protected readonly env: LaunchEnvironment;
20
- static readonly MAX = 3000;
20
+ static readonly MAX = 2000;
21
21
  static readonly FADE = 320;
22
22
  protected done: boolean;
23
23
  protected stops: (() => void)[];
@@ -47,7 +47,7 @@ class LaunchScreen {
47
47
  }
48
48
  }
49
49
  exports.LaunchScreen = LaunchScreen;
50
- LaunchScreen.MAX = 3000;
50
+ LaunchScreen.MAX = 2000;
51
51
  LaunchScreen.FADE = 320;
52
52
  var LaunchScreenUtil;
53
53
  (function (LaunchScreenUtil) {
@@ -11,6 +11,8 @@ export declare namespace LongPressUtil {
11
11
  const MOVE_PX = 10;
12
12
  /** After a menu opened, the click of the finger let go is not a tap of what was under it. */
13
13
  const CLICK_GUARD_MS = 800;
14
+ /** What the finger of a long press that opened a menu pressed, while it is still down. */
15
+ function held(): Element | undefined;
14
16
  function moved(from: {
15
17
  x: number;
16
18
  y: number;
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LongPressUtil = void 0;
4
4
  exports.startLongPress = startLongPress;
5
+ /** What a long press that opened a menu pressed, while the finger is still down: it may slide onto an entry (ContextMenuUtil.attach). */
6
+ let holding;
5
7
  /**
6
8
  * A long press as the right click of a finger: what a right click opens (the menus of tabs, files, chats,
7
9
  * messages) opens under a held finger too, as in the apps of a phone. iOS fires no `contextmenu` on a long
@@ -15,6 +17,11 @@ var LongPressUtil;
15
17
  LongPressUtil.MOVE_PX = 10;
16
18
  /** After a menu opened, the click of the finger let go is not a tap of what was under it. */
17
19
  LongPressUtil.CLICK_GUARD_MS = 800;
20
+ /** What the finger of a long press that opened a menu pressed, while it is still down. */
21
+ function held() {
22
+ return holding;
23
+ }
24
+ LongPressUtil.held = held;
18
25
  function moved(from, to) {
19
26
  return Math.hypot(to.x - from.x, to.y - from.y) > LongPressUtil.MOVE_PX;
20
27
  }
@@ -41,6 +48,7 @@ function startLongPress(doc, native) {
41
48
  const end = () => {
42
49
  var _a;
43
50
  cancel();
51
+ holding = undefined;
44
52
  if (taken) {
45
53
  taken = false;
46
54
  (_a = doc.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
@@ -65,6 +73,8 @@ function startLongPress(doc, native) {
65
73
  return;
66
74
  }
67
75
  sent = true;
76
+ // Before the menu renders, which may be before dispatchEvent returns.
77
+ holding = current.target;
68
78
  const event = new MouseEvent('contextmenu', { bubbles: true, cancelable: true, composed: true, clientX: current.x, clientY: current.y, button: 2 });
69
79
  current.target.dispatchEvent(event);
70
80
  if (event.defaultPrevented) {
@@ -74,11 +84,15 @@ function startLongPress(doc, native) {
74
84
  (_a = doc.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
75
85
  native === null || native === void 0 ? void 0 : native('Haptics', 'impact', { style: 'LIGHT' }).catch(() => undefined);
76
86
  }
87
+ else {
88
+ holding = undefined;
89
+ }
77
90
  };
78
91
  const onStart = (event) => {
79
92
  cancel();
80
93
  sent = false;
81
94
  taken = false;
95
+ holding = undefined;
82
96
  const touch = event.touches[0];
83
97
  const target = event.target instanceof Element ? event.target : null;
84
98
  if (event.touches.length !== 1 || !touch || !target || LongPressUtil.native(target)) {
@@ -107,7 +121,8 @@ function startLongPress(doc, native) {
107
121
  }
108
122
  };
109
123
  const onClick = (event) => {
110
- if (Date.now() < guardUntil) {
124
+ // The click of the finger let go; not an entry the finger slid onto, which the menu clicks.
125
+ if (event.isTrusted && Date.now() < guardUntil) {
111
126
  guardUntil = 0;
112
127
  event.preventDefault();
113
128
  event.stopImmediatePropagation();
@@ -40,8 +40,10 @@ export interface PullDownOptions {
40
40
  }
41
41
  /**
42
42
  * Lets a finger pull the launcher down over the first tab while `enabled`. As useSheetSwipe: transforms and
43
- * opacities only, and the listener that may hold a move back is there only for a touch that may be a pull. A
44
- * pull down is decided on the first move (iOS lets a scroll that started go on), only at the top of the list.
43
+ * opacities only, the listener that may hold a move back there only for a touch that may be a pull, the finger
44
+ * followed on what it touched (SwipeFinger), and let go it slides on at once as on a spring (SwipeSettle), the
45
+ * state following. A pull down is decided on the first move (iOS lets a scroll that started go on), only at
46
+ * the top of the list.
45
47
  */
46
48
  export declare function usePullDown(options: PullDownOptions): void;
47
49
  //# sourceMappingURL=pull-down.d.ts.map
@@ -121,8 +121,10 @@ function tick() {
121
121
  }
122
122
  /**
123
123
  * Lets a finger pull the launcher down over the first tab while `enabled`. As useSheetSwipe: transforms and
124
- * opacities only, and the listener that may hold a move back is there only for a touch that may be a pull. A
125
- * pull down is decided on the first move (iOS lets a scroll that started go on), only at the top of the list.
124
+ * opacities only, the listener that may hold a move back there only for a touch that may be a pull, the finger
125
+ * followed on what it touched (SwipeFinger), and let go it slides on at once as on a spring (SwipeSettle), the
126
+ * state following. A pull down is decided on the first move (iOS lets a scroll that started go on), only at
127
+ * the top of the list.
126
128
  */
127
129
  function usePullDown(options) {
128
130
  const latest = React.useRef(options);
@@ -140,51 +142,18 @@ function usePullDown(options) {
140
142
  const settle = new sheet_swipe_1.SwipeSettle();
141
143
  // The strip that shows while open, with the safe area under it, as the style sizes it.
142
144
  const peekOf = () => { var _a; return ((_a = document.querySelector(latest.current.peek)) === null || _a === void 0 ? void 0 : _a.offsetHeight) || PullUtil.PEEK_PX; };
143
- const paint = (offset) => {
144
- if (!moved) {
145
- return;
146
- }
147
- const p = PullUtil.progress(offset, moved.height, moved.peek);
148
- moved.sheet.style.transform = `translate3d(0, ${offset}px, 0)`;
149
- if (moved.reveal) {
150
- moved.reveal.style.opacity = String(p);
151
- moved.reveal.style.transform = `translate3d(0, ${(p - 1) * 36}px, 0) scale(${0.94 + 0.06 * p})`;
152
- }
153
- };
154
- const release = (elements) => {
155
- var _a, _b;
156
- delete root.dataset.pull;
157
- elements === null || elements === void 0 ? void 0 : elements.sheet.style.removeProperty('transform');
158
- (_a = elements === null || elements === void 0 ? void 0 : elements.reveal) === null || _a === void 0 ? void 0 : _a.style.removeProperty('transform');
159
- (_b = elements === null || elements === void 0 ? void 0 : elements.reveal) === null || _b === void 0 ? void 0 : _b.style.removeProperty('opacity');
145
+ const reveal = (offset, height, peek) => {
146
+ const p = PullUtil.progress(offset, height, peek);
147
+ return { opacity: p, transform: `translate3d(0, ${(p - 1) * 36}px, 0) scale(${0.94 + 0.06 * p})` };
160
148
  };
161
- const stop = () => {
162
- document.removeEventListener('touchmove', onMove);
149
+ const reset = () => {
163
150
  start = undefined;
164
- };
165
- const onStart = (event) => {
166
- const current = latest.current;
167
151
  claimed = undefined;
168
- const touch = event.touches[0];
169
- const target = event.target instanceof Node ? event.target : null;
170
- const area = target
171
- ? [...document.querySelectorAll(current.open ? current.closeArea : current.area)].find(element => element.contains(target))
172
- : undefined;
173
- const inside = !!area;
174
- const free = inside && !editable(event.target) && (current.open ? atEnd(event.target, area) : atTop(event.target, area));
175
- if (event.touches.length === 1 && touch && free) {
176
- start = { x: touch.clientX, y: touch.clientY, t: event.timeStamp };
177
- velocity.start(start);
178
- document.addEventListener('touchmove', onMove, { passive: false });
179
- }
180
- else {
181
- stop();
182
- }
152
+ moved = undefined;
183
153
  };
184
- const onMove = (event) => {
154
+ const onMove = (event, touch) => {
185
155
  const current = latest.current;
186
- const touch = event.touches[0];
187
- if (!start || !touch || claimed === false) {
156
+ if (!start || claimed === false) {
188
157
  return;
189
158
  }
190
159
  const dy = touch.clientY - start.y;
@@ -197,17 +166,12 @@ function usePullDown(options) {
197
166
  }
198
167
  return;
199
168
  }
200
- if (!claimed) {
201
- stop();
202
- return;
203
- }
204
- const sheet = document.querySelector(current.sheet);
169
+ const sheet = claimed ? document.querySelector(current.sheet) : null;
205
170
  if (!sheet) {
206
171
  claimed = false;
207
- stop();
172
+ finger.stop();
208
173
  return;
209
174
  }
210
- settle.clear();
211
175
  moved = {
212
176
  sheet,
213
177
  reveal: document.querySelector(current.reveal),
@@ -216,6 +180,7 @@ function usePullDown(options) {
216
180
  passed: current.open,
217
181
  offset: 0,
218
182
  };
183
+ settle.hold([moved.sheet, moved.reveal]);
219
184
  // Not data-sheet-drag: the sheets off the screen (the screen, the board) stay hidden.
220
185
  root.dataset.pull = '';
221
186
  }
@@ -230,39 +195,62 @@ function usePullDown(options) {
230
195
  tick();
231
196
  }
232
197
  moved.passed = passed || current.open;
233
- paint(moved.offset);
198
+ moved.sheet.style.transform = `translate3d(0, ${moved.offset}px, 0)`;
199
+ if (moved.reveal) {
200
+ const { opacity, transform } = reveal(moved.offset, moved.height, moved.peek);
201
+ moved.reveal.style.opacity = String(opacity);
202
+ moved.reveal.style.transform = transform;
203
+ }
234
204
  };
235
- const onEnd = (event) => {
236
- var _a, _b;
237
- const current = latest.current;
205
+ const onEnd = (event, touch) => {
238
206
  if (start && claimed && moved) {
239
- const end = event.changedTouches[0];
240
- velocity.add({ x: (_a = end === null || end === void 0 ? void 0 : end.clientX) !== null && _a !== void 0 ? _a : start.x, y: (_b = end === null || end === void 0 ? void 0 : end.clientY) !== null && _b !== void 0 ? _b : start.y, t: event.timeStamp });
241
- const speed = velocity.speed;
242
- const open = PullUtil.settle(moved.offset, moved.height, current.open, speed, moved.peek);
243
- const rest = open ? moved.height - moved.peek : 0;
244
- const ms = sheet_swipe_1.SwipeUtil.duration(rest - moved.offset, speed, PullUtil.SETTLE_MS);
245
- current.setOpen(open);
246
- const elements = moved;
247
- requestAnimationFrame(() => {
248
- settle.run(ms, [elements.sheet, elements.reveal], [elements.reveal]);
249
- release(elements);
250
- });
207
+ const current = latest.current;
208
+ if (touch) {
209
+ velocity.add({ x: touch.clientX, y: touch.clientY, t: event.timeStamp });
210
+ }
211
+ const speed = touch ? velocity.speed : 0;
212
+ const { sheet, height, peek, offset } = moved;
213
+ const open = PullUtil.settle(offset, height, current.open, speed, peek);
214
+ const rest = open ? height - peek : 0;
215
+ const motion = sheet_swipe_1.SwipeUtil.motion(offset, rest, speed, PullUtil.SETTLE_MS, [0, height - peek]);
216
+ settle.run(motion, [
217
+ { element: sheet, transform: `translate3d(0, ${rest}px, 0)` },
218
+ { element: moved.reveal, ...reveal(rest, height, peek) },
219
+ ], () => latest.current.open === open, () => delete root.dataset.pull);
220
+ (0, sheet_swipe_1.afterLetGo)(open, () => latest.current);
221
+ }
222
+ reset();
223
+ };
224
+ const finger = new sheet_swipe_1.SwipeFinger({ move: onMove, end: onEnd }, true);
225
+ const onStart = (event) => {
226
+ const current = latest.current;
227
+ // Another finger beside the one that pulls changes nothing.
228
+ if (finger.down && !finger.follow(event, document)) {
229
+ return;
230
+ }
231
+ finger.stop();
232
+ reset();
233
+ const touch = event.touches[0];
234
+ const target = event.target instanceof Node ? event.target : null;
235
+ const area = target
236
+ ? [...document.querySelectorAll(current.open ? current.closeArea : current.area)].find(element => element.contains(target))
237
+ : undefined;
238
+ const free = !!area && !editable(event.target) && (current.open ? atEnd(event.target, area) : atTop(event.target, area));
239
+ if (touch && free && finger.follow(event, document)) {
240
+ start = { x: touch.clientX, y: touch.clientY, t: event.timeStamp };
241
+ velocity.start(start);
251
242
  }
252
- moved = undefined;
253
- claimed = undefined;
254
- stop();
255
243
  };
256
244
  document.addEventListener('touchstart', onStart, { passive: true });
257
- document.addEventListener('touchend', onEnd, { passive: true });
258
- document.addEventListener('touchcancel', onEnd, { passive: true });
259
245
  return () => {
260
246
  document.removeEventListener('touchstart', onStart);
261
- document.removeEventListener('touchend', onEnd);
262
- document.removeEventListener('touchcancel', onEnd);
263
- stop();
264
- release(moved);
265
- settle.clear();
247
+ finger.stop();
248
+ // A list still under the finger goes back to where it rests; one sliding on finishes its slide.
249
+ if (moved) {
250
+ delete root.dataset.pull;
251
+ settle.finish();
252
+ }
253
+ reset();
266
254
  };
267
255
  }, [enabled]);
268
256
  }
@@ -5,23 +5,48 @@ 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];
27
52
  //# sourceMappingURL=row-swipe.d.ts.map