@noldova/desktop.window 0.0.0-stage → 0.0.1

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 (1014) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -2
  3. package/api/build.d.ts +13 -0
  4. package/api/build.js +10 -0
  5. package/api/build.js.map +1 -0
  6. package/api/index.d.ts +68 -0
  7. package/api/index.js +42 -0
  8. package/api/index.js.map +1 -0
  9. package/api/testing.d.ts +10 -0
  10. package/api/testing.js +11 -0
  11. package/api/testing.js.map +1 -0
  12. package/app/components/about/about.component.d.ts +50 -0
  13. package/app/components/about/about.component.js +125 -0
  14. package/app/components/about/about.component.js.map +1 -0
  15. package/app/components/dock/dock.component.d.ts +56 -0
  16. package/app/components/dock/dock.component.js +117 -0
  17. package/app/components/dock/dock.component.js.map +1 -0
  18. package/app/components/docking-guides/docking-guides.component.d.ts +35 -0
  19. package/app/components/docking-guides/docking-guides.component.js +61 -0
  20. package/app/components/docking-guides/docking-guides.component.js.map +1 -0
  21. package/app/components/empty-window/empty-window.component.d.ts +8 -0
  22. package/app/components/empty-window/empty-window.component.js +22 -0
  23. package/app/components/empty-window/empty-window.component.js.map +1 -0
  24. package/app/components/field-menu/field-menu.component.d.ts +30 -0
  25. package/app/components/field-menu/field-menu.component.js +92 -0
  26. package/app/components/field-menu/field-menu.component.js.map +1 -0
  27. package/app/components/highlighted-text/highlighted-text.component.d.ts +19 -0
  28. package/app/components/highlighted-text/highlighted-text.component.js +33 -0
  29. package/app/components/highlighted-text/highlighted-text.component.js.map +1 -0
  30. package/app/components/link-menu/link-menu.component.d.ts +22 -0
  31. package/app/components/link-menu/link-menu.component.js +46 -0
  32. package/app/components/link-menu/link-menu.component.js.map +1 -0
  33. package/app/components/module-actions/module-actions.component.d.ts +31 -0
  34. package/app/components/module-actions/module-actions.component.js +64 -0
  35. package/app/components/module-actions/module-actions.component.js.map +1 -0
  36. package/app/components/module-failure-card/module-failure-card.component.d.ts +17 -0
  37. package/app/components/module-failure-card/module-failure-card.component.js +24 -0
  38. package/app/components/module-failure-card/module-failure-card.component.js.map +1 -0
  39. package/app/components/module-failures/module-failures.component.d.ts +20 -0
  40. package/app/components/module-failures/module-failures.component.js +28 -0
  41. package/app/components/module-failures/module-failures.component.js.map +1 -0
  42. package/app/components/module-switch/module-switch.component.d.ts +22 -0
  43. package/app/components/module-switch/module-switch.component.js +40 -0
  44. package/app/components/module-switch/module-switch.component.js.map +1 -0
  45. package/app/components/modules/modules.component.d.ts +48 -0
  46. package/app/components/modules/modules.component.js +132 -0
  47. package/app/components/modules/modules.component.js.map +1 -0
  48. package/app/components/notifications/notifications.component.d.ts +23 -0
  49. package/app/components/notifications/notifications.component.js +35 -0
  50. package/app/components/notifications/notifications.component.js.map +1 -0
  51. package/app/components/notifications-popover/notifications-popover.component.d.ts +40 -0
  52. package/app/components/notifications-popover/notifications-popover.component.js +78 -0
  53. package/app/components/notifications-popover/notifications-popover.component.js.map +1 -0
  54. package/app/components/place-menu/place-menu.component.d.ts +27 -0
  55. package/app/components/place-menu/place-menu.component.js +40 -0
  56. package/app/components/place-menu/place-menu.component.js.map +1 -0
  57. package/app/components/placeholder-content/placeholder-content.component.d.ts +16 -0
  58. package/app/components/placeholder-content/placeholder-content.component.js +54 -0
  59. package/app/components/placeholder-content/placeholder-content.component.js.map +1 -0
  60. package/app/components/quit-dialog/quit-dialog.component.d.ts +17 -0
  61. package/app/components/quit-dialog/quit-dialog.component.js +38 -0
  62. package/app/components/quit-dialog/quit-dialog.component.js.map +1 -0
  63. package/app/components/runtime-status/runtime-status.component.d.ts +18 -0
  64. package/app/components/runtime-status/runtime-status.component.js +49 -0
  65. package/app/components/runtime-status/runtime-status.component.js.map +1 -0
  66. package/app/components/search-palette/search-palette.component.d.ts +35 -0
  67. package/app/components/search-palette/search-palette.component.js +66 -0
  68. package/app/components/search-palette/search-palette.component.js.map +1 -0
  69. package/app/components/setting-row/setting-row.component.d.ts +62 -0
  70. package/app/components/setting-row/setting-row.component.js +176 -0
  71. package/app/components/setting-row/setting-row.component.js.map +1 -0
  72. package/app/components/settings/settings.component.d.ts +84 -0
  73. package/app/components/settings/settings.component.js +273 -0
  74. package/app/components/settings/settings.component.js.map +1 -0
  75. package/app/components/settings-page-host/settings-page-host.component.d.ts +19 -0
  76. package/app/components/settings-page-host/settings-page-host.component.js +54 -0
  77. package/app/components/settings-page-host/settings-page-host.component.js.map +1 -0
  78. package/app/components/shortcuts/shortcuts.component.d.ts +59 -0
  79. package/app/components/shortcuts/shortcuts.component.js +175 -0
  80. package/app/components/shortcuts/shortcuts.component.js.map +1 -0
  81. package/app/components/split-sash/split-sash.component.d.ts +24 -0
  82. package/app/components/split-sash/split-sash.component.js +44 -0
  83. package/app/components/split-sash/split-sash.component.js.map +1 -0
  84. package/app/components/startup/startup.component.d.ts +25 -0
  85. package/app/components/startup/startup.component.js +33 -0
  86. package/app/components/startup/startup.component.js.map +1 -0
  87. package/app/components/status-bar/status-bar.component.d.ts +9 -0
  88. package/app/components/status-bar/status-bar.component.js +28 -0
  89. package/app/components/status-bar/status-bar.component.js.map +1 -0
  90. package/app/components/status-bar-item/status-bar-item.component.d.ts +23 -0
  91. package/app/components/status-bar-item/status-bar-item.component.js +39 -0
  92. package/app/components/status-bar-item/status-bar-item.component.js.map +1 -0
  93. package/app/components/tab-content/tab-content.component.d.ts +35 -0
  94. package/app/components/tab-content/tab-content.component.js +139 -0
  95. package/app/components/tab-content/tab-content.component.js.map +1 -0
  96. package/app/components/tab-group/tab-group.component.d.ts +54 -0
  97. package/app/components/tab-group/tab-group.component.js +176 -0
  98. package/app/components/tab-group/tab-group.component.js.map +1 -0
  99. package/app/components/tab-row-actions/tab-row-actions.component.d.ts +27 -0
  100. package/app/components/tab-row-actions/tab-row-actions.component.js +37 -0
  101. package/app/components/tab-row-actions/tab-row-actions.component.js.map +1 -0
  102. package/app/components/tab-slot/tab-slot.component.d.ts +35 -0
  103. package/app/components/tab-slot/tab-slot.component.js +70 -0
  104. package/app/components/tab-slot/tab-slot.component.js.map +1 -0
  105. package/app/components/toasts/toasts.component.d.ts +36 -0
  106. package/app/components/toasts/toasts.component.js +68 -0
  107. package/app/components/toasts/toasts.component.js.map +1 -0
  108. package/app/components/toolbar/toolbar.component.d.ts +49 -0
  109. package/app/components/toolbar/toolbar.component.js +129 -0
  110. package/app/components/toolbar/toolbar.component.js.map +1 -0
  111. package/app/components/toolbar-band/toolbar-band.component.d.ts +14 -0
  112. package/app/components/toolbar-band/toolbar-band.component.js +32 -0
  113. package/app/components/toolbar-band/toolbar-band.component.js.map +1 -0
  114. package/app/components/update-item/update-item.component.d.ts +22 -0
  115. package/app/components/update-item/update-item.component.js +32 -0
  116. package/app/components/update-item/update-item.component.js.map +1 -0
  117. package/app/components/view-dialog/view-dialog.component.d.ts +17 -0
  118. package/app/components/view-dialog/view-dialog.component.js +46 -0
  119. package/app/components/view-dialog/view-dialog.component.js.map +1 -0
  120. package/app/components/window/window.component.d.ts +30 -0
  121. package/app/components/window/window.component.js +107 -0
  122. package/app/components/window/window.component.js.map +1 -0
  123. package/app/components/window-controls/window-controls.component.d.ts +27 -0
  124. package/app/components/window-controls/window-controls.component.js +55 -0
  125. package/app/components/window-controls/window-controls.component.js.map +1 -0
  126. package/app/components/window-row/window-row.component.d.ts +78 -0
  127. package/app/components/window-row/window-row.component.js +260 -0
  128. package/app/components/window-row/window-row.component.js.map +1 -0
  129. package/app/components/workspace/workspace.component.d.ts +32 -0
  130. package/app/components/workspace/workspace.component.js +134 -0
  131. package/app/components/workspace/workspace.component.js.map +1 -0
  132. package/app/directives/keeps-ctrl-keys.directive.d.ts +31 -0
  133. package/app/directives/keeps-ctrl-keys.directive.js +21 -0
  134. package/app/directives/keeps-ctrl-keys.directive.js.map +1 -0
  135. package/app/directives/tab-scroller.directive.d.ts +29 -0
  136. package/app/directives/tab-scroller.directive.js +88 -0
  137. package/app/directives/tab-scroller.directive.js.map +1 -0
  138. package/app/enums/bottom-dock-span.d.ts +11 -0
  139. package/app/enums/bottom-dock-span.js +13 -0
  140. package/app/enums/bottom-dock-span.js.map +1 -0
  141. package/app/enums/clock-choice.d.ts +11 -0
  142. package/app/enums/clock-choice.js +13 -0
  143. package/app/enums/clock-choice.js.map +1 -0
  144. package/app/enums/content-padding.d.ts +28 -0
  145. package/app/enums/content-padding.js +13 -0
  146. package/app/enums/content-padding.js.map +1 -0
  147. package/app/enums/dock-side.d.ts +24 -0
  148. package/app/enums/dock-side.js +14 -0
  149. package/app/enums/dock-side.js.map +1 -0
  150. package/app/enums/dock-style.d.ts +11 -0
  151. package/app/enums/dock-style.js +13 -0
  152. package/app/enums/dock-style.js.map +1 -0
  153. package/app/enums/document-tone.d.ts +24 -0
  154. package/app/enums/document-tone.js +14 -0
  155. package/app/enums/document-tone.js.map +1 -0
  156. package/app/enums/file-save-outcome.d.ts +26 -0
  157. package/app/enums/file-save-outcome.js +14 -0
  158. package/app/enums/file-save-outcome.js.map +1 -0
  159. package/app/enums/link-place.d.ts +23 -0
  160. package/app/enums/link-place.js +13 -0
  161. package/app/enums/link-place.js.map +1 -0
  162. package/app/enums/menu-bar-style.d.ts +12 -0
  163. package/app/enums/menu-bar-style.js +14 -0
  164. package/app/enums/menu-bar-style.js.map +1 -0
  165. package/app/enums/menu-check.d.ts +12 -0
  166. package/app/enums/menu-check.js +14 -0
  167. package/app/enums/menu-check.js.map +1 -0
  168. package/app/enums/panel-edge.d.ts +13 -0
  169. package/app/enums/panel-edge.js +15 -0
  170. package/app/enums/panel-edge.js.map +1 -0
  171. package/app/enums/part-save-outcome.d.ts +12 -0
  172. package/app/enums/part-save-outcome.js +14 -0
  173. package/app/enums/part-save-outcome.js.map +1 -0
  174. package/app/enums/quit-choice.d.ts +12 -0
  175. package/app/enums/quit-choice.js +14 -0
  176. package/app/enums/quit-choice.js.map +1 -0
  177. package/app/enums/split-axis.d.ts +11 -0
  178. package/app/enums/split-axis.js +13 -0
  179. package/app/enums/split-axis.js.map +1 -0
  180. package/app/enums/startup-state-kind.d.ts +17 -0
  181. package/app/enums/startup-state-kind.js +19 -0
  182. package/app/enums/startup-state-kind.js.map +1 -0
  183. package/app/enums/status-bar-item-tone.d.ts +21 -0
  184. package/app/enums/status-bar-item-tone.js +13 -0
  185. package/app/enums/status-bar-item-tone.js.map +1 -0
  186. package/app/enums/status-bar-side.d.ts +20 -0
  187. package/app/enums/status-bar-side.js +13 -0
  188. package/app/enums/status-bar-side.js.map +1 -0
  189. package/app/enums/toolbar-move.d.ts +13 -0
  190. package/app/enums/toolbar-move.js +15 -0
  191. package/app/enums/toolbar-move.js.map +1 -0
  192. package/app/enums/top-bar-side.d.ts +21 -0
  193. package/app/enums/top-bar-side.js +13 -0
  194. package/app/enums/top-bar-side.js.map +1 -0
  195. package/app/enums/unconfirmed-action.d.ts +12 -0
  196. package/app/enums/unconfirmed-action.js +14 -0
  197. package/app/enums/unconfirmed-action.js.map +1 -0
  198. package/app/enums/update-action.d.ts +11 -0
  199. package/app/enums/update-action.js +13 -0
  200. package/app/enums/update-action.js.map +1 -0
  201. package/app/enums/update-state-kind.d.ts +16 -0
  202. package/app/enums/update-state-kind.js +18 -0
  203. package/app/enums/update-state-kind.js.map +1 -0
  204. package/app/enums/view-dialog-refusal.d.ts +11 -0
  205. package/app/enums/view-dialog-refusal.js +13 -0
  206. package/app/enums/view-dialog-refusal.js.map +1 -0
  207. package/app/exceptions/action-not-confirmed.exception.d.ts +17 -0
  208. package/app/exceptions/action-not-confirmed.exception.js +36 -0
  209. package/app/exceptions/action-not-confirmed.exception.js.map +1 -0
  210. package/app/exceptions/command-already-registered.exception.d.ts +13 -0
  211. package/app/exceptions/command-already-registered.exception.js +18 -0
  212. package/app/exceptions/command-already-registered.exception.js.map +1 -0
  213. package/app/exceptions/command-not-declared.exception.d.ts +13 -0
  214. package/app/exceptions/command-not-declared.exception.js +18 -0
  215. package/app/exceptions/command-not-declared.exception.js.map +1 -0
  216. package/app/exceptions/command-not-found.exception.d.ts +13 -0
  217. package/app/exceptions/command-not-found.exception.js +18 -0
  218. package/app/exceptions/command-not-found.exception.js.map +1 -0
  219. package/app/exceptions/contribution-not-declared.exception.d.ts +14 -0
  220. package/app/exceptions/contribution-not-declared.exception.js +20 -0
  221. package/app/exceptions/contribution-not-declared.exception.js.map +1 -0
  222. package/app/exceptions/contribution-registered.exception.d.ts +14 -0
  223. package/app/exceptions/contribution-registered.exception.js +20 -0
  224. package/app/exceptions/contribution-registered.exception.js.map +1 -0
  225. package/app/exceptions/dependency-not-followed.exception.d.ts +12 -0
  226. package/app/exceptions/dependency-not-followed.exception.js +17 -0
  227. package/app/exceptions/dependency-not-followed.exception.js.map +1 -0
  228. package/app/exceptions/file-not-opened.exception.d.ts +13 -0
  229. package/app/exceptions/file-not-opened.exception.js +18 -0
  230. package/app/exceptions/file-not-opened.exception.js.map +1 -0
  231. package/app/exceptions/file-not-shown.exception.d.ts +13 -0
  232. package/app/exceptions/file-not-shown.exception.js +18 -0
  233. package/app/exceptions/file-not-shown.exception.js.map +1 -0
  234. package/app/exceptions/foreign-contribution.exception.d.ts +13 -0
  235. package/app/exceptions/foreign-contribution.exception.js +18 -0
  236. package/app/exceptions/foreign-contribution.exception.js.map +1 -0
  237. package/app/exceptions/foreign-name.exception.d.ts +13 -0
  238. package/app/exceptions/foreign-name.exception.js +18 -0
  239. package/app/exceptions/foreign-name.exception.js.map +1 -0
  240. package/app/exceptions/foreign-secret.exception.d.ts +13 -0
  241. package/app/exceptions/foreign-secret.exception.js +18 -0
  242. package/app/exceptions/foreign-secret.exception.js.map +1 -0
  243. package/app/exceptions/in-app-browser-taken.exception.d.ts +12 -0
  244. package/app/exceptions/in-app-browser-taken.exception.js +16 -0
  245. package/app/exceptions/in-app-browser-taken.exception.js.map +1 -0
  246. package/app/exceptions/link-not-opened.exception.d.ts +12 -0
  247. package/app/exceptions/link-not-opened.exception.js +16 -0
  248. package/app/exceptions/link-not-opened.exception.js.map +1 -0
  249. package/app/exceptions/placeholder-shown.exception.d.ts +14 -0
  250. package/app/exceptions/placeholder-shown.exception.js +20 -0
  251. package/app/exceptions/placeholder-shown.exception.js.map +1 -0
  252. package/app/exceptions/preload-bridge.exception.d.ts +12 -0
  253. package/app/exceptions/preload-bridge.exception.js +16 -0
  254. package/app/exceptions/preload-bridge.exception.js.map +1 -0
  255. package/app/exceptions/product-name.exception.d.ts +12 -0
  256. package/app/exceptions/product-name.exception.js +16 -0
  257. package/app/exceptions/product-name.exception.js.map +1 -0
  258. package/app/exceptions/runtime-disconnected.exception.d.ts +13 -0
  259. package/app/exceptions/runtime-disconnected.exception.js +25 -0
  260. package/app/exceptions/runtime-disconnected.exception.js.map +1 -0
  261. package/app/exceptions/runtime-request.exception.d.ts +15 -0
  262. package/app/exceptions/runtime-request.exception.js +19 -0
  263. package/app/exceptions/runtime-request.exception.js.map +1 -0
  264. package/app/exceptions/search-source-registered.exception.d.ts +13 -0
  265. package/app/exceptions/search-source-registered.exception.js +18 -0
  266. package/app/exceptions/search-source-registered.exception.js.map +1 -0
  267. package/app/exceptions/setting-options-failed.exception.d.ts +13 -0
  268. package/app/exceptions/setting-options-failed.exception.js +19 -0
  269. package/app/exceptions/setting-options-failed.exception.js.map +1 -0
  270. package/app/exceptions/setting-options-repeated.exception.d.ts +13 -0
  271. package/app/exceptions/setting-options-repeated.exception.js +18 -0
  272. package/app/exceptions/setting-options-repeated.exception.js.map +1 -0
  273. package/app/exceptions/settings-page-not-loaded.exception.d.ts +12 -0
  274. package/app/exceptions/settings-page-not-loaded.exception.js +17 -0
  275. package/app/exceptions/settings-page-not-loaded.exception.js.map +1 -0
  276. package/app/exceptions/view-dialog.exception.d.ts +15 -0
  277. package/app/exceptions/view-dialog.exception.js +27 -0
  278. package/app/exceptions/view-dialog.exception.js.map +1 -0
  279. package/app/exceptions/web-view-closed.exception.d.ts +12 -0
  280. package/app/exceptions/web-view-closed.exception.js +16 -0
  281. package/app/exceptions/web-view-closed.exception.js.map +1 -0
  282. package/app/exceptions/web-view-not-opened.exception.d.ts +12 -0
  283. package/app/exceptions/web-view-not-opened.exception.js +16 -0
  284. package/app/exceptions/web-view-not-opened.exception.js.map +1 -0
  285. package/app/exceptions/window-part-access.exception.d.ts +13 -0
  286. package/app/exceptions/window-part-access.exception.js +17 -0
  287. package/app/exceptions/window-part-access.exception.js.map +1 -0
  288. package/app/exceptions/window-part-activation-failed.exception.d.ts +12 -0
  289. package/app/exceptions/window-part-activation-failed.exception.js +17 -0
  290. package/app/exceptions/window-part-activation-failed.exception.js.map +1 -0
  291. package/app/exceptions/window-part-failure.exception.d.ts +14 -0
  292. package/app/exceptions/window-part-failure.exception.js +17 -0
  293. package/app/exceptions/window-part-failure.exception.js.map +1 -0
  294. package/app/exceptions/window-part-load-failed.exception.d.ts +12 -0
  295. package/app/exceptions/window-part-load-failed.exception.js +17 -0
  296. package/app/exceptions/window-part-load-failed.exception.js.map +1 -0
  297. package/app/exceptions/window-part-reconnection-failed.exception.d.ts +12 -0
  298. package/app/exceptions/window-part-reconnection-failed.exception.js +17 -0
  299. package/app/exceptions/window-part-reconnection-failed.exception.js.map +1 -0
  300. package/app/exceptions/window-part-save-failed-for-update.exception.d.ts +13 -0
  301. package/app/exceptions/window-part-save-failed-for-update.exception.js +19 -0
  302. package/app/exceptions/window-part-save-failed-for-update.exception.js.map +1 -0
  303. package/app/exceptions/window-part-save-failed-late.exception.d.ts +13 -0
  304. package/app/exceptions/window-part-save-failed-late.exception.js +19 -0
  305. package/app/exceptions/window-part-save-failed-late.exception.js.map +1 -0
  306. package/app/exceptions/window-part-save-failed.exception.d.ts +13 -0
  307. package/app/exceptions/window-part-save-failed.exception.js +19 -0
  308. package/app/exceptions/window-part-save-failed.exception.js.map +1 -0
  309. package/app/exceptions/window.exception.d.ts +21 -0
  310. package/app/exceptions/window.exception.js +15 -0
  311. package/app/exceptions/window.exception.js.map +1 -0
  312. package/app/interfaces/i-command-key.d.ts +22 -0
  313. package/app/interfaces/i-command-key.js +8 -0
  314. package/app/interfaces/i-command-key.js.map +1 -0
  315. package/app/interfaces/i-document-contribution-options.d.ts +34 -0
  316. package/app/interfaces/i-document-contribution-options.js +8 -0
  317. package/app/interfaces/i-document-contribution-options.js.map +1 -0
  318. package/app/interfaces/i-document-marker.d.ts +23 -0
  319. package/app/interfaces/i-document-marker.js +8 -0
  320. package/app/interfaces/i-document-marker.js.map +1 -0
  321. package/app/interfaces/i-document-options.d.ts +79 -0
  322. package/app/interfaces/i-document-options.js +8 -0
  323. package/app/interfaces/i-document-options.js.map +1 -0
  324. package/app/interfaces/i-document-status.d.ts +28 -0
  325. package/app/interfaces/i-document-status.js +8 -0
  326. package/app/interfaces/i-document-status.js.map +1 -0
  327. package/app/interfaces/i-document-update.d.ts +58 -0
  328. package/app/interfaces/i-document-update.js +8 -0
  329. package/app/interfaces/i-document-update.js.map +1 -0
  330. package/app/interfaces/i-file-choice-options.d.ts +18 -0
  331. package/app/interfaces/i-file-choice-options.js +8 -0
  332. package/app/interfaces/i-file-choice-options.js.map +1 -0
  333. package/app/interfaces/i-file-grant-options.d.ts +17 -0
  334. package/app/interfaces/i-file-grant-options.js +8 -0
  335. package/app/interfaces/i-file-grant-options.js.map +1 -0
  336. package/app/interfaces/i-file-path-choice-options.d.ts +24 -0
  337. package/app/interfaces/i-file-path-choice-options.js +8 -0
  338. package/app/interfaces/i-file-path-choice-options.js.map +1 -0
  339. package/app/interfaces/i-in-app-browser.d.ts +36 -0
  340. package/app/interfaces/i-in-app-browser.js +8 -0
  341. package/app/interfaces/i-in-app-browser.js.map +1 -0
  342. package/app/interfaces/i-layout-store.d.ts +12 -0
  343. package/app/interfaces/i-layout-store.js +8 -0
  344. package/app/interfaces/i-layout-store.js.map +1 -0
  345. package/app/interfaces/i-link-open-options.d.ts +26 -0
  346. package/app/interfaces/i-link-open-options.js +8 -0
  347. package/app/interfaces/i-link-open-options.js.map +1 -0
  348. package/app/interfaces/i-module-saver.d.ts +10 -0
  349. package/app/interfaces/i-module-saver.js +8 -0
  350. package/app/interfaces/i-module-saver.js.map +1 -0
  351. package/app/interfaces/i-opened-web-view.d.ts +12 -0
  352. package/app/interfaces/i-opened-web-view.js +8 -0
  353. package/app/interfaces/i-opened-web-view.js.map +1 -0
  354. package/app/interfaces/i-preload-bridge.d.ts +75 -0
  355. package/app/interfaces/i-preload-bridge.js +8 -0
  356. package/app/interfaces/i-preload-bridge.js.map +1 -0
  357. package/app/interfaces/i-product-about.d.ts +38 -0
  358. package/app/interfaces/i-product-about.js +8 -0
  359. package/app/interfaces/i-product-about.js.map +1 -0
  360. package/app/interfaces/i-product-logo.d.ts +23 -0
  361. package/app/interfaces/i-product-logo.js +8 -0
  362. package/app/interfaces/i-product-logo.js.map +1 -0
  363. package/app/interfaces/i-selection-source.d.ts +24 -0
  364. package/app/interfaces/i-selection-source.js +8 -0
  365. package/app/interfaces/i-selection-source.js.map +1 -0
  366. package/app/interfaces/i-settings-page-declaration.d.ts +22 -0
  367. package/app/interfaces/i-settings-page-declaration.js +8 -0
  368. package/app/interfaces/i-settings-page-declaration.js.map +1 -0
  369. package/app/interfaces/i-settings-page-row.d.ts +12 -0
  370. package/app/interfaces/i-settings-page-row.js +8 -0
  371. package/app/interfaces/i-settings-page-row.js.map +1 -0
  372. package/app/interfaces/i-status-bar-item-options.d.ts +42 -0
  373. package/app/interfaces/i-status-bar-item-options.js +8 -0
  374. package/app/interfaces/i-status-bar-item-options.js.map +1 -0
  375. package/app/interfaces/i-top-bar-action-options.d.ts +21 -0
  376. package/app/interfaces/i-top-bar-action-options.js +8 -0
  377. package/app/interfaces/i-top-bar-action-options.js.map +1 -0
  378. package/app/interfaces/i-view-dialog-options.d.ts +22 -0
  379. package/app/interfaces/i-view-dialog-options.js +8 -0
  380. package/app/interfaces/i-view-dialog-options.js.map +1 -0
  381. package/app/interfaces/i-view-instance-options.d.ts +37 -0
  382. package/app/interfaces/i-view-instance-options.js +8 -0
  383. package/app/interfaces/i-view-instance-options.js.map +1 -0
  384. package/app/interfaces/i-view-options.d.ts +41 -0
  385. package/app/interfaces/i-view-options.js +8 -0
  386. package/app/interfaces/i-view-options.js.map +1 -0
  387. package/app/interfaces/i-view-update.d.ts +31 -0
  388. package/app/interfaces/i-view-update.js +8 -0
  389. package/app/interfaces/i-view-update.js.map +1 -0
  390. package/app/interfaces/i-web-view-find-options.d.ts +16 -0
  391. package/app/interfaces/i-web-view-find-options.js +8 -0
  392. package/app/interfaces/i-web-view-find-options.js.map +1 -0
  393. package/app/interfaces/i-web-view-found.d.ts +33 -0
  394. package/app/interfaces/i-web-view-found.js +8 -0
  395. package/app/interfaces/i-web-view-found.js.map +1 -0
  396. package/app/interfaces/i-web-view-guest.d.ts +15 -0
  397. package/app/interfaces/i-web-view-guest.js +8 -0
  398. package/app/interfaces/i-web-view-guest.js.map +1 -0
  399. package/app/interfaces/i-web-view-handle.d.ts +370 -0
  400. package/app/interfaces/i-web-view-handle.js +8 -0
  401. package/app/interfaces/i-web-view-handle.js.map +1 -0
  402. package/app/interfaces/i-web-view-layer.d.ts +29 -0
  403. package/app/interfaces/i-web-view-layer.js +8 -0
  404. package/app/interfaces/i-web-view-layer.js.map +1 -0
  405. package/app/interfaces/i-window-inputs.d.ts +72 -0
  406. package/app/interfaces/i-window-inputs.js +8 -0
  407. package/app/interfaces/i-window-inputs.js.map +1 -0
  408. package/app/interfaces/i-window-palette.d.ts +32 -0
  409. package/app/interfaces/i-window-palette.js +8 -0
  410. package/app/interfaces/i-window-palette.js.map +1 -0
  411. package/app/interfaces/i-window-part-context.d.ts +1622 -0
  412. package/app/interfaces/i-window-part-context.js +8 -0
  413. package/app/interfaces/i-window-part-context.js.map +1 -0
  414. package/app/interfaces/i-window-part-host.d.ts +89 -0
  415. package/app/interfaces/i-window-part-host.js +8 -0
  416. package/app/interfaces/i-window-part-host.js.map +1 -0
  417. package/app/interfaces/i-window-part.d.ts +160 -0
  418. package/app/interfaces/i-window-part.js +8 -0
  419. package/app/interfaces/i-window-part.js.map +1 -0
  420. package/app/interfaces/i-window-secrets.d.ts +69 -0
  421. package/app/interfaces/i-window-secrets.js +8 -0
  422. package/app/interfaces/i-window-secrets.js.map +1 -0
  423. package/app/interfaces/i-window-web-views.d.ts +39 -0
  424. package/app/interfaces/i-window-web-views.js +8 -0
  425. package/app/interfaces/i-window-web-views.js.map +1 -0
  426. package/app/models/appearance-preferences.d.ts +22 -0
  427. package/app/models/appearance-preferences.js +51 -0
  428. package/app/models/appearance-preferences.js.map +1 -0
  429. package/app/models/build-info.d.ts +13 -0
  430. package/app/models/build-info.js +22 -0
  431. package/app/models/build-info.js.map +1 -0
  432. package/app/models/build-tokens.d.ts +17 -0
  433. package/app/models/build-tokens.js +16 -0
  434. package/app/models/build-tokens.js.map +1 -0
  435. package/app/models/clipboard-image.d.ts +22 -0
  436. package/app/models/clipboard-image.js +128 -0
  437. package/app/models/clipboard-image.js.map +1 -0
  438. package/app/models/clipboard-image.resources.d.ts +43 -0
  439. package/app/models/clipboard-image.resources.js +44 -0
  440. package/app/models/clipboard-image.resources.js.map +1 -0
  441. package/app/models/command-contribution.d.ts +95 -0
  442. package/app/models/command-contribution.js +38 -0
  443. package/app/models/command-contribution.js.map +1 -0
  444. package/app/models/command-match.d.ts +13 -0
  445. package/app/models/command-match.js +17 -0
  446. package/app/models/command-match.js.map +1 -0
  447. package/app/models/command-matcher.d.ts +11 -0
  448. package/app/models/command-matcher.js +23 -0
  449. package/app/models/command-matcher.js.map +1 -0
  450. package/app/models/command-row.d.ts +20 -0
  451. package/app/models/command-row.js +27 -0
  452. package/app/models/command-row.js.map +1 -0
  453. package/app/models/command-search-entry.d.ts +15 -0
  454. package/app/models/command-search-entry.js +20 -0
  455. package/app/models/command-search-entry.js.map +1 -0
  456. package/app/models/content-padding-ref.d.ts +66 -0
  457. package/app/models/content-padding-ref.js +20 -0
  458. package/app/models/content-padding-ref.js.map +1 -0
  459. package/app/models/contribution-match.d.ts +16 -0
  460. package/app/models/contribution-match.js +18 -0
  461. package/app/models/contribution-match.js.map +1 -0
  462. package/app/models/document-contribution.d.ts +63 -0
  463. package/app/models/document-contribution.js +28 -0
  464. package/app/models/document-contribution.js.map +1 -0
  465. package/app/models/document-heading.d.ts +21 -0
  466. package/app/models/document-heading.js +50 -0
  467. package/app/models/document-heading.js.map +1 -0
  468. package/app/models/document-look.d.ts +27 -0
  469. package/app/models/document-look.js +66 -0
  470. package/app/models/document-look.js.map +1 -0
  471. package/app/models/edit-target.d.ts +22 -0
  472. package/app/models/edit-target.js +58 -0
  473. package/app/models/edit-target.js.map +1 -0
  474. package/app/models/field-menu-request.d.ts +19 -0
  475. package/app/models/field-menu-request.js +32 -0
  476. package/app/models/field-menu-request.js.map +1 -0
  477. package/app/models/gallery-tokens.d.ts +11 -0
  478. package/app/models/gallery-tokens.js +13 -0
  479. package/app/models/gallery-tokens.js.map +1 -0
  480. package/app/models/issued-file-grant.d.ts +45 -0
  481. package/app/models/issued-file-grant.js +20 -0
  482. package/app/models/issued-file-grant.js.map +1 -0
  483. package/app/models/issued-file-grants.d.ts +40 -0
  484. package/app/models/issued-file-grants.js +17 -0
  485. package/app/models/issued-file-grants.js.map +1 -0
  486. package/app/models/key-bindings.d.ts +24 -0
  487. package/app/models/key-bindings.js +66 -0
  488. package/app/models/key-bindings.js.map +1 -0
  489. package/app/models/layout/bounds.d.ts +24 -0
  490. package/app/models/layout/bounds.js +53 -0
  491. package/app/models/layout/bounds.js.map +1 -0
  492. package/app/models/layout/closed-tabs.d.ts +28 -0
  493. package/app/models/layout/closed-tabs.js +72 -0
  494. package/app/models/layout/closed-tabs.js.map +1 -0
  495. package/app/models/layout/dock-growth.d.ts +18 -0
  496. package/app/models/layout/dock-growth.js +27 -0
  497. package/app/models/layout/dock-growth.js.map +1 -0
  498. package/app/models/layout/dock-strip-icon.d.ts +17 -0
  499. package/app/models/layout/dock-strip-icon.js +20 -0
  500. package/app/models/layout/dock-strip-icon.js.map +1 -0
  501. package/app/models/layout/dock-yield.d.ts +15 -0
  502. package/app/models/layout/dock-yield.js +19 -0
  503. package/app/models/layout/dock-yield.js.map +1 -0
  504. package/app/models/layout/dock.d.ts +33 -0
  505. package/app/models/layout/dock.js +65 -0
  506. package/app/models/layout/dock.js.map +1 -0
  507. package/app/models/layout/docking-overlay.d.ts +20 -0
  508. package/app/models/layout/docking-overlay.js +52 -0
  509. package/app/models/layout/docking-overlay.js.map +1 -0
  510. package/app/models/layout/document-group.d.ts +22 -0
  511. package/app/models/layout/document-group.js +36 -0
  512. package/app/models/layout/document-group.js.map +1 -0
  513. package/app/models/layout/document-tab.d.ts +19 -0
  514. package/app/models/layout/document-tab.js +33 -0
  515. package/app/models/layout/document-tab.js.map +1 -0
  516. package/app/models/layout/drop-target.d.ts +16 -0
  517. package/app/models/layout/drop-target.js +10 -0
  518. package/app/models/layout/drop-target.js.map +1 -0
  519. package/app/models/layout/early-document.d.ts +14 -0
  520. package/app/models/layout/early-document.js +18 -0
  521. package/app/models/layout/early-document.js.map +1 -0
  522. package/app/models/layout/group-drop-target.d.ts +19 -0
  523. package/app/models/layout/group-drop-target.js +25 -0
  524. package/app/models/layout/group-drop-target.js.map +1 -0
  525. package/app/models/layout/group-frame.d.ts +16 -0
  526. package/app/models/layout/group-frame.js +18 -0
  527. package/app/models/layout/group-frame.js.map +1 -0
  528. package/app/models/layout/layout-fit.d.ts +25 -0
  529. package/app/models/layout/layout-fit.js +61 -0
  530. package/app/models/layout/layout-fit.js.map +1 -0
  531. package/app/models/layout/layout-geometry.d.ts +49 -0
  532. package/app/models/layout/layout-geometry.js +129 -0
  533. package/app/models/layout/layout-geometry.js.map +1 -0
  534. package/app/models/layout/layout-metrics.d.ts +21 -0
  535. package/app/models/layout/layout-metrics.js +39 -0
  536. package/app/models/layout/layout-metrics.js.map +1 -0
  537. package/app/models/layout/layout.d.ts +71 -0
  538. package/app/models/layout/layout.js +241 -0
  539. package/app/models/layout/layout.js.map +1 -0
  540. package/app/models/layout/layout.node.d.ts +33 -0
  541. package/app/models/layout/layout.node.js +18 -0
  542. package/app/models/layout/layout.node.js.map +1 -0
  543. package/app/models/layout/side-drop-target.d.ts +23 -0
  544. package/app/models/layout/side-drop-target.js +29 -0
  545. package/app/models/layout/side-drop-target.js.map +1 -0
  546. package/app/models/layout/split-drop-target.d.ts +21 -0
  547. package/app/models/layout/split-drop-target.js +27 -0
  548. package/app/models/layout/split-drop-target.js.map +1 -0
  549. package/app/models/layout/split-handle.d.ts +22 -0
  550. package/app/models/layout/split-handle.js +43 -0
  551. package/app/models/layout/split-handle.js.map +1 -0
  552. package/app/models/layout/split-part.d.ts +13 -0
  553. package/app/models/layout/split-part.js +16 -0
  554. package/app/models/layout/split-part.js.map +1 -0
  555. package/app/models/layout/split.node.d.ts +42 -0
  556. package/app/models/layout/split.node.js +119 -0
  557. package/app/models/layout/split.node.js.map +1 -0
  558. package/app/models/layout/tab-drop-target.d.ts +18 -0
  559. package/app/models/layout/tab-drop-target.js +27 -0
  560. package/app/models/layout/tab-drop-target.js.map +1 -0
  561. package/app/models/layout/tab-group.d.ts +46 -0
  562. package/app/models/layout/tab-group.js +134 -0
  563. package/app/models/layout/tab-group.js.map +1 -0
  564. package/app/models/layout/tab-key.d.ts +12 -0
  565. package/app/models/layout/tab-key.js +22 -0
  566. package/app/models/layout/tab-key.js.map +1 -0
  567. package/app/models/layout/tab-label.d.ts +12 -0
  568. package/app/models/layout/tab-label.js +20 -0
  569. package/app/models/layout/tab-label.js.map +1 -0
  570. package/app/models/layout/tab-reveal.d.ts +13 -0
  571. package/app/models/layout/tab-reveal.js +16 -0
  572. package/app/models/layout/tab-reveal.js.map +1 -0
  573. package/app/models/layout/tab.d.ts +24 -0
  574. package/app/models/layout/tab.js +34 -0
  575. package/app/models/layout/tab.js.map +1 -0
  576. package/app/models/layout/toolbar-layout.d.ts +28 -0
  577. package/app/models/layout/toolbar-layout.js +116 -0
  578. package/app/models/layout/toolbar-layout.js.map +1 -0
  579. package/app/models/layout/view-registry.d.ts +24 -0
  580. package/app/models/layout/view-registry.js +58 -0
  581. package/app/models/layout/view-registry.js.map +1 -0
  582. package/app/models/layout/view-tab.d.ts +19 -0
  583. package/app/models/layout/view-tab.js +33 -0
  584. package/app/models/layout/view-tab.js.map +1 -0
  585. package/app/models/layout/view-type.d.ts +17 -0
  586. package/app/models/layout/view-type.js +28 -0
  587. package/app/models/layout/view-type.js.map +1 -0
  588. package/app/models/live-view.d.ts +32 -0
  589. package/app/models/live-view.js +90 -0
  590. package/app/models/live-view.js.map +1 -0
  591. package/app/models/menu-declarations.d.ts +20 -0
  592. package/app/models/menu-declarations.js +50 -0
  593. package/app/models/menu-declarations.js.map +1 -0
  594. package/app/models/menu-group.d.ts +17 -0
  595. package/app/models/menu-group.js +32 -0
  596. package/app/models/menu-group.js.map +1 -0
  597. package/app/models/menu-item.d.ts +20 -0
  598. package/app/models/menu-item.js +40 -0
  599. package/app/models/menu-item.js.map +1 -0
  600. package/app/models/menu-place.d.ts +16 -0
  601. package/app/models/menu-place.js +28 -0
  602. package/app/models/menu-place.js.map +1 -0
  603. package/app/models/menu-row-contribution.d.ts +52 -0
  604. package/app/models/menu-row-contribution.js +27 -0
  605. package/app/models/menu-row-contribution.js.map +1 -0
  606. package/app/models/menu-row.d.ts +12 -0
  607. package/app/models/menu-row.js +16 -0
  608. package/app/models/menu-row.js.map +1 -0
  609. package/app/models/menu-search-row.d.ts +14 -0
  610. package/app/models/menu-search-row.js +20 -0
  611. package/app/models/menu-search-row.js.map +1 -0
  612. package/app/models/menu-section.d.ts +14 -0
  613. package/app/models/menu-section.js +16 -0
  614. package/app/models/menu-section.js.map +1 -0
  615. package/app/models/module-failure.d.ts +20 -0
  616. package/app/models/module-failure.js +35 -0
  617. package/app/models/module-failure.js.map +1 -0
  618. package/app/models/module-switch-tokens.d.ts +12 -0
  619. package/app/models/module-switch-tokens.js +13 -0
  620. package/app/models/module-switch-tokens.js.map +1 -0
  621. package/app/models/modules/contribution-group.d.ts +14 -0
  622. package/app/models/modules/contribution-group.js +18 -0
  623. package/app/models/modules/contribution-group.js.map +1 -0
  624. package/app/models/modules/contribution-row.d.ts +12 -0
  625. package/app/models/modules/contribution-row.js +16 -0
  626. package/app/models/modules/contribution-row.js.map +1 -0
  627. package/app/models/modules/module-overview.d.ts +21 -0
  628. package/app/models/modules/module-overview.js +41 -0
  629. package/app/models/modules/module-overview.js.map +1 -0
  630. package/app/models/modules/module-reference.d.ts +13 -0
  631. package/app/models/modules/module-reference.js +16 -0
  632. package/app/models/modules/module-reference.js.map +1 -0
  633. package/app/models/modules/program-row.d.ts +17 -0
  634. package/app/models/modules/program-row.js +28 -0
  635. package/app/models/modules/program-row.js.map +1 -0
  636. package/app/models/notification-handle.d.ts +45 -0
  637. package/app/models/notification-handle.js +19 -0
  638. package/app/models/notification-handle.js.map +1 -0
  639. package/app/models/pending-document.d.ts +21 -0
  640. package/app/models/pending-document.js +35 -0
  641. package/app/models/pending-document.js.map +1 -0
  642. package/app/models/pending-view-change.d.ts +14 -0
  643. package/app/models/pending-view-change.js +20 -0
  644. package/app/models/pending-view-change.js.map +1 -0
  645. package/app/models/placeholder-contribution.d.ts +49 -0
  646. package/app/models/placeholder-contribution.js +22 -0
  647. package/app/models/placeholder-contribution.js.map +1 -0
  648. package/app/models/product-name.d.ts +13 -0
  649. package/app/models/product-name.js +18 -0
  650. package/app/models/product-name.js.map +1 -0
  651. package/app/models/quit-question.d.ts +16 -0
  652. package/app/models/quit-question.js +30 -0
  653. package/app/models/quit-question.js.map +1 -0
  654. package/app/models/scroll-offset.d.ts +15 -0
  655. package/app/models/scroll-offset.js +25 -0
  656. package/app/models/scroll-offset.js.map +1 -0
  657. package/app/models/search-answer.d.ts +39 -0
  658. package/app/models/search-answer.js +20 -0
  659. package/app/models/search-answer.js.map +1 -0
  660. package/app/models/search-filter.d.ts +14 -0
  661. package/app/models/search-filter.js +20 -0
  662. package/app/models/search-filter.js.map +1 -0
  663. package/app/models/search-group.d.ts +14 -0
  664. package/app/models/search-group.js +18 -0
  665. package/app/models/search-group.js.map +1 -0
  666. package/app/models/search-query.d.ts +17 -0
  667. package/app/models/search-query.js +30 -0
  668. package/app/models/search-query.js.map +1 -0
  669. package/app/models/search-rank.d.ts +14 -0
  670. package/app/models/search-rank.js +32 -0
  671. package/app/models/search-rank.js.map +1 -0
  672. package/app/models/search-request.d.ts +15 -0
  673. package/app/models/search-request.js +20 -0
  674. package/app/models/search-request.js.map +1 -0
  675. package/app/models/search-result.d.ts +65 -0
  676. package/app/models/search-result.js +38 -0
  677. package/app/models/search-result.js.map +1 -0
  678. package/app/models/search-row.d.ts +15 -0
  679. package/app/models/search-row.js +20 -0
  680. package/app/models/search-row.js.map +1 -0
  681. package/app/models/search-session.d.ts +38 -0
  682. package/app/models/search-session.js +140 -0
  683. package/app/models/search-session.js.map +1 -0
  684. package/app/models/search-source-contribution.d.ts +75 -0
  685. package/app/models/search-source-contribution.js +38 -0
  686. package/app/models/search-source-contribution.js.map +1 -0
  687. package/app/models/settings/setting-options-supply.d.ts +18 -0
  688. package/app/models/settings/setting-options-supply.js +46 -0
  689. package/app/models/settings/setting-options-supply.js.map +1 -0
  690. package/app/models/settings/settings-group.d.ts +13 -0
  691. package/app/models/settings/settings-group.js +16 -0
  692. package/app/models/settings/settings-group.js.map +1 -0
  693. package/app/models/settings/settings-page-entry.d.ts +22 -0
  694. package/app/models/settings/settings-page-entry.js +30 -0
  695. package/app/models/settings/settings-page-entry.js.map +1 -0
  696. package/app/models/settings/settings-page.d.ts +26 -0
  697. package/app/models/settings/settings-page.js +62 -0
  698. package/app/models/settings/settings-page.js.map +1 -0
  699. package/app/models/settings/settings-row.d.ts +42 -0
  700. package/app/models/settings/settings-row.js +24 -0
  701. package/app/models/settings/settings-row.js.map +1 -0
  702. package/app/models/settings/shortcut-notice.d.ts +15 -0
  703. package/app/models/settings/shortcut-notice.js +20 -0
  704. package/app/models/settings/shortcut-notice.js.map +1 -0
  705. package/app/models/settings/shortcut-row.d.ts +17 -0
  706. package/app/models/settings/shortcut-row.js +26 -0
  707. package/app/models/settings/shortcut-row.js.map +1 -0
  708. package/app/models/settings/text-match.d.ts +16 -0
  709. package/app/models/settings/text-match.js +41 -0
  710. package/app/models/settings/text-match.js.map +1 -0
  711. package/app/models/settings/word-breaks.d.ts +13 -0
  712. package/app/models/settings/word-breaks.js +34 -0
  713. package/app/models/settings/word-breaks.js.map +1 -0
  714. package/app/models/settings-page-contribution.d.ts +46 -0
  715. package/app/models/settings-page-contribution.js +20 -0
  716. package/app/models/settings-page-contribution.js.map +1 -0
  717. package/app/models/shell-documents.d.ts +21 -0
  718. package/app/models/shell-documents.js +25 -0
  719. package/app/models/shell-documents.js.map +1 -0
  720. package/app/models/shell-menus.d.ts +16 -0
  721. package/app/models/shell-menus.js +97 -0
  722. package/app/models/shell-menus.js.map +1 -0
  723. package/app/models/shortcut-binding.d.ts +13 -0
  724. package/app/models/shortcut-binding.js +16 -0
  725. package/app/models/shortcut-binding.js.map +1 -0
  726. package/app/models/shortcut-collision.d.ts +14 -0
  727. package/app/models/shortcut-collision.js +18 -0
  728. package/app/models/shortcut-collision.js.map +1 -0
  729. package/app/models/shortcut-map.d.ts +27 -0
  730. package/app/models/shortcut-map.js +64 -0
  731. package/app/models/shortcut-map.js.map +1 -0
  732. package/app/models/spelling-offer.d.ts +15 -0
  733. package/app/models/spelling-offer.js +24 -0
  734. package/app/models/spelling-offer.js.map +1 -0
  735. package/app/models/startup-state.d.ts +17 -0
  736. package/app/models/startup-state.js +35 -0
  737. package/app/models/startup-state.js.map +1 -0
  738. package/app/models/status-bar-item-contribution.d.ts +45 -0
  739. package/app/models/status-bar-item-contribution.js +20 -0
  740. package/app/models/status-bar-item-contribution.js.map +1 -0
  741. package/app/models/status-bar-item-state.d.ts +82 -0
  742. package/app/models/status-bar-item-state.js +43 -0
  743. package/app/models/status-bar-item-state.js.map +1 -0
  744. package/app/models/status-bar-item.d.ts +62 -0
  745. package/app/models/status-bar-item.js +29 -0
  746. package/app/models/status-bar-item.js.map +1 -0
  747. package/app/models/submenu-row.d.ts +15 -0
  748. package/app/models/submenu-row.js +19 -0
  749. package/app/models/submenu-row.js.map +1 -0
  750. package/app/models/tab-content.d.ts +18 -0
  751. package/app/models/tab-content.js +22 -0
  752. package/app/models/tab-content.js.map +1 -0
  753. package/app/models/tab-target.d.ts +19 -0
  754. package/app/models/tab-target.js +30 -0
  755. package/app/models/tab-target.js.map +1 -0
  756. package/app/models/text-range.d.ts +40 -0
  757. package/app/models/text-range.js +25 -0
  758. package/app/models/text-range.js.map +1 -0
  759. package/app/models/toolbar-drop-target.d.ts +17 -0
  760. package/app/models/toolbar-drop-target.js +28 -0
  761. package/app/models/toolbar-drop-target.js.map +1 -0
  762. package/app/models/toolbar-fit.d.ts +10 -0
  763. package/app/models/toolbar-fit.js +17 -0
  764. package/app/models/toolbar-fit.js.map +1 -0
  765. package/app/models/toolbar-placement.d.ts +14 -0
  766. package/app/models/toolbar-placement.js +24 -0
  767. package/app/models/toolbar-placement.js.map +1 -0
  768. package/app/models/toolbar.d.ts +14 -0
  769. package/app/models/toolbar.js +18 -0
  770. package/app/models/toolbar.js.map +1 -0
  771. package/app/models/top-bar-action-contribution.d.ts +44 -0
  772. package/app/models/top-bar-action-contribution.js +21 -0
  773. package/app/models/top-bar-action-contribution.js.map +1 -0
  774. package/app/models/top-bar-action-state.d.ts +51 -0
  775. package/app/models/top-bar-action-state.js +27 -0
  776. package/app/models/top-bar-action-state.js.map +1 -0
  777. package/app/models/top-bar-action.d.ts +62 -0
  778. package/app/models/top-bar-action.js +29 -0
  779. package/app/models/top-bar-action.js.map +1 -0
  780. package/app/models/update-state.d.ts +23 -0
  781. package/app/models/update-state.js +56 -0
  782. package/app/models/update-state.js.map +1 -0
  783. package/app/models/view-badge.d.ts +37 -0
  784. package/app/models/view-badge.js +22 -0
  785. package/app/models/view-badge.js.map +1 -0
  786. package/app/models/view-contribution.d.ts +91 -0
  787. package/app/models/view-contribution.js +42 -0
  788. package/app/models/view-contribution.js.map +1 -0
  789. package/app/models/web-view-handle.d.ts +56 -0
  790. package/app/models/web-view-handle.js +118 -0
  791. package/app/models/web-view-handle.js.map +1 -0
  792. package/app/models/web-view-layer.d.ts +20 -0
  793. package/app/models/web-view-layer.js +45 -0
  794. package/app/models/web-view-layer.js.map +1 -0
  795. package/app/models/window-appearance.d.ts +18 -0
  796. package/app/models/window-appearance.js +61 -0
  797. package/app/models/window-appearance.js.map +1 -0
  798. package/app/models/window-application.d.ts +32 -0
  799. package/app/models/window-application.js +45 -0
  800. package/app/models/window-application.js.map +1 -0
  801. package/app/models/window-palette.d.ts +18 -0
  802. package/app/models/window-palette.js +26 -0
  803. package/app/models/window-palette.js.map +1 -0
  804. package/app/models/window-part-activation.d.ts +16 -0
  805. package/app/models/window-part-activation.js +18 -0
  806. package/app/models/window-part-activation.js.map +1 -0
  807. package/app/models/window-part-context.d.ts +171 -0
  808. package/app/models/window-part-context.js +708 -0
  809. package/app/models/window-part-context.js.map +1 -0
  810. package/app/models/window-part-source.d.ts +95 -0
  811. package/app/models/window-part-source.js +40 -0
  812. package/app/models/window-part-source.js.map +1 -0
  813. package/app/models/window-part-tokens.d.ts +32 -0
  814. package/app/models/window-part-tokens.js +15 -0
  815. package/app/models/window-part-tokens.js.map +1 -0
  816. package/app/models/window-secrets.d.ts +18 -0
  817. package/app/models/window-secrets.js +33 -0
  818. package/app/models/window-secrets.js.map +1 -0
  819. package/app/models/window-web-views.d.ts +18 -0
  820. package/app/models/window-web-views.js +34 -0
  821. package/app/models/window-web-views.js.map +1 -0
  822. package/app/services/agent-control.service.d.ts +24 -0
  823. package/app/services/agent-control.service.js +58 -0
  824. package/app/services/agent-control.service.js.map +1 -0
  825. package/app/services/appearance-settings.service.d.ts +12 -0
  826. package/app/services/appearance-settings.service.js +50 -0
  827. package/app/services/appearance-settings.service.js.map +1 -0
  828. package/app/services/bar-items.service.d.ts +22 -0
  829. package/app/services/bar-items.service.js +36 -0
  830. package/app/services/bar-items.service.js.map +1 -0
  831. package/app/services/clock-setting.service.d.ts +26 -0
  832. package/app/services/clock-setting.service.js +43 -0
  833. package/app/services/clock-setting.service.js.map +1 -0
  834. package/app/services/closing.service.d.ts +19 -0
  835. package/app/services/closing.service.js +99 -0
  836. package/app/services/closing.service.js.map +1 -0
  837. package/app/services/command.service.d.ts +51 -0
  838. package/app/services/command.service.js +178 -0
  839. package/app/services/command.service.js.map +1 -0
  840. package/app/services/details.service.d.ts +8 -0
  841. package/app/services/details.service.js +28 -0
  842. package/app/services/details.service.js.map +1 -0
  843. package/app/services/dialog-cover.service.d.ts +32 -0
  844. package/app/services/dialog-cover.service.js +102 -0
  845. package/app/services/dialog-cover.service.js.map +1 -0
  846. package/app/services/dock-growth.service.d.ts +15 -0
  847. package/app/services/dock-growth.service.js +63 -0
  848. package/app/services/dock-growth.service.js.map +1 -0
  849. package/app/services/document-history.service.d.ts +24 -0
  850. package/app/services/document-history.service.js +68 -0
  851. package/app/services/document-history.service.js.map +1 -0
  852. package/app/services/document-instances.service.d.ts +15 -0
  853. package/app/services/document-instances.service.js +47 -0
  854. package/app/services/document-instances.service.js.map +1 -0
  855. package/app/services/document-opener.service.d.ts +18 -0
  856. package/app/services/document-opener.service.js +75 -0
  857. package/app/services/document-opener.service.js.map +1 -0
  858. package/app/services/edit-target.service.d.ts +23 -0
  859. package/app/services/edit-target.service.js +93 -0
  860. package/app/services/edit-target.service.js.map +1 -0
  861. package/app/services/issued-file-grants.reader.d.ts +13 -0
  862. package/app/services/issued-file-grants.reader.js +24 -0
  863. package/app/services/issued-file-grants.reader.js.map +1 -0
  864. package/app/services/layout-menu.service.d.ts +9 -0
  865. package/app/services/layout-menu.service.js +32 -0
  866. package/app/services/layout-menu.service.js.map +1 -0
  867. package/app/services/layout-store.service.d.ts +10 -0
  868. package/app/services/layout-store.service.js +35 -0
  869. package/app/services/layout-store.service.js.map +1 -0
  870. package/app/services/layout.reader.d.ts +23 -0
  871. package/app/services/layout.reader.js +113 -0
  872. package/app/services/layout.reader.js.map +1 -0
  873. package/app/services/layout.service.d.ts +96 -0
  874. package/app/services/layout.service.js +301 -0
  875. package/app/services/layout.service.js.map +1 -0
  876. package/app/services/link.service.d.ts +34 -0
  877. package/app/services/link.service.js +116 -0
  878. package/app/services/link.service.js.map +1 -0
  879. package/app/services/live-view.service.d.ts +32 -0
  880. package/app/services/live-view.service.js +104 -0
  881. package/app/services/live-view.service.js.map +1 -0
  882. package/app/services/menu-bar.service.d.ts +28 -0
  883. package/app/services/menu-bar.service.js +89 -0
  884. package/app/services/menu-bar.service.js.map +1 -0
  885. package/app/services/menu.service.d.ts +34 -0
  886. package/app/services/menu.service.js +96 -0
  887. package/app/services/menu.service.js.map +1 -0
  888. package/app/services/module-selection.service.d.ts +18 -0
  889. package/app/services/module-selection.service.js +31 -0
  890. package/app/services/module-selection.service.js.map +1 -0
  891. package/app/services/module-status.service.d.ts +22 -0
  892. package/app/services/module-status.service.js +39 -0
  893. package/app/services/module-status.service.js.map +1 -0
  894. package/app/services/module-switch.service.d.ts +16 -0
  895. package/app/services/module-switch.service.js +56 -0
  896. package/app/services/module-switch.service.js.map +1 -0
  897. package/app/services/notification.service.d.ts +38 -0
  898. package/app/services/notification.service.js +103 -0
  899. package/app/services/notification.service.js.map +1 -0
  900. package/app/services/preload-bridge.service.d.ts +108 -0
  901. package/app/services/preload-bridge.service.js +461 -0
  902. package/app/services/preload-bridge.service.js.map +1 -0
  903. package/app/services/program-status.service.d.ts +27 -0
  904. package/app/services/program-status.service.js +75 -0
  905. package/app/services/program-status.service.js.map +1 -0
  906. package/app/services/quit.service.d.ts +17 -0
  907. package/app/services/quit.service.js +37 -0
  908. package/app/services/quit.service.js.map +1 -0
  909. package/app/services/recent-commands.service.d.ts +24 -0
  910. package/app/services/recent-commands.service.js +63 -0
  911. package/app/services/recent-commands.service.js.map +1 -0
  912. package/app/services/search-palette.service.d.ts +20 -0
  913. package/app/services/search-palette.service.js +66 -0
  914. package/app/services/search-palette.service.js.map +1 -0
  915. package/app/services/search.service.d.ts +20 -0
  916. package/app/services/search.service.js +31 -0
  917. package/app/services/search.service.js.map +1 -0
  918. package/app/services/setting-check.service.d.ts +10 -0
  919. package/app/services/setting-check.service.js +32 -0
  920. package/app/services/setting-check.service.js.map +1 -0
  921. package/app/services/setting-options.service.d.ts +14 -0
  922. package/app/services/setting-options.service.js +38 -0
  923. package/app/services/setting-options.service.js.map +1 -0
  924. package/app/services/settings-page.service.d.ts +19 -0
  925. package/app/services/settings-page.service.js +35 -0
  926. package/app/services/settings-page.service.js.map +1 -0
  927. package/app/services/settings-rows.service.d.ts +17 -0
  928. package/app/services/settings-rows.service.js +29 -0
  929. package/app/services/settings-rows.service.js.map +1 -0
  930. package/app/services/settings.service.d.ts +38 -0
  931. package/app/services/settings.service.js +104 -0
  932. package/app/services/settings.service.js.map +1 -0
  933. package/app/services/shell-commands.service.d.ts +61 -0
  934. package/app/services/shell-commands.service.js +346 -0
  935. package/app/services/shell-commands.service.js.map +1 -0
  936. package/app/services/shell-search-sources.service.d.ts +26 -0
  937. package/app/services/shell-search-sources.service.js +102 -0
  938. package/app/services/shell-search-sources.service.js.map +1 -0
  939. package/app/services/spelling.service.d.ts +26 -0
  940. package/app/services/spelling.service.js +75 -0
  941. package/app/services/spelling.service.js.map +1 -0
  942. package/app/services/startup.service.d.ts +19 -0
  943. package/app/services/startup.service.js +62 -0
  944. package/app/services/startup.service.js.map +1 -0
  945. package/app/services/support.service.d.ts +18 -0
  946. package/app/services/support.service.js +79 -0
  947. package/app/services/support.service.js.map +1 -0
  948. package/app/services/tab-destinations.service.d.ts +10 -0
  949. package/app/services/tab-destinations.service.js +41 -0
  950. package/app/services/tab-destinations.service.js.map +1 -0
  951. package/app/services/tab-drag.service.d.ts +33 -0
  952. package/app/services/tab-drag.service.js +138 -0
  953. package/app/services/tab-drag.service.js.map +1 -0
  954. package/app/services/tab-focus.service.d.ts +24 -0
  955. package/app/services/tab-focus.service.js +93 -0
  956. package/app/services/tab-focus.service.js.map +1 -0
  957. package/app/services/tab-label.service.d.ts +37 -0
  958. package/app/services/tab-label.service.js +104 -0
  959. package/app/services/tab-label.service.js.map +1 -0
  960. package/app/services/tab-rename.service.d.ts +30 -0
  961. package/app/services/tab-rename.service.js +82 -0
  962. package/app/services/tab-rename.service.js.map +1 -0
  963. package/app/services/tab-row.service.d.ts +16 -0
  964. package/app/services/tab-row.service.js +50 -0
  965. package/app/services/tab-row.service.js.map +1 -0
  966. package/app/services/tab-strip.service.d.ts +11 -0
  967. package/app/services/tab-strip.service.js +44 -0
  968. package/app/services/tab-strip.service.js.map +1 -0
  969. package/app/services/time-formats.service.d.ts +20 -0
  970. package/app/services/time-formats.service.js +40 -0
  971. package/app/services/time-formats.service.js.map +1 -0
  972. package/app/services/toast.service.d.ts +31 -0
  973. package/app/services/toast.service.js +143 -0
  974. package/app/services/toast.service.js.map +1 -0
  975. package/app/services/toolbar-drag.service.d.ts +21 -0
  976. package/app/services/toolbar-drag.service.js +105 -0
  977. package/app/services/toolbar-drag.service.js.map +1 -0
  978. package/app/services/toolbar.service.d.ts +34 -0
  979. package/app/services/toolbar.service.js +89 -0
  980. package/app/services/toolbar.service.js.map +1 -0
  981. package/app/services/update.service.d.ts +25 -0
  982. package/app/services/update.service.js +47 -0
  983. package/app/services/update.service.js.map +1 -0
  984. package/app/services/view-dialog.service.d.ts +27 -0
  985. package/app/services/view-dialog.service.js +107 -0
  986. package/app/services/view-dialog.service.js.map +1 -0
  987. package/app/services/view-instances.service.d.ts +27 -0
  988. package/app/services/view-instances.service.js +129 -0
  989. package/app/services/view-instances.service.js.map +1 -0
  990. package/app/services/web-view.service.d.ts +47 -0
  991. package/app/services/web-view.service.js +222 -0
  992. package/app/services/web-view.service.js.map +1 -0
  993. package/app/services/window-error-handler.d.ts +18 -0
  994. package/app/services/window-error-handler.js +43 -0
  995. package/app/services/window-error-handler.js.map +1 -0
  996. package/app/services/window-part-host.service.d.ts +199 -0
  997. package/app/services/window-part-host.service.js +793 -0
  998. package/app/services/window-part-host.service.js.map +1 -0
  999. package/app/services/window-row-overlay.service.d.ts +15 -0
  1000. package/app/services/window-row-overlay.service.js +79 -0
  1001. package/app/services/window-row-overlay.service.js.map +1 -0
  1002. package/package.json +49 -3
  1003. package/resources.d.ts +1039 -0
  1004. package/resources.js +1451 -0
  1005. package/resources.js.map +1 -0
  1006. package/testing/models/fake-window-part-context.d.ts +1402 -0
  1007. package/testing/models/fake-window-part-context.js +109 -0
  1008. package/testing/models/fake-window-part-context.js.map +1 -0
  1009. package/testing/models/fake-window-secrets.d.ts +109 -0
  1010. package/testing/models/fake-window-secrets.js +14 -0
  1011. package/testing/models/fake-window-secrets.js.map +1 -0
  1012. package/testing/models/fake-window-web-views.d.ts +66 -0
  1013. package/testing/models/fake-window-web-views.js +12 -0
  1014. package/testing/models/fake-window-web-views.js.map +1 -0
@@ -0,0 +1,1622 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import type { Signal, Type } from "@angular/core";
9
+ import type { JsonObject, JsonValue } from "@noldova/context.json";
10
+ import type { AgentControlState, NotificationPost, SettingEntry, SettingOption, SettingScope } from "@noldova/desktop.protocol";
11
+ import type { FileSaveOutcome } from "../enums/file-save-outcome.js";
12
+ import type { CommandContribution } from "../models/command-contribution.js";
13
+ import type { DocumentContribution } from "../models/document-contribution.js";
14
+ import type { IssuedFileGrants } from "../models/issued-file-grants.js";
15
+ import type { MenuRowContribution } from "../models/menu-row-contribution.js";
16
+ import type { NotificationHandle } from "../models/notification-handle.js";
17
+ import type { PlaceholderContribution } from "../models/placeholder-contribution.js";
18
+ import type { SearchSourceContribution } from "../models/search-source-contribution.js";
19
+ import type { SettingsPageContribution } from "../models/settings-page-contribution.js";
20
+ import type { SettingsRow } from "../models/settings/settings-row.js";
21
+ import type { StatusBarItem } from "../models/status-bar-item.js";
22
+ import type { StatusBarItemContribution } from "../models/status-bar-item-contribution.js";
23
+ import type { TopBarAction } from "../models/top-bar-action.js";
24
+ import type { TopBarActionContribution } from "../models/top-bar-action-contribution.js";
25
+ import type { ViewBadge } from "../models/view-badge.js";
26
+ import type { ViewContribution } from "../models/view-contribution.js";
27
+ import type { ICommandKey } from "./i-command-key.js";
28
+ import type { IDocumentOptions } from "./i-document-options.js";
29
+ import type { IDocumentUpdate } from "./i-document-update.js";
30
+ import type { IFileChoiceOptions } from "./i-file-choice-options.js";
31
+ import type { IFilePathChoiceOptions } from "./i-file-path-choice-options.js";
32
+ import type { IFileGrantOptions } from "./i-file-grant-options.js";
33
+ import type { IInAppBrowser } from "./i-in-app-browser.js";
34
+ import type { ILinkOpenOptions } from "./i-link-open-options.js";
35
+ import type { ISelectionSource } from "./i-selection-source.js";
36
+ import type { IViewDialogOptions } from "./i-view-dialog-options.js";
37
+ import type { IViewInstanceOptions } from "./i-view-instance-options.js";
38
+ import type { IViewUpdate } from "./i-view-update.js";
39
+ import type { IWindowPalette } from "./i-window-palette.js";
40
+ import type { IWindowSecrets } from "./i-window-secrets.js";
41
+ import type { IWindowWebViews } from "./i-window-web-views.js";
42
+ /**
43
+ * What the window gives a window part: registration of its contributions,
44
+ * and access to commands, notifications, documents, the runtime and
45
+ * settings. A part reaches only its own module's names and its dependencies',
46
+ * `<module id>.<name>`; it registers only names its module declares in
47
+ * `module.json`. Everything it registers is withdrawn when it deactivates.
48
+ * After that, the context ignores what would register, mark or post
49
+ * something, or change the window's tabs, such as a call from a load that
50
+ * finishes late: it still refuses a name or value a live context refuses, but
51
+ * registers no contribution, provider or listener, opens, changes, closes or
52
+ * shows no document or view, shows none in a view dialog, shows no link
53
+ * menu, becomes no in-app browser, sets no badge,
54
+ * marks no tab, shows no notification, and the functions it returns do
55
+ * nothing. A document or view a part asks to open, change or close during
56
+ * an activation that then fails is never opened, changed or closed. The
57
+ * calls that reach the system do nothing after a withdraw either:
58
+ * `chooseFolderAsync` answers `null` and `saveFileAsync` answers
59
+ * `FileSaveOutcome.Cancelled` without showing a dialog, and `openLinkAsync`,
60
+ * `openFileAsync` and `showInFolderAsync` open and show nothing. Their
61
+ * refusals live in the main process, so these five answer without checking
62
+ * their values. `chooseFilePathAsync` answers `null` without showing a
63
+ * dialog, still refusing options a live context refuses.
64
+ * `chooseFilesAsync` and `grantFilesAsync` answer no files,
65
+ * still refusing a lifetime a live context refuses, and a withdraw ends every
66
+ * file grant the part holds, including those a request still pending
67
+ * answers.
68
+ */
69
+ export interface IWindowPartContext {
70
+ /**
71
+ * The part's web views: it opens them for its own panes, and every one it
72
+ * still holds closes when it deactivates.
73
+ */
74
+ readonly webViews: IWindowWebViews;
75
+ /**
76
+ * The module's own secrets in this machine's secret store, which the part
77
+ * saves, replaces, removes and checks but never reads back: only the
78
+ * module's runtime part reads a value, as `documents/MODULES.md` says.
79
+ */
80
+ readonly secrets: IWindowSecrets;
81
+ /**
82
+ * Whether agent control is stopped and whether any agent session is open,
83
+ * which the runtime keeps current through `desktop.agentControlChanged`;
84
+ * null until the runtime first answers.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * import { type Signal, computed } from "@angular/core";
89
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
90
+ *
91
+ * export function isStopped(context: IWindowPartContext): Signal<boolean> {
92
+ * return computed(() => context.agentControl()?.isStopped === true);
93
+ * }
94
+ * ```
95
+ */
96
+ readonly agentControl: Signal<AgentControlState | null>;
97
+ /**
98
+ * Registers one of the module's views.
99
+ *
100
+ * @param view The view, which the module declares in
101
+ * `contributes.views`.
102
+ * @throws Error synchronously when the view belongs to another module, the
103
+ * module does not declare it, or it is already registered.
104
+ * @example
105
+ * ```ts
106
+ * import { Component } from "@angular/core";
107
+ * import { DockSide, type IWindowPartContext, ViewContribution } from "@noldova/desktop.window";
108
+ *
109
+ * @Component({ selector: "nol-notes-list", template: "<ul></ul>" })
110
+ * export class NotesListComponent {
111
+ * }
112
+ *
113
+ * export function registerList(context: IWindowPartContext): void {
114
+ * context.registerView(new ViewContribution("notes.list", "Notes", "notes", DockSide.Left, true, () => Promise.resolve(NotesListComponent)));
115
+ * }
116
+ * ```
117
+ */
118
+ registerView(view: ViewContribution): void;
119
+ /**
120
+ * Registers one of the module's documents.
121
+ *
122
+ * @param document The document, which the module declares in
123
+ * `contributes.documents`.
124
+ * @throws Error synchronously when the document belongs to another module,
125
+ * the module does not declare it, or it is already registered.
126
+ * @example
127
+ * ```ts
128
+ * import { Component } from "@angular/core";
129
+ * import { DocumentContribution, type IWindowPartContext } from "@noldova/desktop.window";
130
+ *
131
+ * @Component({ selector: "nol-notes-editor", template: "<textarea></textarea>" })
132
+ * export class NotesEditorComponent {
133
+ * }
134
+ *
135
+ * export function registerEditor(context: IWindowPartContext): void {
136
+ * context.registerDocument(new DocumentContribution("notes.note", () => Promise.resolve(NotesEditorComponent)));
137
+ * }
138
+ * ```
139
+ */
140
+ registerDocument(document: DocumentContribution): void;
141
+ /**
142
+ * Registers the module's placeholder, which the documents area shows while
143
+ * no document is open, such as a start page with ways to begin.
144
+ *
145
+ * @param placeholder The placeholder, which the module declares in
146
+ * `contributes.placeholders`.
147
+ * @throws Error synchronously when the placeholder belongs to another
148
+ * module, the module does not declare it, or a placeholder is already
149
+ * registered, since the window shows one.
150
+ * @example
151
+ * ```ts
152
+ * import { Component } from "@angular/core";
153
+ * import { type IWindowPartContext, PlaceholderContribution } from "@noldova/desktop.window";
154
+ *
155
+ * @Component({ selector: "nol-notes-start", template: "<button type=\"button\">New note</button>" })
156
+ * export class NotesStartComponent {
157
+ * }
158
+ *
159
+ * export function registerStart(context: IWindowPartContext): void {
160
+ * context.registerPlaceholder(new PlaceholderContribution("notes.start", () => Promise.resolve(NotesStartComponent)));
161
+ * }
162
+ * ```
163
+ */
164
+ registerPlaceholder(placeholder: PlaceholderContribution): void;
165
+ /**
166
+ * Registers one of the module's Settings pages, which Settings shows
167
+ * among the pages under the title its `settings.json` gives, with the
168
+ * module's component in the content column, followed by the settings of
169
+ * the modules that depend on this one and name the page's title as their
170
+ * page; until the part registers it, the page shows that it is loading,
171
+ * and while the module is failed or blocked it shows why.
172
+ *
173
+ * @param page The page, which the module declares in
174
+ * `contributes.settingsPages` and in its `settings.json`'s `pages`.
175
+ * @throws Error synchronously when the page belongs to another module,
176
+ * the module does not declare it, or it is already registered.
177
+ * @example
178
+ * ```ts
179
+ * import { Component } from "@angular/core";
180
+ * import { type IWindowPartContext, SettingsPageContribution } from "@noldova/desktop.window";
181
+ *
182
+ * @Component({ selector: "nol-notes-sync", template: "<section class=\"nol-settings-group\"></section>" })
183
+ * export class NotesSyncComponent {
184
+ * }
185
+ *
186
+ * export function registerSync(context: IWindowPartContext): void {
187
+ * context.registerSettingsPage(new SettingsPageContribution("notes.sync", () => Promise.resolve(NotesSyncComponent)));
188
+ * }
189
+ * ```
190
+ */
191
+ registerSettingsPage(page: SettingsPageContribution): void;
192
+ /**
193
+ * Gives Settings search the rows one of the module's own pages draws, so a
194
+ * search finds them as it finds settings: it matches each row's title and
195
+ * description and shows the page with its matching rows, and opening a row
196
+ * opens the page, scrolls the element marked `data-setting="<id>"` into
197
+ * view once the page's component draws it, and marks it until the person
198
+ * leaves the page or searches again.
199
+ *
200
+ * The part can call it at any time, its page's component too through the
201
+ * same context, so the rows follow what the page shows; the rows go when
202
+ * the part deactivates.
203
+ *
204
+ * @param page The page, which the module declares in
205
+ * `contributes.settingsPages` and in its `settings.json`'s `pages`.
206
+ * @param rows The page's rows, which replace its earlier ones; an empty
207
+ * list clears them.
208
+ * @throws Error synchronously when the page or a row's id belongs to
209
+ * another module, or the module does not declare the page.
210
+ * @throws ArgumentException synchronously when two rows have the same id.
211
+ * @example
212
+ * ```ts
213
+ * import { type IWindowPartContext, SettingsRow } from "@noldova/desktop.window";
214
+ *
215
+ * export function showSyncRows(context: IWindowPartContext): void {
216
+ * context.setSettingsRows("notes.sync", [
217
+ * new SettingsRow("notes.sync.server", "Sync server", "Where your notes sync to."),
218
+ * new SettingsRow("notes.sync.interval", "Sync every")
219
+ * ]);
220
+ * }
221
+ * ```
222
+ */
223
+ setSettingsRows(page: string, rows: readonly SettingsRow[]): void;
224
+ /**
225
+ * Registers one of the module's commands, which then runs in this window.
226
+ *
227
+ * @param command The command, which the module declares in
228
+ * `contributes.commands`.
229
+ * @throws Error synchronously when the command belongs to another module,
230
+ * the module does not declare it, or a command of that name is already
231
+ * registered.
232
+ * @example
233
+ * ```ts
234
+ * import { CommandContribution, type IWindowPartContext } from "@noldova/desktop.window";
235
+ *
236
+ * export function registerNewNote(context: IWindowPartContext): void {
237
+ * context.registerCommand(new CommandContribution("notes.new", "New note", "add", "Mod+Alt+N", () => context.requestAsync("notes.create", null)));
238
+ * }
239
+ * ```
240
+ */
241
+ registerCommand(command: CommandContribution): void;
242
+ /**
243
+ * Registers one of the module's search sources, whose recent items and
244
+ * matches the window's search shows in a group and a filter of their own.
245
+ *
246
+ * @param source The source, named `<module id>.<name>`.
247
+ * @throws Error synchronously when the source belongs to another module or
248
+ * a source of that name is already registered.
249
+ * @example
250
+ * ```ts
251
+ * import { SearchAnswer, SearchSourceContribution, type IWindowPartContext } from "@noldova/desktop.window";
252
+ *
253
+ * export function registerNotesSearch(context: IWindowPartContext): void {
254
+ * context.registerSearchSource(new SearchSourceContribution("notes.notes", "Notes", "notes", "Notes", null, "description",
255
+ * () => Promise.resolve([]), () => Promise.resolve(new SearchAnswer([]))));
256
+ * }
257
+ * ```
258
+ */
259
+ registerSearchSource(source: SearchSourceContribution): void;
260
+ /**
261
+ * Registers one of the module's status-bar items.
262
+ *
263
+ * @param item The item, which the module declares in
264
+ * `contributes.statusBarItems`.
265
+ * @returns The registered item, which the part updates or hides.
266
+ * @throws Error synchronously when the item belongs to another module, the
267
+ * module does not declare it, it is already registered, or its command
268
+ * belongs to neither the module nor a dependency.
269
+ * @example
270
+ * ```ts
271
+ * import { type IWindowPartContext, type StatusBarItem, StatusBarItemContribution, StatusBarItemState, StatusBarSide } from "@noldova/desktop.window";
272
+ *
273
+ * export function registerCount(context: IWindowPartContext): StatusBarItem {
274
+ * return context.registerStatusBarItem(new StatusBarItemContribution("notes.count", StatusBarSide.Left,
275
+ * new StatusBarItemState("3 notes", { command: "notes.showList" })));
276
+ * }
277
+ * ```
278
+ */
279
+ registerStatusBarItem(item: StatusBarItemContribution): StatusBarItem;
280
+ /**
281
+ * Registers one of the module's top-bar actions.
282
+ *
283
+ * @param action The action, which the module declares in
284
+ * `contributes.topBarActions`.
285
+ * @returns The registered action, which the part updates or hides.
286
+ * @throws Error synchronously when the action belongs to another module,
287
+ * the module does not declare it, it is already registered, or its command
288
+ * belongs to neither the module nor a dependency.
289
+ * @example
290
+ * ```ts
291
+ * import { type IWindowPartContext, type TopBarAction, TopBarActionContribution, TopBarActionState } from "@noldova/desktop.window";
292
+ *
293
+ * export function registerSync(context: IWindowPartContext): TopBarAction {
294
+ * return context.registerTopBarAction(new TopBarActionContribution("notes.sync", new TopBarActionState("sync", "Sync notes", "notes.sync")));
295
+ * }
296
+ * ```
297
+ */
298
+ registerTopBarAction(action: TopBarActionContribution): TopBarAction;
299
+ /**
300
+ * Registers a step that saves the part's unsaved state when Noldova Desktop Sample
301
+ * closes, quits for a newer build or restarts. The window runs every
302
+ * part's steps and its own layout save together and closes only once they
303
+ * settle. A step that rejects keeps Noldova Desktop Sample open: the window logs the
304
+ * error and shows it as a notification naming the module, and the person
305
+ * closes again once it is fixed. A part whose steps have not settled after
306
+ * 4 seconds does not hold closing back: Noldova Desktop Sample closes, and the window
307
+ * logs it and posts a warning naming the module.
308
+ *
309
+ * @param save The step; it resolves once the state is saved.
310
+ * @returns A function that removes the step; deactivation removes it too.
311
+ * @example
312
+ * ```ts
313
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
314
+ *
315
+ * export function saveDraftsOnClose(context: IWindowPartContext, saveDraftsAsync: () => Promise<void>): () => void {
316
+ * return context.registerSave(saveDraftsAsync);
317
+ * }
318
+ * ```
319
+ */
320
+ registerSave(save: () => Promise<void>): () => void;
321
+ /**
322
+ * Makes the Edit menu's and the text field menu's Copy follow a selection
323
+ * the part keeps itself, such as a terminal's. While focus is in the
324
+ * element, Copy is enabled when the source has a selection, and copies its
325
+ * text through the window's own clipboard channel, as
326
+ * `ClipboardWriter` writes, without any web permission. While the source
327
+ * has nothing selected, Copy acts on a text field inside the element as
328
+ * before. Cut, Paste and Select All, and Copy anywhere else, work as before.
329
+ *
330
+ * Register the narrowest element that holds the selection. When registered
331
+ * elements are nested, Copy follows the innermost one around the focus, and
332
+ * registering an element again replaces its source; the earlier remover
333
+ * then leaves the new one in place.
334
+ *
335
+ * @param element The element whose focus, its own or a descendant's, makes
336
+ * the source the one Copy follows.
337
+ * @param source The selection.
338
+ * @returns A function that removes the source; deactivation removes it too.
339
+ * Copy ignores a source whose element has left the page, but the window
340
+ * keeps it until it is removed, so the part calls the remover when it
341
+ * discards the element.
342
+ * @example
343
+ * ```ts
344
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
345
+ *
346
+ * export function followTerminalSelection(context: IWindowPartContext, element: HTMLElement,
347
+ * terminal: { hasSelection(): boolean; getSelection(): string }): () => void {
348
+ * return context.registerSelectionSource(element, { hasSelection: () => terminal.hasSelection(), readSelection: () => terminal.getSelection() });
349
+ * }
350
+ * ```
351
+ */
352
+ registerSelectionSource(element: HTMLElement, source: ISelectionSource): () => void;
353
+ /**
354
+ * Supplies the rows of one of the module's dynamic menu groups. The window
355
+ * asks again whenever it builds the menu or toolbar, and leaves out a row
356
+ * whose command belongs to neither the module nor a dependency, and a group
357
+ * without rows.
358
+ *
359
+ * @param group The group's name, which the module's `menus.json` declares
360
+ * as `dynamic`.
361
+ * @param provider Returns the rows for the context object the menu was
362
+ * opened with, `{}` in the main menu and toolbars.
363
+ * @returns A function that withdraws the rows; deactivation withdraws them
364
+ * too.
365
+ * @throws Error synchronously when the group belongs to another module or
366
+ * the module does not declare it as dynamic.
367
+ * @example
368
+ * ```ts
369
+ * import { type IWindowPartContext, MenuRowContribution } from "@noldova/desktop.window";
370
+ *
371
+ * export function provideRecent(context: IWindowPartContext, recent: readonly string[]): () => void {
372
+ * return context.provideMenuGroup("notes.recent", () => recent.map(t => new MenuRowContribution("notes.open", { note: t }, t)));
373
+ * }
374
+ * ```
375
+ */
376
+ provideMenuGroup(group: string, provider: (context: JsonObject) => readonly MenuRowContribution[]): () => void;
377
+ /**
378
+ * Supplies the options of one of the module's dynamic choice settings.
379
+ * Settings asks again whenever one of the module's settings changes and
380
+ * whenever the part calls `refreshSettingOptions`, so the options can
381
+ * follow the module's other settings and data the part loads. It keeps a
382
+ * value that isn't among the options, marked unavailable, and shows the
383
+ * value in a disabled field while no options are supplied, the provider
384
+ * returns `null` because its data is still loading, or it throws or returns
385
+ * two options with one value. Settings calls the provider synchronously
386
+ * while it renders, outside any reactive context, so the provider may read
387
+ * and write signals, and a signal it reads doesn't make Settings ask again.
388
+ *
389
+ * @param setting The setting's name, which the module's `settings.json`
390
+ * declares as a `Choice` with `"dynamic": true`.
391
+ * @param provider Returns the options for the module's settings in effect
392
+ * for the application, by name; an option's value may be empty, such as
393
+ * for a "Provider default" option; or `null` while the data they come
394
+ * from is still loading, followed by `refreshSettingOptions` once it is.
395
+ * @returns A function that stops supplying them; deactivation stops it
396
+ * too, and a later call for the same setting replaces the provider.
397
+ * @throws Error synchronously when the setting belongs to another module
398
+ * or is not a dynamic choice.
399
+ * @example
400
+ * ```ts
401
+ * import { SettingOption } from "@noldova/desktop.protocol";
402
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
403
+ *
404
+ * export function provideModels(context: IWindowPartContext, models: ReadonlyMap<string, readonly string[]>): () => void {
405
+ * return context.provideSettingOptions("notes.model", values =>
406
+ * (models.get(String(values["notes.account"])) ?? []).map(t => new SettingOption(t, t)));
407
+ * }
408
+ * ```
409
+ */
410
+ provideSettingOptions(setting: string, provider: (values: JsonObject) => readonly SettingOption[] | null): () => void;
411
+ /**
412
+ * Tells Settings that a dynamic choice setting's options changed, such as
413
+ * when data the provider reads finished loading, so it asks the provider
414
+ * again. Changes of the module's settings need no call.
415
+ *
416
+ * @param setting The setting's name, a dynamic choice of the module.
417
+ * @throws Error synchronously when the setting belongs to another module
418
+ * or is not a dynamic choice.
419
+ * @example
420
+ * ```ts
421
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
422
+ *
423
+ * export function modelsLoaded(context: IWindowPartContext): void {
424
+ * context.refreshSettingOptions("notes.model");
425
+ * }
426
+ * ```
427
+ */
428
+ refreshSettingOptions(setting: string): void;
429
+ /**
430
+ * Supplies the check of one of the module's checked text settings.
431
+ * When the person commits a value in Settings, Settings asks the check:
432
+ * a message refuses the value, which Settings doesn't save, and the field
433
+ * keeps the refused text with the message under it until the person's
434
+ * next commit, even when an earlier save lands meanwhile. Settings also
435
+ * shows the message for a stored value the check refuses, without
436
+ * changing it, until the person commits a value the check accepts. While
437
+ * no check is supplied, such as before the part activates, Settings saves
438
+ * any value within the text's length. A check that throws accepts the
439
+ * value, and the part's log names the setting and the error's name, or
440
+ * the type of what was thrown, never the value. Settings calls the check
441
+ * synchronously, outside any reactive context, so a signal it reads
442
+ * doesn't make Settings ask again.
443
+ *
444
+ * @param setting The setting's name, which the module's `settings.json`
445
+ * declares as a `Text` with `"checked": true`.
446
+ * @param check Returns the message that tells the person why a value is
447
+ * refused, in their terms, or `null` to accept it.
448
+ * @returns A function that stops supplying it; deactivation stops it
449
+ * too, and a later call for the same setting replaces the check.
450
+ * @throws Error synchronously when the setting belongs to another module
451
+ * or is not a checked text.
452
+ * @example
453
+ * ```ts
454
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
455
+ *
456
+ * export function checkSites(context: IWindowPartContext): () => void {
457
+ * return context.provideSettingCheck("notes.sites", value =>
458
+ * value.split(",").some(t => t.trim().includes(" ")) ? "Enter hosts, such as github.com, separated by commas." : null);
459
+ * }
460
+ * ```
461
+ */
462
+ provideSettingCheck(setting: string, check: (value: string) => string | null): () => void;
463
+ /**
464
+ * Sets or removes the badge of one of the module's views.
465
+ *
466
+ * @param view The view's name, which the module declares in
467
+ * `contributes.views`.
468
+ * @param badge The badge, or null to remove it.
469
+ * @throws Error synchronously when the view belongs to another module or
470
+ * the module does not declare it.
471
+ * @example
472
+ * ```ts
473
+ * import { type IWindowPartContext, ViewBadge } from "@noldova/desktop.window";
474
+ *
475
+ * export function showUnread(context: IWindowPartContext, unread: number): void {
476
+ * context.setViewBadge("notes.list", unread === 0 ? null : new ViewBadge(unread, `${unread} unread notes`));
477
+ * }
478
+ * ```
479
+ */
480
+ setViewBadge(view: string, badge: ViewBadge | null): void;
481
+ /**
482
+ * Marks the tab of one of the module's views or documents as working. A
483
+ * view's tab shows a spinner in place of its close glyph and reveals Close
484
+ * when hovered or focused; a document's tab shows the spinner before its
485
+ * title, in place of its image, status or glyph, and keeps Close at its end.
486
+ * Either is marked busy for assistive technology, until every mark on it is
487
+ * cleared or the part is withdrawn. Real work that should hold up
488
+ * quitting is reported by the module's runtime part, not by this mark.
489
+ *
490
+ * @param name The view's or document's name, which the module declares in
491
+ * `contributes.views` or `contributes.documents`.
492
+ * @param instance The tab's instance, if it has one.
493
+ * @returns A function that clears this mark; calling it again does nothing.
494
+ * @throws Error synchronously when the name belongs to another module, the
495
+ * module declares no such view or document, or the instance is not valid.
496
+ * @example
497
+ * ```ts
498
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
499
+ *
500
+ * export async function syncNoteAsync(context: IWindowPartContext, note: string, sync: () => Promise<void>): Promise<void> {
501
+ * const clear = context.markWorking("notes.note", note);
502
+ * try {
503
+ * await sync();
504
+ * }
505
+ * finally {
506
+ * clear();
507
+ * }
508
+ * }
509
+ * ```
510
+ */
511
+ markWorking(name: string, instance?: string): () => void;
512
+ /**
513
+ * Marks the tab of one of the module's views or documents as waiting for the
514
+ * person, such as for an answer to an approval. The tab shows a raised hand
515
+ * in place of its close glyph, at the spinner's size and place, reveals Close
516
+ * when hovered or focused, and its accessible name ends with "waiting for
517
+ * your answer", until every waiting mark on it is cleared or the part is
518
+ * withdrawn. A tab that is also marked working shows waiting, and isn't
519
+ * marked busy; it works again once its waiting marks are cleared.
520
+ *
521
+ * @param name The view's or document's name, which the module declares in
522
+ * `contributes.views` or `contributes.documents`.
523
+ * @param instance The tab's instance, if it has one.
524
+ * @returns A function that clears this mark; calling it again does nothing.
525
+ * @throws Error synchronously when the name belongs to another module, the
526
+ * module declares no such view or document, or the instance is not valid.
527
+ * @example
528
+ * ```ts
529
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
530
+ *
531
+ * export async function askAsync(context: IWindowPartContext, chat: string, answer: () => Promise<boolean>): Promise<boolean> {
532
+ * const clear = context.markWaiting("chats.chat", chat);
533
+ * try {
534
+ * return await answer();
535
+ * }
536
+ * finally {
537
+ * clear();
538
+ * }
539
+ * }
540
+ * ```
541
+ */
542
+ markWaiting(name: string, instance?: string): () => void;
543
+ /**
544
+ * Tells whether a name belongs to the module or one of its dependencies,
545
+ * which is what the part may reach.
546
+ *
547
+ * @param name A name, `<module id>.<name>`.
548
+ * @returns True when the name's module id is the module's own or a
549
+ * dependency's.
550
+ * @example
551
+ * ```ts
552
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
553
+ *
554
+ * export function canOpen(context: IWindowPartContext, command: string): boolean {
555
+ * return context.isAllowed(command);
556
+ * }
557
+ * ```
558
+ */
559
+ isAllowed(name: string): boolean;
560
+ /**
561
+ * Runs a command of the module or a dependency, in the window or in the
562
+ * runtime, or Noldova Desktop's `desktop.search`, which opens search under the
563
+ * filter of the source its `source` argument names.
564
+ *
565
+ * @param name The command's name.
566
+ * @param commandArguments The arguments; null when left out.
567
+ * @returns A promise of the command's result; it rejects when the command
568
+ * is not registered, not enabled or fails.
569
+ * @throws Error synchronously when the command belongs to neither the
570
+ * module nor a dependency, and is not `desktop.search`.
571
+ * @example
572
+ * ```ts
573
+ * import type { JsonValue } from "@noldova/context.json";
574
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
575
+ *
576
+ * export function openNote(context: IWindowPartContext, note: string): Promise<JsonValue> {
577
+ * return context.runCommandAsync("notes.open", { note });
578
+ * }
579
+ * ```
580
+ */
581
+ runCommandAsync(name: string, commandArguments?: JsonValue): Promise<JsonValue>;
582
+ /**
583
+ * Names the command the window would run for a key, so an element's own key
584
+ * handler, which runs before the window's, can decide which keys to leave
585
+ * to the window: an element that keeps Ctrl keys typically leaves its own
586
+ * module's commands and every Ctrl+Shift key, and keeps other plain Ctrl
587
+ * keys by preventing their default. The window reads the key with the
588
+ * person's bindings and, inside an element marked with
589
+ * {@link KeepsCtrlKeysDirective}, by its rule, and names only an enabled
590
+ * command it would run now, whether or not the key repeats or a handler
591
+ * already prevented its default.
592
+ *
593
+ * @param event The key event, during its handling.
594
+ * @returns The command's name, or `null` when the window runs none for the
595
+ * key, including while text is being composed.
596
+ * @example
597
+ * ```ts
598
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
599
+ *
600
+ * export function isForShell(context: IWindowPartContext, event: KeyboardEvent): boolean {
601
+ * const command = context.findWindowCommand(event);
602
+ * return command === null || !(command.startsWith("terminal.") || event.shiftKey);
603
+ * }
604
+ * ```
605
+ */
606
+ findWindowCommand(event: KeyboardEvent): string | null;
607
+ /**
608
+ * Reads the key that runs a command, after the person's bindings, so a part
609
+ * can show it beside the command's control. The signal follows the person's
610
+ * bindings and the commands as they change.
611
+ *
612
+ * @param command The command's qualified name, such as `notes.newNote`.
613
+ * @returns A signal of the command's key, or of `null` while the command
614
+ * has no key or isn't registered.
615
+ * @example
616
+ * ```ts
617
+ * import { type Signal, computed } from "@angular/core";
618
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
619
+ *
620
+ * export function newNoteHint(context: IWindowPartContext): Signal<string> {
621
+ * const key = context.keyOf("notes.newNote");
622
+ * return computed(() => key()?.label ?? "");
623
+ * }
624
+ * ```
625
+ */
626
+ keyOf(command: string): Signal<ICommandKey | null>;
627
+ /**
628
+ * Posts a notification of one of the module's kinds.
629
+ *
630
+ * @param post The notification; its commands belong to the module or a
631
+ * dependency.
632
+ * @returns A promise of the handle that dismisses it; it rejects
633
+ * when the kind belongs to another module or the module does not declare
634
+ * it, a command belongs to neither the module nor a dependency, or the
635
+ * runtime refuses the post.
636
+ * @example
637
+ * ```ts
638
+ * import { NotificationPost, NotificationSeverity, QualifiedName } from "@noldova/desktop.protocol";
639
+ * import { type IWindowPartContext, type NotificationHandle } from "@noldova/desktop.window";
640
+ *
641
+ * export function announceSaved(context: IWindowPartContext): Promise<NotificationHandle> {
642
+ * return context.postNotificationAsync(new NotificationPost(QualifiedName.parse("notes.saved"), null, "Note saved", null, NotificationSeverity.Info, null, [], null));
643
+ * }
644
+ * ```
645
+ */
646
+ postNotificationAsync(post: NotificationPost): Promise<NotificationHandle>;
647
+ /**
648
+ * Opens one of the module's documents at the end of the active document
649
+ * group, or right after another of its open instances when
650
+ * {@link IDocumentOptions.after} names one, or activates it where it is. While the part first activates with a saved
651
+ * layout, the document shows only when the layout holds it. An open document
652
+ * keeps its look, changing only what the options give.
653
+ *
654
+ * @param name The document's name.
655
+ * @param instance Which of the document's instances, such as a note's id.
656
+ * @param title The tab's title.
657
+ * @param options Whether it opens as a preview, its breadcrumb, its look
658
+ * and the document it opens after; an ordinary tab with no breadcrumb, at
659
+ * the end of the active group, when left out.
660
+ * @throws Error synchronously when the document belongs to another module,
661
+ * or the title or a breadcrumb segment is blank.
662
+ * @example
663
+ * ```ts
664
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
665
+ *
666
+ * export function previewNote(context: IWindowPartContext, note: string, title: string): void {
667
+ * context.openDocument("notes.note", note, title, { preview: true, breadcrumb: ["Notes", "Drafts"] });
668
+ * }
669
+ *
670
+ * export function openLinkedNote(context: IWindowPartContext, from: string, note: string, title: string): void {
671
+ * context.openDocument("notes.note", note, title, { after: from });
672
+ * }
673
+ * ```
674
+ */
675
+ openDocument(name: string, instance: string, title: string, options?: IDocumentOptions): void;
676
+ /**
677
+ * Keeps an open preview of one of the module's documents, so the next
678
+ * preview does not replace it.
679
+ *
680
+ * @param name The document's name.
681
+ * @param instance The instance it opened with.
682
+ * @throws Error synchronously when the document belongs to another module.
683
+ * @example
684
+ * ```ts
685
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
686
+ *
687
+ * export function keepEdited(context: IWindowPartContext, note: string): void {
688
+ * context.keepDocument("notes.note", note);
689
+ * }
690
+ * ```
691
+ */
692
+ keepDocument(name: string, instance: string): void;
693
+ /**
694
+ * Closes one of the module's documents: its tab closes as when the person
695
+ * closes it, the next tab of its group shows, and a view dialog showing it
696
+ * closes. Back and Forward keep it as a place; for a document whose subject
697
+ * is gone, use {@link IWindowPartContext.forgetDocument}.
698
+ * {@link onDocumentClosed} does not hear of it. Nothing happens when the
699
+ * document is not open.
700
+ *
701
+ * @param name The document's name.
702
+ * @param instance The instance it opened with.
703
+ * @throws Error synchronously when the document belongs to another module.
704
+ * @example
705
+ * ```ts
706
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
707
+ *
708
+ * export function closeNote(context: IWindowPartContext, note: string): void {
709
+ * context.closeDocument("notes.note", note);
710
+ * }
711
+ * ```
712
+ */
713
+ closeDocument(name: string, instance: string): void;
714
+ /**
715
+ * Removes one of the module's documents from Back and Forward, and closes
716
+ * it as {@link IWindowPartContext.closeDocument} does, for a document whose
717
+ * subject is gone, such as a deleted note. A document closed any other
718
+ * way stays a place that Back and Forward reopen.
719
+ *
720
+ * @param name The document's name.
721
+ * @param instance The instance it opened with.
722
+ * @throws Error synchronously when the document belongs to another module.
723
+ * @example
724
+ * ```ts
725
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
726
+ *
727
+ * export function forgetDeleted(context: IWindowPartContext, note: string): void {
728
+ * context.forgetDocument("notes.note", note);
729
+ * }
730
+ * ```
731
+ */
732
+ forgetDocument(name: string, instance: string): void;
733
+ /**
734
+ * Changes the title or breadcrumb of one of the module's open documents,
735
+ * such as after the person renames or moves a note, a tab in the
736
+ * background included. Nothing shows when the document is not open.
737
+ * A change made before the window's saved layout loads applies once it
738
+ * has, over the title saved with the layout; a later close or
739
+ * {@link openDocument} of the document, also before the load, drops it.
740
+ *
741
+ * @param name The document's name.
742
+ * @param instance The instance it opened with.
743
+ * @param update The new title, breadcrumb or both.
744
+ * @throws Error synchronously when the document belongs to another module,
745
+ * the title, a breadcrumb segment or the breadcrumb's glyph is blank, or the
746
+ * glyph comes without a breadcrumb.
747
+ * @example
748
+ * ```ts
749
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
750
+ *
751
+ * export function renameNote(context: IWindowPartContext, note: string, title: string): void {
752
+ * context.updateDocument("notes.note", note, { title });
753
+ * }
754
+ * ```
755
+ */
756
+ updateDocument(name: string, instance: string, update: IDocumentUpdate): void;
757
+ /**
758
+ * Listens for the person closing a tab of one of the module's documents,
759
+ * such as to delete a record kept for each open page. A preview that
760
+ * another preview replaces closes too. It never hears of a close made by
761
+ * {@link closeDocument} or {@link forgetDocument}, the part deactivating
762
+ * or the window going away. The part's deactivation removes the listener;
763
+ * an error it throws is reported and the other listeners still hear. A
764
+ * close the person makes while no listener of the document is registered,
765
+ * such as while the part is inactive or reactivating, waits: the part's
766
+ * next activation leaves that tab closed even when it reopens the
767
+ * instance with {@link openDocument}, and the document's listeners hear
768
+ * the close when that activation ends. Opening the instance after an
769
+ * activation drops the waiting close.
770
+ *
771
+ * @param name The document's name.
772
+ * @param listener Called with the instance whose tab closed.
773
+ * @returns A function that removes the listener.
774
+ * @throws Error synchronously when the document belongs to another module
775
+ * or the module does not declare it.
776
+ * @example
777
+ * ```ts
778
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
779
+ *
780
+ * export function dropClosedPages(context: IWindowPartContext, drop: (page: string) => void): () => void {
781
+ * return context.onDocumentClosed("browser.page", drop);
782
+ * }
783
+ * ```
784
+ */
785
+ onDocumentClosed(name: string, listener: (instance: string) => void): () => void;
786
+ /**
787
+ * Listens for a person renaming a tab of one of the module's renamable
788
+ * views or documents in place, as {@link IViewOptions.isRenamable} and
789
+ * {@link IDocumentContributionOptions.isRenamable} declare it. Enter or
790
+ * leaving the field keeps the title, trimmed; the listener hears it, or
791
+ * an empty title, which asks for the part's own automatic title. Escape,
792
+ * or a title the tab already shows, tells it nothing. The part owns the
793
+ * name: the tab shows its old title until the part applies the new one
794
+ * with {@link updateView} or {@link updateDocument}. The part's
795
+ * deactivation removes the listener; an error it throws is reported and
796
+ * the other listeners still hear.
797
+ *
798
+ * @param name The view's or document's name.
799
+ * @param listener Called with the instance whose tab was renamed and the
800
+ * kept title, empty for the automatic one.
801
+ * @returns A function that removes the listener.
802
+ * @throws Error synchronously when the view or document belongs to
803
+ * another module, or the module does not register it as renamable.
804
+ * @example
805
+ * ```ts
806
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
807
+ *
808
+ * export function followRenames(context: IWindowPartContext, automaticTitle: (terminal: string) => string): () => void {
809
+ * return context.onTabRenamed("terminal.panel", (terminal, title) =>
810
+ * context.updateView("terminal.panel", terminal, { title: title === "" ? automaticTitle(terminal) : title }));
811
+ * }
812
+ * ```
813
+ */
814
+ onTabRenamed(name: string, listener: (instance: string, title: string) => void): () => void;
815
+ /**
816
+ * Lists the instances of one of the module's documents whose tabs are
817
+ * open, such as to delete the records of pages with no tab, one the
818
+ * person closed before it ever showed included. Asked while the part
819
+ * activates, it answers once that activation ends, with the saved layout's
820
+ * tabs in place and the waiting closes heard, so the part never awaits it
821
+ * inside {@link IWindowPart.activateAsync}; asked later, it answers at once.
822
+ *
823
+ * @param name The document's name.
824
+ * @returns A promise of the open instances, in tab order, or of `null`
825
+ * when the part deactivates or its activation fails first; it rejects when
826
+ * the document belongs to another module or the module does not declare
827
+ * it.
828
+ * @example
829
+ * ```ts
830
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
831
+ *
832
+ * export function pruneClosedPages(context: IWindowPartContext, prune: (open: readonly string[]) => void): void {
833
+ * void context.listOpenDocumentsAsync("browser.page").then(open => open === null ? undefined : prune(open));
834
+ * }
835
+ * ```
836
+ */
837
+ listOpenDocumentsAsync(name: string): Promise<readonly string[] | null>;
838
+ /**
839
+ * Opens a tab for an instance of one of the module's views with
840
+ * instances, such as a new terminal, and activates it; one already open
841
+ * activates where it is, with the new title, glyph and breadcrumb. Its
842
+ * component gets the instance and title as its `instance` and `title`
843
+ * inputs.
844
+ *
845
+ * While the part activates, until the promise its
846
+ * {@link IWindowPart.activateAsync} returned resolves, an instance tab the
847
+ * saved layout holds takes the new title, glyph and breadcrumb where it
848
+ * is, without activating, and the saved instance tabs it does not reopen
849
+ * by then close without {@link onViewClosed}.
850
+ *
851
+ * @param name The view's name.
852
+ * @param instance Which of the view's instances, such as a terminal's id;
853
+ * not blank.
854
+ * @param title The tab's title.
855
+ * @param options Its glyph, the group to open in and its breadcrumb, as
856
+ * {@link IViewInstanceOptions} describes them.
857
+ * @throws Error synchronously when the view belongs to another module or
858
+ * is not a registered view with instances, or the instance, the title or a
859
+ * breadcrumb segment is blank.
860
+ * @example
861
+ * ```ts
862
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
863
+ *
864
+ * export function openTerminal(context: IWindowPartContext, id: string, shell: string, tabGroup: string): void {
865
+ * context.openView("terminal.session", id, shell, { tabGroup });
866
+ * }
867
+ * ```
868
+ */
869
+ openView(name: string, instance: string, title: string, options?: IViewInstanceOptions): void;
870
+ /**
871
+ * Changes the title, glyph or breadcrumb of an open instance's tab, such
872
+ * as after its shell changes the terminal's title or working folder.
873
+ * Nothing happens when it is not open.
874
+ *
875
+ * @param name The view's name.
876
+ * @param instance The instance it opened with.
877
+ * @param update The new title, glyph, breadcrumb or any of them.
878
+ * @throws Error synchronously when the view belongs to another module or
879
+ * is not a registered view with instances, the instance, the title, a
880
+ * breadcrumb segment or the breadcrumb's glyph is blank, or the breadcrumb's
881
+ * glyph comes without a breadcrumb.
882
+ * @example
883
+ * ```ts
884
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
885
+ *
886
+ * export function retitleTerminal(context: IWindowPartContext, id: string, title: string): void {
887
+ * context.updateView("terminal.session", id, { title });
888
+ * }
889
+ * ```
890
+ */
891
+ updateView(name: string, instance: string, update: IViewUpdate): void;
892
+ /**
893
+ * Closes an instance's tab, such as after its terminal's process exits:
894
+ * the next tab of its group shows, a view dialog showing it closes, and
895
+ * {@link onViewClosed} does not hear of it. Nothing happens when it is
896
+ * not open.
897
+ *
898
+ * @param name The view's name.
899
+ * @param instance The instance it opened with.
900
+ * @throws Error synchronously when the view belongs to another module or
901
+ * is not a registered view with instances, or the instance is blank.
902
+ * @example
903
+ * ```ts
904
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
905
+ *
906
+ * export function closeExited(context: IWindowPartContext, id: string): void {
907
+ * context.closeView("terminal.session", id);
908
+ * }
909
+ * ```
910
+ */
911
+ closeView(name: string, instance: string): void;
912
+ /**
913
+ * Shows one of the part's views without instances, such as a bottom
914
+ * panel, and moves the focus into it, as choosing its tab with the
915
+ * pointer does: to the element it last held there, else its first
916
+ * focusable element, once the view shows one, such as after its part
917
+ * loads, waiting up to 10 seconds unless the person moves the focus,
918
+ * clicks or presses a key elsewhere first. {@link openView} only
919
+ * activates an instance, and the shell's `desktop.toggleView` leaves the
920
+ * focus on the view's tab. A view that is not open opens in its dock; an
921
+ * open one activates where it is, wherever the person moved it, and the
922
+ * dock that holds it shows, even when it was hidden or the narrow window
923
+ * closed it.
924
+ *
925
+ * While the part activates, until the promise its
926
+ * {@link IWindowPart.activateAsync} returned resolves, the view shows once
927
+ * the window has loaded its layout.
928
+ *
929
+ * @param name The view's name.
930
+ * @throws Error synchronously when the view belongs to another module or
931
+ * is not a registered view without instances.
932
+ * @example
933
+ * ```ts
934
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
935
+ *
936
+ * export function showPanel(context: IWindowPartContext): void {
937
+ * context.showView("terminal.panel");
938
+ * }
939
+ * ```
940
+ */
941
+ showView(name: string): void;
942
+ /**
943
+ * Hides the dock that holds one of the part's view tabs, as the shell's
944
+ * `desktop.toggleLeftDock`, `desktop.toggleRightDock` and
945
+ * `desktop.toggleBottomDock` hide it: the dock keeps its tabs, so
946
+ * {@link showView}, {@link openView} or the person shows the view again
947
+ * where it was. A focus inside the dock moves to its strip, as when the
948
+ * person hides it. The person may have moved the tab to any dock. Nothing
949
+ * happens when the tab is not open, is outside a dock, such as among the
950
+ * documents, or its dock is already hidden.
951
+ *
952
+ * @param name The view's name.
953
+ * @param instance Which instance's tab, for a view with instances; left
954
+ * out for a view without instances.
955
+ * @throws Error synchronously when the view belongs to another module or
956
+ * is not a registered view, the instance is left out for a view with
957
+ * instances or given for one without, or the instance is blank.
958
+ * @example
959
+ * ```ts
960
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
961
+ *
962
+ * export function hideTerminal(context: IWindowPartContext, id: string): void {
963
+ * context.hideViewDock("terminal.session", id);
964
+ * }
965
+ * ```
966
+ */
967
+ hideViewDock(name: string, instance?: string): void;
968
+ /**
969
+ * Grows the dock that holds one of the part's view tabs so the tab's
970
+ * content shows at least a length, in rem, along the dock's axis: its
971
+ * height in the bottom dock, its width in a side dock. The dock grows
972
+ * once, when the tab's content first shows in a dock shorter than that, by
973
+ * what it lacks and no further than the window allows; a content already
974
+ * long enough grows nothing, and a later resize by the person stands.
975
+ * Nothing grows while the tab is outside a dock, such as among the
976
+ * documents. The tab may open after the call, as when the part opens it
977
+ * next. A new call for the same tab takes the place of the one before.
978
+ *
979
+ * @param name The view's name.
980
+ * @param minimum The length in rem the tab's content shows at least, above
981
+ * 0.
982
+ * @param instance Which instance's tab, for a view with instances; left
983
+ * out for a view without instances.
984
+ * @returns A function that ends the ask and puts the dock's earlier size
985
+ * back, unless the person or another ask resized the dock since; it does
986
+ * nothing once a later call for the same tab took the ask's place, or the
987
+ * second time.
988
+ * @throws Error synchronously when the view belongs to another module or
989
+ * is not a registered view, the instance is left out for a view with
990
+ * instances or given for one without, the instance is blank, or the
991
+ * minimum is not a finite number above 0.
992
+ * @example
993
+ * ```ts
994
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
995
+ *
996
+ * export function showTall(context: IWindowPartContext, id: string): () => void {
997
+ * context.openView("terminal.session", id, "Sign in");
998
+ * return context.growViewDock("terminal.session", 20, id);
999
+ * }
1000
+ * ```
1001
+ */
1002
+ growViewDock(name: string, minimum: number, instance?: string): () => void;
1003
+ /**
1004
+ * Listens for the person closing an instance's tab, such as to end its
1005
+ * terminal. It hears only the person's close: never the part's own
1006
+ * {@link closeView}, the saved tabs closed at the end of activation, the
1007
+ * part deactivating or the window going away. The part's deactivation
1008
+ * removes the listener; an error it throws is reported and the other
1009
+ * listeners still hear. A close the person makes while no listener of
1010
+ * the view is registered, such as while the part is inactive or
1011
+ * reactivating, waits: the part's next activation leaves that tab closed
1012
+ * even when it reopens the instance with {@link openView}, and the view's
1013
+ * listeners hear the close when that activation ends.
1014
+ *
1015
+ * @param name The view's name.
1016
+ * @param listener Called with the instance whose tab closed.
1017
+ * @returns A function that removes the listener.
1018
+ * @throws Error synchronously when the view belongs to another module or
1019
+ * is not a registered view with instances.
1020
+ * @example
1021
+ * ```ts
1022
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1023
+ *
1024
+ * export function endClosedTerminals(context: IWindowPartContext, end: (id: string) => void): () => void {
1025
+ * return context.onViewClosed("terminal.session", end);
1026
+ * }
1027
+ * ```
1028
+ */
1029
+ onViewClosed(name: string, listener: (instance: string) => void): () => void;
1030
+ /**
1031
+ * Shows a view or document in a large modal dialog. One already open in a
1032
+ * tab moves into the dialog and returns when it closes.
1033
+ *
1034
+ * @param name The view's or document's name, the module's, a
1035
+ * dependency's or the shell's.
1036
+ * @param options The document's instance and the dialog's title.
1037
+ * @returns A promise that settles when the dialog closes; it rejects when
1038
+ * the name belongs to another module, another dialog is open, the runtime
1039
+ * is starting again, or no such view or document is registered.
1040
+ * @example
1041
+ * ```ts
1042
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1043
+ *
1044
+ * export function showNote(context: IWindowPartContext, note: string): Promise<void> {
1045
+ * return context.showInDialogAsync("notes.note", { instance: note, title: "Note" });
1046
+ * }
1047
+ * ```
1048
+ */
1049
+ showInDialogAsync(name: string, options?: IViewDialogOptions): Promise<void>;
1050
+ /**
1051
+ * Opens a palette just under the window row, centred across the window, as
1052
+ * the command search opens: the part's component, created with its
1053
+ * {@link WindowPartTokens}, with `shown` true and a content padding of its
1054
+ * own. The window shows one palette at a time.
1055
+ *
1056
+ * @param load Loads the palette's component.
1057
+ * @returns The palette, or null when the window shows no window row,
1058
+ * another palette, the command search's included, is open, or the part was
1059
+ * withdrawn while the component loaded, in which case it is never created.
1060
+ * @throws Error asynchronously, rejecting the promise, with what `load`
1061
+ * rejects with, or with what the component throws as it is created; no
1062
+ * palette is left open.
1063
+ * @example
1064
+ * ```ts
1065
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1066
+ *
1067
+ * export async function findAsync(context: IWindowPartContext): Promise<boolean> {
1068
+ * const palette = await context.openBelowWindowRowAsync(() => import("./find.component.js").then(t => t.FindComponent));
1069
+ * await palette?.closed;
1070
+ * return palette !== null;
1071
+ * }
1072
+ * ```
1073
+ */
1074
+ openBelowWindowRowAsync<T>(load: () => Promise<Type<T>>): Promise<IWindowPalette<T> | null>;
1075
+ /**
1076
+ * Writes a message to the main process's log under the module's id. The
1077
+ * message holds no secrets and no unnecessary personal or project data.
1078
+ *
1079
+ * @param message The message.
1080
+ * @example
1081
+ * ```ts
1082
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1083
+ *
1084
+ * export function logSkipped(context: IWindowPartContext, count: number): void {
1085
+ * context.log(`Skipped ${count} notes that could not be read.`);
1086
+ * }
1087
+ * ```
1088
+ */
1089
+ log(message: string): void;
1090
+ /**
1091
+ * Opens a link the one way every module does. An http or https link opens
1092
+ * in the in-app browser a part registered with
1093
+ * {@link IWindowPartContext.registerInAppBrowser} when the options' place
1094
+ * says so or, with no place, where that browser places it by the options'
1095
+ * gesture; otherwise, and when the in-app browser fails, it opens in the
1096
+ * system's own application, such as the person's browser, as does every
1097
+ * other link, such as a new message in their mail app. The system opens
1098
+ * only well-formed http, https and mailto links without credentials, and
1099
+ * Noldova Desktop Sample never asks first. The in-app browser gets a link only
1100
+ * when it passes the same check, and in its normalized form, so a link with
1101
+ * credentials, over 32768 characters or that does not parse goes to the
1102
+ * system, which refuses it. A click on a link in the window's
1103
+ * content opens it the same way, with the click's gesture, unless the part
1104
+ * handled the click itself.
1105
+ *
1106
+ * @param url The link to open.
1107
+ * @param options How the person opened it, or where it opens.
1108
+ * @returns A promise that settles once the in-app browser or the system has
1109
+ * taken the link; it rejects when Noldova Desktop Sample refuses the link or
1110
+ * the system cannot open it. After the part is withdrawn, it settles at
1111
+ * once without checking the link and opens nothing.
1112
+ * @example
1113
+ * ```ts
1114
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1115
+ * import type { LinkOpenEvent } from "@noldova/ui.components.angular";
1116
+ *
1117
+ * export function openLink(context: IWindowPartContext, opened: LinkOpenEvent): Promise<void> {
1118
+ * return context.openLinkAsync(opened.url, { gesture: opened.gesture });
1119
+ * }
1120
+ * ```
1121
+ */
1122
+ openLinkAsync(url: string, options?: ILinkOpenOptions): Promise<void>;
1123
+ /**
1124
+ * Shows a web link's menu at the pointer, which offers to open the link in
1125
+ * the app, while a part is the in-app browser, and in the person's
1126
+ * browser, and cancels the event's default. It shows nothing for a link that
1127
+ * isn't http or https, and leaves that event's default alone. A right-click
1128
+ * on a link in the window's content shows it the same way, unless the part
1129
+ * handled the event itself.
1130
+ *
1131
+ * @param url The link the person asked the menu of.
1132
+ * @param event The right-click, which places the menu.
1133
+ * After the part is withdrawn, it shows nothing.
1134
+ * @example
1135
+ * ```ts
1136
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1137
+ * import type { LinkMenuEvent } from "@noldova/ui.components.angular";
1138
+ *
1139
+ * export function showLinkMenu(context: IWindowPartContext, asked: LinkMenuEvent): void {
1140
+ * context.showLinkMenu(asked.url, asked.event);
1141
+ * }
1142
+ * ```
1143
+ */
1144
+ showLinkMenu(url: string, event: MouseEvent): void;
1145
+ /**
1146
+ * Makes the part the in-app browser, which then opens the http and https
1147
+ * links every module opens with {@link IWindowPartContext.openLinkAsync},
1148
+ * wherever it places them. One part at a time is the in-app browser; until
1149
+ * it registers, and once it unregisters or is withdrawn, every link opens
1150
+ * in the system's browser.
1151
+ *
1152
+ * @param browser Where links open, and how to open one in the app.
1153
+ * @returns A function that unregisters the browser.
1154
+ * @throws InAppBrowserTakenException when another part is already the in-app
1155
+ * browser. After the part is withdrawn, it registers nothing and returns a
1156
+ * function that does nothing.
1157
+ * @example
1158
+ * ```ts
1159
+ * import { LinkGesture, LinkPlace, type IWindowPartContext } from "@noldova/desktop.window";
1160
+ *
1161
+ * export function registerBrowser(context: IWindowPartContext, openPageAsync: (url: string) => Promise<void>): () => void {
1162
+ * return context.registerInAppBrowser({
1163
+ * placeFor: (_url, gesture) => gesture === LinkGesture.Plain ? LinkPlace.InApp : LinkPlace.System,
1164
+ * openAsync: openPageAsync
1165
+ * });
1166
+ * }
1167
+ * ```
1168
+ */
1169
+ registerInAppBrowser(browser: IInAppBrowser): () => void;
1170
+ /**
1171
+ * Shows a file or a folder, selected in its parent folder, in the system's
1172
+ * file manager: File Explorer on Windows, the Finder on macOS, and the file
1173
+ * manager on Linux. It never opens or runs the file, never opens the folder
1174
+ * itself, and never asks first.
1175
+ *
1176
+ * The main process shows only an absolute path to an existing regular file
1177
+ * or folder, checked when the request arrives, or a link to one. It refuses
1178
+ * a missing or relative path, and on Windows any path that isn't on a drive,
1179
+ * such as a network or device path, before looking at it. It follows each
1180
+ * link in the path in turn, reading the link without looking at where it
1181
+ * leads, and refuses a path with a link to a network or device path before
1182
+ * looking at that path. On Windows a `..` drops the part before it by its
1183
+ * text first, as Windows does. The file manager is given the path the links
1184
+ * reach, with no link left in it, so it shows what was checked. A mapped
1185
+ * drive and a network mount on macOS and Linux can still reach another
1186
+ * machine. The check and the showing are two steps, so a file replaced
1187
+ * between them is shown as it is then. The part decides which files it
1188
+ * shows, such as the ones it saved itself.
1189
+ *
1190
+ * @param path The file's or folder's absolute path.
1191
+ * @returns A promise that settles once the request is handed to the system's
1192
+ * file manager; it rejects, with the reason, when the path is refused.
1193
+ * After the part is withdrawn, it settles at once without checking the path
1194
+ * and shows nothing.
1195
+ * @example
1196
+ * ```ts
1197
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1198
+ *
1199
+ * export function showAttachment(context: IWindowPartContext, savedPath: string): Promise<void> {
1200
+ * return context.showInFolderAsync(savedPath);
1201
+ * }
1202
+ * ```
1203
+ */
1204
+ showInFolderAsync(path: string): Promise<void>;
1205
+ /**
1206
+ * Opens a document or text file in the system's default app for its kind,
1207
+ * and never asks first. It never opens a program or a script.
1208
+ *
1209
+ * The main process checks the path as {@link showInFolderAsync} does, but
1210
+ * refuses a folder, and then the file's kind, by its name and by the name of
1211
+ * the file the path leads to: only a PDF (`.pdf`), an office or OpenDocument
1212
+ * file without macros (`.docx`, `.xlsx`, `.pptx`, `.rtf`, `.odt`, `.ods`,
1213
+ * `.odp`) and a plain text or data file (`.txt`, `.md`, `.markdown`, `.csv`,
1214
+ * `.tsv`, `.json`, `.log`, `.yaml`, `.yml`, `.xml`, `.toml`) open, case aside.
1215
+ * Every other file is refused, and on macOS and Linux so is a file marked
1216
+ * executable, whatever its name. Once its links are followed, the path the file
1217
+ * is at, with its drive followed too, is checked again, so on Windows a mapped
1218
+ * drive that leads to a network path is refused; a network mount on macOS and
1219
+ * Linux can still reach another machine. The default app is given that
1220
+ * checked path, not the path as the part gave it. The check and the opening
1221
+ * are two steps, so a file replaced between them is opened as it is then. A
1222
+ * part shows a refused file in its folder with {@link showInFolderAsync}
1223
+ * instead.
1224
+ *
1225
+ * @param path The file's absolute path.
1226
+ * @returns A promise that settles once the system has taken the file; it
1227
+ * rejects, with the reason, when the file is refused or the system cannot
1228
+ * open it. After the part is withdrawn, it settles at once without checking
1229
+ * the path and opens nothing.
1230
+ * @example
1231
+ * ```ts
1232
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1233
+ *
1234
+ * export async function openReportAsync(context: IWindowPartContext, path: string): Promise<void> {
1235
+ * await context.openFileAsync(path).catch(() => context.showInFolderAsync(path));
1236
+ * }
1237
+ * ```
1238
+ */
1239
+ openFileAsync(path: string): Promise<void>;
1240
+ /**
1241
+ * Asks the person to choose a folder, with the system's own folder chooser
1242
+ * attached to this window. The part gets the folder's path; it gets no other
1243
+ * access to the folder, which its runtime part reaches by that path.
1244
+ *
1245
+ * @returns A promise of the chosen folder's absolute path, or null when the
1246
+ * person cancels, the window closes while the chooser is open or the window
1247
+ * already shows a file or folder chooser or a save dialog. After the part is
1248
+ * withdrawn, it answers null at once without showing the chooser.
1249
+ * @example
1250
+ * ```ts
1251
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1252
+ *
1253
+ * export async function openProjectAsync(context: IWindowPartContext): Promise<void> {
1254
+ * const folder = await context.chooseFolderAsync();
1255
+ * if (folder !== null)
1256
+ * await context.requestAsync("notes.openFolder", { folder });
1257
+ * }
1258
+ * ```
1259
+ */
1260
+ chooseFolderAsync(): Promise<string | null>;
1261
+ /**
1262
+ * Asks the person to choose one file, with the system's own file chooser
1263
+ * attached to this window. The part gets the file's path; it gets no other
1264
+ * access to the file, which its runtime part reaches by that path.
1265
+ *
1266
+ * @param options The extensions the person may pick and the folder the
1267
+ * chooser starts in; any file, from where the system starts, by default.
1268
+ * @returns A promise of the chosen file's absolute path, or null when the
1269
+ * person cancels, the window closes while the chooser is open, the window
1270
+ * already shows a file or folder chooser or a save dialog. After the part
1271
+ * is withdrawn, it answers null at once without showing the chooser.
1272
+ * @throws {ArgumentException} Rejected when the extensions are not 1 to 32
1273
+ * extensions of 1 to 16 letters and digits each, or the folder is not an
1274
+ * absolute path on the window's platform or holds a control character.
1275
+ * @example
1276
+ * ```ts
1277
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1278
+ *
1279
+ * export async function chooseProgramAsync(context: IWindowPartContext): Promise<void> {
1280
+ * const program = await context.chooseFilePathAsync({ extensions: ["exe", "cmd"] });
1281
+ * if (program !== null)
1282
+ * await context.requestAsync("tools.useProgram", { program });
1283
+ * }
1284
+ * ```
1285
+ */
1286
+ chooseFilePathAsync(options?: IFilePathChoiceOptions): Promise<string | null>;
1287
+ /**
1288
+ * Saves bytes to a file the person chooses, with the system's own save
1289
+ * dialog attached to this window, starting in the system's Downloads folder
1290
+ * with the name suggested, or where the system last was when that folder is
1291
+ * not found; the part never learns the chosen path.
1292
+ *
1293
+ * @param name The suggested file name, a plain name without a folder, such
1294
+ * as `photo.png`, that every system can hold: no reserved Windows name such
1295
+ * as `CON`, no `\ / : * ? " < > |`, control or direction characters, no
1296
+ * dot or space at its end and at most 255 bytes in UTF-8.
1297
+ * @param bytes The file's contents, at most 512 MiB.
1298
+ * @returns A promise of what became of the file: saved, cancelled when the
1299
+ * person cancels or the window closes while the dialog is open, or failed
1300
+ * when the name or bytes are refused, the window already shows a file or
1301
+ * folder chooser or a save dialog, or the file cannot be written; a failed write
1302
+ * leaves an existing file as it was. After the part is withdrawn, it
1303
+ * answers cancelled at once without checking the name or bytes or showing
1304
+ * the dialog.
1305
+ * @example
1306
+ * ```ts
1307
+ * import { FileSaveOutcome, type IWindowPartContext } from "@noldova/desktop.window";
1308
+ *
1309
+ * export async function saveImageAsync(context: IWindowPartContext, bytes: Uint8Array): Promise<boolean> {
1310
+ * return await context.saveFileAsync("photo.png", bytes) === FileSaveOutcome.Saved;
1311
+ * }
1312
+ * ```
1313
+ */
1314
+ saveFileAsync(name: string, bytes: Uint8Array): Promise<FileSaveOutcome>;
1315
+ /**
1316
+ * Lets the person pick files for the module with the system's own file
1317
+ * chooser attached to this window, and grants each picked regular file to
1318
+ * the module's runtime part for this page of the window. The part gets each
1319
+ * file's grant, name, media type and size, never its path; it passes a
1320
+ * grant to its runtime part, which should redeem it at once, when the
1321
+ * request arrives, and copy the file into its own store: a grant is used
1322
+ * once, and it ends when its lifetime runs out, when the part discards it
1323
+ * or is withdrawn, and when the window's page reloads or closes.
1324
+ *
1325
+ * @param options How long the grants live, ten minutes by default and at
1326
+ * most, and whether the person may pick more than one file.
1327
+ * @returns A promise of the granted files and, for each picked file that
1328
+ * isn't granted, such as a folder, a pipe or a device, a sentence naming it
1329
+ * and why. It answers none when the person cancels, the window closes while
1330
+ * the chooser is open, the window already shows a file or folder chooser or
1331
+ * a save dialog, or the page sending it is not the window's current page.
1332
+ * After the part is withdrawn, it answers none at once without showing the
1333
+ * chooser.
1334
+ * @throws {ArgumentOutOfRangeException} Rejected when the lifetime is not a
1335
+ * whole number of milliseconds from 1 to 600 000.
1336
+ * @example
1337
+ * ```ts
1338
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1339
+ *
1340
+ * export async function attachAsync(context: IWindowPartContext): Promise<void> {
1341
+ * const chosen = await context.chooseFilesAsync({ multiple: true });
1342
+ * if (chosen.files.length > 0)
1343
+ * await context.requestAsync("notes.attach", { grants: chosen.files.map(t => t.grant) });
1344
+ * }
1345
+ * ```
1346
+ */
1347
+ chooseFilesAsync(options?: IFileChoiceOptions): Promise<IssuedFileGrants>;
1348
+ /**
1349
+ * Grants files the person dropped or pasted on the module's pane to the
1350
+ * module's runtime part for this page of the window, as
1351
+ * {@link IWindowPartContext.chooseFilesAsync} grants picked ones. A file
1352
+ * with a path on disk, such as one dropped from the system's file manager,
1353
+ * is granted by that path, which the part never learns, and on Windows only
1354
+ * when it is on a drive, never a network or device path; a pasted file
1355
+ * without one, such as an image copied from a page, is staged by the main
1356
+ * process, at most 64 MiB in one call and 256 MiB staged in all, and its
1357
+ * copy is deleted when the grant ends.
1358
+ *
1359
+ * @param files The files of the drop's or paste's `DataTransfer`, at most
1360
+ * 256.
1361
+ * @param options How long the grants live, ten minutes by default and at
1362
+ * most.
1363
+ * @returns A promise of the granted files and, for each file that isn't
1364
+ * granted, a sentence naming it and why. It answers none for no files, a
1365
+ * page that is not the window's current page, and after the part is
1366
+ * withdrawn.
1367
+ * @throws {ArgumentOutOfRangeException} Rejected when the lifetime is not a
1368
+ * whole number of milliseconds from 1 to 600 000, or there are more than 256
1369
+ * files.
1370
+ * @example
1371
+ * ```ts
1372
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1373
+ *
1374
+ * export async function dropAsync(context: IWindowPartContext, event: DragEvent): Promise<void> {
1375
+ * event.preventDefault();
1376
+ * const granted = await context.grantFilesAsync(Array.from(event.dataTransfer?.files ?? []));
1377
+ * if (granted.files.length > 0)
1378
+ * await context.requestAsync("notes.attach", { grants: granted.files.map(t => t.grant) });
1379
+ * }
1380
+ * ```
1381
+ */
1382
+ grantFilesAsync(files: readonly File[], options?: IFileGrantOptions): Promise<IssuedFileGrants>;
1383
+ /**
1384
+ * Ends grants the part holds and no longer needs, such as those of files
1385
+ * the person removed before the part sent them on. A grant the part does not
1386
+ * hold, or already discarded, is skipped; a redeemed grant has already ended.
1387
+ *
1388
+ * @param grants The grants to end.
1389
+ * @example
1390
+ * ```ts
1391
+ * import type { IssuedFileGrants, IWindowPartContext } from "@noldova/desktop.window";
1392
+ *
1393
+ * export function cancel(context: IWindowPartContext, chosen: IssuedFileGrants): void {
1394
+ * context.discardFileGrants(chosen.files.map(t => t.grant));
1395
+ * }
1396
+ * ```
1397
+ */
1398
+ discardFileGrants(grants: readonly string[]): void;
1399
+ /**
1400
+ * Turns the grant of a file the part's runtime part shared, with
1401
+ * `IRuntimeFiles.shareAsync`, into its address on the main process's own
1402
+ * scheme, `desktop-file://<grant>/`, which the page loads like any image
1403
+ * address, with no bytes passing as text. The part then holds the share as
1404
+ * it holds a grant: `discardFileGrants` ends it, and so does withdrawing the
1405
+ * part; a withdrawn part's share ends at once. The page's reload, the
1406
+ * window's close and the share's lifetime end it too. The main process serves
1407
+ * PNG, JPEG, GIF and WebP images as themselves and anything else as
1408
+ * `application/octet-stream`, never as a document.
1409
+ *
1410
+ * @param grant The share's grant, as the runtime part answered it.
1411
+ * @returns The address.
1412
+ * @throws ArgumentException synchronously when the grant is not 32
1413
+ * lowercase hexadecimal digits.
1414
+ * @example
1415
+ * ```ts
1416
+ * import { JsonReader } from "@noldova/context.json";
1417
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1418
+ *
1419
+ * export async function showAsync(context: IWindowPartContext, image: HTMLImageElement): Promise<void> {
1420
+ * const grant = JsonReader.fromValue(await context.requestAsync("notes.photo", null)).readString("grant");
1421
+ * image.src = context.fileAddressOf(grant);
1422
+ * }
1423
+ * ```
1424
+ */
1425
+ fileAddressOf(grant: string): string;
1426
+ /**
1427
+ * Calls a method of the module's runtime part or a dependency's.
1428
+ *
1429
+ * @param method The method's name.
1430
+ * @param parameters The parameters.
1431
+ * @returns A promise of the method's result; it rejects when the method
1432
+ * belongs to neither the module nor a dependency, or the runtime refuses
1433
+ * or fails the request.
1434
+ * @example
1435
+ * ```ts
1436
+ * import type { JsonValue } from "@noldova/context.json";
1437
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1438
+ *
1439
+ * export function listNotes(context: IWindowPartContext): Promise<JsonValue> {
1440
+ * return context.requestAsync("notes.list", { limit: 50 });
1441
+ * }
1442
+ * ```
1443
+ */
1444
+ requestAsync(method: string, parameters: JsonValue): Promise<JsonValue>;
1445
+ /**
1446
+ * Listens to an event of the module's runtime part or a dependency's.
1447
+ *
1448
+ * @param event The event's name.
1449
+ * @param listener Called with each payload of the event.
1450
+ * @returns A function that stops listening; deactivation stops it too.
1451
+ * @throws Error synchronously when the event belongs to neither the module
1452
+ * nor a dependency.
1453
+ * @example
1454
+ * ```ts
1455
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1456
+ *
1457
+ * export function followChanges(context: IWindowPartContext, refresh: () => void): () => void {
1458
+ * return context.onEvent("notes.changed", () => refresh());
1459
+ * }
1460
+ * ```
1461
+ */
1462
+ onEvent(event: string, listener: (payload: JsonValue) => void): () => void;
1463
+ /**
1464
+ * Reads the application's value in effect of a setting of the module, a
1465
+ * dependency or the shell. `readSettingAsync` reads it for a scope object.
1466
+ *
1467
+ * @param name The setting's name.
1468
+ * @returns The value, or undefined while the window has not loaded the
1469
+ * settings or no such setting exists.
1470
+ * @throws Error synchronously when the setting belongs to another module.
1471
+ * @example
1472
+ * ```ts
1473
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1474
+ *
1475
+ * export function readsWrapped(context: IWindowPartContext): boolean {
1476
+ * return context.readSetting("notes.wrapLines") === true;
1477
+ * }
1478
+ * ```
1479
+ */
1480
+ readSetting(name: string): JsonValue | undefined;
1481
+ /**
1482
+ * Asks the runtime for the value in effect of a setting of the module, a
1483
+ * dependency or the shell at a scope object: the value set for the
1484
+ * object, else for each enclosing object, else for the application, else
1485
+ * the default. A change at an enclosing scope or the application reaches
1486
+ * `onSettingChanged` with that scope, not with the object's, so a part
1487
+ * that shows the object reads it again.
1488
+ *
1489
+ * @param name The setting's name.
1490
+ * @param scope The scope object; the application when left out or null.
1491
+ * @returns A promise of the setting's name, the value in effect and
1492
+ * whether a value is stored for the object itself; it rejects when the
1493
+ * setting belongs to another module that is not a dependency, or the
1494
+ * runtime refuses the request, such as for a scope the setting does not
1495
+ * list.
1496
+ * @example
1497
+ * ```ts
1498
+ * import { QualifiedName, SettingScope } from "@noldova/desktop.protocol";
1499
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1500
+ *
1501
+ * export async function isWrappedInProject(context: IWindowPartContext, project: string): Promise<boolean> {
1502
+ * const entry = await context.readSettingAsync("notes.wrapLines", new SettingScope(QualifiedName.parse("notes.project"), project));
1503
+ * return entry.value === true;
1504
+ * }
1505
+ * ```
1506
+ */
1507
+ readSettingAsync(name: string, scope?: SettingScope | null): Promise<SettingEntry>;
1508
+ /**
1509
+ * Changes a setting of the module. A value equal to the setting's default
1510
+ * resets it when it would otherwise take its default.
1511
+ *
1512
+ * @param name The setting's name.
1513
+ * @param value The value, which the setting's type accepts.
1514
+ * @param scope The setting scope to set it in; the application scope when
1515
+ * left out or null.
1516
+ * @returns A promise that settles once the runtime has stored it; it
1517
+ * rejects when the setting belongs to another module or the runtime
1518
+ * refuses the value.
1519
+ * @example
1520
+ * ```ts
1521
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1522
+ *
1523
+ * export function wrapLines(context: IWindowPartContext, isWrapped: boolean): Promise<void> {
1524
+ * return context.writeSettingAsync("notes.wrapLines", isWrapped);
1525
+ * }
1526
+ * ```
1527
+ */
1528
+ writeSettingAsync(name: string, value: JsonValue, scope?: SettingScope | null): Promise<void>;
1529
+ /**
1530
+ * Removes the stored value of a setting of the module, so it follows its
1531
+ * enclosing scopes and its default again.
1532
+ *
1533
+ * @param name The setting's name.
1534
+ * @param scope The setting scope to reset it in; the application scope
1535
+ * when left out or null.
1536
+ * @returns A promise that settles once the runtime has removed it; it
1537
+ * rejects when the setting belongs to another module or the runtime
1538
+ * refuses the request.
1539
+ * @example
1540
+ * ```ts
1541
+ * import { QualifiedName, SettingScope } from "@noldova/desktop.protocol";
1542
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1543
+ *
1544
+ * export function resetForProject(context: IWindowPartContext, project: string): Promise<void> {
1545
+ * return context.resetSettingAsync("notes.wrapLines", new SettingScope(QualifiedName.parse("notes.project"), project));
1546
+ * }
1547
+ * ```
1548
+ */
1549
+ resetSettingAsync(name: string, scope?: SettingScope | null): Promise<void>;
1550
+ /**
1551
+ * Listens to changes of a setting of the module, a dependency or the
1552
+ * shell, in any scope.
1553
+ *
1554
+ * @param name The setting's name.
1555
+ * @param listener Called with the value now in effect, the scope it
1556
+ * changed in, null for the application scope, and whether a value is
1557
+ * stored for that scope, false after a reset.
1558
+ * @returns A function that stops listening; deactivation stops it too.
1559
+ * @throws Error synchronously when the setting belongs to another module.
1560
+ * @example
1561
+ * ```ts
1562
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1563
+ *
1564
+ * export function followWrapping(context: IWindowPartContext, apply: (isWrapped: boolean) => void): () => void {
1565
+ * return context.onSettingChanged("notes.wrapLines", (value, scope) => {
1566
+ * if (scope === null)
1567
+ * apply(value === true);
1568
+ * });
1569
+ * }
1570
+ * ```
1571
+ */
1572
+ onSettingChanged(name: string, listener: (value: JsonValue, scope: SettingScope | null, isSet: boolean) => void): () => void;
1573
+ /**
1574
+ * Says whether a module the module optionally depends on is active in the
1575
+ * window now: active in the runtime and, when it has a window part, with
1576
+ * that part activated. A dependency's state is settled before the part
1577
+ * activates, so the part reads it here and follows its later changes with
1578
+ * {@link IWindowPartContext.onDependencyChanged}; in that listener, it
1579
+ * answers the state the listener was just given.
1580
+ *
1581
+ * @param moduleId The optional dependency's id.
1582
+ * @returns Whether that module is active in the window; false for a module
1583
+ * that isn't one of the module's optional dependencies, and once the part
1584
+ * deactivated.
1585
+ * @example
1586
+ * ```ts
1587
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1588
+ *
1589
+ * export function showsClock(context: IWindowPartContext): boolean {
1590
+ * return context.isDependencyActive("clock");
1591
+ * }
1592
+ * ```
1593
+ */
1594
+ isDependencyActive(moduleId: string): boolean;
1595
+ /**
1596
+ * Listens for a module the module optionally depends on turning on or off
1597
+ * while the part stays active, such as across a restart of the runtime. The
1598
+ * part reaches an optional dependency's methods, events, commands and
1599
+ * settings like a required one's, and they fail while it is not active; it
1600
+ * reads the state at activation with
1601
+ * {@link IWindowPartContext.isDependencyActive}.
1602
+ *
1603
+ * @param listener Called with the optional dependency's id and whether it
1604
+ * is now active in the window: active in the runtime and, when it has a
1605
+ * window part, with that part activated; the window reports an error it
1606
+ * throws.
1607
+ * @returns A function that stops listening; deactivation stops it too.
1608
+ * @example
1609
+ * ```ts
1610
+ * import type { IWindowPartContext } from "@noldova/desktop.window";
1611
+ *
1612
+ * export function followClock(context: IWindowPartContext, show: (isShown: boolean) => void): () => void {
1613
+ * show(context.isDependencyActive("clock"));
1614
+ * return context.onDependencyChanged((moduleId, isActive) => {
1615
+ * if (moduleId === "clock")
1616
+ * show(isActive);
1617
+ * });
1618
+ * }
1619
+ * ```
1620
+ */
1621
+ onDependencyChanged(listener: (moduleId: string, isActive: boolean) => void): () => void;
1622
+ }