@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
@@ -164,6 +164,16 @@ export const CHAT_ZH = {
164
164
  'ta.composer.voiceDenied': 'Ta 没有使用麦克风或语音识别的权限。已经允许了仍不行,可能是这个浏览器不提供语音识别,可以换用 Safari、Chrome 或 Ta App。',
165
165
  'ta.composer.voiceUnavailable': '这个浏览器的语音识别用不了(iPhone 上要打开“Siri 与听写”)。可以换用 Safari、Chrome 或 Ta App。',
166
166
  'ta.composer.voiceFailed': '语音识别不可用:{error}',
167
+ 'ta.hear.offer': '这台设备不能识别语音,可以改由电脑来听写',
168
+ 'ta.hear.offerHint': '给电脑下载约 {size} 的识别模型;只用麦克风权限,不联网。',
169
+ 'ta.hear.turnOn': '下载并打开',
170
+ 'ta.hear.turnedOn': '电脑正在下载语音识别模型,好了再说一次',
171
+ 'ta.hear.getting': '电脑正在下载语音识别模型({percent}%),好了再说一次',
172
+ 'ta.hear.failed': '电脑上的语音识别还没准备好',
173
+ 'ta.hear.retry': '重试',
174
+ 'ta.hear.unsupported': '这台设备不能识别语音,电脑也跑不了 Ta 的语音识别',
175
+ 'ta.hear.unavailable': '这台设备不能识别语音,Ta 的语音识别也没开',
176
+ 'ta.hear.unavailableHint': '在 设置 → 扩展 里打开「实时语音」和「本机模型」。',
167
177
  'ta.talk.listening': '正在听…',
168
178
  'ta.talk.edit': '编辑',
169
179
  'ta.talk.releaseSend': '松开 发送',
@@ -35,6 +35,7 @@ export const COMMON_ZH = {
35
35
  'ta.zoom.next': '下一张(→)',
36
36
  'ta.zoom.failed': '无法显示这张图片',
37
37
  'ta.markdown.missing': '无法显示 {name}',
38
+ 'ta.markdown.retry': '点一下重试',
38
39
  'ta.link.openFile': '点击打开',
39
40
  'ta.link.openFolder': '点击在资源管理器中显示',
40
41
  'ta.link.external': 'Ctrl + 点击在系统浏览器中打开',
@@ -45,6 +46,16 @@ export const COMMON_ZH = {
45
46
  'ta.link.trust': '信任 {host}',
46
47
  'ta.link.trustHint': '以后这个域名的网页不再询问,直接打开;可在设置中管理。',
47
48
  'ta.link.copied': '链接已复制',
49
+ 'ta.link.kindPairing': '连接电脑的链接',
50
+ 'ta.link.kindExtension': 'Ta 扩展',
51
+ 'ta.clip.clipboardOne': '剪贴板里有一个{kind}',
52
+ 'ta.clip.pasteOne': '粘贴的是一个{kind}',
53
+ 'ta.clip.clipboardFrom': '来自剪贴板 · {kind}',
54
+ 'ta.clip.pasteFrom': '粘贴的内容 · {kind}',
55
+ 'ta.clip.clipboardMany': '剪贴板里有 {count} 个 Ta 链接',
56
+ 'ta.clip.pasteMany': '粘贴的内容里有 {count} 个 Ta 链接',
57
+ 'ta.clip.pick': '点一个打开',
58
+ 'ta.clip.open': '打开',
48
59
  'ta.link.notFound': '{path} 不存在。',
49
60
  'ta.terminal.openLink': 'Ctrl + 点击打开',
50
61
  'ta.terminal.openLinkMac': 'Cmd + 点击打开',
@@ -91,6 +102,10 @@ export const COMMON_ZH = {
91
102
  'ta.select.all': '全选',
92
103
  'ta.select.count': '已选 {count} 项',
93
104
  'ta.select.done': '完成',
105
+ 'ta.people.search': '搜索',
106
+ 'ta.people.none': '还没有可选的人',
107
+ 'ta.people.noMatch': '没有找到',
108
+ 'ta.people.leaveOut': '移除 {name}',
94
109
  'ta.more': '更多',
95
110
  'ta.host.title': '在远端主机 {host} 上',
96
111
  'ta.on': '开',
@@ -45,12 +45,22 @@ export const DISCOVER_ZH = {
45
45
  'ta.share.friends': 'Ta 好友',
46
46
  'ta.share.pickFriends': '选择好友',
47
47
  'ta.share.sendN': '发送给 {n} 位',
48
- 'ta.share.sentTo': '已发给 {n} 位好友,在对方的 Ta 里等着打开',
48
+ 'ta.share.sentTitle': '发给了这些好友',
49
+ 'ta.share.sent': '已发出',
50
+ 'ta.share.got': '已收到',
51
+ 'ta.share.opened': '已打开',
49
52
  'ta.share.renew': '换新链接',
50
53
  'ta.share.passwordApart': '密码请另行告诉对方:',
51
54
  'ta.share.copyPassword': '复制密码',
52
55
  'ta.share.cannotMake': '没能生成链接',
53
56
  'ta.share.extensionGets': '对方在 Ta 里打开,不用安装',
57
+ 'ta.share.extensionInvite': '送你一个 Ta 扩展「{name}」,用 Ta 打开链接就能试用,不用安装:',
58
+ 'ta.share.share': '分享',
59
+ 'ta.share.titled': '分享“{name}”',
60
+ 'ta.share.thing': '这个',
61
+ 'ta.share.itemWork': '选择分享到哪里',
62
+ 'ta.share.itemFile': '发出去的是文件现在的副本',
63
+ 'ta.share.noWay': '这里还没有能分享到的地方',
54
64
  'ta.open.title': '打开“{name}”?',
55
65
  'ta.open.published': '扩展在 Ta 里运行,能做 Ta 能做的事:读写这台电脑上的文件、运行命令。只打开你信任的来源。',
56
66
  'ta.open.relayed': '扩展来自分享者的电脑,在 Ta 里运行,能做 Ta 能做的事:读写这台电脑上的文件、运行命令。只打开你信任的人分享的扩展。',
@@ -59,6 +59,14 @@ export const SETTINGS_ZH = {
59
59
  'ta.settings.diagramStyle.sketch': '草图',
60
60
  'ta.settings.diagramStyle.colour': '彩色',
61
61
  'ta.settings.diagramStyle.motion': '动效',
62
+ 'ta.settings.skin': '皮肤',
63
+ 'ta.settings.skinHint': 'Ta 背后的画面,各栏像玻璃一样透出它。',
64
+ 'ta.settings.skin.none': '无',
65
+ 'ta.settings.glass': '玻璃',
66
+ 'ta.settings.glassHint': '透出多少皮肤的画面。',
67
+ 'ta.settings.glass.clear': '清透',
68
+ 'ta.settings.glass.soft': '柔和',
69
+ 'ta.settings.glass.focus': '专注',
62
70
  'ta.settings.fontSize': '字体大小',
63
71
  'ta.settings.fontSizeHint': '整个页面的文字。',
64
72
  'ta.settings.chatFontSize': '对话字体大小',
@@ -144,6 +152,8 @@ export const SETTINGS_ZH = {
144
152
  'ta.settings.chatArchiveHint': '超过这个时间没有新消息的对话移出列表,不再随列表刷新;在列表末尾的“已归档”或搜索中找回',
145
153
  'ta.settings.recentShots': '提示最近的截图',
146
154
  'ta.settings.recentShotsHint': '刚截屏后打开对话,输入框上方会提示一次这张截图,点一下即可带上。仅 Ta 桌面版和手机 App',
155
+ 'ta.settings.clipboardLinks': '识别复制的 Ta 链接',
156
+ 'ta.settings.clipboardLinksHint': '复制了带 Ta 邀请或分享链接的内容,回到 Ta 时会提示它是什么,点“打开”就能打开;在 Ta 里任何地方粘贴也一样。只在回到 Ta 的那一刻读一次剪贴板,不保存内容。iPhone 上点了“打开”才读',
147
157
  'ta.settings.navigation': '导航栏',
148
158
  'ta.settings.navigation.show': '显示在导航栏',
149
159
  'ta.settings.navigation.inNav': '在导航栏',
@@ -23,6 +23,9 @@ export const ASSISTANT_ZH_TW = {
23
23
  'ta.assistant.speakStopShort': '停止',
24
24
  'ta.assistant.poke': '戳一下 Ta',
25
25
  'ta.assistant.stop': '停止',
26
+ 'ta.assistant.pauseTasks': '暫停全部任務',
27
+ 'ta.assistant.resumeTasks': '繼續已暫停的任務({count})',
28
+ 'ta.assistant.pausedTasks': '已暫停 {count} 個任務',
26
29
  'ta.assistant.restart': '重新開始',
27
30
  'ta.assistant.restartTitle': '和分身開始新的對話?',
28
31
  'ta.assistant.restartHint': '目前對話仍儲存在會話檔案裡,任務繼續進行。',
@@ -77,6 +80,7 @@ export const ASSISTANT_ZH_TW = {
77
80
  'ta.task.verdictFail': '檢查未通過',
78
81
  'ta.task.branch': '分支 {branch}',
79
82
  'ta.task.stopped': '已停止',
83
+ 'ta.task.paused': '已暫停',
80
84
  'ta.task.waiting': '等你處理',
81
85
  'ta.task.waitingPermission': '等你授權',
82
86
  'ta.task.waitingQuestion': '等你回答',
@@ -164,6 +164,16 @@ export const CHAT_ZH_TW = {
164
164
  'ta.composer.voiceDenied': 'Ta 沒有使用麥克風或語音識別的權限。已經允許了仍不行,可能是這個瀏覽器不提供語音識別,可以換用 Safari、Chrome 或 Ta App。',
165
165
  'ta.composer.voiceUnavailable': '這個瀏覽器的語音識別用不了(iPhone 上要開啟「Siri 與聽寫」)。可以換用 Safari、Chrome 或 Ta App。',
166
166
  'ta.composer.voiceFailed': '語音識別不可用:{error}',
167
+ 'ta.hear.offer': '這台裝置不能辨識語音,可以改由電腦來聽寫',
168
+ 'ta.hear.offerHint': '給電腦下載約 {size} 的辨識模型;只用麥克風權限,不連網。',
169
+ 'ta.hear.turnOn': '下載並開啟',
170
+ 'ta.hear.turnedOn': '電腦正在下載語音辨識模型,好了再說一次',
171
+ 'ta.hear.getting': '電腦正在下載語音辨識模型({percent}%),好了再說一次',
172
+ 'ta.hear.failed': '電腦上的語音辨識還沒準備好',
173
+ 'ta.hear.retry': '重試',
174
+ 'ta.hear.unsupported': '這台裝置不能辨識語音,電腦也跑不了 Ta 的語音辨識',
175
+ 'ta.hear.unavailable': '這台裝置不能辨識語音,Ta 的語音辨識也沒開',
176
+ 'ta.hear.unavailableHint': '在 設定 → 擴充 裡開啟「即時語音」和「本機模型」。',
167
177
  'ta.talk.listening': '正在聽…',
168
178
  'ta.talk.edit': '編輯',
169
179
  'ta.talk.releaseSend': '鬆開 傳送',
@@ -35,6 +35,7 @@ export const COMMON_ZH_TW = {
35
35
  'ta.zoom.next': '下一張(→)',
36
36
  'ta.zoom.failed': '無法顯示這張圖片',
37
37
  'ta.markdown.missing': '無法顯示 {name}',
38
+ 'ta.markdown.retry': '點一下重試',
38
39
  'ta.link.openFile': '點選開啟',
39
40
  'ta.link.openFolder': '點選在資源管理器中顯示',
40
41
  'ta.link.external': 'Ctrl + 點選在系統瀏覽器中開啟',
@@ -45,6 +46,16 @@ export const COMMON_ZH_TW = {
45
46
  'ta.link.trust': '信任 {host}',
46
47
  'ta.link.trustHint': '以後這個域名的網頁不再詢問,直接開啟;可在設定中管理。',
47
48
  'ta.link.copied': '連結已複製',
49
+ 'ta.link.kindPairing': '連接電腦的連結',
50
+ 'ta.link.kindExtension': 'Ta 擴充功能',
51
+ 'ta.clip.clipboardOne': '剪貼簿裡有一個{kind}',
52
+ 'ta.clip.pasteOne': '貼上的是一個{kind}',
53
+ 'ta.clip.clipboardFrom': '來自剪貼簿 · {kind}',
54
+ 'ta.clip.pasteFrom': '貼上的內容 · {kind}',
55
+ 'ta.clip.clipboardMany': '剪貼簿裡有 {count} 個 Ta 連結',
56
+ 'ta.clip.pasteMany': '貼上的內容裡有 {count} 個 Ta 連結',
57
+ 'ta.clip.pick': '點一個開啟',
58
+ 'ta.clip.open': '開啟',
48
59
  'ta.link.notFound': '{path} 不存在。',
49
60
  'ta.terminal.openLink': 'Ctrl + 點選開啟',
50
61
  'ta.terminal.openLinkMac': 'Cmd + 點選開啟',
@@ -91,6 +102,10 @@ export const COMMON_ZH_TW = {
91
102
  'ta.select.all': '全選',
92
103
  'ta.select.count': '已選 {count} 項',
93
104
  'ta.select.done': '完成',
105
+ 'ta.people.search': '搜尋',
106
+ 'ta.people.none': '還沒有可選的人',
107
+ 'ta.people.noMatch': '沒有找到',
108
+ 'ta.people.leaveOut': '移除 {name}',
94
109
  'ta.more': '更多',
95
110
  'ta.host.title': '在遠端主機 {host} 上',
96
111
  'ta.on': '開',
@@ -45,12 +45,22 @@ export const DISCOVER_ZH_TW = {
45
45
  'ta.share.friends': 'Ta 好友',
46
46
  'ta.share.pickFriends': '選擇好友',
47
47
  'ta.share.sendN': '傳送給 {n} 位',
48
- 'ta.share.sentTo': '已傳給 {n} 位好友,在對方的 Ta 裡等著開啟',
48
+ 'ta.share.sentTitle': '傳給了這些好友',
49
+ 'ta.share.sent': '已傳出',
50
+ 'ta.share.got': '已收到',
51
+ 'ta.share.opened': '已開啟',
49
52
  'ta.share.renew': '換新連結',
50
53
  'ta.share.passwordApart': '密碼請另行告訴對方:',
51
54
  'ta.share.copyPassword': '複製密碼',
52
55
  'ta.share.cannotMake': '沒能產生連結',
53
56
  'ta.share.extensionGets': '對方在 Ta 裡開啟,不用安裝',
57
+ 'ta.share.extensionInvite': '送你一個 Ta 擴充功能「{name}」,用 Ta 開啟連結就能試用,不用安裝:',
58
+ 'ta.share.share': '分享',
59
+ 'ta.share.titled': '分享「{name}」',
60
+ 'ta.share.thing': '這個',
61
+ 'ta.share.itemWork': '選擇分享到哪裡',
62
+ 'ta.share.itemFile': '送出去的是檔案現在的副本',
63
+ 'ta.share.noWay': '這裡還沒有能分享到的地方',
54
64
  'ta.open.title': '開啟「{name}」?',
55
65
  'ta.open.published': '擴充功能在 Ta 裡執行,能做 Ta 能做的事:讀寫這台電腦上的檔案、執行命令。只打開你信任的來源。',
56
66
  'ta.open.relayed': '擴充功能來自分享者的電腦,在 Ta 裡執行,能做 Ta 能做的事:讀寫這台電腦上的檔案、執行命令。只打開你信任的人分享的擴充功能。',
@@ -59,6 +59,14 @@ export const SETTINGS_ZH_TW = {
59
59
  'ta.settings.diagramStyle.sketch': '草圖',
60
60
  'ta.settings.diagramStyle.colour': '彩色',
61
61
  'ta.settings.diagramStyle.motion': '動效',
62
+ 'ta.settings.skin': '皮膚',
63
+ 'ta.settings.skinHint': 'Ta 背後的畫面,各欄像玻璃一樣透出它。',
64
+ 'ta.settings.skin.none': '無',
65
+ 'ta.settings.glass': '玻璃',
66
+ 'ta.settings.glassHint': '透出多少皮膚的畫面。',
67
+ 'ta.settings.glass.clear': '清透',
68
+ 'ta.settings.glass.soft': '柔和',
69
+ 'ta.settings.glass.focus': '專注',
62
70
  'ta.settings.fontSize': '字型大小',
63
71
  'ta.settings.fontSizeHint': '整個頁面的文字。',
64
72
  'ta.settings.chatFontSize': '對話字型大小',
@@ -144,6 +152,8 @@ export const SETTINGS_ZH_TW = {
144
152
  'ta.settings.chatArchiveHint': '超過這個時間沒有新訊息的對話移出列表,不再隨列表重新整理;在列表末尾的「已歸檔」或搜尋中找回',
145
153
  'ta.settings.recentShots': '提示最近的截圖',
146
154
  'ta.settings.recentShotsHint': '剛截圖後開啟對話,輸入框上方會提示一次這張截圖,點一下即可帶上。僅 Ta 桌面版和手機 App',
155
+ 'ta.settings.clipboardLinks': '識別複製的 Ta 連結',
156
+ 'ta.settings.clipboardLinksHint': '複製了帶 Ta 邀請或分享連結的內容,回到 Ta 時會提示它是什麼,點「開啟」就能開啟;在 Ta 裡任何地方貼上也一樣。只在回到 Ta 的那一刻讀一次剪貼簿,不保存內容。iPhone 上點了「開啟」才讀',
147
157
  'ta.settings.navigation': '導航欄',
148
158
  'ta.settings.navigation.show': '顯示在導航欄',
149
159
  'ta.settings.navigation.inNav': '在導航欄',
@@ -0,0 +1,41 @@
1
+ export type Rgb = readonly [number, number, number];
2
+ /** How an era lays its paint: the width of a stroke, how fast it runs, how thick, and how many strokes are tiles instead. */
3
+ export interface ArtBrush {
4
+ width: number;
5
+ speed: number;
6
+ alpha: number;
7
+ /** 0 to 1: of the strokes, those laid as square tiles of colour (Klimt's mosaic). */
8
+ tiles: number;
9
+ }
10
+ /** A school of painting: the colours of the phases of the sky, round a ring from the first to the last and back, and its brush. */
11
+ export interface ArtEra {
12
+ name: string;
13
+ stops: readonly Rgb[];
14
+ brush: ArtBrush;
15
+ }
16
+ /**
17
+ * The eras the sky of the launch picture goes through, one after another, each into the next: the short thick strokes
18
+ * of Van Gogh's swirling night, the fine long lines of Hokusai's wave in indigo and foam, Klimt's gold laid in tiles, the
19
+ * green dawn of Ta, and the broad brush of ink wash, its gaps the paper left bare.
20
+ */
21
+ export declare const ART_ERAS: readonly ArtEra[];
22
+ /** The colours and brush of the sky at a time: an era for `seconds`, the next one coming in over its last third. */
23
+ export declare class ArtPalette {
24
+ readonly eras: readonly ArtEra[];
25
+ readonly seconds: number;
26
+ constructor(eras?: readonly ArtEra[], seconds?: number);
27
+ /** The era of `time`, the next, and how far (0 to 1, eased) the next has come in. */
28
+ moment(time: number): {
29
+ from: ArtEra;
30
+ to: ArtEra;
31
+ mix: number;
32
+ };
33
+ /** The colour of each of `states` phases at `time` seconds. */
34
+ colors(time: number, states: number): Rgb[];
35
+ brush(time: number): ArtBrush;
36
+ /** The colour at `at` (0 to 1) round the ring of `stops`. */
37
+ static ring(stops: readonly Rgb[], at: number): Rgb;
38
+ static blend(a: Rgb, b: Rgb, amount: number): Rgb;
39
+ /** The lightest of `colors`. */
40
+ static lightest(colors: readonly Rgb[]): Rgb;
41
+ }
@@ -0,0 +1,72 @@
1
+ const hex = (value) => [Number.parseInt(value.slice(1, 3), 16), Number.parseInt(value.slice(3, 5), 16), Number.parseInt(value.slice(5, 7), 16)];
2
+ /**
3
+ * The eras the sky of the launch picture goes through, one after another, each into the next: the short thick strokes
4
+ * of Van Gogh's swirling night, the fine long lines of Hokusai's wave in indigo and foam, Klimt's gold laid in tiles, the
5
+ * green dawn of Ta, and the broad brush of ink wash, its gaps the paper left bare.
6
+ */
7
+ export const ART_ERAS = [
8
+ {
9
+ name: 'starry-night',
10
+ stops: ['#0b1d3a', '#1b3f7a', '#3a6fb5', '#8fb8de', '#f4d35e', '#e9a23b'].map(hex),
11
+ brush: { width: 2.6, speed: 1, alpha: 0.6, tiles: 0 },
12
+ },
13
+ {
14
+ name: 'great-wave',
15
+ stops: ['#0a1a2f', '#123c69', '#2b6b9e', '#e8e4d8', '#b9d3e3', '#1d4e7a'].map(hex),
16
+ brush: { width: 1.3, speed: 1.5, alpha: 0.7, tiles: 0 },
17
+ },
18
+ {
19
+ name: 'gold-leaf',
20
+ stops: ['#1d160a', '#6b4e16', '#c99a2e', '#f2d27a', '#8a9a3b', '#3b2a10'].map(hex),
21
+ brush: { width: 2, speed: 0.6, alpha: 0.65, tiles: 0.5 },
22
+ },
23
+ {
24
+ name: 'green-dawn',
25
+ stops: ['#06231d', '#0f5c48', '#10b981', '#a7f3d0', '#ecfdf5', '#34d399'].map(hex),
26
+ brush: { width: 1.8, speed: 0.9, alpha: 0.5, tiles: 0 },
27
+ },
28
+ {
29
+ name: 'ink-wash',
30
+ stops: ['#0b0d10', '#0b0d10', '#4a4842', '#d9d3c4', '#8c8678', '#0b0d10'].map(hex),
31
+ brush: { width: 4.2, speed: 0.7, alpha: 0.3, tiles: 0 },
32
+ },
33
+ ];
34
+ /** The colours and brush of the sky at a time: an era for `seconds`, the next one coming in over its last third. */
35
+ export class ArtPalette {
36
+ constructor(eras = ART_ERAS, seconds = 40) {
37
+ this.eras = eras;
38
+ this.seconds = seconds;
39
+ }
40
+ /** The era of `time`, the next, and how far (0 to 1, eased) the next has come in. */
41
+ moment(time) {
42
+ const at = Math.max(0, time) / this.seconds;
43
+ const index = Math.floor(at);
44
+ const fade = Math.min(1, Math.max(0, (at - index - 2 / 3) * 3));
45
+ return { from: this.eras[index % this.eras.length], to: this.eras[(index + 1) % this.eras.length], mix: fade * fade * (3 - 2 * fade) };
46
+ }
47
+ /** The colour of each of `states` phases at `time` seconds. */
48
+ colors(time, states) {
49
+ const { from, to, mix } = this.moment(time);
50
+ return Array.from({ length: states }, (_, phase) => ArtPalette.blend(ArtPalette.ring(from.stops, phase / states), ArtPalette.ring(to.stops, phase / states), mix));
51
+ }
52
+ brush(time) {
53
+ const { from, to, mix } = this.moment(time);
54
+ const between = (key) => from.brush[key] + (to.brush[key] - from.brush[key]) * mix;
55
+ return { width: between('width'), speed: between('speed'), alpha: between('alpha'), tiles: between('tiles') };
56
+ }
57
+ /** The colour at `at` (0 to 1) round the ring of `stops`. */
58
+ static ring(stops, at) {
59
+ const position = (((at % 1) + 1) % 1) * stops.length;
60
+ const index = Math.floor(position);
61
+ return ArtPalette.blend(stops[index], stops[(index + 1) % stops.length], position - index);
62
+ }
63
+ static blend(a, b, amount) {
64
+ return [Math.round(a[0] + (b[0] - a[0]) * amount), Math.round(a[1] + (b[1] - a[1]) * amount), Math.round(a[2] + (b[2] - a[2]) * amount)];
65
+ }
66
+ /** The lightest of `colors`. */
67
+ static lightest(colors) {
68
+ const light = (color) => 0.2126 * color[0] + 0.7152 * color[1] + 0.0722 * color[2];
69
+ return colors.reduce((best, color) => (light(color) > light(best) ? color : best));
70
+ }
71
+ }
72
+ //# sourceMappingURL=art-palette.js.map
@@ -0,0 +1,45 @@
1
+ /**
2
+ * A cyclic cellular automaton (Griffeath's): each cell holds one of `states` phases and takes the next one as soon as
3
+ * `threshold` of its neighbours (those within `range`, a round neighbourhood) hold it. Seeded with spirals it never comes
4
+ * to rest: its waves wind out of the points where all the phases meet (the cores) and run on until they meet the waves of
5
+ * another core. The sky of the launch picture (LaunchArt) is painted along them.
6
+ */
7
+ export declare class CyclicAutomaton {
8
+ readonly cols: number;
9
+ readonly rows: number;
10
+ readonly states: number;
11
+ readonly cells: Uint8Array;
12
+ readonly range: number;
13
+ readonly threshold: number;
14
+ /** Per cell, the direction its wave fronts run along (a unit vector); 0, 0 where its phases are flat. */
15
+ readonly flowX: Float32Array;
16
+ readonly flowY: Float32Array;
17
+ protected readonly next: Uint8Array;
18
+ protected readonly reach: readonly (readonly [number, number])[];
19
+ constructor(cols: number, rows: number, states?: number, cells?: Uint8Array, range?: number, threshold?: number);
20
+ /**
21
+ * A field already turning round `count` cores: the phase winds once round each (of either hand) and grows by one every
22
+ * `range` cells away from the nearest, so its first frame is spirals already, with no steps to run first.
23
+ */
24
+ static spirals(cols: number, rows: number, count: number, random: () => number, states?: number): CyclicAutomaton;
25
+ /** The automaton `encode` kept, if it is one of this size. */
26
+ static decode(cols: number, rows: number, text: string, states?: number): CyclicAutomaton | undefined;
27
+ static wrap(value: number, states: number): number;
28
+ /** How far phase `a` is ahead of `b`, the short way round: within (-states / 2, states / 2]. */
29
+ static ahead(a: number, b: number, states: number): number;
30
+ /** One step of every cell at once; how many cells changed. */
31
+ step(): number;
32
+ /** A new core of hand `hand` (1 or -1) at `x`, `y`, its spiral over the cells within `radius` of it. */
33
+ plant(x: number, y: number, radius: number, hand: number): void;
34
+ phase(x: number, y: number): number;
35
+ /** The direction of the fronts at `x`, `y` (in cells), between the cells round it. */
36
+ flow(x: number, y: number): [number, number];
37
+ /** Its cells, four bits each, in base 64: what the next launch goes on from. */
38
+ encode(): string;
39
+ /**
40
+ * The wave fronts: a phase goes on into the cells behind it, so a wave runs from the higher phases to the lower, and
41
+ * its front lies across that. Round a core the fronts turn, and the strokes along them whirl. Measured one and two
42
+ * cells away, so that inside a wave as wide as a cell or two the fronts still have a direction.
43
+ */
44
+ protected measure(): void;
45
+ }
@@ -0,0 +1,176 @@
1
+ /**
2
+ * A cyclic cellular automaton (Griffeath's): each cell holds one of `states` phases and takes the next one as soon as
3
+ * `threshold` of its neighbours (those within `range`, a round neighbourhood) hold it. Seeded with spirals it never comes
4
+ * to rest: its waves wind out of the points where all the phases meet (the cores) and run on until they meet the waves of
5
+ * another core. The sky of the launch picture (LaunchArt) is painted along them.
6
+ */
7
+ export class CyclicAutomaton {
8
+ constructor(cols, rows, states = 8, cells = new Uint8Array(cols * rows), range = 2, threshold = 3) {
9
+ this.cols = cols;
10
+ this.rows = rows;
11
+ this.states = states;
12
+ this.cells = cells;
13
+ this.range = range;
14
+ this.threshold = threshold;
15
+ this.next = new Uint8Array(cols * rows);
16
+ this.flowX = new Float32Array(cols * rows);
17
+ this.flowY = new Float32Array(cols * rows);
18
+ const reach = [];
19
+ for (let dy = -range; dy <= range; dy++) {
20
+ for (let dx = -range; dx <= range; dx++) {
21
+ if ((dx || dy) && dx * dx + dy * dy <= range * range + range) {
22
+ reach.push([dx, dy]);
23
+ }
24
+ }
25
+ }
26
+ this.reach = reach;
27
+ this.measure();
28
+ }
29
+ /**
30
+ * A field already turning round `count` cores: the phase winds once round each (of either hand) and grows by one every
31
+ * `range` cells away from the nearest, so its first frame is spirals already, with no steps to run first.
32
+ */
33
+ static spirals(cols, rows, count, random, states = 8) {
34
+ const automaton = new CyclicAutomaton(cols, rows, states);
35
+ const cores = Array.from({ length: count }, () => ({ x: random() * cols, y: random() * rows, hand: random() < 0.5 ? -1 : 1 }));
36
+ for (let y = 0; y < rows; y++) {
37
+ for (let x = 0; x < cols; x++) {
38
+ let winding = 0;
39
+ let nearest = Number.POSITIVE_INFINITY;
40
+ for (const core of cores) {
41
+ winding += core.hand * Math.atan2(y - core.y, x - core.x);
42
+ nearest = Math.min(nearest, Math.hypot(x - core.x, y - core.y));
43
+ }
44
+ const phase = (winding / (2 * Math.PI)) * states + nearest / automaton.range;
45
+ automaton.cells[y * cols + x] = CyclicAutomaton.wrap(Math.floor(phase), states);
46
+ }
47
+ }
48
+ automaton.measure();
49
+ return automaton;
50
+ }
51
+ /** The automaton `encode` kept, if it is one of this size. */
52
+ static decode(cols, rows, text, states = 8) {
53
+ let bytes;
54
+ try {
55
+ bytes = atob(text);
56
+ }
57
+ catch (_a) {
58
+ return undefined;
59
+ }
60
+ if (bytes.length !== Math.ceil((cols * rows) / 2)) {
61
+ return undefined;
62
+ }
63
+ const cells = new Uint8Array(cols * rows);
64
+ for (let index = 0; index < cells.length; index++) {
65
+ const byte = bytes.charCodeAt(index >> 1);
66
+ cells[index] = index % 2 === 0 ? byte >> 4 : byte & 15;
67
+ if (cells[index] >= states) {
68
+ return undefined;
69
+ }
70
+ }
71
+ return new CyclicAutomaton(cols, rows, states, cells);
72
+ }
73
+ static wrap(value, states) {
74
+ return ((value % states) + states) % states;
75
+ }
76
+ /** How far phase `a` is ahead of `b`, the short way round: within (-states / 2, states / 2]. */
77
+ static ahead(a, b, states) {
78
+ const difference = CyclicAutomaton.wrap(a - b, states);
79
+ return difference > states / 2 ? difference - states : difference;
80
+ }
81
+ /** One step of every cell at once; how many cells changed. */
82
+ step() {
83
+ const { cols, rows, states, cells, next, reach, threshold } = this;
84
+ let changed = 0;
85
+ for (let y = 0; y < rows; y++) {
86
+ for (let x = 0; x < cols; x++) {
87
+ const index = y * cols + x;
88
+ const phase = cells[index];
89
+ const following = phase + 1 === states ? 0 : phase + 1;
90
+ let count = 0;
91
+ for (const [dx, dy] of reach) {
92
+ const col = x + dx;
93
+ const row = y + dy;
94
+ if (col >= 0 && row >= 0 && col < cols && row < rows && cells[row * cols + col] === following && ++count >= threshold) {
95
+ break;
96
+ }
97
+ }
98
+ next[index] = count >= threshold ? following : phase;
99
+ if (next[index] !== phase) {
100
+ changed++;
101
+ }
102
+ }
103
+ }
104
+ cells.set(next);
105
+ this.measure();
106
+ return changed;
107
+ }
108
+ /** A new core of hand `hand` (1 or -1) at `x`, `y`, its spiral over the cells within `radius` of it. */
109
+ plant(x, y, radius, hand) {
110
+ const { cols, rows, states, cells } = this;
111
+ for (let row = Math.max(0, Math.floor(y - radius)); row <= Math.min(rows - 1, Math.ceil(y + radius)); row++) {
112
+ for (let col = Math.max(0, Math.floor(x - radius)); col <= Math.min(cols - 1, Math.ceil(x + radius)); col++) {
113
+ const distance = Math.hypot(col - x, row - y);
114
+ if (distance <= radius) {
115
+ const turn = (hand * Math.atan2(row - y, col - x)) / (2 * Math.PI);
116
+ cells[row * cols + col] = CyclicAutomaton.wrap(Math.floor(turn * states + distance / this.range), states);
117
+ }
118
+ }
119
+ }
120
+ this.measure();
121
+ }
122
+ phase(x, y) {
123
+ const col = Math.min(this.cols - 1, Math.max(0, Math.floor(x)));
124
+ const row = Math.min(this.rows - 1, Math.max(0, Math.floor(y)));
125
+ return this.cells[row * this.cols + col];
126
+ }
127
+ /** The direction of the fronts at `x`, `y` (in cells), between the cells round it. */
128
+ flow(x, y) {
129
+ const { cols, rows, flowX, flowY } = this;
130
+ const fx = Math.min(cols - 1.001, Math.max(0, x - 0.5));
131
+ const fy = Math.min(rows - 1.001, Math.max(0, y - 0.5));
132
+ const col = Math.floor(fx);
133
+ const row = Math.floor(fy);
134
+ const u = fx - col;
135
+ const v = fy - row;
136
+ const a = row * cols + col;
137
+ const b = a + (col + 1 < cols ? 1 : 0);
138
+ const c = a + (row + 1 < rows ? cols : 0);
139
+ const d = c + (col + 1 < cols ? 1 : 0);
140
+ const along = (field) => (field[a] * (1 - u) + field[b] * u) * (1 - v) + (field[c] * (1 - u) + field[d] * u) * v;
141
+ return [along(flowX), along(flowY)];
142
+ }
143
+ /** Its cells, four bits each, in base 64: what the next launch goes on from. */
144
+ encode() {
145
+ var _a;
146
+ let text = '';
147
+ for (let index = 0; index < this.cells.length; index += 2) {
148
+ text += String.fromCharCode((this.cells[index] << 4) | ((_a = this.cells[index + 1]) !== null && _a !== void 0 ? _a : 0));
149
+ }
150
+ return btoa(text);
151
+ }
152
+ /**
153
+ * The wave fronts: a phase goes on into the cells behind it, so a wave runs from the higher phases to the lower, and
154
+ * its front lies across that. Round a core the fronts turn, and the strokes along them whirl. Measured one and two
155
+ * cells away, so that inside a wave as wide as a cell or two the fronts still have a direction.
156
+ */
157
+ measure() {
158
+ const { cols, rows, states, cells, flowX, flowY } = this;
159
+ const clamp = (value, size) => (value < 0 ? 0 : value >= size ? size - 1 : value);
160
+ for (let y = 0; y < rows; y++) {
161
+ for (let x = 0; x < cols; x++) {
162
+ let gx = 0;
163
+ let gy = 0;
164
+ for (let reach = 1; reach <= 2; reach++) {
165
+ gx += CyclicAutomaton.ahead(cells[y * cols + clamp(x + reach, cols)], cells[y * cols + clamp(x - reach, cols)], states) / reach;
166
+ gy += CyclicAutomaton.ahead(cells[clamp(y + reach, rows) * cols + x], cells[clamp(y - reach, rows) * cols + x], states) / reach;
167
+ }
168
+ const length = Math.hypot(gx, gy);
169
+ const index = y * cols + x;
170
+ flowX[index] = length ? -gy / length : 0;
171
+ flowY[index] = length ? gx / length : 0;
172
+ }
173
+ }
174
+ }
175
+ }
176
+ //# sourceMappingURL=cyclic-automaton.js.map
@@ -0,0 +1,43 @@
1
+ interface TreeNode {
2
+ /** Of its parent's length (1 for the trunk). */
3
+ length: number;
4
+ /** Its angle from its parent's, in radians. */
5
+ turn: number;
6
+ children: TreeNode[];
7
+ }
8
+ /** Where the tree stands and how it moves this frame. */
9
+ export interface TreePose {
10
+ x: number;
11
+ y: number;
12
+ /** The length of the trunk. */
13
+ size: number;
14
+ /** The wind, about -1 to 1: the higher a branch, the more it bends. */
15
+ sway: number;
16
+ /** Toward a finger, about -1 to 1. */
17
+ lean: number;
18
+ /** 0 to 1: the tree grows from its trunk to its tips. */
19
+ growth: number;
20
+ }
21
+ export interface TreeSegment {
22
+ x0: number;
23
+ y0: number;
24
+ x1: number;
25
+ y1: number;
26
+ depth: number;
27
+ /** A branch of the last level, whole: it ends in a curl of gold. */
28
+ tip: boolean;
29
+ angle: number;
30
+ }
31
+ /**
32
+ * A fractal tree, Klimt's tree of life: each branch forks into two or three shorter ones down to `depth`, and its
33
+ * last ones end in curls of gold. Its shape is drawn from `random` once; each frame only bends it.
34
+ */
35
+ export declare class FractalTree {
36
+ readonly depth: number;
37
+ readonly root: TreeNode;
38
+ constructor(depth: number, random: () => number);
39
+ segments(pose: TreePose): TreeSegment[];
40
+ protected grow(depth: number, random: () => number): TreeNode;
41
+ protected lay(node: TreeNode, depth: number, x: number, y: number, angle: number, length: number, pose: TreePose, out: TreeSegment[]): void;
42
+ }
43
+ export {};