@celljs/ta-web 4.42.0 → 4.44.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 (400) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/apps/app-window.js +2 -2
  4. package/esm/browser/apps/web-apps.d.ts +4 -0
  5. package/esm/browser/apps/web-apps.js +14 -3
  6. package/esm/browser/assistant/assistant-chat-list.js +2 -1
  7. package/esm/browser/assistant/assistant-extension.js +16 -2
  8. package/esm/browser/assistant/assistant-protocol.d.ts +6 -0
  9. package/esm/browser/assistant/assistant-task-source.js +3 -0
  10. package/esm/browser/assistant/assistant-task-util.d.ts +2 -0
  11. package/esm/browser/assistant/assistant-task-util.js +5 -0
  12. package/esm/browser/assistant/assistant.d.ts +3 -0
  13. package/esm/browser/assistant/assistant.js +26 -2
  14. package/esm/browser/assistant/ta-hearing.d.ts +85 -0
  15. package/esm/browser/assistant/ta-hearing.js +272 -0
  16. package/esm/browser/components/app-shell-hooks.d.ts +2 -1
  17. package/esm/browser/components/app-shell-hooks.js +4 -3
  18. package/esm/browser/components/app-shell-state.js +2 -2
  19. package/esm/browser/components/auth-view.js +1 -1
  20. package/esm/browser/components/board.js +9 -1
  21. package/esm/browser/components/chat-list-row.js +4 -4
  22. package/esm/browser/components/chat-list-util.d.ts +2 -2
  23. package/esm/browser/components/clipboard-link-host.d.ts +2 -0
  24. package/esm/browser/components/clipboard-link-host.js +27 -0
  25. package/esm/browser/components/cloud-network.js +1 -1
  26. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  27. package/esm/browser/components/custom-host.d.ts +4 -1
  28. package/esm/browser/components/custom-host.js +8 -2
  29. package/esm/browser/components/custom-provider-advanced.js +8 -8
  30. package/esm/browser/components/custom-provider-view.js +12 -12
  31. package/esm/browser/components/earlier-messages.d.ts +4 -1
  32. package/esm/browser/components/earlier-messages.js +5 -2
  33. package/esm/browser/components/empty-state.d.ts +2 -1
  34. package/esm/browser/components/empty-state.js +6 -2
  35. package/esm/browser/components/folder-picker.js +2 -2
  36. package/esm/browser/components/gallery.js +8 -9
  37. package/esm/browser/components/hearing-host.d.ts +5 -0
  38. package/esm/browser/components/hearing-host.js +58 -0
  39. package/esm/browser/components/host-view.d.ts +1 -1
  40. package/esm/browser/components/link-dialog.js +4 -0
  41. package/esm/browser/components/loading.d.ts +3 -2
  42. package/esm/browser/components/loading.js +7 -3
  43. package/esm/browser/components/markdown.d.ts +3 -1
  44. package/esm/browser/components/markdown.js +10 -5
  45. package/esm/browser/components/media.d.ts +10 -4
  46. package/esm/browser/components/media.js +60 -14
  47. package/esm/browser/components/message-list.js +2 -1
  48. package/esm/browser/components/message-steps.js +8 -5
  49. package/esm/browser/components/people-picker.d.ts +17 -0
  50. package/esm/browser/components/people-picker.js +129 -0
  51. package/esm/browser/components/relay-view.js +1 -1
  52. package/esm/browser/components/settings-choices.d.ts +2 -1
  53. package/esm/browser/components/settings-choices.js +2 -1
  54. package/esm/browser/components/settings-parts.js +25 -3
  55. package/esm/browser/components/share-dialog.d.ts +2 -2
  56. package/esm/browser/components/share-dialog.js +7 -4
  57. package/esm/browser/components/share-friends.d.ts +18 -2
  58. package/esm/browser/components/share-friends.js +64 -13
  59. package/esm/browser/components/share-item-sheet.d.ts +12 -0
  60. package/esm/browser/components/share-item-sheet.js +39 -0
  61. package/esm/browser/components/share-sheet.d.ts +12 -4
  62. package/esm/browser/components/share-sheet.js +15 -6
  63. package/esm/browser/components/sign-in-setup.js +4 -4
  64. package/esm/browser/components/trusted-domains.js +1 -1
  65. package/esm/browser/components/view-room.d.ts +25 -0
  66. package/esm/browser/components/view-room.js +136 -0
  67. package/esm/browser/components/voice-services.js +6 -6
  68. package/esm/browser/device/device-protocol.d.ts +9 -6
  69. package/esm/browser/device/device-protocol.js +7 -4
  70. package/esm/browser/device/launch-screen.d.ts +11 -1
  71. package/esm/browser/device/launch-screen.js +22 -4
  72. package/esm/browser/extension/share-sheet-compat.d.ts +2 -0
  73. package/esm/browser/extension/share-sheet-compat.js +12 -2
  74. package/esm/browser/extension/web-api-chats.d.ts +23 -0
  75. package/esm/browser/extension/web-api-code.d.ts +11 -0
  76. package/esm/browser/extension/web-api-components.d.ts +8 -1
  77. package/esm/browser/extension/web-api-contributions.d.ts +30 -1
  78. package/esm/browser/extension/web-api-desktop.d.ts +2 -1
  79. package/esm/browser/extension/web-api-file-views.d.ts +38 -0
  80. package/esm/browser/extension/web-api-file-views.js +2 -0
  81. package/esm/browser/extension/web-api-host.d.ts +47 -0
  82. package/esm/browser/extension/web-api-host.js +3 -0
  83. package/esm/browser/extension/web-api-menus.d.ts +46 -0
  84. package/esm/browser/extension/web-api-partners.d.ts +58 -1
  85. package/esm/browser/extension/web-api-skins.d.ts +95 -0
  86. package/esm/browser/extension/web-api-skins.js +2 -0
  87. package/esm/browser/extension/web-api-spec.js +9 -0
  88. package/esm/browser/extension/web-extension-api.d.ts +13 -34
  89. package/esm/browser/extension/web-extension-context.d.ts +2 -8
  90. package/esm/browser/extension/web-extension-context.js +15 -39
  91. package/esm/browser/extension/web-extension-marks.d.ts +10 -0
  92. package/esm/browser/extension/web-extension-marks.js +29 -0
  93. package/esm/browser/extension/web-extension-protocol.d.ts +13 -1
  94. package/esm/browser/extension/web-extension-protocol.js +4 -0
  95. package/esm/browser/extension/web-extension-run.d.ts +16 -2
  96. package/esm/browser/extension/web-extension-run.js +80 -0
  97. package/esm/browser/extension/web-extensions-running.d.ts +5 -1
  98. package/esm/browser/extension/web-extensions-running.js +16 -0
  99. package/esm/browser/extension/web-extensions.d.ts +2 -1
  100. package/esm/browser/extension/web-extensions.js +3 -0
  101. package/esm/browser/extension/web-home.js +3 -1
  102. package/esm/browser/extension/web-host-values.d.ts +66 -0
  103. package/esm/browser/extension/web-host-values.js +191 -0
  104. package/esm/browser/extension/web-hosts.d.ts +7 -2
  105. package/esm/browser/extension/web-hosts.js +16 -4
  106. package/esm/browser/extension/web-share-ui.d.ts +7 -0
  107. package/esm/browser/extension/web-share-ui.js +20 -0
  108. package/esm/browser/extension/web-share.d.ts +18 -0
  109. package/esm/browser/extension/web-share.js +42 -0
  110. package/esm/browser/i18n/en/assistant.d.ts +4 -0
  111. package/esm/browser/i18n/en/assistant.js +4 -0
  112. package/esm/browser/i18n/en/chat.d.ts +10 -0
  113. package/esm/browser/i18n/en/chat.js +10 -0
  114. package/esm/browser/i18n/en/common.d.ts +15 -0
  115. package/esm/browser/i18n/en/common.js +15 -0
  116. package/esm/browser/i18n/en/discover.d.ts +11 -1
  117. package/esm/browser/i18n/en/discover.js +11 -1
  118. package/esm/browser/i18n/en/settings.d.ts +10 -0
  119. package/esm/browser/i18n/en/settings.js +10 -0
  120. package/esm/browser/i18n/ja/assistant.js +4 -0
  121. package/esm/browser/i18n/ja/chat.js +10 -0
  122. package/esm/browser/i18n/ja/common.js +15 -0
  123. package/esm/browser/i18n/ja/discover.js +11 -1
  124. package/esm/browser/i18n/ja/settings.js +10 -0
  125. package/esm/browser/i18n/locales.d.ts +51 -2
  126. package/esm/browser/i18n/messages.d.ts +50 -1
  127. package/esm/browser/i18n/zh/assistant.js +4 -0
  128. package/esm/browser/i18n/zh/chat.js +10 -0
  129. package/esm/browser/i18n/zh/common.js +15 -0
  130. package/esm/browser/i18n/zh/discover.js +11 -1
  131. package/esm/browser/i18n/zh/settings.js +10 -0
  132. package/esm/browser/i18n/zh-tw/assistant.js +4 -0
  133. package/esm/browser/i18n/zh-tw/chat.js +10 -0
  134. package/esm/browser/i18n/zh-tw/common.js +15 -0
  135. package/esm/browser/i18n/zh-tw/discover.js +11 -1
  136. package/esm/browser/i18n/zh-tw/settings.js +10 -0
  137. package/esm/browser/launch-art/art-palette.d.ts +41 -0
  138. package/esm/browser/launch-art/art-palette.js +72 -0
  139. package/esm/browser/launch-art/cyclic-automaton.d.ts +45 -0
  140. package/esm/browser/launch-art/cyclic-automaton.js +176 -0
  141. package/esm/browser/launch-art/fractal-tree.d.ts +43 -0
  142. package/esm/browser/launch-art/fractal-tree.js +48 -0
  143. package/esm/browser/launch-art/launch-art.d.ts +98 -0
  144. package/esm/browser/launch-art/launch-art.js +420 -0
  145. package/esm/browser/launch-art/launch-sky.d.ts +66 -0
  146. package/esm/browser/launch-art/launch-sky.js +153 -0
  147. package/esm/browser/links/clipboard-links.d.ts +85 -0
  148. package/esm/browser/links/clipboard-links.js +261 -0
  149. package/esm/browser/links/link-text.d.ts +29 -0
  150. package/esm/browser/links/link-text.js +97 -0
  151. package/esm/browser/links/links-protocol.d.ts +12 -1
  152. package/esm/browser/links/links.d.ts +8 -2
  153. package/esm/browser/links/links.js +33 -3
  154. package/esm/browser/markdown/code-renderers.d.ts +4 -0
  155. package/esm/browser/markdown/code-renderers.js +4 -0
  156. package/esm/browser/partners/group-picker.js +23 -29
  157. package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
  158. package/esm/browser/sandbox/work/work-senses.js +1 -1
  159. package/esm/browser/settings/settings-protocol.d.ts +26 -0
  160. package/esm/browser/settings/settings-protocol.js +11 -0
  161. package/esm/browser/settings/settings.d.ts +4 -1
  162. package/esm/browser/settings/settings.js +16 -3
  163. package/esm/browser/skin/skin-layer.d.ts +8 -0
  164. package/esm/browser/skin/skin-layer.js +118 -0
  165. package/esm/browser/skin/skin-util.d.ts +40 -0
  166. package/esm/browser/skin/skin-util.js +120 -0
  167. package/esm/browser/style/base.d.ts +1 -1
  168. package/esm/browser/style/base.js +10 -6
  169. package/esm/browser/style/chat-list.d.ts +1 -1
  170. package/esm/browser/style/chat-list.js +28 -15
  171. package/esm/browser/style/conversation-column.d.ts +1 -1
  172. package/esm/browser/style/conversation.d.ts +1 -1
  173. package/esm/browser/style/conversation.js +5 -4
  174. package/esm/browser/style/dialogs.d.ts +1 -1
  175. package/esm/browser/style/dialogs.js +2 -5
  176. package/esm/browser/style/forms.d.ts +5 -0
  177. package/esm/browser/style/forms.js +65 -0
  178. package/esm/browser/style/layout.d.ts +1 -1
  179. package/esm/browser/style/pages.d.ts +1 -1
  180. package/esm/browser/style/pages.js +14 -24
  181. package/esm/browser/style/phone.d.ts +1 -1
  182. package/esm/browser/style/shared.d.ts +1 -1
  183. package/esm/browser/style/shell.d.ts +1 -1
  184. package/esm/browser/style/shell.js +1 -6
  185. package/esm/browser/style/skins.d.ts +9 -0
  186. package/esm/browser/style/skins.js +107 -0
  187. package/esm/browser/style/surfaces.d.ts +1 -1
  188. package/esm/browser/style/surfaces.js +8 -6
  189. package/esm/browser/style/tasks.d.ts +1 -1
  190. package/esm/browser/style.js +4 -0
  191. package/esm/browser/util/fresh-rows.d.ts +21 -0
  192. package/esm/browser/util/fresh-rows.js +36 -0
  193. package/esm/browser/util/process.d.ts +12 -22
  194. package/esm/browser/util/process.js +49 -39
  195. package/esm/browser/util/voice.d.ts +18 -0
  196. package/esm/browser/util/voice.js +111 -3
  197. package/esm/browser/workbench-protocol.d.ts +2 -0
  198. package/esm/browser/workbench-services.d.ts +2 -0
  199. package/esm/browser/workbench-services.js +5 -0
  200. package/esm/browser/workbench.js +5 -0
  201. package/lib/browser/apps/app-window.js +2 -2
  202. package/lib/browser/apps/web-apps.d.ts +4 -0
  203. package/lib/browser/apps/web-apps.js +14 -3
  204. package/lib/browser/assistant/assistant-chat-list.js +2 -1
  205. package/lib/browser/assistant/assistant-extension.js +15 -1
  206. package/lib/browser/assistant/assistant-protocol.d.ts +6 -0
  207. package/lib/browser/assistant/assistant-task-source.js +3 -0
  208. package/lib/browser/assistant/assistant-task-util.d.ts +2 -0
  209. package/lib/browser/assistant/assistant-task-util.js +5 -0
  210. package/lib/browser/assistant/assistant.d.ts +3 -0
  211. package/lib/browser/assistant/assistant.js +26 -2
  212. package/lib/browser/assistant/ta-hearing.d.ts +86 -0
  213. package/lib/browser/assistant/ta-hearing.js +277 -0
  214. package/lib/browser/components/app-shell-hooks.d.ts +2 -1
  215. package/lib/browser/components/app-shell-hooks.js +4 -3
  216. package/lib/browser/components/app-shell-state.js +2 -2
  217. package/lib/browser/components/auth-view.js +1 -1
  218. package/lib/browser/components/board.js +9 -1
  219. package/lib/browser/components/chat-list-row.js +4 -4
  220. package/lib/browser/components/chat-list-util.d.ts +2 -2
  221. package/lib/browser/components/clipboard-link-host.d.ts +3 -0
  222. package/lib/browser/components/clipboard-link-host.js +63 -0
  223. package/lib/browser/components/cloud-network.js +1 -1
  224. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  225. package/lib/browser/components/custom-host.d.ts +4 -1
  226. package/lib/browser/components/custom-host.js +8 -2
  227. package/lib/browser/components/custom-provider-advanced.js +8 -8
  228. package/lib/browser/components/custom-provider-view.js +12 -12
  229. package/lib/browser/components/earlier-messages.d.ts +4 -1
  230. package/lib/browser/components/earlier-messages.js +5 -2
  231. package/lib/browser/components/empty-state.d.ts +2 -1
  232. package/lib/browser/components/empty-state.js +6 -2
  233. package/lib/browser/components/folder-picker.js +2 -2
  234. package/lib/browser/components/gallery.js +7 -8
  235. package/lib/browser/components/hearing-host.d.ts +6 -0
  236. package/lib/browser/components/hearing-host.js +94 -0
  237. package/lib/browser/components/host-view.d.ts +1 -1
  238. package/lib/browser/components/link-dialog.js +4 -0
  239. package/lib/browser/components/loading.d.ts +3 -2
  240. package/lib/browser/components/loading.js +7 -3
  241. package/lib/browser/components/markdown.d.ts +3 -1
  242. package/lib/browser/components/markdown.js +9 -4
  243. package/lib/browser/components/media.d.ts +10 -4
  244. package/lib/browser/components/media.js +61 -14
  245. package/lib/browser/components/message-list.js +2 -1
  246. package/lib/browser/components/message-steps.js +8 -5
  247. package/lib/browser/components/people-picker.d.ts +18 -0
  248. package/lib/browser/components/people-picker.js +166 -0
  249. package/lib/browser/components/relay-view.js +1 -1
  250. package/lib/browser/components/settings-choices.d.ts +2 -1
  251. package/lib/browser/components/settings-choices.js +2 -1
  252. package/lib/browser/components/settings-parts.js +23 -1
  253. package/lib/browser/components/share-dialog.d.ts +2 -2
  254. package/lib/browser/components/share-dialog.js +7 -4
  255. package/lib/browser/components/share-friends.d.ts +18 -2
  256. package/lib/browser/components/share-friends.js +67 -13
  257. package/lib/browser/components/share-item-sheet.d.ts +13 -0
  258. package/lib/browser/components/share-item-sheet.js +75 -0
  259. package/lib/browser/components/share-sheet.d.ts +12 -4
  260. package/lib/browser/components/share-sheet.js +14 -4
  261. package/lib/browser/components/sign-in-setup.js +4 -4
  262. package/lib/browser/components/trusted-domains.js +1 -1
  263. package/lib/browser/components/view-room.d.ts +26 -0
  264. package/lib/browser/components/view-room.js +173 -0
  265. package/lib/browser/components/voice-services.js +6 -6
  266. package/lib/browser/device/device-protocol.d.ts +9 -6
  267. package/lib/browser/device/device-protocol.js +7 -4
  268. package/lib/browser/device/launch-screen.d.ts +11 -1
  269. package/lib/browser/device/launch-screen.js +22 -4
  270. package/lib/browser/extension/share-sheet-compat.d.ts +2 -0
  271. package/lib/browser/extension/share-sheet-compat.js +13 -2
  272. package/lib/browser/extension/web-api-chats.d.ts +23 -0
  273. package/lib/browser/extension/web-api-code.d.ts +11 -0
  274. package/lib/browser/extension/web-api-components.d.ts +8 -1
  275. package/lib/browser/extension/web-api-contributions.d.ts +30 -1
  276. package/lib/browser/extension/web-api-desktop.d.ts +2 -1
  277. package/lib/browser/extension/web-api-file-views.d.ts +39 -0
  278. package/lib/browser/extension/web-api-file-views.js +3 -0
  279. package/lib/browser/extension/web-api-host.d.ts +48 -0
  280. package/lib/browser/extension/web-api-host.js +4 -0
  281. package/lib/browser/extension/web-api-menus.d.ts +46 -0
  282. package/lib/browser/extension/web-api-partners.d.ts +58 -1
  283. package/lib/browser/extension/web-api-skins.d.ts +96 -0
  284. package/lib/browser/extension/web-api-skins.js +3 -0
  285. package/lib/browser/extension/web-api-spec.js +9 -0
  286. package/lib/browser/extension/web-extension-api.d.ts +13 -34
  287. package/lib/browser/extension/web-extension-context.d.ts +2 -8
  288. package/lib/browser/extension/web-extension-context.js +15 -39
  289. package/lib/browser/extension/web-extension-marks.d.ts +11 -0
  290. package/lib/browser/extension/web-extension-marks.js +65 -0
  291. package/lib/browser/extension/web-extension-protocol.d.ts +13 -1
  292. package/lib/browser/extension/web-extension-protocol.js +4 -0
  293. package/lib/browser/extension/web-extension-run.d.ts +16 -2
  294. package/lib/browser/extension/web-extension-run.js +80 -0
  295. package/lib/browser/extension/web-extensions-running.d.ts +5 -1
  296. package/lib/browser/extension/web-extensions-running.js +16 -0
  297. package/lib/browser/extension/web-extensions.d.ts +2 -1
  298. package/lib/browser/extension/web-extensions.js +3 -0
  299. package/lib/browser/extension/web-home.js +3 -1
  300. package/lib/browser/extension/web-host-values.d.ts +67 -0
  301. package/lib/browser/extension/web-host-values.js +229 -0
  302. package/lib/browser/extension/web-hosts.d.ts +7 -2
  303. package/lib/browser/extension/web-hosts.js +16 -4
  304. package/lib/browser/extension/web-share-ui.d.ts +8 -0
  305. package/lib/browser/extension/web-share-ui.js +56 -0
  306. package/lib/browser/extension/web-share.d.ts +19 -0
  307. package/lib/browser/extension/web-share.js +45 -0
  308. package/lib/browser/i18n/en/assistant.d.ts +4 -0
  309. package/lib/browser/i18n/en/assistant.js +4 -0
  310. package/lib/browser/i18n/en/chat.d.ts +10 -0
  311. package/lib/browser/i18n/en/chat.js +10 -0
  312. package/lib/browser/i18n/en/common.d.ts +15 -0
  313. package/lib/browser/i18n/en/common.js +15 -0
  314. package/lib/browser/i18n/en/discover.d.ts +11 -1
  315. package/lib/browser/i18n/en/discover.js +11 -1
  316. package/lib/browser/i18n/en/settings.d.ts +10 -0
  317. package/lib/browser/i18n/en/settings.js +10 -0
  318. package/lib/browser/i18n/ja/assistant.js +4 -0
  319. package/lib/browser/i18n/ja/chat.js +10 -0
  320. package/lib/browser/i18n/ja/common.js +15 -0
  321. package/lib/browser/i18n/ja/discover.js +11 -1
  322. package/lib/browser/i18n/ja/settings.js +10 -0
  323. package/lib/browser/i18n/locales.d.ts +51 -2
  324. package/lib/browser/i18n/messages.d.ts +50 -1
  325. package/lib/browser/i18n/zh/assistant.js +4 -0
  326. package/lib/browser/i18n/zh/chat.js +10 -0
  327. package/lib/browser/i18n/zh/common.js +15 -0
  328. package/lib/browser/i18n/zh/discover.js +11 -1
  329. package/lib/browser/i18n/zh/settings.js +10 -0
  330. package/lib/browser/i18n/zh-tw/assistant.js +4 -0
  331. package/lib/browser/i18n/zh-tw/chat.js +10 -0
  332. package/lib/browser/i18n/zh-tw/common.js +15 -0
  333. package/lib/browser/i18n/zh-tw/discover.js +11 -1
  334. package/lib/browser/i18n/zh-tw/settings.js +10 -0
  335. package/lib/browser/launch-art/art-palette.d.ts +42 -0
  336. package/lib/browser/launch-art/art-palette.js +76 -0
  337. package/lib/browser/launch-art/cyclic-automaton.d.ts +46 -0
  338. package/lib/browser/launch-art/cyclic-automaton.js +180 -0
  339. package/lib/browser/launch-art/fractal-tree.d.ts +44 -0
  340. package/lib/browser/launch-art/fractal-tree.js +52 -0
  341. package/lib/browser/launch-art/launch-art.d.ts +99 -0
  342. package/lib/browser/launch-art/launch-art.js +424 -0
  343. package/lib/browser/launch-art/launch-sky.d.ts +67 -0
  344. package/lib/browser/launch-art/launch-sky.js +157 -0
  345. package/lib/browser/links/clipboard-links.d.ts +86 -0
  346. package/lib/browser/links/clipboard-links.js +266 -0
  347. package/lib/browser/links/link-text.d.ts +30 -0
  348. package/lib/browser/links/link-text.js +100 -0
  349. package/lib/browser/links/links-protocol.d.ts +12 -1
  350. package/lib/browser/links/links.d.ts +8 -2
  351. package/lib/browser/links/links.js +33 -3
  352. package/lib/browser/markdown/code-renderers.d.ts +4 -0
  353. package/lib/browser/markdown/code-renderers.js +5 -1
  354. package/lib/browser/partners/group-picker.js +23 -29
  355. package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
  356. package/lib/browser/sandbox/work/work-senses.js +1 -1
  357. package/lib/browser/settings/settings-protocol.d.ts +26 -0
  358. package/lib/browser/settings/settings-protocol.js +12 -1
  359. package/lib/browser/settings/settings.d.ts +4 -1
  360. package/lib/browser/settings/settings.js +16 -3
  361. package/lib/browser/skin/skin-layer.d.ts +9 -0
  362. package/lib/browser/skin/skin-layer.js +154 -0
  363. package/lib/browser/skin/skin-util.d.ts +41 -0
  364. package/lib/browser/skin/skin-util.js +123 -0
  365. package/lib/browser/style/base.d.ts +1 -1
  366. package/lib/browser/style/base.js +10 -6
  367. package/lib/browser/style/chat-list.d.ts +1 -1
  368. package/lib/browser/style/chat-list.js +28 -15
  369. package/lib/browser/style/conversation-column.d.ts +1 -1
  370. package/lib/browser/style/conversation.d.ts +1 -1
  371. package/lib/browser/style/conversation.js +5 -4
  372. package/lib/browser/style/dialogs.d.ts +1 -1
  373. package/lib/browser/style/dialogs.js +2 -5
  374. package/lib/browser/style/forms.d.ts +6 -0
  375. package/lib/browser/style/forms.js +68 -0
  376. package/lib/browser/style/layout.d.ts +1 -1
  377. package/lib/browser/style/pages.d.ts +1 -1
  378. package/lib/browser/style/pages.js +14 -24
  379. package/lib/browser/style/phone.d.ts +1 -1
  380. package/lib/browser/style/shared.d.ts +1 -1
  381. package/lib/browser/style/shell.d.ts +1 -1
  382. package/lib/browser/style/shell.js +1 -6
  383. package/lib/browser/style/skins.d.ts +10 -0
  384. package/lib/browser/style/skins.js +110 -0
  385. package/lib/browser/style/surfaces.d.ts +1 -1
  386. package/lib/browser/style/surfaces.js +8 -6
  387. package/lib/browser/style/tasks.d.ts +1 -1
  388. package/lib/browser/style.js +4 -0
  389. package/lib/browser/util/fresh-rows.d.ts +22 -0
  390. package/lib/browser/util/fresh-rows.js +40 -0
  391. package/lib/browser/util/process.d.ts +12 -22
  392. package/lib/browser/util/process.js +49 -40
  393. package/lib/browser/util/voice.d.ts +18 -0
  394. package/lib/browser/util/voice.js +111 -3
  395. package/lib/browser/workbench-protocol.d.ts +2 -0
  396. package/lib/browser/workbench-services.d.ts +2 -0
  397. package/lib/browser/workbench-services.js +5 -0
  398. package/lib/browser/workbench.js +5 -0
  399. package/package.json +8 -8
  400. package/public/launch.svg +3 -3
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import type { WebShareItem, WebShareWay } from '../extension/web-api-menus.js';
3
+ /**
4
+ * The share sheet of something (WebExtensionUI.share, docs/design/ta-links.md 4.2): what goes, as the other will see
5
+ * it, over a row of the ways that take it (registerShareWay: send to friends and group chats, post to Moments, a link).
6
+ * A way picked, the sheet closes and the way shows what it needs; the one place sharing starts, whatever is shared.
7
+ */
8
+ export declare function ShareItemSheet({ item, ways, onClose }: {
9
+ item: WebShareItem;
10
+ ways: readonly WebShareWay[];
11
+ onClose(): void;
12
+ }): React.JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { Sparkles } from 'lucide-react';
2
+ import * as React from 'react';
3
+ import { WEB_ICONS } from '../extension/icons.js';
4
+ import { WebShareUtil } from '../extension/web-share.js';
5
+ import { useNotices } from '../hooks.js';
6
+ import { useT } from '../i18n/use-t.js';
7
+ import { EmptyState } from './empty-state.js';
8
+ import { Tile } from './share-sheet.js';
9
+ import { WebDialog } from './web-dialog.js';
10
+ /**
11
+ * The share sheet of something (WebExtensionUI.share, docs/design/ta-links.md 4.2): what goes, as the other will see
12
+ * it, over a row of the ways that take it (registerShareWay: send to friends and group chats, post to Moments, a link).
13
+ * A way picked, the sheet closes and the way shows what it needs; the one place sharing starts, whatever is shared.
14
+ */
15
+ export function ShareItemSheet({ item, ways, onClose }) {
16
+ var _a;
17
+ const t = useT();
18
+ const [, notices] = useNotices();
19
+ const taking = WebShareUtil.ways(ways, item);
20
+ const Icon = (_a = WEB_ICONS[WebShareUtil.icon(item)]) !== null && _a !== void 0 ? _a : Sparkles;
21
+ const name = WebShareUtil.name(item) || t('ta.share.thing');
22
+ const pick = (way) => {
23
+ onClose();
24
+ Promise.resolve()
25
+ .then(() => way.share(item))
26
+ .catch(reason => notices.error(reason));
27
+ };
28
+ return (React.createElement(WebDialog, { title: t('ta.share.titled', { name }), onClose: onClose },
29
+ React.createElement("div", { className: "ta-share" },
30
+ React.createElement("div", { className: "ta-share-card" },
31
+ React.createElement("div", { className: "ta-share-who" },
32
+ React.createElement("span", { className: "ta-share-face" },
33
+ React.createElement(Icon, { size: 22 })),
34
+ React.createElement("span", { className: "ta-share-who-text" },
35
+ React.createElement("strong", { className: "ta-share-name" }, name),
36
+ React.createElement("span", { className: "ta-share-gets" }, item.kind === 'file' ? t('ta.share.itemFile') : t('ta.share.itemWork'))))),
37
+ taking.length ? (React.createElement("div", { className: "ta-share-tiles" }, taking.map(way => (React.createElement(Tile, { key: way.key, icon: way.icon, label: WebShareUtil.label(way), onClick: () => pick(way) }))))) : (React.createElement(EmptyState, { title: t('ta.share.noWay'), compact: true })))));
38
+ }
39
+ //# sourceMappingURL=share-item-sheet.js.map
@@ -1,15 +1,23 @@
1
- import type { TaRoomServer } from '@celljs/ta-protocol';
1
+ import type { TaRoomEvent, TaRoomServer } from '@celljs/ta-protocol';
2
2
  import * as React from 'react';
3
- import type { WebShareSheetProps } from '../extension/web-extension-api.js';
3
+ import type { WebIcon, WebShareSheetProps } from '../extension/web-extension-api.js';
4
4
  import type { TaNotices } from '../notices/notices-protocol.js';
5
+ /** One of the actions under the code, as the share sheets of phones: a round icon over a word. */
6
+ export declare function Tile({ icon: Icon, label, onClick, disabled }: {
7
+ icon: WebIcon;
8
+ label: string;
9
+ onClick(): void;
10
+ disabled?: boolean;
11
+ }): React.JSX.Element;
5
12
  /**
6
13
  * The sheet everything shared goes out from (`ui.ShareSheet`, docs/design/ta-links.md 4): who or what goes and what
7
14
  * the other gets over its code, the link, and the actions in one row: Send to Ta friends, Copy, the system's other apps
8
15
  * (where it has them), New link; Stop under the notes. Every package shares through it, so a share looks and works the same wherever it is made.
9
16
  */
10
- /** What the sheet uses of the page: its notices, and the rooms to send to friends by. */
17
+ /** What the sheet uses of the page: its notices, the rooms to send to friends by, and what happens in them (how far a send got). */
11
18
  export interface ShareSheetServices {
12
19
  notices: TaNotices;
13
20
  rooms: TaRoomServer;
21
+ onRoomEvent?(listener: (event: TaRoomEvent) => void): () => void;
14
22
  }
15
- export declare function ShareSheet({ title, link, error, face, name, gets, notes, password, own, onRenew, onStop, stop, onClose, children, notices, rooms, }: WebShareSheetProps & ShareSheetServices): React.JSX.Element;
23
+ export declare function ShareSheet({ title, link, error, face, name, gets, invite, notes, password, own, onRenew, onStop, stop, onClose, children, notices, rooms, onRoomEvent, }: WebShareSheetProps & ShareSheetServices): React.JSX.Element;
@@ -1,9 +1,10 @@
1
1
  import { Check, Copy, KeyRound, RefreshCw, Send, Share2 } from 'lucide-react';
2
2
  import * as React from 'react';
3
+ import { shareMessage } from '../extension/share-sheet-compat.js';
3
4
  import { useT } from '../i18n/use-t.js';
4
5
  import { EmptyState } from './empty-state.js';
5
6
  import { QrView } from './qr-view.js';
6
- import { ShareToFriends, useShareFriends } from './share-friends.js';
7
+ import { FriendSends, ShareToFriends, useFriendSends, useShareFriends } from './share-friends.js';
7
8
  import { WebDialog } from './web-dialog.js';
8
9
  /** Copies a text, saying so on the control that did it for a moment. */
9
10
  function useCopied() {
@@ -19,18 +20,20 @@ function useCopied() {
19
20
  return [copied, copy];
20
21
  }
21
22
  /** One of the actions under the code, as the share sheets of phones: a round icon over a word. */
22
- function Tile({ icon: Icon, label, onClick, disabled }) {
23
+ export function Tile({ icon: Icon, label, onClick, disabled }) {
23
24
  return (React.createElement("button", { type: "button", className: "ta-share-tile", disabled: disabled, onClick: onClick },
24
25
  React.createElement("span", { className: "ta-share-tile-icon" },
25
26
  React.createElement(Icon, { size: 20 })),
26
27
  React.createElement("span", { className: "ta-share-tile-label" }, label)));
27
28
  }
28
- export function ShareSheet({ title, link, error, face, name, gets, notes, password, own, onRenew, onStop, stop, onClose, children, notices, rooms, }) {
29
+ export function ShareSheet({ title, link, error, face, name, gets, invite, notes, password, own, onRenew, onStop, stop, onClose, children, notices, rooms, onRoomEvent, }) {
29
30
  const t = useT();
30
31
  const [copied, copy] = useCopied();
31
32
  const [stopping, setStopping] = React.useState(false);
32
33
  const [picking, setPicking] = React.useState(false);
33
34
  const friends = useShareFriends(rooms);
35
+ const [sends, setSends] = React.useState(0);
36
+ const sent = useFriendSends(rooms, own ? undefined : link, sends, onRoomEvent);
34
37
  const canFriends = !own && !!(friends === null || friends === void 0 ? void 0 : friends.length);
35
38
  const canSend = !own && typeof navigator !== 'undefined' && typeof navigator.share === 'function';
36
39
  const end = async () => {
@@ -65,11 +68,17 @@ export function ShareSheet({ title, link, error, face, name, gets, notes, passwo
65
68
  " ",
66
69
  React.createElement("code", null, password)),
67
70
  React.createElement("button", { type: "button", className: "ta-button", onClick: () => copy(password, 'password') }, copied === 'password' ? t('ta.share.copied') : t('ta.share.copyPassword')))),
68
- picking && link && friends ? (React.createElement(ShareToFriends, { rooms: rooms, notices: notices, friends: friends, link: link, title: name || title, onDone: () => setPicking(false) })) : (React.createElement("div", { className: "ta-share-tiles" },
71
+ picking && link && friends ? (React.createElement(ShareToFriends, { rooms: rooms, notices: notices, friends: friends, link: link, title: name || title, onDone: done => {
72
+ setPicking(false);
73
+ if (done) {
74
+ setSends(n => n + 1);
75
+ }
76
+ } })) : (React.createElement("div", { className: "ta-share-tiles" },
69
77
  canFriends && React.createElement(Tile, { icon: Send, label: t('ta.share.friends'), disabled: !link, onClick: () => setPicking(true) }),
70
- React.createElement(Tile, { icon: copied === 'link' ? Check : Copy, label: copied === 'link' ? t('ta.share.copied') : t('ta.share.copy'), disabled: !link, onClick: () => link && copy(link, 'link') }),
71
- canSend && (React.createElement(Tile, { icon: Share2, label: t('ta.share.apps'), disabled: !link, onClick: () => link && void navigator.share({ title: name || title, url: link }).catch(() => undefined) })),
78
+ React.createElement(Tile, { icon: copied === 'link' ? Check : Copy, label: copied === 'link' ? t('ta.share.copied') : t('ta.share.copy'), disabled: !link, onClick: () => link && copy(shareMessage(invite, link), 'link') }),
79
+ canSend && (React.createElement(Tile, { icon: Share2, label: t('ta.share.apps'), disabled: !link, onClick: () => link && void navigator.share({ title: name || title, text: invite, url: link }).catch(() => undefined) })),
72
80
  onRenew && React.createElement(Tile, { icon: RefreshCw, label: t('ta.share.renew'), disabled: !link, onClick: onRenew }))),
81
+ !picking && React.createElement(FriendSends, { sent: sent }),
73
82
  children,
74
83
  lines.length > 0 && (React.createElement("div", { className: "ta-share-notes" }, lines.map(line => (React.createElement("p", { key: line }, line))))),
75
84
  onStop && link && (React.createElement("button", { type: "button", className: `ta-share-stop${stopping ? ' ta-busy' : ''}`, disabled: stopping, onClick: () => void end() },
@@ -37,19 +37,19 @@ function SetupForm({ setup, onSave, onCancel }) {
37
37
  const [busy, setBusy] = React.useState(false);
38
38
  const set = (id, value) => setValues(current => ({ ...current, [id]: value }));
39
39
  const missing = shape.fields.some(field => { var _a; return !field.optional && !((_a = values[field.id]) === null || _a === void 0 ? void 0 : _a.trim()); }) || (!setup.secret && !((_a = values[shape.secret]) === null || _a === void 0 ? void 0 : _a.trim()));
40
- return (React.createElement("form", { className: "ta-sign-in-form", onSubmit: event => {
40
+ return (React.createElement("form", { className: "ta-form", onSubmit: event => {
41
41
  event.preventDefault();
42
42
  setBusy(true);
43
43
  void onSave(values).finally(() => setBusy(false));
44
44
  } },
45
- [...shape.fields, { id: shape.secret, secret: true }].map(field => { var _a; return (React.createElement("label", { key: field.id, className: "ta-sign-in-field" },
46
- React.createElement("span", null, t(`ta.signInSetup.field.${field.id}`)),
45
+ [...shape.fields, { id: shape.secret, secret: true }].map(field => { var _a; return (React.createElement("label", { key: field.id, className: "ta-form-item" },
46
+ React.createElement("span", { className: "ta-form-label" }, t(`ta.signInSetup.field.${field.id}`)),
47
47
  React.createElement("input", { className: "ta-input", type: 'secret' in field ? 'password' : 'text', value: (_a = values[field.id]) !== null && _a !== void 0 ? _a : '', placeholder: 'secret' in field && setup.secret
48
48
  ? t('ta.signInSetup.secretKept')
49
49
  : 'optional' in field && field.optional
50
50
  ? t('ta.signInSetup.optional')
51
51
  : '', autoComplete: "off", spellCheck: false, autoCapitalize: "off", onChange: event => set(field.id, event.target.value) }))); }),
52
- React.createElement("div", { className: "ta-sign-in-actions" },
52
+ React.createElement("div", { className: "ta-form-actions" },
53
53
  React.createElement("button", { type: "button", className: "ta-button", disabled: busy, onClick: onCancel }, t('ta.cancel')),
54
54
  React.createElement("button", { type: "submit", className: `ta-button ta-primary${busy ? ' ta-busy' : ''}`, disabled: busy || missing }, t('ta.signInSetup.save')))));
55
55
  }
@@ -23,7 +23,7 @@ export function TrustedDomains() {
23
23
  };
24
24
  return (React.createElement(React.Fragment, null,
25
25
  React.createElement(Row, { label: t('ta.settings.trustedDomains'), description: t('ta.settings.trustedDomainsHint'), stacked: true },
26
- React.createElement("form", { className: "ta-trusted-add", onSubmit: event => {
26
+ React.createElement("form", { className: "ta-trusted-add ta-form-inline", onSubmit: event => {
27
27
  event.preventDefault();
28
28
  add();
29
29
  } },
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The room of a Loading or an EmptyState that is not `compact`: the rest of the view it is in, from its top to the
4
+ * bottom of what shows it, less what comes under it, so that it sits in the middle of what is left however the page
5
+ * around it is laid out. A column of flex that gives it room already (`flex: 1` in base.ts) is left to do so; where its
6
+ * parent is not one (a block an extension wraps it in, a body that is no column of flex) it takes the room itself,
7
+ * rather than each page having to make every box above it a column of flex. It keeps its own height in a reply, in a
8
+ * box drawn as one (a card: rounded, with a background, a border or a shadow) and beside something (a cell of a grid).
9
+ */
10
+ export declare namespace ViewRoom {
11
+ interface Measure {
12
+ /** Its height as laid out, before any room of its own. */
13
+ height: number;
14
+ /** The height of what it holds (or its min-height): more than that, its parent gives it room. */
15
+ natural: number;
16
+ /** From its top to the bottom of the view, less what comes under it. */
17
+ room: number;
18
+ }
19
+ /** The min-height it takes, or undefined where it keeps the height it has. */
20
+ function height({ height, natural, room }: Measure): number | undefined;
21
+ /** Keeps the room of the element while the view and what is around it change; the function stops it. */
22
+ function keep(element: HTMLElement): () => void;
23
+ }
24
+ /** Gives the element its room in the view (ViewRoom) while `on`. */
25
+ export declare function useViewRoom(ref: React.RefObject<HTMLElement | null>, on: boolean): void;
@@ -0,0 +1,136 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The room of a Loading or an EmptyState that is not `compact`: the rest of the view it is in, from its top to the
4
+ * bottom of what shows it, less what comes under it, so that it sits in the middle of what is left however the page
5
+ * around it is laid out. A column of flex that gives it room already (`flex: 1` in base.ts) is left to do so; where its
6
+ * parent is not one (a block an extension wraps it in, a body that is no column of flex) it takes the room itself,
7
+ * rather than each page having to make every box above it a column of flex. It keeps its own height in a reply, in a
8
+ * box drawn as one (a card: rounded, with a background, a border or a shadow) and beside something (a cell of a grid).
9
+ */
10
+ export var ViewRoom;
11
+ (function (ViewRoom) {
12
+ /** The min-height it takes, or undefined where it keeps the height it has. */
13
+ function height({ height, natural, room }) {
14
+ if (height > natural + 1) {
15
+ return undefined;
16
+ }
17
+ return room > height + 1 ? Math.floor(room) : undefined;
18
+ }
19
+ ViewRoom.height = height;
20
+ /** Keeps the room of the element while the view and what is around it change; the function stops it. */
21
+ function keep(element) {
22
+ const view = viewOf(element);
23
+ if (element.closest('.ta-message') || boxed(element, view)) {
24
+ return () => undefined;
25
+ }
26
+ let frame = 0;
27
+ const measure = () => {
28
+ frame = 0;
29
+ const taken = room(element, view);
30
+ const next = taken === undefined ? '' : `${taken}px`;
31
+ if (element.style.minHeight !== next) {
32
+ element.style.minHeight = next;
33
+ }
34
+ };
35
+ const later = () => {
36
+ if (!frame) {
37
+ frame = requestAnimationFrame(measure);
38
+ }
39
+ };
40
+ measure();
41
+ const observer = typeof ResizeObserver === 'function' ? new ResizeObserver(later) : undefined;
42
+ observer === null || observer === void 0 ? void 0 : observer.observe(view !== null && view !== void 0 ? view : document.documentElement);
43
+ if (element.parentElement && element.parentElement !== view) {
44
+ observer === null || observer === void 0 ? void 0 : observer.observe(element.parentElement);
45
+ }
46
+ window.addEventListener('resize', later);
47
+ return () => {
48
+ observer === null || observer === void 0 ? void 0 : observer.disconnect();
49
+ window.removeEventListener('resize', later);
50
+ cancelAnimationFrame(frame);
51
+ element.style.minHeight = '';
52
+ };
53
+ }
54
+ ViewRoom.keep = keep;
55
+ function room(element, view) {
56
+ element.style.minHeight = '';
57
+ const rect = element.getBoundingClientRect();
58
+ let after = 0;
59
+ for (let node = element; node.parentElement && node !== view; node = node.parentElement) {
60
+ const parent = node.parentElement;
61
+ if (parent === view) {
62
+ break;
63
+ }
64
+ const box = node.getBoundingClientRect();
65
+ let bottom = box.bottom;
66
+ for (const sibling of Array.from(parent.children)) {
67
+ if (sibling === node || !inFlow(sibling)) {
68
+ continue;
69
+ }
70
+ const other = sibling.getBoundingClientRect();
71
+ if (other.height === 0 && other.width === 0) {
72
+ continue;
73
+ }
74
+ if (other.top < box.bottom - 1 && other.bottom > box.top + 1) {
75
+ return undefined;
76
+ }
77
+ if (other.top >= box.bottom - 1) {
78
+ bottom = Math.max(bottom, other.bottom);
79
+ }
80
+ }
81
+ const style = getComputedStyle(parent);
82
+ after += bottom - box.bottom + px(style.paddingBottom) + px(style.borderBottomWidth);
83
+ }
84
+ const end = view ? viewBottom(view) : window.innerHeight;
85
+ return height({ height: rect.height, natural: natural(element, rect.height), room: Math.min(end, window.innerHeight) - rect.top - after });
86
+ }
87
+ function natural(element, laid) {
88
+ const style = getComputedStyle(element);
89
+ const children = Array.from(element.children).filter(inFlow);
90
+ if (!children.length) {
91
+ return Math.max(px(style.minHeight), laid);
92
+ }
93
+ const top = Math.min(...children.map(child => child.getBoundingClientRect().top));
94
+ const bottom = Math.max(...children.map(child => child.getBoundingClientRect().bottom));
95
+ const content = bottom - top + px(style.paddingTop) + px(style.paddingBottom) + px(style.borderTopWidth) + px(style.borderBottomWidth);
96
+ return Math.max(px(style.minHeight), content);
97
+ }
98
+ function viewOf(element) {
99
+ for (let node = element.parentElement; node && node !== document.body && node !== document.documentElement; node = node.parentElement) {
100
+ const overflow = getComputedStyle(node).overflowY;
101
+ if (overflow !== 'visible') {
102
+ return node;
103
+ }
104
+ }
105
+ return undefined;
106
+ }
107
+ function viewBottom(view) {
108
+ const style = getComputedStyle(view);
109
+ return view.getBoundingClientRect().top + view.clientTop + view.clientHeight - px(style.paddingBottom);
110
+ }
111
+ function boxed(element, view) {
112
+ for (let node = element.parentElement; node && node !== view && node !== document.body; node = node.parentElement) {
113
+ const style = getComputedStyle(node);
114
+ if (px(style.borderTopLeftRadius) <= 0) {
115
+ continue;
116
+ }
117
+ const filled = !/^(transparent|rgba\(0, 0, 0, 0\))$/.test(style.backgroundColor);
118
+ if (filled || px(style.borderTopWidth) > 0 || style.boxShadow !== 'none') {
119
+ return true;
120
+ }
121
+ }
122
+ return false;
123
+ }
124
+ function inFlow(element) {
125
+ const style = getComputedStyle(element);
126
+ return style.display !== 'none' && style.position !== 'absolute' && style.position !== 'fixed';
127
+ }
128
+ function px(value) {
129
+ return Number.parseFloat(value) || 0;
130
+ }
131
+ })(ViewRoom || (ViewRoom = {}));
132
+ /** Gives the element its room in the view (ViewRoom) while `on`. */
133
+ export function useViewRoom(ref, on) {
134
+ React.useLayoutEffect(() => (on && ref.current ? ViewRoom.keep(ref.current) : undefined), [on, ref]);
135
+ }
136
+ //# sourceMappingURL=view-room.js.map
@@ -141,17 +141,17 @@ function VoiceForm({ type, title, service, close, added, }) {
141
141
  event.preventDefault();
142
142
  void submit();
143
143
  } },
144
- type.options.map(option => { var _a, _b; return (React.createElement("label", { key: option.key, className: "ta-store-field" },
145
- React.createElement("span", { className: "ta-store-field-label" }, (_a = TaPackageTextUtil.pick(option.label, language)) !== null && _a !== void 0 ? _a : option.key,
146
- option.optional && React.createElement("span", { className: "ta-store-field-optional" }, t('ta.voices.optional'))),
144
+ type.options.map(option => { var _a, _b; return (React.createElement("label", { key: option.key, className: "ta-form-item" },
145
+ React.createElement("span", { className: "ta-form-label" }, (_a = TaPackageTextUtil.pick(option.label, language)) !== null && _a !== void 0 ? _a : option.key,
146
+ option.optional && React.createElement("span", { className: "ta-form-optional" }, t('ta.voices.optional'))),
147
147
  React.createElement("input", { className: "ta-input", type: option.secret ? 'password' : 'text', autoComplete: option.secret ? 'new-password' : 'off', spellCheck: false, placeholder: service && option.secret ? t('ta.voices.keepSecret') : option.placeholder, value: (_b = values[option.key]) !== null && _b !== void 0 ? _b : '', onChange: event => {
148
148
  const value = event.target.value;
149
149
  setValues(before => ({ ...before, [option.key]: value }));
150
150
  } }))); }),
151
- React.createElement("label", { className: "ta-store-field" },
152
- React.createElement("span", { className: "ta-store-field-label" },
151
+ React.createElement("label", { className: "ta-form-item" },
152
+ React.createElement("span", { className: "ta-form-label" },
153
153
  t('ta.voices.name'),
154
- React.createElement("span", { className: "ta-store-field-optional" }, t('ta.voices.optional'))),
154
+ React.createElement("span", { className: "ta-form-optional" }, t('ta.voices.optional'))),
155
155
  React.createElement("input", { className: "ta-input", value: name, placeholder: title, spellCheck: false, onChange: event => setName(event.target.value) })),
156
156
  React.createElement("p", { className: "ta-store-form-note" },
157
157
  React.createElement(Icon, { icon: ShieldCheck, size: 13 }),
@@ -21,14 +21,17 @@ export interface DeviceState {
21
21
  * (`@media ${DeviceMedia.COMPACT}`) and for the code (DeviceState). Never write a width of the layout elsewhere.
22
22
  */
23
23
  export declare namespace DeviceMedia {
24
- /** The main pointer is a finger. */
25
- const TOUCH = "(pointer: coarse)";
24
+ /**
25
+ * The main pointer is a finger. Or a pen: a screen that also takes a stylus is a fine pointer to Chrome on Android
26
+ * (phones with a pen, the emulator), but no pointer of it hovers, as none of a computer's fails to.
27
+ */
28
+ const TOUCH = "(pointer: coarse), (hover: none)";
26
29
  /** A phone held sideways: as wide as a small tablet, but low. */
27
- const LOW = "(max-height: 500px) and (pointer: coarse)";
28
- const COMPACT = "(max-width: 860px), (max-height: 500px) and (pointer: coarse)";
30
+ const LOW = "(max-height: 500px) and (pointer: coarse), (max-height: 500px) and (hover: none)";
31
+ const COMPACT = "(max-width: 860px), (max-height: 500px) and (pointer: coarse), (max-height: 500px) and (hover: none)";
29
32
  /** The workbench beside the conversation too: a window of a computer, or a tablet wide enough (13" sideways) that the conversation keeps its room beside the sidebar. */
30
- const EXPANDED = "(min-width: 1100px) and (pointer: fine), (min-width: 1300px)";
31
- const HANDHELD = "(max-width: 599px), (max-height: 500px) and (pointer: coarse)";
33
+ const EXPANDED = "(min-width: 1100px) and (pointer: fine) and (hover: hover), (min-width: 1300px)";
34
+ const HANDHELD = "(max-width: 599px), (max-height: 500px) and (pointer: coarse), (max-height: 500px) and (hover: none)";
32
35
  }
33
36
  /**
34
37
  * How the page moves with the on-screen keyboard of the Ta app on iOS (DeviceObserver, style/shell.ts):
@@ -4,13 +4,16 @@
4
4
  */
5
5
  export var DeviceMedia;
6
6
  (function (DeviceMedia) {
7
- /** The main pointer is a finger. */
8
- DeviceMedia.TOUCH = '(pointer: coarse)';
7
+ /**
8
+ * The main pointer is a finger. Or a pen: a screen that also takes a stylus is a fine pointer to Chrome on Android
9
+ * (phones with a pen, the emulator), but no pointer of it hovers, as none of a computer's fails to.
10
+ */
11
+ DeviceMedia.TOUCH = '(pointer: coarse), (hover: none)';
9
12
  /** A phone held sideways: as wide as a small tablet, but low. */
10
- DeviceMedia.LOW = '(max-height: 500px) and (pointer: coarse)';
13
+ DeviceMedia.LOW = '(max-height: 500px) and (pointer: coarse), (max-height: 500px) and (hover: none)';
11
14
  DeviceMedia.COMPACT = `(max-width: 860px), ${DeviceMedia.LOW}`;
12
15
  /** The workbench beside the conversation too: a window of a computer, or a tablet wide enough (13" sideways) that the conversation keeps its room beside the sidebar. */
13
- DeviceMedia.EXPANDED = '(min-width: 1100px) and (pointer: fine), (min-width: 1300px)';
16
+ DeviceMedia.EXPANDED = '(min-width: 1100px) and (pointer: fine) and (hover: hover), (min-width: 1300px)';
14
17
  DeviceMedia.HANDHELD = `(max-width: 599px), ${DeviceMedia.LOW}`;
15
18
  })(DeviceMedia || (DeviceMedia = {}));
16
19
  /**
@@ -1,3 +1,10 @@
1
+ /** What plays on the launch screen (LaunchArt): while a finger holds it, the launch screen stays. */
2
+ export interface LaunchStage {
3
+ readonly held: boolean;
4
+ /** `next` once, when the finger lets go. */
5
+ onRelease(next: () => void): void;
6
+ stop(): void;
7
+ }
1
8
  /** What the launch screen reads of the page; tests give their own. */
2
9
  export interface LaunchEnvironment {
3
10
  /** `#ta-launch` of index.html: there in the app of a phone only. */
@@ -7,19 +14,22 @@ export interface LaunchEnvironment {
7
14
  observe(changed: () => void): () => void;
8
15
  frame(next: () => void): void;
9
16
  later(next: () => void, ms: number): () => void;
17
+ stage?: LaunchStage;
10
18
  }
11
19
  /**
12
20
  * The launch picture of the app of a phone, as WeChat's: apps/ta/serve/index.html draws it before any script
13
21
  * runs (`#ta-launch`, the picture of `public/launch.svg`), over the native one it takes over from. It stays
14
22
  * until what the page shows is whole, then fades: the app is there (`.ta-app`, or the page to sign in) and no
15
23
  * list is still on its way (`.ta-loading`). A computer slow to answer gets the page after MAX at most, with
16
- * its own word for that (ConnectionBar).
24
+ * its own word for that (ConnectionBar). Over it the picture comes alive (`stage`, LaunchArt); a finger on it keeps
25
+ * it until it lets go.
17
26
  */
18
27
  export declare class LaunchScreen {
19
28
  protected readonly env: LaunchEnvironment;
20
29
  static readonly MAX = 2000;
21
30
  static readonly FADE = 320;
22
31
  protected done: boolean;
32
+ protected waiting: boolean;
23
33
  protected stops: (() => void)[];
24
34
  constructor(env: LaunchEnvironment);
25
35
  /** The page shows something, and nothing in it waits for its rows. */
@@ -1,14 +1,17 @@
1
+ import { LaunchArtUtil } from '../launch-art/launch-art.js';
1
2
  /**
2
3
  * The launch picture of the app of a phone, as WeChat's: apps/ta/serve/index.html draws it before any script
3
4
  * runs (`#ta-launch`, the picture of `public/launch.svg`), over the native one it takes over from. It stays
4
5
  * until what the page shows is whole, then fades: the app is there (`.ta-app`, or the page to sign in) and no
5
6
  * list is still on its way (`.ta-loading`). A computer slow to answer gets the page after MAX at most, with
6
- * its own word for that (ConnectionBar).
7
+ * its own word for that (ConnectionBar). Over it the picture comes alive (`stage`, LaunchArt); a finger on it keeps
8
+ * it until it lets go.
7
9
  */
8
10
  export class LaunchScreen {
9
11
  constructor(env) {
10
12
  this.env = env;
11
13
  this.done = false;
14
+ this.waiting = false;
12
15
  this.stops = [];
13
16
  }
14
17
  /** The page shows something, and nothing in it waits for its rows. */
@@ -31,8 +34,17 @@ export class LaunchScreen {
31
34
  this.env.frame(() => this.env.frame(() => LaunchScreen.whole(this.env.root) && this.hide()));
32
35
  }
33
36
  hide() {
37
+ var _a;
34
38
  const { element } = this.env;
35
- if (this.done || !element) {
39
+ if (this.done || !element || this.waiting) {
40
+ return;
41
+ }
42
+ if ((_a = this.env.stage) === null || _a === void 0 ? void 0 : _a.held) {
43
+ this.waiting = true;
44
+ this.env.stage.onRelease(() => {
45
+ this.waiting = false;
46
+ this.hide();
47
+ });
36
48
  return;
37
49
  }
38
50
  this.done = true;
@@ -40,7 +52,11 @@ export class LaunchScreen {
40
52
  stop();
41
53
  }
42
54
  element.setAttribute('data-leaving', '');
43
- this.env.later(() => element.remove(), LaunchScreen.FADE);
55
+ this.env.later(() => {
56
+ var _a;
57
+ element.remove();
58
+ (_a = this.env.stage) === null || _a === void 0 ? void 0 : _a.stop();
59
+ }, LaunchScreen.FADE);
44
60
  }
45
61
  }
46
62
  LaunchScreen.MAX = 2000;
@@ -52,8 +68,10 @@ export var LaunchScreenUtil;
52
68
  if (typeof document === 'undefined') {
53
69
  return;
54
70
  }
71
+ const element = document.getElementById('ta-launch');
55
72
  new LaunchScreen({
56
- element: document.getElementById('ta-launch'),
73
+ element,
74
+ stage: element ? LaunchArtUtil.start(element) : undefined,
57
75
  root: document.body,
58
76
  observe: changed => {
59
77
  const observer = new MutationObserver(changed);
@@ -1,6 +1,8 @@
1
1
  import type * as React from 'react';
2
2
  import type { WebShareSheetProps } from './web-api-components.js';
3
3
  import type { WebExtensionAPI } from './web-extension-api.js';
4
+ /** What Copy puts in the clipboard: the words of the share, then the link on a line of its own. */
5
+ export declare function shareMessage(invite: string | undefined, link: string): string;
4
6
  /**
5
7
  * The share sheet a package shares through (`<ShareSheetCompat pi={pi} …/>`): the page's (`pi.ui.ShareSheet`), or,
6
8
  * in a Ta app older than it (a phone's page is often older than the extensions of its computer), a dialog with the
@@ -1,3 +1,8 @@
1
+ /** What Copy puts in the clipboard: the words of the share, then the link on a line of its own. */
2
+ export function shareMessage(invite, link) {
3
+ const words = invite === null || invite === void 0 ? void 0 : invite.trim();
4
+ return words ? `${words}\n${link}` : link;
5
+ }
1
6
  /**
2
7
  * The share sheet a package shares through (`<ShareSheetCompat pi={pi} …/>`): the page's (`pi.ui.ShareSheet`), or,
3
8
  * in a Ta app older than it (a phone's page is often older than the extensions of its computer), a dialog with the
@@ -8,7 +13,7 @@ export function ShareSheetCompat({ pi, ...props }) {
8
13
  if (pi.ui.ShareSheet) {
9
14
  return h(pi.ui.ShareSheet, props);
10
15
  }
11
- const { title, link, error, name, gets, notes, password, own, onClose, children } = props;
16
+ const { title, link, error, name, gets, invite, notes, password, own, onClose, children } = props;
12
17
  const quiet = { margin: 0, opacity: 0.7, textAlign: 'center' };
13
18
  return h(pi.ui.Dialog, { title, onClose }, h('div', { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 12 } }, error !== undefined
14
19
  ? h('p', { role: 'alert' }, error)
@@ -18,7 +23,12 @@ export function ShareSheetCompat({ pi, ...props }) {
18
23
  h('code', { key: 'link', style: { maxWidth: '100%', overflowWrap: 'anywhere', userSelect: 'all' } }, link !== null && link !== void 0 ? link : '…'),
19
24
  password ? h('code', { key: 'password', style: { userSelect: 'all' } }, password) : null,
20
25
  link
21
- ? h('button', { key: 'copy', type: 'button', className: 'ta-button ta-primary', onClick: () => { var _a; return void ((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(link)); } }, 'Copy')
26
+ ? h('button', {
27
+ key: 'copy',
28
+ type: 'button',
29
+ className: 'ta-button ta-primary',
30
+ onClick: () => { var _a; return void ((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(shareMessage(invite, link))); },
31
+ }, 'Copy')
22
32
  : null,
23
33
  children,
24
34
  ...(notes !== null && notes !== void 0 ? notes : []).filter(Boolean).map(line => h('p', { key: String(line), style: quiet }, line)),
@@ -78,3 +78,26 @@ export interface WebChatIconSource {
78
78
  /** What `icon` answers changed: the lists draw their rows again. */
79
79
  subscribe?(listener: () => void): () => void;
80
80
  }
81
+ /** What a session still opening is shown as (`switchSession`): the head of its conversation, till it comes. */
82
+ export interface WebSessionOpening {
83
+ title?: string;
84
+ cwd?: string;
85
+ /** Its session file, when known: what the device kept of the conversation shows while it opens, and while the computer cannot be reached. */
86
+ sessionFile?: string;
87
+ }
88
+ /** What a notice of an extension has besides its message (WebExtensionUI.notify). */
89
+ export interface WebNotifyOptions {
90
+ action?: {
91
+ label: string;
92
+ run(): void;
93
+ };
94
+ key?: string;
95
+ /** Ta did it for the user: drawn with the double's face, the message as its head (`修改了设置`). */
96
+ ta?: boolean;
97
+ /** What it changed, a row each under the message: `{ label: '通话字幕', before: '关', after: '开' }`, or a name alone. */
98
+ changes?: {
99
+ label?: string;
100
+ before?: string;
101
+ after: string;
102
+ }[];
103
+ }
@@ -31,6 +31,17 @@ export interface WebCodeRendererProps {
31
31
  answer?: string;
32
32
  conversation?: string;
33
33
  embedded?: boolean;
34
+ /**
35
+ * The title the frame around the block shows already (the head of a card of the board): a title of its own that says
36
+ * the same (TaWorkTitle.repeats) is left out, the rest of its head kept. None elsewhere, and for a block inside it.
37
+ */
38
+ titled?: string;
39
+ /**
40
+ * The block is what the page shows (a work's page, a file opened, a work shared by a link, a page printed): drawn
41
+ * whole. Otherwise it sits among others (a reply, a post, a message), and a long one shows its start with a way to
42
+ * see the rest (the first page of a document, the first rows of a sheet). Given by `ui.Markdown`'s `whole`.
43
+ */
44
+ whole?: boolean;
34
45
  point?: (point: TaWorkPoint) => void;
35
46
  }
36
47
  /** pi's custom message, as the conversation holds it. */
@@ -37,6 +37,13 @@ export interface WebShareSheetProps {
37
37
  name?: string;
38
38
  /** What the other gets, in a line: "They add it as an agent of their own". */
39
39
  gets?: string;
40
+ /**
41
+ * What the other reads with the link, in their words, as the user would write it to them: "Join my group chat
42
+ * Weekend hike on Ta: open the link in Ta to ask to join". Copy and Other apps send it before the link (shareMessage),
43
+ * and Ta, where the other copies it, names the link by it (docs/design/ta-links.md 7): a link alone says nothing of
44
+ * what it is.
45
+ */
46
+ invite: string;
40
47
  /** Quieter lines under it: how long it works, what it holds or leaves out. Empty ones are left out. */
41
48
  notes?: readonly (string | false | undefined)[];
42
49
  /** A password the other needs, told apart from the link: with a Copy of its own. */
@@ -159,7 +166,7 @@ export interface WebSwitchProps {
159
166
  }
160
167
  /**
161
168
  * What a page, a list, a card or a dialog shows while what it shows is on its way (`ui.Loading`): a turning mark and its
162
- * `label`, centered in the space it has (its parent a column of flex), `compact` a line of its own in a card or a
169
+ * `label`, centered in the space left in the view however the page around it is laid out, `compact` a line of its own in a card or a
163
170
  * dialog; after a moment, never for what comes at once. Never a spinner or a "loading" text of your own.
164
171
  */
165
172
  export interface WebLoadingProps {