@jupyterlab/mainmenu 3.4.3 → 4.0.0-alpha.11
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/lib/edit.d.ts +23 -51
- package/lib/edit.js +10 -11
- package/lib/edit.js.map +1 -1
- package/lib/file.d.ts +9 -48
- package/lib/file.js +7 -7
- package/lib/file.js.map +1 -1
- package/lib/help.d.ts +11 -22
- package/lib/help.js +2 -1
- package/lib/help.js.map +1 -1
- package/lib/kernel.d.ts +18 -31
- package/lib/kernel.js +9 -8
- package/lib/kernel.js.map +1 -1
- package/lib/mainmenu.js.map +1 -1
- package/lib/run.d.ts +12 -66
- package/lib/run.js +6 -8
- package/lib/run.js.map +1 -1
- package/lib/tokens.d.ts +2 -23
- package/lib/tokens.js +0 -1
- package/lib/tokens.js.map +1 -1
- package/lib/view.d.ts +13 -30
- package/lib/view.js +6 -8
- package/lib/view.js.map +1 -1
- package/package.json +11 -12
package/lib/edit.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
|
|
2
|
-
import {
|
|
3
|
-
import { IMenuExtender } from './tokens';
|
|
2
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
3
|
/**
|
|
5
4
|
* An interface for an Edit menu.
|
|
6
5
|
*/
|
|
7
6
|
export interface IEditMenu extends IRankedMenu {
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
8
|
+
* Semantic commands IUndoers for the Edit menu.
|
|
10
9
|
*/
|
|
11
|
-
readonly undoers:
|
|
10
|
+
readonly undoers: IEditMenu.IUndoer;
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
12
|
+
* Semantic commands IClearers for the Edit menu.
|
|
14
13
|
*/
|
|
15
|
-
readonly clearers:
|
|
14
|
+
readonly clearers: IEditMenu.IClearer;
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
16
|
+
* Semantic commands IGoToLiners for the Edit menu.
|
|
18
17
|
*/
|
|
19
|
-
readonly goToLiners:
|
|
18
|
+
readonly goToLiners: SemanticCommand;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* An extensible Edit menu for the application.
|
|
@@ -27,21 +26,17 @@ export declare class EditMenu extends RankedMenu implements IEditMenu {
|
|
|
27
26
|
*/
|
|
28
27
|
constructor(options: IRankedMenu.IOptions);
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
29
|
+
* Semantic commands IUndoers for the Edit menu.
|
|
31
30
|
*/
|
|
32
|
-
readonly undoers:
|
|
31
|
+
readonly undoers: IEditMenu.IUndoer;
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
33
|
+
* Semantic commands IClearers for the Edit menu.
|
|
35
34
|
*/
|
|
36
|
-
readonly clearers:
|
|
35
|
+
readonly clearers: IEditMenu.IClearer;
|
|
37
36
|
/**
|
|
38
|
-
*
|
|
37
|
+
* Semantic commands IGoToLiners for the Edit menu.
|
|
39
38
|
*/
|
|
40
|
-
readonly goToLiners:
|
|
41
|
-
/**
|
|
42
|
-
* Dispose of the resources held by the edit menu.
|
|
43
|
-
*/
|
|
44
|
-
dispose(): void;
|
|
39
|
+
readonly goToLiners: SemanticCommand;
|
|
45
40
|
}
|
|
46
41
|
/**
|
|
47
42
|
* Namespace for IEditMenu
|
|
@@ -50,50 +45,27 @@ export declare namespace IEditMenu {
|
|
|
50
45
|
/**
|
|
51
46
|
* Interface for an activity that uses Undo/Redo.
|
|
52
47
|
*/
|
|
53
|
-
interface IUndoer
|
|
48
|
+
interface IUndoer {
|
|
54
49
|
/**
|
|
55
|
-
*
|
|
50
|
+
* A semantic command to execute an undo command for the activity.
|
|
56
51
|
*/
|
|
57
|
-
undo
|
|
52
|
+
undo: SemanticCommand;
|
|
58
53
|
/**
|
|
59
|
-
*
|
|
54
|
+
* A semantic command to execute a redo command for the activity.
|
|
60
55
|
*/
|
|
61
|
-
redo
|
|
56
|
+
redo: SemanticCommand;
|
|
62
57
|
}
|
|
63
58
|
/**
|
|
64
59
|
* Interface for an activity that wants to register a 'Clear...' menu item
|
|
65
60
|
*/
|
|
66
|
-
interface IClearer
|
|
67
|
-
/**
|
|
68
|
-
* A function to create the label for the `clearCurrent`action.
|
|
69
|
-
*
|
|
70
|
-
* This function receives the number of items `n` to be able to provided
|
|
71
|
-
* correct pluralized forms of translations.
|
|
72
|
-
*/
|
|
73
|
-
clearCurrentLabel?: (n: number) => string;
|
|
74
|
-
/**
|
|
75
|
-
* A function to create the label for the `clearAll`action.
|
|
76
|
-
*
|
|
77
|
-
* This function receives the number of items `n` to be able to provided
|
|
78
|
-
* correct pluralized forms of translations.
|
|
79
|
-
*/
|
|
80
|
-
clearAllLabel?: (n: number) => string;
|
|
61
|
+
interface IClearer {
|
|
81
62
|
/**
|
|
82
|
-
* A
|
|
63
|
+
* A semantic command to clear the currently portion of activity.
|
|
83
64
|
*/
|
|
84
|
-
clearCurrent
|
|
85
|
-
/**
|
|
86
|
-
* A function to clear all of an activity.
|
|
87
|
-
*/
|
|
88
|
-
clearAll?: (widget: T) => void;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Interface for an activity that uses Go to Line.
|
|
92
|
-
*/
|
|
93
|
-
interface IGoToLiner<T extends Widget> extends IMenuExtender<T> {
|
|
65
|
+
clearCurrent: SemanticCommand;
|
|
94
66
|
/**
|
|
95
|
-
*
|
|
67
|
+
* A semantic command to clear all of an activity.
|
|
96
68
|
*/
|
|
97
|
-
|
|
69
|
+
clearAll: SemanticCommand;
|
|
98
70
|
}
|
|
99
71
|
}
|
package/lib/edit.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { RankedMenu } from '@jupyterlab/ui-components';
|
|
4
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
5
|
/**
|
|
5
6
|
* An extensible Edit menu for the application.
|
|
6
7
|
*/
|
|
@@ -10,17 +11,15 @@ export class EditMenu extends RankedMenu {
|
|
|
10
11
|
*/
|
|
11
12
|
constructor(options) {
|
|
12
13
|
super(options);
|
|
13
|
-
this.undoers =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
this.clearers.clear();
|
|
23
|
-
super.dispose();
|
|
14
|
+
this.undoers = {
|
|
15
|
+
redo: new SemanticCommand(),
|
|
16
|
+
undo: new SemanticCommand()
|
|
17
|
+
};
|
|
18
|
+
this.clearers = {
|
|
19
|
+
clearAll: new SemanticCommand(),
|
|
20
|
+
clearCurrent: new SemanticCommand()
|
|
21
|
+
};
|
|
22
|
+
this.goToLiners = new SemanticCommand();
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
//# sourceMappingURL=edit.js.map
|
package/lib/edit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../src/edit.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../src/edit.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAsBvD;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,UAAU;IACtC;;OAEG;IACH,YAAY,OAA6B;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,IAAI,eAAe,EAAE;YAC3B,IAAI,EAAE,IAAI,eAAe,EAAE;SAC5B,CAAC;QAEF,IAAI,CAAC,QAAQ,GAAG;YACd,QAAQ,EAAE,IAAI,eAAe,EAAE;YAC/B,YAAY,EAAE,IAAI,eAAe,EAAE;SACpC,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IAC1C,CAAC;CAgBF"}
|
package/lib/file.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
|
|
2
|
-
import {
|
|
3
|
-
import { IMenuExtender } from './tokens';
|
|
2
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
3
|
/**
|
|
5
4
|
* An interface for a File menu.
|
|
6
5
|
*/
|
|
@@ -14,13 +13,13 @@ export interface IFileMenu extends IRankedMenu {
|
|
|
14
13
|
*/
|
|
15
14
|
readonly newMenu: IRankedMenu;
|
|
16
15
|
/**
|
|
17
|
-
* The close and cleanup
|
|
16
|
+
* The close and cleanup semantic command.
|
|
18
17
|
*/
|
|
19
|
-
readonly closeAndCleaners:
|
|
18
|
+
readonly closeAndCleaners: SemanticCommand;
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
20
|
+
* The console creator semantic command.
|
|
22
21
|
*/
|
|
23
|
-
readonly consoleCreators:
|
|
22
|
+
readonly consoleCreators: SemanticCommand;
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
26
25
|
* An extensible FileMenu for the application.
|
|
@@ -32,13 +31,13 @@ export declare class FileMenu extends RankedMenu implements IFileMenu {
|
|
|
32
31
|
*/
|
|
33
32
|
get newMenu(): RankedMenu;
|
|
34
33
|
/**
|
|
35
|
-
* The close and cleanup
|
|
34
|
+
* The close and cleanup semantic command.
|
|
36
35
|
*/
|
|
37
|
-
readonly closeAndCleaners:
|
|
36
|
+
readonly closeAndCleaners: SemanticCommand;
|
|
38
37
|
/**
|
|
39
|
-
*
|
|
38
|
+
* The console creator semantic command.
|
|
40
39
|
*/
|
|
41
|
-
readonly consoleCreators:
|
|
40
|
+
readonly consoleCreators: SemanticCommand;
|
|
42
41
|
/**
|
|
43
42
|
* Dispose of the resources held by the file menu.
|
|
44
43
|
*/
|
|
@@ -49,41 +48,3 @@ export declare class FileMenu extends RankedMenu implements IFileMenu {
|
|
|
49
48
|
quitEntry: boolean;
|
|
50
49
|
private _newMenu;
|
|
51
50
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Namespace for IFileMenu
|
|
54
|
-
*/
|
|
55
|
-
export declare namespace IFileMenu {
|
|
56
|
-
/**
|
|
57
|
-
* Interface for an activity that has some cleanup action associated
|
|
58
|
-
* with it in addition to merely closing its widget in the main area.
|
|
59
|
-
*/
|
|
60
|
-
interface ICloseAndCleaner<T extends Widget> extends IMenuExtender<T> {
|
|
61
|
-
/**
|
|
62
|
-
* A function to create the label for the `closeAndCleanup`action.
|
|
63
|
-
*
|
|
64
|
-
* This function receives the number of items `n` to be able to provided
|
|
65
|
-
* correct pluralized forms of translations.
|
|
66
|
-
*/
|
|
67
|
-
closeAndCleanupLabel?: (n: number) => string;
|
|
68
|
-
/**
|
|
69
|
-
* A function to perform the close and cleanup action.
|
|
70
|
-
*/
|
|
71
|
-
closeAndCleanup: (widget: T) => Promise<void>;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Interface for a command to create a console for an activity.
|
|
75
|
-
*/
|
|
76
|
-
interface IConsoleCreator<T extends Widget> extends IMenuExtender<T> {
|
|
77
|
-
/**
|
|
78
|
-
* A function to create the label for the `createConsole`action.
|
|
79
|
-
*
|
|
80
|
-
* This function receives the number of items `n` to be able to provided
|
|
81
|
-
* correct pluralized forms of translations.
|
|
82
|
-
*/
|
|
83
|
-
createConsoleLabel?: (n: number) => string;
|
|
84
|
-
/**
|
|
85
|
-
* The function to create the console.
|
|
86
|
-
*/
|
|
87
|
-
createConsole: (widget: T) => Promise<void>;
|
|
88
|
-
}
|
|
89
|
-
}
|
package/lib/file.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { RankedMenu } from '@jupyterlab/ui-components';
|
|
4
4
|
import { find } from '@lumino/algorithm';
|
|
5
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
5
6
|
/**
|
|
6
7
|
* An extensible FileMenu for the application.
|
|
7
8
|
*/
|
|
@@ -9,9 +10,8 @@ export class FileMenu extends RankedMenu {
|
|
|
9
10
|
constructor(options) {
|
|
10
11
|
super(options);
|
|
11
12
|
this.quitEntry = false;
|
|
12
|
-
|
|
13
|
-
this.
|
|
14
|
-
this.consoleCreators = new Set();
|
|
13
|
+
this.closeAndCleaners = new SemanticCommand();
|
|
14
|
+
this.consoleCreators = new SemanticCommand();
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* The New submenu.
|
|
@@ -19,9 +19,10 @@ export class FileMenu extends RankedMenu {
|
|
|
19
19
|
get newMenu() {
|
|
20
20
|
var _a, _b;
|
|
21
21
|
if (!this._newMenu) {
|
|
22
|
-
this._newMenu =
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
this._newMenu =
|
|
23
|
+
(_b = (_a = find(this.items, menu => { var _a; return ((_a = menu.submenu) === null || _a === void 0 ? void 0 : _a.id) === 'jp-mainmenu-file-new'; })) === null || _a === void 0 ? void 0 : _a.submenu) !== null && _b !== void 0 ? _b : new RankedMenu({
|
|
24
|
+
commands: this.commands
|
|
25
|
+
});
|
|
25
26
|
}
|
|
26
27
|
return this._newMenu;
|
|
27
28
|
}
|
|
@@ -31,7 +32,6 @@ export class FileMenu extends RankedMenu {
|
|
|
31
32
|
dispose() {
|
|
32
33
|
var _a;
|
|
33
34
|
(_a = this._newMenu) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
34
|
-
this.consoleCreators.clear();
|
|
35
35
|
super.dispose();
|
|
36
36
|
}
|
|
37
37
|
}
|
package/lib/file.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAAA,0CAA0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,18 @@
|
|
|
1
|
-
import { Kernel } from '@jupyterlab/services';
|
|
2
1
|
import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
|
|
3
|
-
import {
|
|
4
|
-
import { IMenuExtender } from './tokens';
|
|
2
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
5
3
|
/**
|
|
6
4
|
* An interface for a Help menu.
|
|
7
5
|
*/
|
|
8
6
|
export interface IHelpMenu extends IRankedMenu {
|
|
9
7
|
/**
|
|
10
|
-
* A
|
|
8
|
+
* A semantic command to get the kernel for the help menu.
|
|
11
9
|
* This is used to populate additional help
|
|
12
10
|
* links provided by the kernel of a widget.
|
|
11
|
+
*
|
|
12
|
+
* #### Note
|
|
13
|
+
* The command must return a Kernel.IKernelConnection object
|
|
13
14
|
*/
|
|
14
|
-
readonly
|
|
15
|
+
readonly getKernel: SemanticCommand;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* An extensible Help menu for the application.
|
|
@@ -22,24 +23,12 @@ export declare class HelpMenu extends RankedMenu implements IHelpMenu {
|
|
|
22
23
|
*/
|
|
23
24
|
constructor(options: IRankedMenu.IOptions);
|
|
24
25
|
/**
|
|
25
|
-
* A
|
|
26
|
+
* A semantic command to get the kernel for the help menu.
|
|
26
27
|
* This is used to populate additional help
|
|
27
28
|
* links provided by the kernel of a widget.
|
|
29
|
+
*
|
|
30
|
+
* #### Note
|
|
31
|
+
* The command must return a Kernel.IKernelConnection object
|
|
28
32
|
*/
|
|
29
|
-
readonly
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Namespace for IHelpMenu
|
|
33
|
-
*/
|
|
34
|
-
export declare namespace IHelpMenu {
|
|
35
|
-
/**
|
|
36
|
-
* Interface for a Kernel user to register itself
|
|
37
|
-
* with the IHelpMenu's semantic extension points.
|
|
38
|
-
*/
|
|
39
|
-
interface IKernelUser<T extends Widget> extends IMenuExtender<T> {
|
|
40
|
-
/**
|
|
41
|
-
* A function to get the kernel for a widget.
|
|
42
|
-
*/
|
|
43
|
-
getKernel: (widget: T) => Kernel.IKernelConnection | null;
|
|
44
|
-
}
|
|
33
|
+
readonly getKernel: SemanticCommand;
|
|
45
34
|
}
|
package/lib/help.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { RankedMenu } from '@jupyterlab/ui-components';
|
|
4
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
5
|
/**
|
|
5
6
|
* An extensible Help menu for the application.
|
|
6
7
|
*/
|
|
@@ -10,7 +11,7 @@ export class HelpMenu extends RankedMenu {
|
|
|
10
11
|
*/
|
|
11
12
|
constructor(options) {
|
|
12
13
|
super(options);
|
|
13
|
-
this.
|
|
14
|
+
this.getKernel = new SemanticCommand();
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=help.js.map
|
package/lib/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAiBvD;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,UAAU;IACtC;;OAEG;IACH,YAAY,OAA6B;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,CAAC;CAWF"}
|
package/lib/kernel.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
|
|
2
|
-
import {
|
|
3
|
-
import { IMenuExtender } from './tokens';
|
|
2
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
3
|
/**
|
|
5
4
|
* An interface for a Kernel menu.
|
|
6
5
|
*/
|
|
7
6
|
export interface IKernelMenu extends IRankedMenu {
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
8
|
+
* Semantic commands IKernelUsers for the Kernel menu.
|
|
10
9
|
*/
|
|
11
|
-
readonly kernelUsers:
|
|
10
|
+
readonly kernelUsers: IKernelMenu.IKernelUser;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
13
|
* An extensible Kernel menu for the application.
|
|
@@ -19,13 +18,9 @@ export declare class KernelMenu extends RankedMenu implements IKernelMenu {
|
|
|
19
18
|
*/
|
|
20
19
|
constructor(options: IRankedMenu.IOptions);
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
21
|
+
* Semantic commands IKernelUsers for the Kernel menu.
|
|
23
22
|
*/
|
|
24
|
-
readonly kernelUsers:
|
|
25
|
-
/**
|
|
26
|
-
* Dispose of the resources held by the kernel menu.
|
|
27
|
-
*/
|
|
28
|
-
dispose(): void;
|
|
23
|
+
readonly kernelUsers: IKernelMenu.IKernelUser;
|
|
29
24
|
}
|
|
30
25
|
/**
|
|
31
26
|
* Namespace for IKernelMenu
|
|
@@ -35,39 +30,31 @@ export declare namespace IKernelMenu {
|
|
|
35
30
|
* Interface for a Kernel user to register itself
|
|
36
31
|
* with the IKernelMenu's semantic extension points.
|
|
37
32
|
*/
|
|
38
|
-
interface IKernelUser
|
|
33
|
+
interface IKernelUser {
|
|
39
34
|
/**
|
|
40
|
-
* A
|
|
35
|
+
* A semantic command to interrupt the kernel.
|
|
41
36
|
*/
|
|
42
|
-
interruptKernel
|
|
37
|
+
interruptKernel: SemanticCommand;
|
|
43
38
|
/**
|
|
44
|
-
* A
|
|
45
|
-
*/
|
|
46
|
-
reconnectToKernel?: (widget: T) => Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* A function to restart the kernel, which
|
|
49
|
-
* returns a promise of whether the kernel was restarted.
|
|
39
|
+
* A semantic command to reconnect to the kernel
|
|
50
40
|
*/
|
|
51
|
-
|
|
41
|
+
reconnectToKernel: SemanticCommand;
|
|
52
42
|
/**
|
|
53
|
-
* A
|
|
43
|
+
* A semantic command to restart the kernel, which
|
|
54
44
|
* returns a promise of whether the kernel was restarted.
|
|
55
45
|
*/
|
|
56
|
-
|
|
46
|
+
restartKernel: SemanticCommand;
|
|
57
47
|
/**
|
|
58
|
-
* A
|
|
48
|
+
* A semantic command to clear the widget.
|
|
59
49
|
*/
|
|
60
|
-
|
|
50
|
+
clearWidget: SemanticCommand;
|
|
61
51
|
/**
|
|
62
|
-
* A
|
|
52
|
+
* A semantic command to change the kernel.
|
|
63
53
|
*/
|
|
64
|
-
|
|
54
|
+
changeKernel: SemanticCommand;
|
|
65
55
|
/**
|
|
66
|
-
* A
|
|
67
|
-
*
|
|
68
|
-
* This function receives the number of items `n` to be able to provided
|
|
69
|
-
* correct pluralized forms of translations.
|
|
56
|
+
* A semantic command to shut down the kernel.
|
|
70
57
|
*/
|
|
71
|
-
|
|
58
|
+
shutdownKernel: SemanticCommand;
|
|
72
59
|
}
|
|
73
60
|
}
|
package/lib/kernel.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { RankedMenu } from '@jupyterlab/ui-components';
|
|
4
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
5
|
/**
|
|
5
6
|
* An extensible Kernel menu for the application.
|
|
6
7
|
*/
|
|
@@ -10,14 +11,14 @@ export class KernelMenu extends RankedMenu {
|
|
|
10
11
|
*/
|
|
11
12
|
constructor(options) {
|
|
12
13
|
super(options);
|
|
13
|
-
this.kernelUsers =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
this.kernelUsers = {
|
|
15
|
+
changeKernel: new SemanticCommand(),
|
|
16
|
+
clearWidget: new SemanticCommand(),
|
|
17
|
+
interruptKernel: new SemanticCommand(),
|
|
18
|
+
reconnectToKernel: new SemanticCommand(),
|
|
19
|
+
restartKernel: new SemanticCommand(),
|
|
20
|
+
shutdownKernel: new SemanticCommand()
|
|
21
|
+
};
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=kernel.js.map
|
package/lib/kernel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../src/kernel.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../src/kernel.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAYvD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,UAAU;IACxC;;OAEG;IACH,YAAY,OAA6B;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,WAAW,GAAG;YACjB,YAAY,EAAE,IAAI,eAAe,EAAE;YACnC,WAAW,EAAE,IAAI,eAAe,EAAE;YAClC,eAAe,EAAE,IAAI,eAAe,EAAE;YACtC,iBAAiB,EAAE,IAAI,eAAe,EAAE;YACxC,aAAa,EAAE,IAAI,eAAe,EAAE;YACpC,cAAc,EAAE,IAAI,eAAe,EAAE;SACtC,CAAC;IACJ,CAAC;CAMF"}
|
package/lib/mainmenu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mainmenu.js","sourceRoot":"","sources":["../src/mainmen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AFe,eAAO,UAEtB,CAAA;AACH,CAAC,EAtBS,OAAO,KAAP,OAAO,QAsBhB"}
|
package/lib/run.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
|
|
2
|
-
import {
|
|
3
|
-
import { IMenuExtender } from './tokens';
|
|
2
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
3
|
/**
|
|
5
4
|
* An interface for a Run menu.
|
|
6
5
|
*/
|
|
7
6
|
export interface IRunMenu extends IRankedMenu {
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* ### Notes
|
|
12
|
-
* The key for the set may be used in menu labels.
|
|
8
|
+
* Semantic commands ICodeRunner for the Run menu.
|
|
13
9
|
*/
|
|
14
|
-
readonly codeRunners:
|
|
10
|
+
readonly codeRunners: IRunMenu.ICodeRunner;
|
|
15
11
|
}
|
|
16
12
|
/**
|
|
17
13
|
* An extensible Run menu for the application.
|
|
@@ -22,16 +18,9 @@ export declare class RunMenu extends RankedMenu implements IRunMenu {
|
|
|
22
18
|
*/
|
|
23
19
|
constructor(options: IRankedMenu.IOptions);
|
|
24
20
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* ### Notes
|
|
28
|
-
* The key for the set may be used in menu labels.
|
|
21
|
+
* Semantic commands ICodeRunner for the Run menu.
|
|
29
22
|
*/
|
|
30
|
-
readonly codeRunners:
|
|
31
|
-
/**
|
|
32
|
-
* Dispose of the resources held by the run menu.
|
|
33
|
-
*/
|
|
34
|
-
dispose(): void;
|
|
23
|
+
readonly codeRunners: IRunMenu.ICodeRunner;
|
|
35
24
|
}
|
|
36
25
|
/**
|
|
37
26
|
* A namespace for RunMenu statics.
|
|
@@ -41,61 +30,18 @@ export declare namespace IRunMenu {
|
|
|
41
30
|
* An object that runs code, which may be
|
|
42
31
|
* registered with the Run menu.
|
|
43
32
|
*/
|
|
44
|
-
interface ICodeRunner
|
|
45
|
-
/**
|
|
46
|
-
* Return the caption associated to the `run` function.
|
|
47
|
-
*
|
|
48
|
-
* This function receives the number of items `n` to be able to provided
|
|
49
|
-
* correct pluralized forms of translations.
|
|
50
|
-
*/
|
|
51
|
-
runCaption?: (n: number) => string;
|
|
52
|
-
/**
|
|
53
|
-
* Return the label associated to the `run` function.
|
|
54
|
-
*
|
|
55
|
-
* This function receives the number of items `n` to be able to provided
|
|
56
|
-
* correct pluralized forms of translations.
|
|
57
|
-
*/
|
|
58
|
-
runLabel?: (n: number) => string;
|
|
59
|
-
/**
|
|
60
|
-
* Return the caption associated to the `runAll` function.
|
|
61
|
-
*
|
|
62
|
-
* This function receives the number of items `n` to be able to provided
|
|
63
|
-
* correct pluralized forms of translations.
|
|
64
|
-
*/
|
|
65
|
-
runAllCaption?: (n: number) => string;
|
|
66
|
-
/**
|
|
67
|
-
* Return the label associated to the `runAll` function.
|
|
68
|
-
*
|
|
69
|
-
* This function receives the number of items `n` to be able to provided
|
|
70
|
-
* correct pluralized forms of translations.
|
|
71
|
-
*/
|
|
72
|
-
runAllLabel?: (n: number) => string;
|
|
73
|
-
/**
|
|
74
|
-
* Return the caption associated to the `restartAndRunAll` function.
|
|
75
|
-
*
|
|
76
|
-
* This function receives the number of items `n` to be able to provided
|
|
77
|
-
* correct pluralized forms of translations.
|
|
78
|
-
*/
|
|
79
|
-
restartAndRunAllCaption?: (n: number) => string;
|
|
80
|
-
/**
|
|
81
|
-
* Return the label associated to the `restartAndRunAll` function.
|
|
82
|
-
*
|
|
83
|
-
* This function receives the number of items `n` to be able to provided
|
|
84
|
-
* correct pluralized forms of translations.
|
|
85
|
-
*/
|
|
86
|
-
restartAndRunAllLabel?: (n: number) => string;
|
|
33
|
+
interface ICodeRunner {
|
|
87
34
|
/**
|
|
88
|
-
* A
|
|
35
|
+
* A semantic command to run a subpart of a document.
|
|
89
36
|
*/
|
|
90
|
-
run
|
|
37
|
+
run: SemanticCommand;
|
|
91
38
|
/**
|
|
92
|
-
* A
|
|
39
|
+
* A semantic command to run a whole document
|
|
93
40
|
*/
|
|
94
|
-
runAll
|
|
41
|
+
runAll: SemanticCommand;
|
|
95
42
|
/**
|
|
96
|
-
* A
|
|
97
|
-
* returns a promise of whether the action was performed.
|
|
43
|
+
* A semantic command to restart a kernel
|
|
98
44
|
*/
|
|
99
|
-
|
|
45
|
+
restart: SemanticCommand;
|
|
100
46
|
}
|
|
101
47
|
}
|
package/lib/run.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { RankedMenu } from '@jupyterlab/ui-components';
|
|
4
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
5
|
/**
|
|
5
6
|
* An extensible Run menu for the application.
|
|
6
7
|
*/
|
|
@@ -10,14 +11,11 @@ export class RunMenu extends RankedMenu {
|
|
|
10
11
|
*/
|
|
11
12
|
constructor(options) {
|
|
12
13
|
super(options);
|
|
13
|
-
this.codeRunners =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
dispose() {
|
|
19
|
-
this.codeRunners.clear();
|
|
20
|
-
super.dispose();
|
|
14
|
+
this.codeRunners = {
|
|
15
|
+
restart: new SemanticCommand(),
|
|
16
|
+
run: new SemanticCommand(),
|
|
17
|
+
runAll: new SemanticCommand()
|
|
18
|
+
};
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
//# sourceMappingURL=run.js.map
|
package/lib/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAYvD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,UAAU;IACrC;;OAEG;IACH,YAAY,OAA6B;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,WAAW,GAAG;YACjB,OAAO,EAAE,IAAI,eAAe,EAAE;YAC9B,GAAG,EAAE,IAAI,eAAe,EAAE;YAC1B,MAAM,EAAE,IAAI,eAAe,EAAE;SAC9B,CAAC;IACJ,CAAC;CAMF"}
|
package/lib/tokens.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MenuFactory } from '@jupyterlab/apputils';
|
|
2
2
|
import { Token } from '@lumino/coreutils';
|
|
3
|
-
import { Menu
|
|
3
|
+
import { Menu } from '@lumino/widgets';
|
|
4
4
|
import { IEditMenu } from './edit';
|
|
5
5
|
import { IFileMenu } from './file';
|
|
6
6
|
import { IHelpMenu } from './help';
|
|
@@ -13,27 +13,6 @@ import { IViewMenu } from './view';
|
|
|
13
13
|
* The main menu token.
|
|
14
14
|
*/
|
|
15
15
|
export declare const IMainMenu: Token<IMainMenu>;
|
|
16
|
-
/**
|
|
17
|
-
* A base interface for a consumer of one of the menu
|
|
18
|
-
* semantic extension points. The IMenuExtender gives
|
|
19
|
-
* a widget tracker which is checked when the menu
|
|
20
|
-
* is deciding which IMenuExtender to delegate to upon
|
|
21
|
-
* selection of the menu item.
|
|
22
|
-
*/
|
|
23
|
-
export interface IMenuExtender<T extends Widget> {
|
|
24
|
-
/**
|
|
25
|
-
* A widget tracker for identifying the appropriate extender.
|
|
26
|
-
*/
|
|
27
|
-
tracker: IWidgetTracker<T>;
|
|
28
|
-
/**
|
|
29
|
-
* An additional function that determines whether the extender
|
|
30
|
-
* is enabled. By default it is considered enabled if the application
|
|
31
|
-
* active widget is contained in the `tracker`. If this is also
|
|
32
|
-
* provided, the criterion is equivalent to
|
|
33
|
-
* `tracker.has(widget) && extender.isEnabled(widget)`
|
|
34
|
-
*/
|
|
35
|
-
isEnabled?: (widget: T) => boolean;
|
|
36
|
-
}
|
|
37
16
|
/**
|
|
38
17
|
* The main menu interface.
|
|
39
18
|
*/
|
package/lib/tokens.js
CHANGED
package/lib/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAW1C
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAW1C;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,KAAK,CAAY,gCAAgC,CAAC,CAAC"}
|
package/lib/view.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { IRankedMenu, RankedMenu } from '@jupyterlab/ui-components';
|
|
2
|
-
import {
|
|
3
|
-
import { IMenuExtender } from './tokens';
|
|
2
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
3
|
/**
|
|
5
4
|
* An interface for a View menu.
|
|
6
5
|
*/
|
|
7
6
|
export interface IViewMenu extends IRankedMenu {
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
8
|
+
* Semantic commands IEditorViewer for the View menu.
|
|
10
9
|
*/
|
|
11
|
-
readonly editorViewers:
|
|
10
|
+
readonly editorViewers: IViewMenu.IEditorViewer;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
13
|
* An extensible View menu for the application.
|
|
@@ -19,13 +18,9 @@ export declare class ViewMenu extends RankedMenu implements IViewMenu {
|
|
|
19
18
|
*/
|
|
20
19
|
constructor(options: IRankedMenu.IOptions);
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
21
|
+
* Semantic commands IEditorViewer for the View menu.
|
|
23
22
|
*/
|
|
24
|
-
readonly editorViewers:
|
|
25
|
-
/**
|
|
26
|
-
* Dispose of the resources held by the view menu.
|
|
27
|
-
*/
|
|
28
|
-
dispose(): void;
|
|
23
|
+
readonly editorViewers: IViewMenu.IEditorViewer;
|
|
29
24
|
}
|
|
30
25
|
/**
|
|
31
26
|
* Namespace for IViewMenu.
|
|
@@ -33,32 +28,20 @@ export declare class ViewMenu extends RankedMenu implements IViewMenu {
|
|
|
33
28
|
export declare namespace IViewMenu {
|
|
34
29
|
/**
|
|
35
30
|
* Interface for a text editor viewer to register
|
|
36
|
-
* itself with the text editor
|
|
31
|
+
* itself with the text editor semantic commands.
|
|
37
32
|
*/
|
|
38
|
-
interface IEditorViewer
|
|
39
|
-
/**
|
|
40
|
-
* Whether to show line numbers in the editor.
|
|
41
|
-
*/
|
|
42
|
-
toggleLineNumbers?: (widget: T) => void;
|
|
43
|
-
/**
|
|
44
|
-
* Whether to word-wrap the editor.
|
|
45
|
-
*/
|
|
46
|
-
toggleWordWrap?: (widget: T) => void;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to match brackets in the editor.
|
|
49
|
-
*/
|
|
50
|
-
toggleMatchBrackets?: (widget: T) => void;
|
|
33
|
+
interface IEditorViewer {
|
|
51
34
|
/**
|
|
52
|
-
*
|
|
35
|
+
* A semantic command to show line numbers in the editor.
|
|
53
36
|
*/
|
|
54
|
-
|
|
37
|
+
toggleLineNumbers: SemanticCommand;
|
|
55
38
|
/**
|
|
56
|
-
*
|
|
39
|
+
* A semantic command to word-wrap the editor.
|
|
57
40
|
*/
|
|
58
|
-
|
|
41
|
+
toggleWordWrap: SemanticCommand;
|
|
59
42
|
/**
|
|
60
|
-
*
|
|
43
|
+
* A semantic command to match brackets in the editor.
|
|
61
44
|
*/
|
|
62
|
-
|
|
45
|
+
toggleMatchBrackets: SemanticCommand;
|
|
63
46
|
}
|
|
64
47
|
}
|
package/lib/view.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { RankedMenu } from '@jupyterlab/ui-components';
|
|
4
|
+
import { SemanticCommand } from '@jupyterlab/apputils';
|
|
4
5
|
/**
|
|
5
6
|
* An extensible View menu for the application.
|
|
6
7
|
*/
|
|
@@ -10,14 +11,11 @@ export class ViewMenu extends RankedMenu {
|
|
|
10
11
|
*/
|
|
11
12
|
constructor(options) {
|
|
12
13
|
super(options);
|
|
13
|
-
this.editorViewers =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
dispose() {
|
|
19
|
-
this.editorViewers.clear();
|
|
20
|
-
super.dispose();
|
|
14
|
+
this.editorViewers = {
|
|
15
|
+
toggleLineNumbers: new SemanticCommand(),
|
|
16
|
+
toggleMatchBrackets: new SemanticCommand(),
|
|
17
|
+
toggleWordWrap: new SemanticCommand()
|
|
18
|
+
};
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
//# sourceMappingURL=view.js.map
|
package/lib/view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAe,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAYvD;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,UAAU;IACtC;;OAEG;IACH,YAAY,OAA6B;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,aAAa,GAAG;YACnB,iBAAiB,EAAE,IAAI,eAAe,EAAE;YACxC,mBAAmB,EAAE,IAAI,eAAe,EAAE;YAC1C,cAAc,EAAE,IAAI,eAAe,EAAE;SACtC,CAAC;IACJ,CAAC;CAMF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/mainmenu",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.11",
|
|
4
4
|
"description": "JupyterLab - Main Menu",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
6
|
"bugs": {
|
|
@@ -41,23 +41,22 @@
|
|
|
41
41
|
"watch": "tsc -b --watch"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@jupyterlab/apputils": "^
|
|
45
|
-
"@jupyterlab/
|
|
46
|
-
"@jupyterlab/
|
|
47
|
-
"@
|
|
48
|
-
"@lumino/
|
|
49
|
-
"@lumino/
|
|
50
|
-
"@lumino/
|
|
51
|
-
"@lumino/widgets": "^1.30.0"
|
|
44
|
+
"@jupyterlab/apputils": "^4.0.0-alpha.11",
|
|
45
|
+
"@jupyterlab/translation": "^4.0.0-alpha.11",
|
|
46
|
+
"@jupyterlab/ui-components": "^4.0.0-alpha.26",
|
|
47
|
+
"@lumino/algorithm": "^1.9.1",
|
|
48
|
+
"@lumino/commands": "^1.20.0",
|
|
49
|
+
"@lumino/coreutils": "^1.12.0",
|
|
50
|
+
"@lumino/widgets": "^1.32.0"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
|
-
"@jupyterlab/testutils": "^
|
|
53
|
+
"@jupyterlab/testutils": "^4.0.0-alpha.11",
|
|
55
54
|
"@types/jest": "^26.0.10",
|
|
56
55
|
"jest": "^26.4.2",
|
|
57
56
|
"rimraf": "~3.0.0",
|
|
58
57
|
"ts-jest": "^26.3.0",
|
|
59
|
-
"typedoc": "~0.
|
|
60
|
-
"typescript": "~4.
|
|
58
|
+
"typedoc": "~0.22.10",
|
|
59
|
+
"typescript": "~4.6.3"
|
|
61
60
|
},
|
|
62
61
|
"publishConfig": {
|
|
63
62
|
"access": "public"
|