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