@noldova/desktop.window 0.0.1 → 0.0.3
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/api/index.d.ts +3 -0
- package/api/index.js +3 -0
- package/api/index.js.map +1 -1
- package/app/components/placeholder-content/placeholder-content.component.js +2 -1
- package/app/components/placeholder-content/placeholder-content.component.js.map +1 -1
- package/app/components/search-palette/search-palette.component.js +2 -2
- package/app/components/search-palette/search-palette.component.js.map +1 -1
- package/app/components/settings/settings.component.d.ts +1 -0
- package/app/components/settings/settings.component.js +7 -1
- package/app/components/settings/settings.component.js.map +1 -1
- package/app/components/settings-page-host/settings-page-host.component.js +2 -1
- package/app/components/settings-page-host/settings-page-host.component.js.map +1 -1
- package/app/components/shortcuts/shortcuts.component.d.ts +1 -0
- package/app/components/shortcuts/shortcuts.component.js +7 -3
- package/app/components/shortcuts/shortcuts.component.js.map +1 -1
- package/app/components/tab-content/tab-content.component.d.ts +2 -0
- package/app/components/tab-content/tab-content.component.js +8 -3
- package/app/components/tab-content/tab-content.component.js.map +1 -1
- package/app/components/tab-slot/tab-slot.component.js +2 -2
- package/app/components/tab-slot/tab-slot.component.js.map +1 -1
- 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/file-not-opened.exception.d.ts +26 -0
- package/app/exceptions/file-not-shown.exception.d.ts +27 -0
- package/app/exceptions/runtime-request.exception.d.ts +40 -0
- package/app/interfaces/i-document-options.d.ts +11 -0
- package/app/interfaces/i-opened-web-view.d.ts +2 -1
- package/app/interfaces/i-preload-bridge.d.ts +4 -0
- package/app/interfaces/i-web-view-handle.d.ts +4 -2
- 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-window-part-context.d.ts +153 -15
- package/app/interfaces/i-window-part-host.d.ts +8 -1
- package/app/interfaces/i-window-part.d.ts +4 -1
- package/app/models/clipboard-image.js +26 -27
- package/app/models/clipboard-image.js.map +1 -1
- package/app/models/layout/early-document.d.ts +2 -1
- package/app/models/layout/early-document.js +3 -1
- package/app/models/layout/early-document.js.map +1 -1
- package/app/models/layout/layout.d.ts +1 -1
- package/app/models/layout/layout.js +9 -3
- package/app/models/layout/layout.js.map +1 -1
- package/app/models/layout/tab-group.d.ts +1 -0
- package/app/models/layout/tab-group.js +7 -0
- package/app/models/layout/tab-group.js.map +1 -1
- package/app/models/live-view.d.ts +5 -0
- package/app/models/live-view.js +24 -4
- package/app/models/live-view.js.map +1 -1
- package/app/models/pending-document.d.ts +2 -1
- package/app/models/pending-document.js +5 -3
- package/app/models/pending-document.js.map +1 -1
- package/app/models/region-stop.d.ts +13 -0
- package/app/models/region-stop.js +19 -0
- package/app/models/region-stop.js.map +1 -0
- package/app/models/search-answer.d.ts +16 -1
- package/app/models/search-answer.js +3 -1
- package/app/models/search-answer.js.map +1 -1
- package/app/models/search-filter.d.ts +2 -1
- package/app/models/search-filter.js +3 -1
- package/app/models/search-filter.js.map +1 -1
- package/app/models/search-session.d.ts +4 -0
- package/app/models/search-session.js +33 -9
- package/app/models/search-session.js.map +1 -1
- package/app/models/settings/shortcut-row.d.ts +2 -1
- package/app/models/settings/shortcut-row.js +3 -1
- package/app/models/settings/shortcut-row.js.map +1 -1
- package/app/models/view-place.d.ts +17 -0
- package/app/models/view-place.js +26 -0
- package/app/models/view-place.js.map +1 -0
- package/app/models/web-view-handle.d.ts +4 -0
- package/app/models/web-view-handle.js +4 -0
- package/app/models/web-view-handle.js.map +1 -1
- package/app/models/window-part-context.d.ts +8 -0
- package/app/models/window-part-context.js +43 -1
- package/app/models/window-part-context.js.map +1 -1
- package/app/models/window-part-source.d.ts +9 -1
- package/app/models/window-part-source.js +3 -1
- package/app/models/window-part-source.js.map +1 -1
- package/app/models/window-part-tokens.d.ts +13 -0
- package/app/models/window-part-tokens.js +1 -0
- package/app/models/window-part-tokens.js.map +1 -1
- package/app/services/document-history.service.d.ts +13 -0
- package/app/services/document-history.service.js +72 -14
- package/app/services/document-history.service.js.map +1 -1
- package/app/services/document-opener.service.d.ts +1 -1
- package/app/services/document-opener.service.js +2 -2
- package/app/services/document-opener.service.js.map +1 -1
- package/app/services/layout.reader.d.ts +4 -2
- package/app/services/layout.reader.js +26 -6
- package/app/services/layout.reader.js.map +1 -1
- package/app/services/layout.service.d.ts +4 -1
- package/app/services/layout.service.js +18 -7
- package/app/services/layout.service.js.map +1 -1
- package/app/services/live-view.service.d.ts +9 -0
- package/app/services/live-view.service.js +64 -11
- package/app/services/live-view.service.js.map +1 -1
- package/app/services/menu.service.js +1 -1
- package/app/services/menu.service.js.map +1 -1
- package/app/services/pane-keys.service.d.ts +19 -0
- package/app/services/pane-keys.service.js +29 -0
- package/app/services/pane-keys.service.js.map +1 -0
- package/app/services/preload-bridge.service.d.ts +7 -1
- package/app/services/preload-bridge.service.js +37 -2
- package/app/services/preload-bridge.service.js.map +1 -1
- package/app/services/region-focus.service.d.ts +12 -0
- package/app/services/region-focus.service.js +51 -0
- package/app/services/region-focus.service.js.map +1 -0
- package/app/services/search.service.js +11 -2
- package/app/services/search.service.js.map +1 -1
- package/app/services/shell-commands.service.d.ts +1 -0
- package/app/services/shell-commands.service.js +5 -1
- package/app/services/shell-commands.service.js.map +1 -1
- package/app/services/shell-search-sources.service.d.ts +9 -0
- package/app/services/shell-search-sources.service.js +1 -0
- package/app/services/shell-search-sources.service.js.map +1 -1
- package/app/services/view-dialog.service.d.ts +3 -0
- package/app/services/view-dialog.service.js +20 -2
- package/app/services/view-dialog.service.js.map +1 -1
- package/app/services/view-instances.service.d.ts +10 -0
- package/app/services/view-instances.service.js +4 -1
- package/app/services/view-instances.service.js.map +1 -1
- package/app/services/web-view.service.d.ts +12 -0
- package/app/services/web-view.service.js +106 -2
- package/app/services/web-view.service.js.map +1 -1
- package/app/services/window-part-host.service.d.ts +8 -1
- package/app/services/window-part-host.service.js +31 -11
- package/app/services/window-part-host.service.js.map +1 -1
- package/package.json +3 -3
- package/resources.d.ts +61 -0
- package/resources.js +63 -0
- package/resources.js.map +1 -1
- package/testing/models/fake-window-part-context.d.ts +123 -0
- package/testing/models/fake-window-part-context.js +9 -0
- package/testing/models/fake-window-part-context.js.map +1 -1
- package/app/models/clipboard-image.resources.d.ts +0 -43
- package/app/models/clipboard-image.resources.js +0 -44
- package/app/models/clipboard-image.resources.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-slot.component.js","sourceRoot":"","sources":["../../../../../../src/noldova.desktop.window/src/app/components/tab-slot/tab-slot.component.ts","../../../../../../src/noldova.desktop.window/src/app/components/tab-slot/tab-slot.component.html"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAsD,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EACrI,SAAS,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElG,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;;AAY9E,MAAM,OAAO,gBAAgB;IACV,KAAK,GAAoB,MAAM,CAAC,eAAe,CAAC,CAAC;IACjD,OAAO,GAAgB,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa,CAAC;IACjF,YAAY,GAA+C,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AAI,EAAE,CAAC,CAAC;IAClD,CAAC;IAES,MAAM;QACd,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;IACzD,CAAC;IAEO,IAAI,CAAC,GAAQ,EAAE,QAAiB;QACtC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;YACvD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IACtE,CAAC;IAEO,IAAI;QACV,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;uGA5CU,gBAAgB;2FAAhB,gBAAgB,2YChC7B,wjBAcA,
|
|
1
|
+
{"version":3,"file":"tab-slot.component.js","sourceRoot":"","sources":["../../../../../../src/noldova.desktop.window/src/app/components/tab-slot/tab-slot.component.ts","../../../../../../src/noldova.desktop.window/src/app/components/tab-slot/tab-slot.component.html"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAsD,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EACrI,SAAS,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CA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IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;uGA5CU,gBAAgB;2FAAhB,gBAAgB,2YChC7B,wjBAcA,21BDaY,eAAe,oJAAE,gBAAgB;;2FAKhC,gBAAgB;kBAT5B,SAAS;+BACE,cAAc,WAGf,CAAC,eAAe,EAAE,gBAAgB,CAAC,QACtC;wBACJ,6BAA6B,EAAE,YAAY;qBAC5C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
export declare enum WebViewInputKind {
|
|
9
|
+
Start = "Start",
|
|
10
|
+
End = "End",
|
|
11
|
+
Press = "Press"
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export var WebViewInputKind;
|
|
9
|
+
(function (WebViewInputKind) {
|
|
10
|
+
WebViewInputKind["Start"] = "Start";
|
|
11
|
+
WebViewInputKind["End"] = "End";
|
|
12
|
+
WebViewInputKind["Press"] = "Press";
|
|
13
|
+
})(WebViewInputKind || (WebViewInputKind = {}));
|
|
14
|
+
//# sourceMappingURL=web-view-input-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-view-input-kind.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.window/src/app/enums/web-view-input-kind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,+BAAW,CAAA;IACX,mCAAe,CAAA;AACjB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}
|
|
@@ -6,8 +6,34 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
import { WindowException } from "./window.exception.js";
|
|
9
|
+
/**
|
|
10
|
+
* The exception {@link IWindowPartContext.openFileAsync} rejects with when the
|
|
11
|
+
* window refuses to open a file, such as a program or a script, or the system
|
|
12
|
+
* cannot open it, so a part tells that refusal apart from other failures.
|
|
13
|
+
*/
|
|
9
14
|
export declare class FileNotOpenedException extends WindowException {
|
|
15
|
+
/**
|
|
16
|
+
* The exception's name, `FileNotOpenedException`.
|
|
17
|
+
*/
|
|
10
18
|
readonly name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Why the file wasn't opened, as the main process gave it, such as that only
|
|
21
|
+
* documents and text files open.
|
|
22
|
+
*/
|
|
11
23
|
readonly reason: string;
|
|
24
|
+
/**
|
|
25
|
+
* Creates the exception, for the window to throw.
|
|
26
|
+
*
|
|
27
|
+
* @param productName The app's name, which the message starts with.
|
|
28
|
+
* @param reason Why the file wasn't opened.
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { FileNotOpenedException } from "@noldova/desktop.window";
|
|
32
|
+
*
|
|
33
|
+
* export function readRefusal(error: unknown): string | null {
|
|
34
|
+
* return error instanceof FileNotOpenedException ? error.reason : null;
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
12
38
|
constructor(productName: string, reason: string);
|
|
13
39
|
}
|
|
@@ -6,8 +6,35 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
import { WindowException } from "./window.exception.js";
|
|
9
|
+
/**
|
|
10
|
+
* The exception {@link IWindowPartContext.showInFolderAsync} rejects with when
|
|
11
|
+
* the window refuses to show a file in its folder, such as a path no file can
|
|
12
|
+
* be read at, or a network or device path, so a part tells that refusal apart
|
|
13
|
+
* from other failures.
|
|
14
|
+
*/
|
|
9
15
|
export declare class FileNotShownException extends WindowException {
|
|
16
|
+
/**
|
|
17
|
+
* The exception's name, `FileNotShownException`.
|
|
18
|
+
*/
|
|
10
19
|
readonly name: string;
|
|
20
|
+
/**
|
|
21
|
+
* Why the file wasn't shown, as the main process gave it, such as that no
|
|
22
|
+
* file can be read at the path.
|
|
23
|
+
*/
|
|
11
24
|
readonly reason: string;
|
|
25
|
+
/**
|
|
26
|
+
* Creates the exception, for the window to throw.
|
|
27
|
+
*
|
|
28
|
+
* @param productName The app's name, which the message starts with.
|
|
29
|
+
* @param reason Why the file wasn't shown.
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { FileNotShownException } from "@noldova/desktop.window";
|
|
33
|
+
*
|
|
34
|
+
* export function readRefusal(error: unknown): string | null {
|
|
35
|
+
* return error instanceof FileNotShownException ? error.reason : null;
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
12
39
|
constructor(productName: string, reason: string);
|
|
13
40
|
}
|
|
@@ -7,9 +7,49 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { JsonObject } from "@noldova/context.json";
|
|
9
9
|
import { WindowException } from "./window.exception.js";
|
|
10
|
+
/**
|
|
11
|
+
* The exception {@link IWindowPartContext.requestAsync} rejects with when the
|
|
12
|
+
* runtime refuses or fails the request, so a part reads the failure's code and
|
|
13
|
+
* the details its module's runtime part gave, such as which note was missing.
|
|
14
|
+
*/
|
|
10
15
|
export declare class RuntimeRequestException extends WindowException {
|
|
16
|
+
/**
|
|
17
|
+
* The exception's name: `RuntimeRequestException`, or
|
|
18
|
+
* `RuntimeDisconnectedException` once the runtime is gone, when the window
|
|
19
|
+
* throws its own subclass; `instanceof RuntimeRequestException` holds for both.
|
|
20
|
+
*/
|
|
11
21
|
readonly name: string;
|
|
22
|
+
/**
|
|
23
|
+
* The failure's code, one of `FailureCode`'s values from
|
|
24
|
+
* `@noldova/desktop.protocol`: the one the runtime part's method failed with,
|
|
25
|
+
* such as `NotFound`, or `Disconnected` once the runtime is gone.
|
|
26
|
+
*/
|
|
12
27
|
readonly code: string;
|
|
28
|
+
/**
|
|
29
|
+
* The failure's details, as the runtime part's method gave them with its
|
|
30
|
+
* failure, or `undefined` when it gave none.
|
|
31
|
+
*/
|
|
13
32
|
readonly details: JsonObject | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Creates the exception, for the window to throw, and for a part's specs to
|
|
35
|
+
* reject a fake request with, as the testing package's
|
|
36
|
+
* `FakeWindowPartContext.requestAsync` shows.
|
|
37
|
+
*
|
|
38
|
+
* @param code The failure's code.
|
|
39
|
+
* @param message A sentence describing the failure.
|
|
40
|
+
* @param details The failure's details, if any.
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* import { JsonReader } from "@noldova/context.json";
|
|
44
|
+
* import { FailureCode } from "@noldova/desktop.protocol";
|
|
45
|
+
* import { RuntimeRequestException } from "@noldova/desktop.window";
|
|
46
|
+
*
|
|
47
|
+
* export function readMissingNote(error: unknown): string | null {
|
|
48
|
+
* if (!(error instanceof RuntimeRequestException) || error.code !== FailureCode.NotFound || error.details === undefined)
|
|
49
|
+
* return null;
|
|
50
|
+
* return JsonReader.fromValue(error.details).readString("path");
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
14
54
|
constructor(code: string, message: string, details?: JsonObject);
|
|
15
55
|
}
|
|
@@ -76,4 +76,15 @@ export interface IDocumentOptions {
|
|
|
76
76
|
* is only activated where it is.
|
|
77
77
|
*/
|
|
78
78
|
readonly after?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the document becomes its group's active tab, as when the person
|
|
81
|
+
* chooses it; true when left out. When false, the document joins its group's
|
|
82
|
+
* tabs without becoming active, the group stays as it was, and the focus
|
|
83
|
+
* stays where it is, such as a page an agent opens beside the one the person
|
|
84
|
+
* reads; an open document stays where it is, behind the active tab. A preview
|
|
85
|
+
* replaces the group's preview only when that preview isn't the active tab,
|
|
86
|
+
* which otherwise stays open as an ordinary tab. A document opened into an
|
|
87
|
+
* empty group still becomes that group's active tab.
|
|
88
|
+
*/
|
|
89
|
+
readonly activate?: boolean;
|
|
79
90
|
}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* This source code is licensed under the license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
import type { WebViewInfo } from "@noldova/desktop.protocol";
|
|
8
|
+
import type { KeyChord, WebViewInfo } from "@noldova/desktop.protocol";
|
|
9
9
|
export interface IOpenedWebView {
|
|
10
10
|
readonly view: WebViewInfo;
|
|
11
11
|
readonly partition: string;
|
|
12
|
+
readonly keys: readonly KeyChord[];
|
|
12
13
|
}
|
|
@@ -66,10 +66,14 @@ export interface IPreloadBridge {
|
|
|
66
66
|
zoomWebView(moduleId: string, view: string, change: string | number | null): Promise<unknown>;
|
|
67
67
|
findInWebView(moduleId: string, view: string, request: string | JsonObject): Promise<unknown>;
|
|
68
68
|
closeWebView(moduleId: string, view: string): void;
|
|
69
|
+
keepWebViews(views: readonly (readonly [string, string])[]): unknown;
|
|
70
|
+
expectWebView(moduleId: string, view: string): unknown;
|
|
69
71
|
setWebViewShortcuts(keys: readonly string[]): void;
|
|
70
72
|
setAppShortcuts(shortcuts: JsonObject): void;
|
|
71
73
|
onWebViewEvent(listener: (event: unknown) => void): () => void;
|
|
72
74
|
onWebViewShortcut(listener: (stroke: unknown) => void): () => void;
|
|
75
|
+
onWebViewInput(listener: (input: unknown) => void): () => void;
|
|
76
|
+
releaseWebViewFocus(moduleId: string, view: string): void;
|
|
73
77
|
logModule(moduleId: string, message: string): void;
|
|
74
78
|
logError(moduleId: string | null, text: string): void;
|
|
75
79
|
}
|
|
@@ -335,8 +335,10 @@ export interface IWebViewHandle {
|
|
|
335
335
|
/**
|
|
336
336
|
* Reports the view's events: its state, failed loads, refused navigations
|
|
337
337
|
* and requests, a crash, a cleared profile, the person's declared keys, each
|
|
338
|
-
* zoom change
|
|
339
|
-
*
|
|
338
|
+
* zoom change, each search's result, each change of the page's icon as a
|
|
339
|
+
* `Favicon` event whose `image` is a `data:image/png` URL or null, and
|
|
340
|
+
* `Closed` when the main process ends it. No event comes after the part
|
|
341
|
+
* closes the view itself.
|
|
340
342
|
*
|
|
341
343
|
* @param listener Receives each event.
|
|
342
344
|
* @returns The release.
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { WebViewInputKind } from "../enums/web-view-input-kind.js";
|
|
9
|
+
export interface IWebViewInput {
|
|
10
|
+
readonly module: string;
|
|
11
|
+
readonly view: string;
|
|
12
|
+
readonly kind: WebViewInputKind;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-web-view-input.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.window/src/app/interfaces/i-web-view-input.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import type { Signal, Type } from "@angular/core";
|
|
9
9
|
import type { JsonObject, JsonValue } from "@noldova/context.json";
|
|
10
10
|
import type { AgentControlState, NotificationPost, SettingEntry, SettingOption, SettingScope } from "@noldova/desktop.protocol";
|
|
11
|
+
import type { DockSide } from "../enums/dock-side.js";
|
|
11
12
|
import type { FileSaveOutcome } from "../enums/file-save-outcome.js";
|
|
12
13
|
import type { CommandContribution } from "../models/command-contribution.js";
|
|
13
14
|
import type { DocumentContribution } from "../models/document-contribution.js";
|
|
@@ -647,15 +648,16 @@ export interface IWindowPartContext {
|
|
|
647
648
|
/**
|
|
648
649
|
* Opens one of the module's documents at the end of the active document
|
|
649
650
|
* group, or right after another of its open instances when
|
|
650
|
-
* {@link IDocumentOptions.after} names one, or activates it where it is
|
|
651
|
+
* {@link IDocumentOptions.after} names one, or activates it where it is,
|
|
652
|
+
* unless {@link IDocumentOptions.activate} is false. While the part first activates with a saved
|
|
651
653
|
* layout, the document shows only when the layout holds it. An open document
|
|
652
654
|
* keeps its look, changing only what the options give.
|
|
653
655
|
*
|
|
654
656
|
* @param name The document's name.
|
|
655
657
|
* @param instance Which of the document's instances, such as a note's id.
|
|
656
658
|
* @param title The tab's title.
|
|
657
|
-
* @param options Whether it opens as a preview, its breadcrumb, its look
|
|
658
|
-
*
|
|
659
|
+
* @param options Whether it opens as a preview, its breadcrumb, its look,
|
|
660
|
+
* the document it opens after and whether it becomes active; an ordinary, active tab with no breadcrumb, at
|
|
659
661
|
* the end of the active group, when left out.
|
|
660
662
|
* @throws Error synchronously when the document belongs to another module,
|
|
661
663
|
* or the title or a breadcrumb segment is blank.
|
|
@@ -909,6 +911,34 @@ export interface IWindowPartContext {
|
|
|
909
911
|
* ```
|
|
910
912
|
*/
|
|
911
913
|
closeView(name: string, instance: string): void;
|
|
914
|
+
/**
|
|
915
|
+
* Closes the view dialog while it shows one of the module's views or
|
|
916
|
+
* documents, with instances or without, such as after an action of the view
|
|
917
|
+
* leads elsewhere: the dialog closes as when the person closes it, its view
|
|
918
|
+
* returns to its tab if it came from one, and the focus returns where the
|
|
919
|
+
* person's close returns it, or goes to the tab of a document the module
|
|
920
|
+
* opened or activated since the dialog showed, as in the example below.
|
|
921
|
+
* Nothing happens while the view or document
|
|
922
|
+
* shows in a tab, or the dialog shows something else or nothing, so a view
|
|
923
|
+
* never needs to know whether it shows in a dialog: it asks to close the
|
|
924
|
+
* dialog either way.
|
|
925
|
+
*
|
|
926
|
+
* @param name The view's or document's name.
|
|
927
|
+
* @param instance The instance the dialog must show for it to close; any
|
|
928
|
+
* instance of the name when omitted.
|
|
929
|
+
* @throws Error synchronously when the name belongs to another module or is
|
|
930
|
+
* not one of the module's views or documents, or the instance is blank.
|
|
931
|
+
* @example
|
|
932
|
+
* ```ts
|
|
933
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
934
|
+
*
|
|
935
|
+
* export function startChat(context: IWindowPartContext, person: string): void {
|
|
936
|
+
* context.openDocument("chat.conversation", person, person);
|
|
937
|
+
* context.closeDialog("chat.people");
|
|
938
|
+
* }
|
|
939
|
+
* ```
|
|
940
|
+
*/
|
|
941
|
+
closeDialog(name: string, instance?: string): void;
|
|
912
942
|
/**
|
|
913
943
|
* Shows one of the part's views without instances, such as a bottom
|
|
914
944
|
* panel, and moves the focus into it, as choosing its tab with the
|
|
@@ -1000,6 +1030,37 @@ export interface IWindowPartContext {
|
|
|
1000
1030
|
* ```
|
|
1001
1031
|
*/
|
|
1002
1032
|
growViewDock(name: string, minimum: number, instance?: string): () => void;
|
|
1033
|
+
/**
|
|
1034
|
+
* Reads which dock holds one of the part's view tabs, such as to know
|
|
1035
|
+
* whether {@link growViewDock} grows the tab's height or its width. The
|
|
1036
|
+
* signal holds {@link DockSide.Bottom} while the tab is in the bottom dock,
|
|
1037
|
+
* {@link DockSide.Left} or {@link DockSide.Right} while it is in a side
|
|
1038
|
+
* dock, and `null` while it is outside a dock, such as among the documents,
|
|
1039
|
+
* or not open, as before the part opens it or after it closes. It follows
|
|
1040
|
+
* the tab as the person or the part moves, opens or closes it; a hidden
|
|
1041
|
+
* dock still holds its tabs, so its side stays. Once the part deactivates,
|
|
1042
|
+
* a new call reads `null`.
|
|
1043
|
+
*
|
|
1044
|
+
* @param name The view's name.
|
|
1045
|
+
* @param instance Which instance's tab, for a view with instances; left
|
|
1046
|
+
* out for a view without instances.
|
|
1047
|
+
* @returns A signal of the dock's side, or of `null` while no dock holds
|
|
1048
|
+
* the tab.
|
|
1049
|
+
* @throws Error synchronously when the view belongs to another module or
|
|
1050
|
+
* is not a registered view, the instance is left out for a view with
|
|
1051
|
+
* instances or given for one without, or the instance is blank.
|
|
1052
|
+
* @example
|
|
1053
|
+
* ```ts
|
|
1054
|
+
* import { type Signal, computed } from "@angular/core";
|
|
1055
|
+
* import { DockSide, type IWindowPartContext } from "@noldova/desktop.window";
|
|
1056
|
+
*
|
|
1057
|
+
* export function growsHeight(context: IWindowPartContext, id: string): Signal<boolean> {
|
|
1058
|
+
* const dock = context.viewDockOf("terminal.session", id);
|
|
1059
|
+
* return computed(() => dock() === DockSide.Bottom);
|
|
1060
|
+
* }
|
|
1061
|
+
* ```
|
|
1062
|
+
*/
|
|
1063
|
+
viewDockOf(name: string, instance?: string): Signal<DockSide | null>;
|
|
1003
1064
|
/**
|
|
1004
1065
|
* Listens for the person closing an instance's tab, such as to end its
|
|
1005
1066
|
* terminal. It hears only the person's close: never the part's own
|
|
@@ -1027,6 +1088,75 @@ export interface IWindowPartContext {
|
|
|
1027
1088
|
* ```
|
|
1028
1089
|
*/
|
|
1029
1090
|
onViewClosed(name: string, listener: (instance: string) => void): () => void;
|
|
1091
|
+
/**
|
|
1092
|
+
* Adds a place the view shows, such as a list's item or a pane's page, to
|
|
1093
|
+
* Back and Forward, after the entry the person is on: the same history as
|
|
1094
|
+
* the documents shown in the middle, whose entries ahead it drops and whose
|
|
1095
|
+
* 50-entry limit it shares. A place equal to the entry the person is on is
|
|
1096
|
+
* ignored, so a view can record each place it shows, including one it shows
|
|
1097
|
+
* because Back or Forward reached it. While the part is inactive, the call
|
|
1098
|
+
* does nothing.
|
|
1099
|
+
*
|
|
1100
|
+
* @param view The view's name, the module's.
|
|
1101
|
+
* @param place The place, a string the module chooses that is not blank,
|
|
1102
|
+
* such as an item's id or a page's address; the same view, instance and
|
|
1103
|
+
* place make the same place.
|
|
1104
|
+
* @param instance The view's instance, given for a view with instances and
|
|
1105
|
+
* left out for one without.
|
|
1106
|
+
* @throws Error synchronously when the view belongs to another module, is
|
|
1107
|
+
* not a registered view, gets an instance it doesn't have or lacks one it
|
|
1108
|
+
* has, or the place or instance is blank.
|
|
1109
|
+
* @example
|
|
1110
|
+
* ```ts
|
|
1111
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
1112
|
+
*
|
|
1113
|
+
* export function showNote(context: IWindowPartContext, id: string): void {
|
|
1114
|
+
* context.recordPlace("notes.list", id);
|
|
1115
|
+
* }
|
|
1116
|
+
* ```
|
|
1117
|
+
*/
|
|
1118
|
+
recordPlace(view: string, place: string, instance?: string): void;
|
|
1119
|
+
/**
|
|
1120
|
+
* Takes a place the module no longer has out of Back and Forward, such as
|
|
1121
|
+
* a deleted item. While the part is inactive, the call does nothing; the
|
|
1122
|
+
* window drops a module's places when its part deactivates.
|
|
1123
|
+
*
|
|
1124
|
+
* @param view The view's name, the module's.
|
|
1125
|
+
* @param place The place, as {@link recordPlace} gave it.
|
|
1126
|
+
* @param instance The view's instance, as {@link recordPlace} gave it.
|
|
1127
|
+
* @throws Error synchronously as {@link recordPlace} does.
|
|
1128
|
+
* @example
|
|
1129
|
+
* ```ts
|
|
1130
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
1131
|
+
*
|
|
1132
|
+
* export function deleteNote(context: IWindowPartContext, id: string): void {
|
|
1133
|
+
* context.forgetPlace("notes.list", id);
|
|
1134
|
+
* }
|
|
1135
|
+
* ```
|
|
1136
|
+
*/
|
|
1137
|
+
forgetPlace(view: string, place: string, instance?: string): void;
|
|
1138
|
+
/**
|
|
1139
|
+
* Listens for Back or Forward reaching one of the view's places. The window
|
|
1140
|
+
* shows the view first, the instance's tab or the view in its dock, and
|
|
1141
|
+
* then calls each listener with the place to show. Back and Forward skip a
|
|
1142
|
+
* place whose view has no listener or whose instance's tab is closed.
|
|
1143
|
+
*
|
|
1144
|
+
* @param view The view's name, the module's.
|
|
1145
|
+
* @param listener Called with the place and the instance it was recorded
|
|
1146
|
+
* for, or null for a view without instances.
|
|
1147
|
+
* @returns A function that removes the listener.
|
|
1148
|
+
* @throws Error synchronously when the view belongs to another module or
|
|
1149
|
+
* is not a registered view.
|
|
1150
|
+
* @example
|
|
1151
|
+
* ```ts
|
|
1152
|
+
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
1153
|
+
*
|
|
1154
|
+
* export function followHistory(context: IWindowPartContext, show: (id: string) => void): () => void {
|
|
1155
|
+
* return context.onPlaceShown("notes.list", show);
|
|
1156
|
+
* }
|
|
1157
|
+
* ```
|
|
1158
|
+
*/
|
|
1159
|
+
onPlaceShown(view: string, listener: (place: string, instance: string | null) => void): () => void;
|
|
1030
1160
|
/**
|
|
1031
1161
|
* Shows a view or document in a large modal dialog. One already open in a
|
|
1032
1162
|
* tab moves into the dialog and returns when it closes.
|
|
@@ -1050,8 +1180,8 @@ export interface IWindowPartContext {
|
|
|
1050
1180
|
/**
|
|
1051
1181
|
* Opens a palette just under the window row, centred across the window, as
|
|
1052
1182
|
* the command search opens: the part's component, created with its
|
|
1053
|
-
* {@link WindowPartTokens}, with `shown` true and a
|
|
1054
|
-
* own. The window shows one palette at a time.
|
|
1183
|
+
* {@link WindowPartTokens}, with `shown` true, `activeDocument` false and a
|
|
1184
|
+
* content padding of its own. The window shows one palette at a time.
|
|
1055
1185
|
*
|
|
1056
1186
|
* @param load Loads the palette's component.
|
|
1057
1187
|
* @returns The palette, or null when the window shows no window row,
|
|
@@ -1189,9 +1319,9 @@ export interface IWindowPartContext {
|
|
|
1189
1319
|
*
|
|
1190
1320
|
* @param path The file's or folder's absolute path.
|
|
1191
1321
|
* @returns A promise that settles once the request is handed to the system's
|
|
1192
|
-
* file manager; it rejects
|
|
1193
|
-
*
|
|
1194
|
-
* and shows nothing.
|
|
1322
|
+
* file manager; it rejects with a {@link FileNotShownException}, whose
|
|
1323
|
+
* `reason` says why, when the path is refused. After the part is withdrawn,
|
|
1324
|
+
* it settles at once without checking the path and shows nothing.
|
|
1195
1325
|
* @example
|
|
1196
1326
|
* ```ts
|
|
1197
1327
|
* import type { IWindowPartContext } from "@noldova/desktop.window";
|
|
@@ -1224,15 +1354,22 @@ export interface IWindowPartContext {
|
|
|
1224
1354
|
*
|
|
1225
1355
|
* @param path The file's absolute path.
|
|
1226
1356
|
* @returns A promise that settles once the system has taken the file; it
|
|
1227
|
-
* rejects
|
|
1228
|
-
*
|
|
1229
|
-
* the path and opens nothing.
|
|
1357
|
+
* rejects with a {@link FileNotOpenedException}, whose `reason` says why,
|
|
1358
|
+
* when the file is refused or the system cannot open it. After the part is
|
|
1359
|
+
* withdrawn, it settles at once without checking the path and opens nothing.
|
|
1230
1360
|
* @example
|
|
1231
1361
|
* ```ts
|
|
1232
|
-
* import type
|
|
1362
|
+
* import { FileNotOpenedException, type IWindowPartContext } from "@noldova/desktop.window";
|
|
1233
1363
|
*
|
|
1234
1364
|
* export async function openReportAsync(context: IWindowPartContext, path: string): Promise<void> {
|
|
1235
|
-
*
|
|
1365
|
+
* try {
|
|
1366
|
+
* await context.openFileAsync(path);
|
|
1367
|
+
* }
|
|
1368
|
+
* catch (error) {
|
|
1369
|
+
* if (!(error instanceof FileNotOpenedException))
|
|
1370
|
+
* throw error;
|
|
1371
|
+
* await context.showInFolderAsync(path);
|
|
1372
|
+
* }
|
|
1236
1373
|
* }
|
|
1237
1374
|
* ```
|
|
1238
1375
|
*/
|
|
@@ -1429,8 +1566,9 @@ export interface IWindowPartContext {
|
|
|
1429
1566
|
* @param method The method's name.
|
|
1430
1567
|
* @param parameters The parameters.
|
|
1431
1568
|
* @returns A promise of the method's result; it rejects when the method
|
|
1432
|
-
* belongs to neither the module nor a dependency,
|
|
1433
|
-
*
|
|
1569
|
+
* belongs to neither the module nor a dependency, and with a
|
|
1570
|
+
* {@link RuntimeRequestException}, whose `code` and `details` say why, when
|
|
1571
|
+
* the runtime refuses or fails the request.
|
|
1434
1572
|
* @example
|
|
1435
1573
|
* ```ts
|
|
1436
1574
|
* import type { JsonValue } from "@noldova/context.json";
|
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
import type { Signal, Type } from "@angular/core";
|
|
9
9
|
import type { JsonObject, JsonValue } from "@noldova/context.json";
|
|
10
10
|
import type { AgentControlState, NotificationPost, SettingChange, SettingEntry, SettingOption, SettingScope, WebViewPane } from "@noldova/desktop.protocol";
|
|
11
|
+
import type { DockSide } from "../enums/dock-side.js";
|
|
11
12
|
import type { FileSaveOutcome } from "../enums/file-save-outcome.js";
|
|
12
13
|
import type { DocumentHeading } from "../models/document-heading.js";
|
|
13
14
|
import type { IssuedFileGrants } from "../models/issued-file-grants.js";
|
|
14
15
|
import type { Tab } from "../models/layout/tab.js";
|
|
15
16
|
import type { MenuItem } from "../models/menu-item.js";
|
|
16
17
|
import type { ViewBadge } from "../models/view-badge.js";
|
|
18
|
+
import type { ViewPlace } from "../models/view-place.js";
|
|
17
19
|
import type { ICommandKey } from "./i-command-key.js";
|
|
18
20
|
import type { IDocumentUpdate } from "./i-document-update.js";
|
|
19
21
|
import type { IInAppBrowser } from "./i-in-app-browser.js";
|
|
@@ -30,7 +32,7 @@ export interface IWindowPartHost {
|
|
|
30
32
|
readonly platform: string;
|
|
31
33
|
requestAsync(method: string, payload: JsonValue): Promise<JsonValue>;
|
|
32
34
|
onEvent(name: string, listener: (payload: JsonValue) => void): () => void;
|
|
33
|
-
openDocument(moduleId: string, name: string, instance: string, heading: DocumentHeading, isPreview: boolean, after: string | null): void;
|
|
35
|
+
openDocument(moduleId: string, name: string, instance: string, heading: DocumentHeading, isPreview: boolean, after: string | null, activate: boolean): void;
|
|
34
36
|
keepDocument(moduleId: string, name: string, instance: string): void;
|
|
35
37
|
closeDocument(moduleId: string, name: string, instance: string): void;
|
|
36
38
|
forgetDocument(moduleId: string, name: string, instance: string): void;
|
|
@@ -43,10 +45,15 @@ export interface IWindowPartHost {
|
|
|
43
45
|
openView(moduleId: string, name: string, instance: string, heading: DocumentHeading, icon: string | null, tabGroup: string | null): void;
|
|
44
46
|
updateView(moduleId: string, name: string, instance: string, title: string | null, icon: string | null, breadcrumb: readonly string[] | null, breadcrumbIcon: string | null): void;
|
|
45
47
|
closeView(moduleId: string, name: string, instance: string): void;
|
|
48
|
+
closeDialog(name: string, instance: string | null): void;
|
|
46
49
|
showView(moduleId: string, name: string): void;
|
|
47
50
|
hideViewDock(moduleId: string, name: string, instance: string | null): void;
|
|
48
51
|
growViewDock(name: string, instance: string | null, minimum: number): () => void;
|
|
52
|
+
viewDockOf(name: string, instance: string | null): Signal<DockSide | null>;
|
|
49
53
|
onViewClosed(name: string, listener: (instance: string) => void): () => void;
|
|
54
|
+
recordPlace(place: ViewPlace): void;
|
|
55
|
+
forgetPlace(place: ViewPlace): void;
|
|
56
|
+
onPlaceShown(view: string, listener: (place: string, instance: string | null) => void): () => void;
|
|
50
57
|
showInDialogAsync(name: string, instance: string | null, title: string | null): Promise<void>;
|
|
51
58
|
openBelowWindowRow<T>(context: IWindowPartContext, component: Type<T>): IWindowPalette<T> | null;
|
|
52
59
|
log(moduleId: string, message: string): void;
|
|
@@ -87,7 +87,10 @@ export interface IWindowPart {
|
|
|
87
87
|
* with its context, contributions, views and documents. Before resolving
|
|
88
88
|
* true, the part reads again through its context everything it took from
|
|
89
89
|
* the runtime, including its notifications, because the new runtime may
|
|
90
|
-
* hold other state and events sent while it was away are lost.
|
|
90
|
+
* hold other state and events sent while it was away are lost. A document
|
|
91
|
+
* the part opens from here, or from anything else it runs while the window
|
|
92
|
+
* reconnects, waits for the reconnect to end, then opens as at any other
|
|
93
|
+
* time, in the order asked, each in front, so the last one is active.
|
|
91
94
|
*
|
|
92
95
|
* @returns A promise of true when the part continues, or false to have the
|
|
93
96
|
* window deactivate it and activate it again, which is always safe; a
|