@celljs/ta-web 4.34.0 → 4.36.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 (345) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/apps/app-icon.d.ts +23 -0
  4. package/esm/browser/apps/app-icon.js +98 -0
  5. package/esm/browser/apps/app-settings.d.ts +6 -0
  6. package/esm/browser/apps/app-settings.js +67 -0
  7. package/esm/browser/apps/app-window-util.d.ts +23 -0
  8. package/esm/browser/apps/app-window-util.js +27 -0
  9. package/esm/browser/apps/app-window.d.ts +9 -0
  10. package/esm/browser/apps/app-window.js +90 -0
  11. package/esm/browser/apps/web-apps.d.ts +29 -0
  12. package/esm/browser/apps/web-apps.js +57 -0
  13. package/esm/browser/assistant/assistant-thread.js +2 -2
  14. package/esm/browser/assistant/call-keeper.d.ts +2 -5
  15. package/esm/browser/assistant/call-keeper.js +7 -11
  16. package/esm/browser/assistant/mic-capture.d.ts +34 -0
  17. package/esm/browser/assistant/mic-capture.js +87 -0
  18. package/esm/browser/assistant/realtime-voice.d.ts +2 -2
  19. package/esm/browser/assistant/realtime-voice.js +6 -15
  20. package/esm/browser/components/access-settings.d.ts +6 -0
  21. package/esm/browser/components/access-settings.js +52 -0
  22. package/esm/browser/components/app-root.d.ts +6 -0
  23. package/esm/browser/components/app-root.js +34 -0
  24. package/esm/browser/components/app-view.d.ts +8 -2
  25. package/esm/browser/components/app-view.js +1 -25
  26. package/esm/browser/components/board.d.ts +2 -2
  27. package/esm/browser/components/board.js +2 -2
  28. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  29. package/esm/browser/components/composer-box-hooks.d.ts +12 -0
  30. package/esm/browser/components/composer-box-hooks.js +12 -0
  31. package/esm/browser/components/composer-box-protocol.d.ts +12 -1
  32. package/esm/browser/components/composer-box.js +14 -11
  33. package/esm/browser/components/composer.js +69 -3
  34. package/esm/browser/components/extension-settings.d.ts +7 -0
  35. package/esm/browser/components/extension-settings.js +32 -0
  36. package/esm/browser/components/host-view.d.ts +1 -1
  37. package/esm/browser/components/message-list.js +3 -3
  38. package/esm/browser/components/message-steps.js +3 -3
  39. package/esm/browser/components/phone-shell.d.ts +2 -2
  40. package/esm/browser/components/request-error.d.ts +9 -0
  41. package/esm/browser/components/request-error.js +21 -0
  42. package/esm/browser/components/settings-more.js +13 -24
  43. package/esm/browser/components/storage-settings.d.ts +17 -0
  44. package/esm/browser/components/storage-settings.js +145 -0
  45. package/esm/browser/device/screen-awake.d.ts +16 -0
  46. package/esm/browser/device/screen-awake.js +37 -0
  47. package/esm/browser/device/sheet-swipe.js +4 -0
  48. package/esm/browser/extension/icons.js +2 -1
  49. package/esm/browser/extension/web-access.d.ts +16 -0
  50. package/esm/browser/extension/web-access.js +75 -0
  51. package/esm/browser/extension/web-api-contributions.d.ts +6 -7
  52. package/esm/browser/extension/web-api-desktop.d.ts +23 -0
  53. package/esm/browser/extension/web-api-spec.d.ts +70 -0
  54. package/esm/browser/extension/web-api-spec.js +225 -0
  55. package/esm/browser/extension/web-api-targets.d.ts +11 -0
  56. package/esm/browser/extension/web-api-targets.js +2 -0
  57. package/esm/browser/extension/web-extension-api.d.ts +11 -1
  58. package/esm/browser/extension/web-extension-context.d.ts +3 -2
  59. package/esm/browser/extension/web-extension-context.js +22 -17
  60. package/esm/browser/extension/web-extension-run.d.ts +8 -1
  61. package/esm/browser/extension/web-extension-run.js +37 -0
  62. package/esm/browser/extension/web-extensions-running.d.ts +20 -1
  63. package/esm/browser/extension/web-extensions-running.js +107 -9
  64. package/esm/browser/extension/web-extensions.js +1 -0
  65. package/esm/browser/extension/web-pages.d.ts +5 -0
  66. package/esm/browser/extension/web-pages.js +3 -0
  67. package/esm/browser/game/game-control.d.ts +6 -0
  68. package/esm/browser/game/game-control.js +28 -0
  69. package/esm/browser/game/game-host.d.ts +9 -2
  70. package/esm/browser/game/game-host.js +5 -1
  71. package/esm/browser/game/game-protocol.d.ts +8 -0
  72. package/esm/browser/game/game-runner.d.ts +7 -1
  73. package/esm/browser/game/game-runner.js +24 -2
  74. package/esm/browser/game/game-target.d.ts +22 -0
  75. package/esm/browser/game/game-target.js +84 -0
  76. package/esm/browser/game/game-util.d.ts +2 -0
  77. package/esm/browser/game/game-util.js +2 -0
  78. package/esm/browser/game/game-view.d.ts +5 -2
  79. package/esm/browser/game/game-view.js +4 -4
  80. package/esm/browser/game/game3d-protocol.d.ts +3 -1
  81. package/esm/browser/game/game3d-runner.d.ts +6 -1
  82. package/esm/browser/game/game3d-runner.js +26 -2
  83. package/esm/browser/i18n/en/chat.d.ts +4 -0
  84. package/esm/browser/i18n/en/chat.js +4 -0
  85. package/esm/browser/i18n/en/common.d.ts +1 -0
  86. package/esm/browser/i18n/en/common.js +1 -0
  87. package/esm/browser/i18n/en/discover.d.ts +11 -0
  88. package/esm/browser/i18n/en/discover.js +11 -0
  89. package/esm/browser/i18n/en/settings.d.ts +43 -0
  90. package/esm/browser/i18n/en/settings.js +43 -0
  91. package/esm/browser/i18n/ja/chat.js +4 -0
  92. package/esm/browser/i18n/ja/common.js +1 -0
  93. package/esm/browser/i18n/ja/discover.js +11 -0
  94. package/esm/browser/i18n/ja/settings.js +43 -0
  95. package/esm/browser/i18n/locales.d.ts +60 -3
  96. package/esm/browser/i18n/messages.d.ts +59 -2
  97. package/esm/browser/i18n/zh/chat.js +4 -0
  98. package/esm/browser/i18n/zh/common.js +1 -0
  99. package/esm/browser/i18n/zh/discover.js +11 -0
  100. package/esm/browser/i18n/zh/settings.js +43 -0
  101. package/esm/browser/i18n/zh-tw/chat.js +4 -0
  102. package/esm/browser/i18n/zh-tw/common.js +1 -0
  103. package/esm/browser/i18n/zh-tw/discover.js +11 -0
  104. package/esm/browser/i18n/zh-tw/settings.js +43 -0
  105. package/esm/browser/index.d.ts +3 -0
  106. package/esm/browser/index.js +3 -0
  107. package/esm/browser/notices/notices.js +1 -0
  108. package/esm/browser/sandbox/channel/channel.d.ts +56 -0
  109. package/esm/browser/sandbox/channel/channel.js +124 -0
  110. package/esm/browser/sandbox/channel/codec.d.ts +80 -0
  111. package/esm/browser/sandbox/channel/codec.js +251 -0
  112. package/esm/browser/sandbox/hook-host.d.ts +23 -0
  113. package/esm/browser/sandbox/hook-host.js +61 -0
  114. package/esm/browser/sandbox/isolated-host.d.ts +105 -0
  115. package/esm/browser/sandbox/isolated-host.js +395 -0
  116. package/esm/browser/sandbox/remote/remote-copy.d.ts +57 -0
  117. package/esm/browser/sandbox/remote/remote-copy.js +318 -0
  118. package/esm/browser/sandbox/remote/remote-mirror.d.ts +61 -0
  119. package/esm/browser/sandbox/remote/remote-mirror.js +341 -0
  120. package/esm/browser/sandbox/remote/remote-protocol.d.ts +79 -0
  121. package/esm/browser/sandbox/remote/remote-protocol.js +54 -0
  122. package/esm/browser/sandbox/remote/remote-styles.d.ts +10 -0
  123. package/esm/browser/sandbox/remote/remote-styles.js +113 -0
  124. package/esm/browser/sandbox/remote-root.d.ts +11 -0
  125. package/esm/browser/sandbox/remote-root.js +81 -0
  126. package/esm/browser/sandbox/runtime/frame-api.d.ts +28 -0
  127. package/esm/browser/sandbox/runtime/frame-api.js +147 -0
  128. package/esm/browser/sandbox/runtime/frame-features.d.ts +6 -0
  129. package/esm/browser/sandbox/runtime/frame-features.js +50 -0
  130. package/esm/browser/sandbox/runtime/frame-parts.d.ts +36 -0
  131. package/esm/browser/sandbox/runtime/frame-parts.js +69 -0
  132. package/esm/browser/sandbox/runtime/frame-roots.d.ts +26 -0
  133. package/esm/browser/sandbox/runtime/frame-roots.js +76 -0
  134. package/esm/browser/sandbox/runtime/frame-store.d.ts +9 -0
  135. package/esm/browser/sandbox/runtime/frame-store.js +18 -0
  136. package/esm/browser/sandbox/runtime/sandbox-runtime.d.ts +11 -0
  137. package/esm/browser/sandbox/runtime/sandbox-runtime.js +45 -0
  138. package/esm/browser/sandbox/sandbox-features.d.ts +25 -0
  139. package/esm/browser/sandbox/sandbox-features.js +32 -0
  140. package/esm/browser/sandbox/sandbox-frame.d.ts +21 -0
  141. package/esm/browser/sandbox/sandbox-frame.js +75 -0
  142. package/esm/browser/sandbox/sandbox-guards.d.ts +19 -0
  143. package/esm/browser/sandbox/sandbox-guards.js +74 -0
  144. package/esm/browser/sandbox/sandbox-protocol.d.ts +57 -0
  145. package/esm/browser/sandbox/sandbox-protocol.js +49 -0
  146. package/esm/browser/sandbox/sandbox-runtime-code.d.ts +1 -0
  147. package/esm/browser/sandbox/sandbox-runtime-code.js +3 -0
  148. package/esm/browser/sandbox/web-sandbox.d.ts +28 -0
  149. package/esm/browser/sandbox/web-sandbox.js +44 -0
  150. package/esm/browser/settings/agent-settings.js +5 -1
  151. package/esm/browser/settings/settings-protocol.d.ts +2 -0
  152. package/esm/browser/settings/settings-protocol.js +2 -0
  153. package/esm/browser/style/pages.d.ts +1 -1
  154. package/esm/browser/style/pages.js +2 -0
  155. package/esm/browser/style/surfaces.d.ts +1 -1
  156. package/esm/browser/style/surfaces.js +4 -0
  157. package/esm/browser/style/tints.d.ts +2 -0
  158. package/esm/browser/style/tints.js +10 -0
  159. package/esm/browser/targets/targets-protocol.d.ts +54 -0
  160. package/esm/browser/targets/targets-protocol.js +34 -0
  161. package/esm/browser/targets/targets.d.ts +13 -0
  162. package/esm/browser/targets/targets.js +64 -0
  163. package/esm/browser/util/composer.d.ts +4 -2
  164. package/esm/browser/util/composer.js +7 -1
  165. package/esm/browser/util/desktop.d.ts +31 -1
  166. package/esm/browser/util/desktop.js +20 -0
  167. package/esm/browser/util/message.d.ts +6 -0
  168. package/esm/browser/util/message.js +21 -0
  169. package/esm/browser/util/process.d.ts +1 -0
  170. package/esm/browser/util/process.js +6 -1
  171. package/esm/browser/util/progress.d.ts +2 -1
  172. package/esm/browser/util/progress.js +2 -11
  173. package/esm/browser/view.js +1 -1
  174. package/lib/browser/apps/app-icon.d.ts +24 -0
  175. package/lib/browser/apps/app-icon.js +134 -0
  176. package/lib/browser/apps/app-settings.d.ts +7 -0
  177. package/lib/browser/apps/app-settings.js +103 -0
  178. package/lib/browser/apps/app-window-util.d.ts +24 -0
  179. package/lib/browser/apps/app-window-util.js +30 -0
  180. package/lib/browser/apps/app-window.d.ts +10 -0
  181. package/lib/browser/apps/app-window.js +126 -0
  182. package/lib/browser/apps/web-apps.d.ts +30 -0
  183. package/lib/browser/apps/web-apps.js +61 -0
  184. package/lib/browser/assistant/assistant-thread.js +2 -2
  185. package/lib/browser/assistant/call-keeper.d.ts +2 -5
  186. package/lib/browser/assistant/call-keeper.js +6 -10
  187. package/lib/browser/assistant/mic-capture.d.ts +35 -0
  188. package/lib/browser/assistant/mic-capture.js +91 -0
  189. package/lib/browser/assistant/realtime-voice.d.ts +2 -2
  190. package/lib/browser/assistant/realtime-voice.js +6 -15
  191. package/lib/browser/components/access-settings.d.ts +7 -0
  192. package/lib/browser/components/access-settings.js +88 -0
  193. package/lib/browser/components/app-root.d.ts +7 -0
  194. package/lib/browser/components/app-root.js +70 -0
  195. package/lib/browser/components/app-view.d.ts +8 -2
  196. package/lib/browser/components/app-view.js +1 -25
  197. package/lib/browser/components/board.d.ts +2 -2
  198. package/lib/browser/components/board.js +2 -2
  199. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  200. package/lib/browser/components/composer-box-hooks.d.ts +12 -0
  201. package/lib/browser/components/composer-box-hooks.js +13 -0
  202. package/lib/browser/components/composer-box-protocol.d.ts +12 -1
  203. package/lib/browser/components/composer-box.js +13 -10
  204. package/lib/browser/components/composer.js +69 -3
  205. package/lib/browser/components/extension-settings.d.ts +8 -0
  206. package/lib/browser/components/extension-settings.js +69 -0
  207. package/lib/browser/components/host-view.d.ts +1 -1
  208. package/lib/browser/components/message-list.js +3 -3
  209. package/lib/browser/components/message-steps.js +3 -3
  210. package/lib/browser/components/phone-shell.d.ts +2 -2
  211. package/lib/browser/components/request-error.d.ts +10 -0
  212. package/lib/browser/components/request-error.js +57 -0
  213. package/lib/browser/components/settings-more.js +12 -23
  214. package/lib/browser/components/storage-settings.d.ts +18 -0
  215. package/lib/browser/components/storage-settings.js +182 -0
  216. package/lib/browser/device/screen-awake.d.ts +16 -0
  217. package/lib/browser/device/screen-awake.js +39 -1
  218. package/lib/browser/device/sheet-swipe.js +4 -0
  219. package/lib/browser/extension/icons.js +1 -0
  220. package/lib/browser/extension/web-access.d.ts +17 -0
  221. package/lib/browser/extension/web-access.js +78 -0
  222. package/lib/browser/extension/web-api-contributions.d.ts +6 -7
  223. package/lib/browser/extension/web-api-desktop.d.ts +23 -0
  224. package/lib/browser/extension/web-api-spec.d.ts +71 -0
  225. package/lib/browser/extension/web-api-spec.js +228 -0
  226. package/lib/browser/extension/web-api-targets.d.ts +12 -0
  227. package/lib/browser/extension/web-api-targets.js +3 -0
  228. package/lib/browser/extension/web-extension-api.d.ts +11 -1
  229. package/lib/browser/extension/web-extension-context.d.ts +3 -2
  230. package/lib/browser/extension/web-extension-context.js +22 -17
  231. package/lib/browser/extension/web-extension-run.d.ts +8 -1
  232. package/lib/browser/extension/web-extension-run.js +37 -0
  233. package/lib/browser/extension/web-extensions-running.d.ts +20 -1
  234. package/lib/browser/extension/web-extensions-running.js +107 -9
  235. package/lib/browser/extension/web-extensions.js +1 -0
  236. package/lib/browser/extension/web-pages.d.ts +5 -0
  237. package/lib/browser/extension/web-pages.js +3 -0
  238. package/lib/browser/game/game-control.d.ts +6 -0
  239. package/lib/browser/game/game-control.js +28 -0
  240. package/lib/browser/game/game-host.d.ts +9 -2
  241. package/lib/browser/game/game-host.js +5 -1
  242. package/lib/browser/game/game-protocol.d.ts +8 -0
  243. package/lib/browser/game/game-runner.d.ts +7 -1
  244. package/lib/browser/game/game-runner.js +24 -2
  245. package/lib/browser/game/game-target.d.ts +23 -0
  246. package/lib/browser/game/game-target.js +87 -0
  247. package/lib/browser/game/game-util.d.ts +2 -0
  248. package/lib/browser/game/game-util.js +2 -0
  249. package/lib/browser/game/game-view.d.ts +5 -2
  250. package/lib/browser/game/game-view.js +4 -4
  251. package/lib/browser/game/game3d-protocol.d.ts +3 -1
  252. package/lib/browser/game/game3d-runner.d.ts +6 -1
  253. package/lib/browser/game/game3d-runner.js +26 -2
  254. package/lib/browser/i18n/en/chat.d.ts +4 -0
  255. package/lib/browser/i18n/en/chat.js +4 -0
  256. package/lib/browser/i18n/en/common.d.ts +1 -0
  257. package/lib/browser/i18n/en/common.js +1 -0
  258. package/lib/browser/i18n/en/discover.d.ts +11 -0
  259. package/lib/browser/i18n/en/discover.js +11 -0
  260. package/lib/browser/i18n/en/settings.d.ts +43 -0
  261. package/lib/browser/i18n/en/settings.js +43 -0
  262. package/lib/browser/i18n/ja/chat.js +4 -0
  263. package/lib/browser/i18n/ja/common.js +1 -0
  264. package/lib/browser/i18n/ja/discover.js +11 -0
  265. package/lib/browser/i18n/ja/settings.js +43 -0
  266. package/lib/browser/i18n/locales.d.ts +60 -3
  267. package/lib/browser/i18n/messages.d.ts +59 -2
  268. package/lib/browser/i18n/zh/chat.js +4 -0
  269. package/lib/browser/i18n/zh/common.js +1 -0
  270. package/lib/browser/i18n/zh/discover.js +11 -0
  271. package/lib/browser/i18n/zh/settings.js +43 -0
  272. package/lib/browser/i18n/zh-tw/chat.js +4 -0
  273. package/lib/browser/i18n/zh-tw/common.js +1 -0
  274. package/lib/browser/i18n/zh-tw/discover.js +11 -0
  275. package/lib/browser/i18n/zh-tw/settings.js +43 -0
  276. package/lib/browser/index.d.ts +3 -0
  277. package/lib/browser/index.js +3 -0
  278. package/lib/browser/notices/notices.js +1 -0
  279. package/lib/browser/sandbox/channel/channel.d.ts +57 -0
  280. package/lib/browser/sandbox/channel/channel.js +128 -0
  281. package/lib/browser/sandbox/channel/codec.d.ts +81 -0
  282. package/lib/browser/sandbox/channel/codec.js +256 -0
  283. package/lib/browser/sandbox/hook-host.d.ts +24 -0
  284. package/lib/browser/sandbox/hook-host.js +98 -0
  285. package/lib/browser/sandbox/isolated-host.d.ts +106 -0
  286. package/lib/browser/sandbox/isolated-host.js +432 -0
  287. package/lib/browser/sandbox/remote/remote-copy.d.ts +58 -0
  288. package/lib/browser/sandbox/remote/remote-copy.js +322 -0
  289. package/lib/browser/sandbox/remote/remote-mirror.d.ts +62 -0
  290. package/lib/browser/sandbox/remote/remote-mirror.js +345 -0
  291. package/lib/browser/sandbox/remote/remote-protocol.d.ts +80 -0
  292. package/lib/browser/sandbox/remote/remote-protocol.js +57 -0
  293. package/lib/browser/sandbox/remote/remote-styles.d.ts +11 -0
  294. package/lib/browser/sandbox/remote/remote-styles.js +116 -0
  295. package/lib/browser/sandbox/remote-root.d.ts +12 -0
  296. package/lib/browser/sandbox/remote-root.js +117 -0
  297. package/lib/browser/sandbox/runtime/frame-api.d.ts +29 -0
  298. package/lib/browser/sandbox/runtime/frame-api.js +183 -0
  299. package/lib/browser/sandbox/runtime/frame-features.d.ts +7 -0
  300. package/lib/browser/sandbox/runtime/frame-features.js +53 -0
  301. package/lib/browser/sandbox/runtime/frame-parts.d.ts +37 -0
  302. package/lib/browser/sandbox/runtime/frame-parts.js +106 -0
  303. package/lib/browser/sandbox/runtime/frame-roots.d.ts +27 -0
  304. package/lib/browser/sandbox/runtime/frame-roots.js +113 -0
  305. package/lib/browser/sandbox/runtime/frame-store.d.ts +10 -0
  306. package/lib/browser/sandbox/runtime/frame-store.js +22 -0
  307. package/lib/browser/sandbox/runtime/sandbox-runtime.d.ts +12 -0
  308. package/lib/browser/sandbox/runtime/sandbox-runtime.js +47 -0
  309. package/lib/browser/sandbox/sandbox-features.d.ts +26 -0
  310. package/lib/browser/sandbox/sandbox-features.js +35 -0
  311. package/lib/browser/sandbox/sandbox-frame.d.ts +22 -0
  312. package/lib/browser/sandbox/sandbox-frame.js +79 -0
  313. package/lib/browser/sandbox/sandbox-guards.d.ts +20 -0
  314. package/lib/browser/sandbox/sandbox-guards.js +77 -0
  315. package/lib/browser/sandbox/sandbox-protocol.d.ts +58 -0
  316. package/lib/browser/sandbox/sandbox-protocol.js +52 -0
  317. package/lib/browser/sandbox/sandbox-runtime-code.d.ts +2 -0
  318. package/lib/browser/sandbox/sandbox-runtime-code.js +6 -0
  319. package/lib/browser/sandbox/web-sandbox.d.ts +29 -0
  320. package/lib/browser/sandbox/web-sandbox.js +47 -0
  321. package/lib/browser/settings/agent-settings.js +5 -1
  322. package/lib/browser/settings/settings-protocol.d.ts +2 -0
  323. package/lib/browser/settings/settings-protocol.js +2 -0
  324. package/lib/browser/style/pages.d.ts +1 -1
  325. package/lib/browser/style/pages.js +2 -0
  326. package/lib/browser/style/surfaces.d.ts +1 -1
  327. package/lib/browser/style/surfaces.js +4 -0
  328. package/lib/browser/style/tints.d.ts +2 -0
  329. package/lib/browser/style/tints.js +10 -0
  330. package/lib/browser/targets/targets-protocol.d.ts +55 -0
  331. package/lib/browser/targets/targets-protocol.js +37 -0
  332. package/lib/browser/targets/targets.d.ts +14 -0
  333. package/lib/browser/targets/targets.js +67 -0
  334. package/lib/browser/util/composer.d.ts +4 -2
  335. package/lib/browser/util/composer.js +7 -1
  336. package/lib/browser/util/desktop.d.ts +31 -1
  337. package/lib/browser/util/desktop.js +20 -0
  338. package/lib/browser/util/message.d.ts +6 -0
  339. package/lib/browser/util/message.js +21 -0
  340. package/lib/browser/util/process.d.ts +1 -0
  341. package/lib/browser/util/process.js +6 -1
  342. package/lib/browser/util/progress.d.ts +2 -1
  343. package/lib/browser/util/progress.js +2 -11
  344. package/lib/browser/view.js +2 -2
  345. package/package.json +8 -8
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.RequestError = RequestError;
37
+ const ta_protocol_1 = require("@celljs/ta-protocol");
38
+ const React = __importStar(require("react"));
39
+ const use_t_1 = require("../i18n/use-t");
40
+ const callout_1 = require("./callout");
41
+ /**
42
+ * A request that failed, said in the user's language: the kind of failure (the network, a rate limit, a busy model)
43
+ * as the line, what the provider said under it; an error of another kind as the provider said it.
44
+ */
45
+ function RequestError({ error, action }) {
46
+ const t = (0, use_t_1.useT)();
47
+ const text = error === null || error === void 0 ? void 0 : error.trim();
48
+ if (!text) {
49
+ return (React.createElement(callout_1.Callout, { level: "error", action: action }, t('ta.message.failedUnknown')));
50
+ }
51
+ const reason = ta_protocol_1.TaRequestErrorUtil.reason(text);
52
+ if (reason === 'error') {
53
+ return (React.createElement(callout_1.Callout, { level: "error", action: action }, text));
54
+ }
55
+ return (React.createElement(callout_1.Callout, { level: "error", action: action, detail: text }, t(`ta.message.failed.${reason}`)));
56
+ }
57
+ //# sourceMappingURL=request-error.js.map
@@ -36,14 +36,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.useMoreSections = useMoreSections;
37
37
  const lucide_react_1 = require("lucide-react");
38
38
  const React = __importStar(require("react"));
39
+ const app_settings_1 = require("../apps/app-settings");
39
40
  const device_1 = require("../device/device");
40
- const extension_view_1 = require("../extension/extension-view");
41
- const web_extension_protocol_1 = require("../extension/web-extension-protocol");
42
41
  const hooks_1 = require("../hooks");
43
42
  const use_t_1 = require("../i18n/use-t");
43
+ const access_settings_1 = require("./access-settings");
44
44
  const access_view_1 = require("./access-view");
45
45
  const busy_1 = require("./busy");
46
46
  const environment_view_1 = require("./environment-view");
47
+ const extension_settings_1 = require("./extension-settings");
47
48
  const icon_1 = require("./icon");
48
49
  const launch_settings_1 = require("./launch-settings");
49
50
  const relay_services_1 = require("./relay-services");
@@ -53,6 +54,7 @@ const settings_choices_1 = require("./settings-choices");
53
54
  const settings_controls_1 = require("./settings-controls");
54
55
  const settings_files_1 = require("./settings-files");
55
56
  const sign_in_setup_1 = require("./sign-in-setup");
57
+ const storage_settings_1 = require("./storage-settings");
56
58
  /**
57
59
  * The sections besides those of the page and of pi's settings, each in its part (SectionEntry.group): the packages,
58
60
  * those built in, those of extensions where they ask, the computers and services Ta reaches, who may come in, the
@@ -102,6 +104,10 @@ function useMoreSections(onDialog) {
102
104
  // Those opened without installing are in Quick open, which installs or deletes them (ta-launcher.md).
103
105
  const packages = packageList.packages.filter(pkg => pkg.origin !== 'builtin' && pkg.origin !== 'temporary');
104
106
  const launchRows = (0, launch_settings_1.useLaunchRows)();
107
+ const accessRows = (0, access_settings_1.useAccessRows)();
108
+ const appRows = (0, app_settings_1.useAppRows)();
109
+ // Those of extensions that are the detail of a store show under it in Storage.
110
+ const storage = (0, storage_settings_1.useStorageSection)(settingsSections.filter(entry => entry.section.storage));
105
111
  /** Why the web extension of a package did not load, if it did not. */
106
112
  const failure = (pkg) => { var _a; return (_a = extensions.find(extension => { var _a; return ((_a = extension.info) === null || _a === void 0 ? void 0 : _a.source) === pkg.source && extension.error; })) === null || _a === void 0 ? void 0 : _a.error; };
107
113
  const reload = async () => {
@@ -134,6 +140,8 @@ function useMoreSections(onDialog) {
134
140
  ? [(0, settings_controls_1.row)('packages:none', [t('ta.packages.none')], React.createElement(settings_controls_1.EmptyRow, { title: t('ta.packages.none'), hint: t('ta.packages.noneHint') }))]
135
141
  : []),
136
142
  ...launchRows,
143
+ ...appRows,
144
+ ...accessRows,
137
145
  ],
138
146
  },
139
147
  {
@@ -154,7 +162,8 @@ function useMoreSections(onDialog) {
154
162
  }),
155
163
  ],
156
164
  },
157
- ...settingsSections.map(extensionSection),
165
+ ...settingsSections.filter(entry => !entry.section.storage).map(extension_settings_1.extensionSection),
166
+ ...(storage ? [storage] : []),
158
167
  // Behind a gateway only: where the Ta of this account runs.
159
168
  ...(gateway.info
160
169
  ? [
@@ -270,24 +279,4 @@ function useMoreSections(onDialog) {
270
279
  ];
271
280
  return more;
272
281
  }
273
- /** A section an extension added (WebExtensionAPI.registerSettings): its rows as Ta's, each control in a boundary of its own. */
274
- function extensionSection({ id, section }) {
275
- var _a, _b;
276
- const title = web_extension_protocol_1.WebLabelUtil.text(section.title);
277
- return {
278
- id: `extension-${id.replace(/[^\w-]+/g, '-')}`,
279
- title,
280
- icon: (_a = section.icon) !== null && _a !== void 0 ? _a : lucide_react_1.Puzzle,
281
- group: section.group && settings_choices_1.SETTINGS_GROUPS.some(group => group.id === section.group) ? section.group : 'extensions',
282
- order: (_b = section.order) !== null && _b !== void 0 ? _b : 100,
283
- rows: section.rows.map(item => {
284
- const label = web_extension_protocol_1.WebLabelUtil.text(item.label);
285
- const description = item.description === undefined ? undefined : web_extension_protocol_1.WebLabelUtil.text(item.description);
286
- const Control = item.render;
287
- return (0, settings_controls_1.row)(`${id}/${item.key}`, [label, description, title, item.search === undefined ? undefined : web_extension_protocol_1.WebLabelUtil.text(item.search)], React.createElement(settings_controls_1.Row, { label: label, description: description, stacked: item.stacked },
288
- React.createElement(extension_view_1.ExtensionBoundary, { name: title, resetKey: Control },
289
- React.createElement(Control, null))));
290
- }),
291
- };
292
- }
293
282
  //# sourceMappingURL=settings-more.js.map
@@ -0,0 +1,18 @@
1
+ import { type TaStorageInfo } from '@celljs/ta-protocol';
2
+ import type { WebSettingsEntry } from '../extension/web-extension-protocol';
3
+ import type { SectionEntry } from './settings-parts';
4
+ export declare namespace StorageSettingsUtil {
5
+ /** 512 KB, 300 MB, 1.2 GB: as a person reads what a store takes. */
6
+ function size(bytes: number): string;
7
+ /** A limit of megabytes as chosen: 500 MB, 2 GB. */
8
+ function megabytes(mb: number): string;
9
+ /** What all the stores take, those whose usage was read. */
10
+ function total(stores: readonly TaStorageInfo[]): number;
11
+ }
12
+ /**
13
+ * Settings → Storage (docs/design/ta-storage.md): what Ta and its packages keep on this computer, each store with what it
14
+ * takes, the limits it is kept to (days, size) as the user sets them, and clearing it; the rows of extensions that are a
15
+ * detail of a store (WebSettingsSection.storage) under it, those of a store not listed at the end.
16
+ */
17
+ export declare function useStorageSection(details: readonly WebSettingsEntry[]): SectionEntry | undefined;
18
+ //# sourceMappingURL=storage-settings.d.ts.map
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.StorageSettingsUtil = void 0;
37
+ exports.useStorageSection = useStorageSection;
38
+ const ta_protocol_1 = require("@celljs/ta-protocol");
39
+ const lucide_react_1 = require("lucide-react");
40
+ const React = __importStar(require("react"));
41
+ const hooks_1 = require("../hooks");
42
+ const use_t_1 = require("../i18n/use-t");
43
+ const busy_1 = require("./busy");
44
+ const extension_settings_1 = require("./extension-settings");
45
+ const icon_1 = require("./icon");
46
+ const settings_controls_1 = require("./settings-controls");
47
+ var StorageSettingsUtil;
48
+ (function (StorageSettingsUtil) {
49
+ /** 512 KB, 300 MB, 1.2 GB: as a person reads what a store takes. */
50
+ function size(bytes) {
51
+ if (bytes < 1024 * 1024) {
52
+ return `${Math.max(bytes > 0 ? 1 : 0, Math.round(bytes / 1024))} KB`;
53
+ }
54
+ if (bytes < 1024 ** 3) {
55
+ return `${Math.round(bytes / 1024 ** 2)} MB`;
56
+ }
57
+ return `${(bytes / 1024 ** 3).toFixed(bytes < 10 * 1024 ** 3 ? 1 : 0)} GB`;
58
+ }
59
+ StorageSettingsUtil.size = size;
60
+ /** A limit of megabytes as chosen: 500 MB, 2 GB. */
61
+ function megabytes(mb) {
62
+ return mb >= 1024 && mb % 1024 === 0 ? `${mb / 1024} GB` : `${mb} MB`;
63
+ }
64
+ StorageSettingsUtil.megabytes = megabytes;
65
+ /** What all the stores take, those whose usage was read. */
66
+ function total(stores) {
67
+ return stores.reduce((sum, store) => { var _a; return sum + ((_a = store.bytes) !== null && _a !== void 0 ? _a : 0); }, 0);
68
+ }
69
+ StorageSettingsUtil.total = total;
70
+ })(StorageSettingsUtil || (exports.StorageSettingsUtil = StorageSettingsUtil = {}));
71
+ /** The stores of ta serve (TaSettingsServer.listStorage): undefined while read, null from a Ta service of before. */
72
+ function useStores() {
73
+ const server = (0, hooks_1.useSettingsServer)();
74
+ const [, notices] = (0, hooks_1.useNotices)();
75
+ const [stores, setStores] = React.useState();
76
+ const read = React.useCallback(() => {
77
+ Promise.resolve()
78
+ .then(() => (server.listStorage ? server.listStorage() : null))
79
+ .then(setStores, () => setStores(null));
80
+ }, [server]);
81
+ React.useEffect(read, [read]);
82
+ const setLimit = async (store, kind, value) => {
83
+ var _a;
84
+ // The default again is no setting of the user's: it follows the default if that changes.
85
+ const next = await ((_a = server.setStorageLimits) === null || _a === void 0 ? void 0 : _a.call(server, store.id, { [kind]: value === store.defaults[kind] ? null : value }));
86
+ if (next) {
87
+ setStores(all => all === null || all === void 0 ? void 0 : all.map(each => (each.id === next.id ? next : each)));
88
+ }
89
+ };
90
+ const clear = async (store) => {
91
+ var _a;
92
+ var _b;
93
+ const freed = (_b = (await ((_a = server.clearStorage) === null || _a === void 0 ? void 0 : _a.call(server, store.id)))) !== null && _b !== void 0 ? _b : 0;
94
+ read();
95
+ return freed;
96
+ };
97
+ return { stores, setLimit, clear, notices };
98
+ }
99
+ /** A limit of a store as a choice of its own words: "Keep 30 days", "Keep all". */
100
+ function LimitSelect({ store, kind, onChange }) {
101
+ var _a;
102
+ const t = (0, use_t_1.useT)();
103
+ const [busy, setBusy] = React.useState(false);
104
+ const value = (_a = store.limits[kind]) !== null && _a !== void 0 ? _a : 0;
105
+ const list = ta_protocol_1.TaStorageUtil.choices(kind === 'keepDays' ? store.choices.days : store.choices.mb, value);
106
+ const label = (n) => kind === 'keepDays'
107
+ ? n
108
+ ? t('ta.storage.keep', { days: n })
109
+ : t('ta.storage.keepAll')
110
+ : n
111
+ ? t('ta.storage.max', { size: StorageSettingsUtil.megabytes(n) })
112
+ : t('ta.storage.maxNone');
113
+ return (React.createElement("select", { className: "ta-input ta-select ta-storage-select", "aria-label": t(kind === 'keepDays' ? 'ta.storage.keepLabel' : 'ta.storage.maxLabel'), value: value, disabled: busy, onChange: event => {
114
+ setBusy(true);
115
+ void onChange(Number(event.target.value)).finally(() => setBusy(false));
116
+ } }, list.map(n => (React.createElement("option", { key: n, value: n }, label(n))))));
117
+ }
118
+ /** Clears a store, once the user said so; busy while it runs. */
119
+ function ClearButton({ label, onClear }) {
120
+ const [busy, run] = (0, busy_1.useBusy)();
121
+ return React.createElement(icon_1.IconButton, { icon: lucide_react_1.Trash2, label: label, busy: busy, onClick: () => void run(onClear) });
122
+ }
123
+ /**
124
+ * Settings → Storage (docs/design/ta-storage.md): what Ta and its packages keep on this computer, each store with what it
125
+ * takes, the limits it is kept to (days, size) as the user sets them, and clearing it; the rows of extensions that are a
126
+ * detail of a store (WebSettingsSection.storage) under it, those of a store not listed at the end.
127
+ */
128
+ function useStorageSection(details) {
129
+ const t = (0, use_t_1.useT)();
130
+ const language = (0, use_t_1.useLanguage)();
131
+ const { stores, setLimit, clear, notices } = useStores();
132
+ if (stores === null && details.length === 0) {
133
+ return undefined;
134
+ }
135
+ const words = (text) => ta_protocol_1.TaLanguageUtil.pick(language, text);
136
+ const failed = (error) => {
137
+ notices.error(error);
138
+ };
139
+ const onClear = async (store) => {
140
+ const name = words(store.title);
141
+ const sure = await notices.confirm({
142
+ title: t('ta.storage.clearConfirm', { name }),
143
+ message: store.hint && words(store.hint),
144
+ confirmLabel: t('ta.storage.clear'),
145
+ danger: true,
146
+ });
147
+ if (!sure) {
148
+ return;
149
+ }
150
+ try {
151
+ notices.notify(t('ta.storage.freed', { size: StorageSettingsUtil.size(await clear(store)) }), { level: 'success' });
152
+ }
153
+ catch (error) {
154
+ failed(error);
155
+ }
156
+ };
157
+ const storeRow = (store) => {
158
+ const title = words(store.title);
159
+ const hint = store.hint && words(store.hint);
160
+ const usage = store.bytes === undefined ? undefined : t('ta.storage.usage', { size: StorageSettingsUtil.size(store.bytes) });
161
+ const kinds = ['keepDays', 'maxMB'].filter(kind => store.defaults[kind] !== undefined);
162
+ return (0, settings_controls_1.row)(`storage:${store.id}`, [title, hint, t('ta.storage.title')], React.createElement(settings_controls_1.Row, { label: title, description: [usage, hint].filter(Boolean).join(' · ') },
163
+ kinds.map(kind => (React.createElement(LimitSelect, { key: kind, store: store, kind: kind, onChange: value => setLimit(store, kind, value).catch(failed) }))),
164
+ store.clearable && React.createElement(ClearButton, { label: t('ta.storage.clear'), onClear: () => onClear(store) })));
165
+ };
166
+ const listed = new Set((stores !== null && stores !== void 0 ? stores : []).map(store => store.id));
167
+ const rows = stores
168
+ ? [
169
+ (0, settings_controls_1.row)('storage', [t('ta.storage.title'), t('ta.storage.hint'), 'storage', 'disk'], React.createElement(settings_controls_1.Row, { label: t('ta.storage.total', { size: StorageSettingsUtil.size(StorageSettingsUtil.total(stores)) }), description: t('ta.storage.hint') })),
170
+ ...stores.flatMap(store => [storeRow(store), ...details.filter(entry => entry.section.storage === store.id).flatMap(extension_settings_1.extensionRows)]),
171
+ ]
172
+ : [];
173
+ return {
174
+ id: 'storage',
175
+ title: t('ta.storage.title'),
176
+ icon: lucide_react_1.HardDrive,
177
+ // Last of General but for the keys and About.
178
+ order: 800,
179
+ rows: [...rows, ...(stores === undefined ? [] : details.filter(entry => { var _a; return !listed.has((_a = entry.section.storage) !== null && _a !== void 0 ? _a : ''); }).flatMap(extension_settings_1.extensionRows))],
180
+ };
181
+ }
182
+ //# sourceMappingURL=storage-settings.js.map
@@ -21,5 +21,21 @@ export declare class ScreenAwake {
21
21
  protected bridge(): ScreenAwakeBridge | undefined;
22
22
  protected wakeLock(on: boolean): void;
23
23
  }
24
+ /**
25
+ * Keeps the device awake for the page while any holds it (a call, a meeting written down): the screen stays on, and
26
+ * Ta Desktop keeps the display awake and the page unthrottled and does not restart under it (DesktopUtil.calling).
27
+ * One for the page, so that one letting go does not let the screen lock under another.
28
+ */
29
+ export declare class KeepAwake {
30
+ protected readonly screen: Pick<ScreenAwake, 'set'>;
31
+ protected readonly desktop: () => ((active: boolean) => void) | undefined;
32
+ protected static instance?: KeepAwake;
33
+ protected holds: number;
34
+ static get shared(): KeepAwake;
35
+ constructor(screen?: Pick<ScreenAwake, 'set'>, desktop?: () => ((active: boolean) => void) | undefined);
36
+ /** Holds it till the function it returns is called (again calls do nothing). */
37
+ hold(): () => void;
38
+ protected set(on: boolean): void;
39
+ }
24
40
  export {};
25
41
  //# sourceMappingURL=screen-awake.d.ts.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ScreenAwake = void 0;
3
+ exports.KeepAwake = exports.ScreenAwake = void 0;
4
4
  const desktop_1 = require("../util/desktop");
5
5
  /**
6
6
  * Keeps the screen of the device on while a call goes on, as a messenger does: a phone left alone locks after a
@@ -60,4 +60,42 @@ class ScreenAwake {
60
60
  }
61
61
  }
62
62
  exports.ScreenAwake = ScreenAwake;
63
+ /**
64
+ * Keeps the device awake for the page while any holds it (a call, a meeting written down): the screen stays on, and
65
+ * Ta Desktop keeps the display awake and the page unthrottled and does not restart under it (DesktopUtil.calling).
66
+ * One for the page, so that one letting go does not let the screen lock under another.
67
+ */
68
+ class KeepAwake {
69
+ static get shared() {
70
+ var _a;
71
+ (_a = KeepAwake.instance) !== null && _a !== void 0 ? _a : (KeepAwake.instance = new KeepAwake());
72
+ return KeepAwake.instance;
73
+ }
74
+ constructor(screen = new ScreenAwake(), desktop = () => desktop_1.DesktopUtil.calling()) {
75
+ this.screen = screen;
76
+ this.desktop = desktop;
77
+ this.holds = 0;
78
+ }
79
+ /** Holds it till the function it returns is called (again calls do nothing). */
80
+ hold() {
81
+ let held = true;
82
+ if (this.holds++ === 0) {
83
+ this.set(true);
84
+ }
85
+ return () => {
86
+ if (held) {
87
+ held = false;
88
+ if (--this.holds === 0) {
89
+ this.set(false);
90
+ }
91
+ }
92
+ };
93
+ }
94
+ set(on) {
95
+ var _a;
96
+ (_a = this.desktop()) === null || _a === void 0 ? void 0 : _a(on);
97
+ this.screen.set(on);
98
+ }
99
+ }
100
+ exports.KeepAwake = KeepAwake;
63
101
  //# sourceMappingURL=screen-awake.js.map
@@ -93,6 +93,10 @@ class TouchSources {
93
93
  this.listened.delete(key);
94
94
  }
95
95
  }
96
+ // A frame apart (a game of a reply, an extension in a sandbox) has no document to reach: WebKit says so as an error.
97
+ if (frame.hasAttribute('sandbox') && !frame.sandbox.contains('allow-same-origin')) {
98
+ return;
99
+ }
96
100
  let doc = null;
97
101
  try {
98
102
  doc = frame.contentDocument;
@@ -6,6 +6,7 @@ const lucide_react_1 = require("lucide-react");
6
6
  exports.WEB_ICONS = Object.freeze({
7
7
  AlarmClock: lucide_react_1.AlarmClock,
8
8
  Aperture: lucide_react_1.Aperture,
9
+ AppWindow: lucide_react_1.AppWindow,
9
10
  Archive: lucide_react_1.Archive,
10
11
  ArrowDown: lucide_react_1.ArrowDown,
11
12
  ArrowLeft: lucide_react_1.ArrowLeft,
@@ -0,0 +1,17 @@
1
+ import type { TaExtensionAccess, TaWebExtensionInfo } from '@celljs/ta-protocol';
2
+ import type { MessageId } from '../i18n/messages';
3
+ import type { WebExtensionAPI } from './web-extension-api';
4
+ export declare namespace WebAccessUtil {
5
+ /**
6
+ * What an extension may run with: a built-in, or from a ta serve older than access, all; one of a package, what the
7
+ * user allowed of this version of it; undefined while they have not (it waits to be allowed).
8
+ */
9
+ function granted(info: TaWebExtensionInfo | undefined): TaExtensionAccess | undefined;
10
+ /** Where it came from, as the user knows it: never a link itself, whose key opens what it shares. */
11
+ function source(info: TaWebExtensionInfo, say: (id: MessageId) => string): string;
12
+ /** The API as far as `granted` reaches (WEB_API_SPEC): what is beyond it throws, saying what to ask for. */
13
+ function limit(api: WebExtensionAPI, granted: TaExtensionAccess, name: string): WebExtensionAPI;
14
+ /** Why a member is not there: what the extension has, what the member needs, and how to ask for it. */
15
+ function refusal(name: string, granted: TaExtensionAccess, path: string, need: TaExtensionAccess): string;
16
+ }
17
+ //# sourceMappingURL=web-access.d.ts.map
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebAccessUtil = void 0;
4
+ // Of its own module: the runtime of the sandbox bundles this file (sandbox/runtime), without the rest of the protocol.
5
+ const package_protocol_1 = require("@celljs/ta-protocol/lib/common/package-protocol");
6
+ const web_api_spec_1 = require("./web-api-spec");
7
+ var WebAccessUtil;
8
+ (function (WebAccessUtil) {
9
+ /**
10
+ * What an extension may run with: a built-in, or from a ta serve older than access, all; one of a package, what the
11
+ * user allowed of this version of it; undefined while they have not (it waits to be allowed).
12
+ */
13
+ function granted(info) {
14
+ if (!info || info.access === undefined) {
15
+ return 'full';
16
+ }
17
+ return info.granted;
18
+ }
19
+ WebAccessUtil.granted = granted;
20
+ /** Where it came from, as the user knows it: never a link itself, whose key opens what it shares. */
21
+ function source(info, say) {
22
+ var _a, _b;
23
+ if (((_a = info.temporary) === null || _a === void 0 ? void 0 : _a.from) === 'link') {
24
+ return say('ta.access.fromLink');
25
+ }
26
+ if (((_b = info.temporary) === null || _b === void 0 ? void 0 : _b.from) === 'market') {
27
+ return say('ta.access.fromMarket');
28
+ }
29
+ return info.source;
30
+ }
31
+ WebAccessUtil.source = source;
32
+ /** The API as far as `granted` reaches (WEB_API_SPEC): what is beyond it throws, saying what to ask for. */
33
+ function limit(api, granted, name) {
34
+ return granted === 'full' ? api : only(api, web_api_spec_1.WEB_API_SPEC, granted, name, '');
35
+ }
36
+ WebAccessUtil.limit = limit;
37
+ /** Why a member is not there: what the extension has, what the member needs, and how to ask for it. */
38
+ function refusal(name, granted, path, need) {
39
+ return `The web extension ${name} has ${granted} access; pi.${path} needs ${need}: declare "pi": { "access": "${need}" } in its package.json.`;
40
+ }
41
+ WebAccessUtil.refusal = refusal;
42
+ function only(whole, spec, granted, name, prefix) {
43
+ const part = {};
44
+ for (const [key, entry] of Object.entries(spec)) {
45
+ const descriptor = Object.getOwnPropertyDescriptor(whole, key);
46
+ if (!package_protocol_1.TaExtensionAccessUtil.reaches(granted, entry.access)) {
47
+ Object.defineProperty(part, key, {
48
+ enumerable: true,
49
+ get() {
50
+ throw new Error(refusal(name, granted, prefix + key, entry.access));
51
+ },
52
+ });
53
+ }
54
+ else if (entry.form === 'group' && descriptor) {
55
+ // As far as it reaches too, the same object while the API gives the same one.
56
+ let cut;
57
+ Object.defineProperty(part, key, {
58
+ enumerable: true,
59
+ get() {
60
+ const from = whole[key];
61
+ if (!from || typeof from !== 'object') {
62
+ return from;
63
+ }
64
+ if ((cut === null || cut === void 0 ? void 0 : cut.from) !== from) {
65
+ cut = { from, part: only(from, entry.members, granted, name, `${prefix}${key}.`) };
66
+ }
67
+ return cut.part;
68
+ },
69
+ });
70
+ }
71
+ else if (descriptor) {
72
+ Object.defineProperty(part, key, descriptor);
73
+ }
74
+ }
75
+ return part;
76
+ }
77
+ })(WebAccessUtil || (exports.WebAccessUtil = WebAccessUtil = {}));
78
+ //# sourceMappingURL=web-access.js.map
@@ -35,11 +35,13 @@ export interface WebSettingsSection {
35
35
  /** Smaller first among those of extensions in its group, then as registered; default 100 (negative: before Ta's). */
36
36
  order?: number;
37
37
  rows: WebSettingRow[];
38
+ /** A store of Settings → Storage (TaStorageInfo.id): its rows show under it there; older Ta apps list it as a section. */
39
+ storage?: string;
38
40
  /**
39
41
  * Models without signing in to a service (coding agents to install): the first page, which asks to sign in, shows the
40
42
  * section as a card beside accounts and API keys, `hint` under its title naming examples as theirs do
41
- * (`CodeBuddy · Codex`); picked, its rows are there, and the page goes on by itself once Ta has models.
42
- * Newer than some Ta apps, which do not show it there.
43
+ * (`CodeBuddy · Codex`); picked, its rows are there, and the page goes on by itself once Ta has models. Newer than
44
+ * some Ta apps, which do not show it there.
43
45
  */
44
46
  signIn?: {
45
47
  hint: WebLabel;
@@ -148,16 +150,13 @@ export interface WebView {
148
150
  * chats. `panel`: a tool of the workbench beside the conversation, as the explorer or the terminal
149
151
  * of an IDE: its `+` and its empty state list it, and it opens as one of its tabs. `launcher`: a
150
152
  * section of what a phone pulls down over its first tab (a button of the rail elsewhere), as Recent and
151
- * Mine. `board`: a card of the board a phone brings out with a swipe to the left over its first tab (a
153
+ * Mine. `board`: a card of the board a phone brings in from the left with a swipe to the right over its first tab (a
152
154
  * button of the rail elsewhere), which the user takes off, puts back and orders (ta-launcher.md).
153
155
  */
154
156
  location?: WebViewLocation;
155
157
  /** Smaller first among those of its location; default 100. */
156
158
  order?: number;
157
- /**
158
- * A page: its … where a list shows it (the sidebar view that leads to it), in sections set apart by
159
- * a line; read each time the menu opens, so it can say what holds now.
160
- */
159
+ /** A page: its … where a list shows it (the sidebar view that leads to it), in sections set apart by a line; read as it opens. */
161
160
  menu?(): WebMenuItem[][];
162
161
  /**
163
162
  * Its top bar, in place of the title: for a sidebar view, the row above it (a search, a button
@@ -13,6 +13,11 @@ export interface WebDeviceUI {
13
13
  * `download` saves it. Newer than some Ta apps.
14
14
  */
15
15
  readonly saveFile?: (file: Blob, name: string) => Promise<WebFileSaved>;
16
+ /**
17
+ * Pages installed as apps of the computer, each with a window, a name and an icon of its own (Launchpad, the Dock, the
18
+ * Start menu): in Ta Desktop only, `pi.ui.apps?.…`. An extension installs, opens and removes only pages of its own.
19
+ */
20
+ readonly apps?: WebApps;
16
21
  }
17
22
  export interface WebDesktop {
18
23
  /** Node's `process.platform` of the machine (`darwin`, `win32`, `linux`): what its file manager is called. */
@@ -68,4 +73,22 @@ export interface WebFileDrag {
68
73
  /** Their absolute paths inside their machine. */
69
74
  paths(files: WebDraggedFiles): string[];
70
75
  }
76
+ /** A page installed as an app of the computer (WebApps). */
77
+ export interface WebInstalledApp {
78
+ /** The id of the page, as `ui.showView` takes it. */
79
+ id: string;
80
+ name: string;
81
+ installedAt: number;
82
+ }
83
+ /** The pages installed as apps of the computer (WebExtensionUI.apps, docs/design/ta-install-as-app.md). */
84
+ export interface WebApps {
85
+ /** Whether a page may be installed now: the user lets pages be installed (Settings, Extensions). */
86
+ readonly installable: boolean;
87
+ list(): Promise<WebInstalledApp[]>;
88
+ /** Installs the page (its title and its icon, as the launcher shows it) and opens its window; again, to name it anew. */
89
+ install(id: string): Promise<void>;
90
+ remove(id: string): Promise<void>;
91
+ /** Its window in front, opened when it is not. */
92
+ open(id: string): Promise<void>;
93
+ }
71
94
  //# sourceMappingURL=web-api-desktop.d.ts.map