@jupyterlab/debugger 3.3.0-alpha.1 → 3.3.0-alpha.13
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/config.d.ts +6 -0
- package/lib/config.js +8 -0
- package/lib/config.js.map +1 -1
- package/lib/debugger.d.ts +9 -1
- package/lib/debugger.js +10 -1
- package/lib/debugger.js.map +1 -1
- package/lib/handler.d.ts +32 -3
- package/lib/handler.js +63 -70
- package/lib/handler.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/model.d.ts +8 -1
- package/lib/model.js +10 -0
- package/lib/model.js.map +1 -1
- package/lib/panels/breakpoints/index.d.ts +2 -1
- package/lib/panels/breakpoints/index.js +10 -15
- package/lib/panels/breakpoints/index.js.map +1 -1
- package/lib/panels/callstack/index.d.ts +2 -1
- package/lib/panels/callstack/index.js +22 -20
- package/lib/panels/callstack/index.js.map +1 -1
- package/lib/panels/callstack/model.d.ts +3 -3
- package/lib/panels/callstack/model.js +3 -1
- package/lib/panels/callstack/model.js.map +1 -1
- package/lib/panels/panelbody.d.ts +27 -0
- package/lib/panels/panelbody.js +47 -0
- package/lib/panels/panelbody.js.map +1 -0
- package/lib/panels/panelwithtoolbar.d.ts +57 -0
- package/lib/panels/panelwithtoolbar.js +55 -0
- package/lib/panels/panelwithtoolbar.js.map +1 -0
- package/lib/panels/sources/index.d.ts +2 -2
- package/lib/panels/sources/index.js +14 -11
- package/lib/panels/sources/index.js.map +1 -1
- package/lib/panels/sources/model.d.ts +2 -2
- package/lib/panels/sources/sourcepath.d.ts +11 -0
- package/lib/panels/sources/sourcepath.js +17 -0
- package/lib/panels/sources/sourcepath.js.map +1 -0
- package/lib/panels/variables/grid.d.ts +9 -0
- package/lib/panels/variables/grid.js +83 -9
- package/lib/panels/variables/grid.js.map +1 -1
- package/lib/panels/variables/index.d.ts +10 -2
- package/lib/panels/variables/index.js +39 -16
- package/lib/panels/variables/index.js.map +1 -1
- package/lib/panels/variables/mimerenderer.d.ts +31 -0
- package/lib/panels/variables/mimerenderer.js +44 -0
- package/lib/panels/variables/mimerenderer.js.map +1 -0
- package/lib/panels/variables/tree.d.ts +17 -0
- package/lib/panels/variables/tree.js +44 -8
- package/lib/panels/variables/tree.js.map +1 -1
- package/lib/service.d.ts +33 -0
- package/lib/service.js +99 -11
- package/lib/service.js.map +1 -1
- package/lib/sidebar.js +5 -2
- package/lib/sidebar.js.map +1 -1
- package/lib/tokens.d.ts +130 -10
- package/lib/tokens.js +4 -0
- package/lib/tokens.js.map +1 -1
- package/package.json +19 -20
- package/style/accordionpanel.css +40 -0
- package/style/base.css +5 -0
- package/style/breakpoints.css +2 -0
- package/style/callstack.css +2 -0
- package/style/sidebar.css +16 -5
- package/style/sources.css +6 -1
- package/style/variables.css +35 -1
- package/lib/panels/breakpoints/header.d.ts +0 -16
- package/lib/panels/breakpoints/header.js +0 -30
- package/lib/panels/breakpoints/header.js.map +0 -1
- package/lib/panels/callstack/header.d.ts +0 -16
- package/lib/panels/callstack/header.js +0 -30
- package/lib/panels/callstack/header.js.map +0 -1
- package/lib/panels/sources/header.d.ts +0 -19
- package/lib/panels/sources/header.js +0 -48
- package/lib/panels/sources/header.js.map +0 -1
- package/lib/panels/variables/header.d.ts +0 -16
- package/lib/panels/variables/header.js +0 -30
- package/lib/panels/variables/header.js.map +0 -1
|
@@ -1,42 +1,38 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { Dialog, showDialog } from '@jupyterlab/apputils';
|
|
4
|
-
import { nullTranslator } from '@jupyterlab/translation';
|
|
5
4
|
import { ToolbarButton } from '@jupyterlab/ui-components';
|
|
6
5
|
import { Signal } from '@lumino/signaling';
|
|
7
|
-
import { Panel } from '@lumino/widgets';
|
|
8
6
|
import { closeAllIcon } from '../../icons';
|
|
9
7
|
import { BreakpointsBody } from './body';
|
|
10
|
-
import {
|
|
8
|
+
import { PanelWithToolbar } from '../panelwithtoolbar';
|
|
11
9
|
/**
|
|
12
10
|
* A Panel to show a list of breakpoints.
|
|
13
11
|
*/
|
|
14
|
-
export class Breakpoints extends
|
|
12
|
+
export class Breakpoints extends PanelWithToolbar {
|
|
15
13
|
/**
|
|
16
14
|
* Instantiate a new Breakpoints Panel.
|
|
17
15
|
*
|
|
18
16
|
* @param options The instantiation options for a Breakpoints Panel.
|
|
19
17
|
*/
|
|
20
18
|
constructor(options) {
|
|
21
|
-
super();
|
|
19
|
+
super(options);
|
|
22
20
|
this.clicked = new Signal(this);
|
|
23
21
|
const { model, service } = options;
|
|
24
|
-
|
|
25
|
-
const trans = translator.load('jupyterlab');
|
|
26
|
-
const header = new BreakpointsHeader(translator);
|
|
22
|
+
this.title.label = this.trans.__('Breakpoints');
|
|
27
23
|
const body = new BreakpointsBody(model);
|
|
28
|
-
|
|
24
|
+
this.toolbar.addItem('closeAll', new ToolbarButton({
|
|
29
25
|
icon: closeAllIcon,
|
|
30
26
|
onClick: async () => {
|
|
31
27
|
if (model.breakpoints.size === 0) {
|
|
32
28
|
return;
|
|
33
29
|
}
|
|
34
30
|
const result = await showDialog({
|
|
35
|
-
title: trans.__('Remove All Breakpoints'),
|
|
36
|
-
body: trans.__('Are you sure you want to remove all breakpoints?'),
|
|
31
|
+
title: this.trans.__('Remove All Breakpoints'),
|
|
32
|
+
body: this.trans.__('Are you sure you want to remove all breakpoints?'),
|
|
37
33
|
buttons: [
|
|
38
|
-
Dialog.okButton({ label: trans.__('Remove breakpoints') }),
|
|
39
|
-
Dialog.cancelButton({ label: trans.__('Cancel') })
|
|
34
|
+
Dialog.okButton({ label: this.trans.__('Remove breakpoints') }),
|
|
35
|
+
Dialog.cancelButton({ label: this.trans.__('Cancel') })
|
|
40
36
|
],
|
|
41
37
|
hasClose: true
|
|
42
38
|
});
|
|
@@ -44,9 +40,8 @@ export class Breakpoints extends Panel {
|
|
|
44
40
|
return service.clearBreakpoints();
|
|
45
41
|
}
|
|
46
42
|
},
|
|
47
|
-
tooltip: trans.__('Remove All Breakpoints')
|
|
43
|
+
tooltip: this.trans.__('Remove All Breakpoints')
|
|
48
44
|
}));
|
|
49
|
-
this.addWidget(header);
|
|
50
45
|
this.addWidget(body);
|
|
51
46
|
this.addClass('jp-DebuggerBreakpoints');
|
|
52
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/breakpoints/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/breakpoints/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,gBAAgB;IAC/C;;;;OAIG;IACH,YAAY,OAA6B;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QAqCR,YAAO,GAAG,IAAI,MAAM,CAA8B,IAAI,CAAC,CAAC;QApC/D,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;QAEhD,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QAExC,IAAI,CAAC,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,aAAa,CAAC;YAChB,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,KAAK,IAAmB,EAAE;gBACjC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE;oBAChC,OAAO;iBACR;gBACD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC;oBAC9B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAAC;oBAC9C,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CACjB,kDAAkD,CACnD;oBACD,OAAO,EAAE;wBACP,MAAM,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,EAAE,CAAC;wBAC/D,MAAM,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;qBACxD;oBACD,QAAQ,EAAE,IAAI;iBACf,CAAC,CAAC;gBACH,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;oBACxB,OAAO,OAAO,CAAC,gBAAgB,EAAE,CAAC;iBACnC;YACH,CAAC;YACD,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAAC;SACjD,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;IAC1C,CAAC;CAGF"}
|
|
@@ -2,10 +2,11 @@ import { ITranslator } from '@jupyterlab/translation';
|
|
|
2
2
|
import { CommandRegistry } from '@lumino/commands';
|
|
3
3
|
import { Panel } from '@lumino/widgets';
|
|
4
4
|
import { IDebugger } from '../../tokens';
|
|
5
|
+
import { PanelWithToolbar } from '../panelwithtoolbar';
|
|
5
6
|
/**
|
|
6
7
|
* A Panel to show a callstack.
|
|
7
8
|
*/
|
|
8
|
-
export declare class Callstack extends
|
|
9
|
+
export declare class Callstack extends PanelWithToolbar {
|
|
9
10
|
/**
|
|
10
11
|
* Instantiate a new Callstack Panel.
|
|
11
12
|
*
|
|
@@ -1,50 +1,52 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import { nullTranslator } from '@jupyterlab/translation';
|
|
4
3
|
import { CommandToolbarButton } from '@jupyterlab/ui-components';
|
|
5
|
-
import {
|
|
4
|
+
import { PanelWithToolbar } from '../panelwithtoolbar';
|
|
6
5
|
import { CallstackBody } from './body';
|
|
7
|
-
import { CallstackHeader } from './header';
|
|
8
6
|
/**
|
|
9
7
|
* A Panel to show a callstack.
|
|
10
8
|
*/
|
|
11
|
-
export class Callstack extends
|
|
9
|
+
export class Callstack extends PanelWithToolbar {
|
|
12
10
|
/**
|
|
13
11
|
* Instantiate a new Callstack Panel.
|
|
14
12
|
*
|
|
15
13
|
* @param options The instantiation options for a Callstack Panel.
|
|
16
14
|
*/
|
|
17
15
|
constructor(options) {
|
|
18
|
-
super();
|
|
16
|
+
super(options);
|
|
19
17
|
const { commands, model } = options;
|
|
20
|
-
|
|
21
|
-
const header = new CallstackHeader(translator);
|
|
18
|
+
this.title.label = this.trans.__('Callstack');
|
|
22
19
|
const body = new CallstackBody(model);
|
|
23
|
-
|
|
20
|
+
this.toolbar.addItem('continue', new CommandToolbarButton({
|
|
24
21
|
commands: commands.registry,
|
|
25
|
-
id: commands.continue
|
|
22
|
+
id: commands.continue,
|
|
23
|
+
label: ''
|
|
26
24
|
}));
|
|
27
|
-
|
|
25
|
+
this.toolbar.addItem('terminate', new CommandToolbarButton({
|
|
28
26
|
commands: commands.registry,
|
|
29
|
-
id: commands.terminate
|
|
27
|
+
id: commands.terminate,
|
|
28
|
+
label: ''
|
|
30
29
|
}));
|
|
31
|
-
|
|
30
|
+
this.toolbar.addItem('step-over', new CommandToolbarButton({
|
|
32
31
|
commands: commands.registry,
|
|
33
|
-
id: commands.next
|
|
32
|
+
id: commands.next,
|
|
33
|
+
label: ''
|
|
34
34
|
}));
|
|
35
|
-
|
|
35
|
+
this.toolbar.addItem('step-in', new CommandToolbarButton({
|
|
36
36
|
commands: commands.registry,
|
|
37
|
-
id: commands.stepIn
|
|
37
|
+
id: commands.stepIn,
|
|
38
|
+
label: ''
|
|
38
39
|
}));
|
|
39
|
-
|
|
40
|
+
this.toolbar.addItem('step-out', new CommandToolbarButton({
|
|
40
41
|
commands: commands.registry,
|
|
41
|
-
id: commands.stepOut
|
|
42
|
+
id: commands.stepOut,
|
|
43
|
+
label: ''
|
|
42
44
|
}));
|
|
43
|
-
|
|
45
|
+
this.toolbar.addItem('evaluate', new CommandToolbarButton({
|
|
44
46
|
commands: commands.registry,
|
|
45
|
-
id: commands.evaluate
|
|
47
|
+
id: commands.evaluate,
|
|
48
|
+
label: ''
|
|
46
49
|
}));
|
|
47
|
-
this.addWidget(header);
|
|
48
50
|
this.addWidget(body);
|
|
49
51
|
this.addClass('jp-DebuggerCallstack');
|
|
50
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/callstack/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/callstack/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAIjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,gBAAgB;IAC7C;;;;OAIG;IACH,YAAY,OAA2B;QACrC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;QAC9C,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;QAEtC,IAAI,CAAC,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,QAAQ;YACrB,KAAK,EAAE,EAAE;SACV,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,OAAO,CAClB,WAAW,EACX,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,SAAS;YACtB,KAAK,EAAE,EAAE;SACV,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,OAAO,CAClB,WAAW,EACX,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,IAAI;YACjB,KAAK,EAAE,EAAE;SACV,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,OAAO,CAClB,SAAS,EACT,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,MAAM;YACnB,KAAK,EAAE,EAAE;SACV,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,OAAO;YACpB,KAAK,EAAE,EAAE;SACV,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,OAAO,CAClB,UAAU,EACV,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,QAAQ;YACrB,KAAK,EAAE,EAAE;SACV,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -15,11 +15,11 @@ export declare class CallstackModel implements IDebugger.Model.ICallstack {
|
|
|
15
15
|
/**
|
|
16
16
|
* Get the current frame.
|
|
17
17
|
*/
|
|
18
|
-
get frame(): IDebugger.IStackFrame;
|
|
18
|
+
get frame(): IDebugger.IStackFrame | null;
|
|
19
19
|
/**
|
|
20
20
|
* Set the current frame.
|
|
21
21
|
*/
|
|
22
|
-
set frame(frame: IDebugger.IStackFrame);
|
|
22
|
+
set frame(frame: IDebugger.IStackFrame | null);
|
|
23
23
|
/**
|
|
24
24
|
* Signal emitted when the frames have changed.
|
|
25
25
|
*/
|
|
@@ -27,7 +27,7 @@ export declare class CallstackModel implements IDebugger.Model.ICallstack {
|
|
|
27
27
|
/**
|
|
28
28
|
* Signal emitted when the current frame has changed.
|
|
29
29
|
*/
|
|
30
|
-
get currentFrameChanged(): ISignal<this, IDebugger.IStackFrame>;
|
|
30
|
+
get currentFrameChanged(): ISignal<this, IDebugger.IStackFrame | null>;
|
|
31
31
|
private _state;
|
|
32
32
|
private _currentFrame;
|
|
33
33
|
private _framesChanged;
|
|
@@ -7,6 +7,7 @@ import { Signal } from '@lumino/signaling';
|
|
|
7
7
|
export class CallstackModel {
|
|
8
8
|
constructor() {
|
|
9
9
|
this._state = [];
|
|
10
|
+
this._currentFrame = null;
|
|
10
11
|
this._framesChanged = new Signal(this);
|
|
11
12
|
this._currentFrameChanged = new Signal(this);
|
|
12
13
|
}
|
|
@@ -21,7 +22,8 @@ export class CallstackModel {
|
|
|
21
22
|
*/
|
|
22
23
|
set frames(newFrames) {
|
|
23
24
|
this._state = newFrames;
|
|
24
|
-
const
|
|
25
|
+
const currentFrameId = this.frame !== null ? Private.getFrameId(this.frame) : '';
|
|
26
|
+
const frame = newFrames.find(frame => Private.getFrameId(frame) === currentFrameId);
|
|
25
27
|
// Default to the first frame if the previous one can't be found.
|
|
26
28
|
// Otherwise keep the current frame selected.
|
|
27
29
|
if (!frame) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/panels/callstack/model.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIpD;;GAEG;AACH,MAAM,OAAO,cAAc;IAA3B;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/panels/callstack/model.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIpD;;GAEG;AACH,MAAM,OAAO,cAAc;IAA3B;QAuDU,WAAM,GAA4B,EAAE,CAAC;QACrC,kBAAa,GAAiC,IAAI,CAAC;QACnD,mBAAc,GAAG,IAAI,MAAM,CAAgC,IAAI,CAAC,CAAC;QACjE,yBAAoB,GAAG,IAAI,MAAM,CACvC,IAAI,CACL,CAAC;IACJ,CAAC;IA5DC;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,IAAI,MAAM,CAAC,SAAkC;QAC3C,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,MAAM,cAAc,GAClB,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAC1B,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,cAAc,CACtD,CAAC;QACF,iEAAiE;QACjE,6CAA6C;QAC7C,IAAI,CAAC,KAAK,EAAE;YACV,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;SAC3B;QACD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAI,KAAK,CAAC,KAAmC;QAC3C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,IAAI,mBAAmB;QACrB,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;CAQF;AAED;;GAEG;AACH,IAAU,OAAO,CAShB;AATD,WAAU,OAAO;IACf;;;;OAIG;IACH,SAAgB,UAAU,CAAC,KAA4B;;QACrD,OAAO,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAE,IAAI,IAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,EAAE,EAAE,CAAC;IAC/C,CAAC;IAFe,kBAAU,aAEzB,CAAA;AACH,CAAC,EATS,OAAO,KAAP,OAAO,QAShB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AccordionPanel, Title, Widget } from '@lumino/widgets';
|
|
2
|
+
/**
|
|
3
|
+
* Debugger accordion panel customization
|
|
4
|
+
*/
|
|
5
|
+
export declare namespace DebuggerAccordionPanel {
|
|
6
|
+
/**
|
|
7
|
+
* Custom renderer for the debugger sidebar
|
|
8
|
+
*/
|
|
9
|
+
class Renderer extends AccordionPanel.Renderer {
|
|
10
|
+
/**
|
|
11
|
+
* Render the collapse indicator for a section title.
|
|
12
|
+
*
|
|
13
|
+
* @param data - The data to use for rendering the section title.
|
|
14
|
+
*
|
|
15
|
+
* @returns A element representing the collapse indicator.
|
|
16
|
+
*/
|
|
17
|
+
createCollapseIcon(data: Title<Widget>): HTMLElement;
|
|
18
|
+
/**
|
|
19
|
+
* Render the element for a section title.
|
|
20
|
+
*
|
|
21
|
+
* @param data - The data to use for rendering the section title.
|
|
22
|
+
*
|
|
23
|
+
* @returns A element representing the section title.
|
|
24
|
+
*/
|
|
25
|
+
createSectionTitle(data: Title<Widget>): HTMLElement;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { AccordionPanel } from '@lumino/widgets';
|
|
4
|
+
import { caretDownIcon } from '@jupyterlab/ui-components';
|
|
5
|
+
/**
|
|
6
|
+
* Debugger accordion panel customization
|
|
7
|
+
*/
|
|
8
|
+
export var DebuggerAccordionPanel;
|
|
9
|
+
(function (DebuggerAccordionPanel) {
|
|
10
|
+
/**
|
|
11
|
+
* Custom renderer for the debugger sidebar
|
|
12
|
+
*/
|
|
13
|
+
class Renderer extends AccordionPanel.Renderer {
|
|
14
|
+
/**
|
|
15
|
+
* Render the collapse indicator for a section title.
|
|
16
|
+
*
|
|
17
|
+
* @param data - The data to use for rendering the section title.
|
|
18
|
+
*
|
|
19
|
+
* @returns A element representing the collapse indicator.
|
|
20
|
+
*/
|
|
21
|
+
createCollapseIcon(data) {
|
|
22
|
+
const iconDiv = document.createElement('div');
|
|
23
|
+
caretDownIcon.element({
|
|
24
|
+
container: iconDiv
|
|
25
|
+
});
|
|
26
|
+
return iconDiv;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Render the element for a section title.
|
|
30
|
+
*
|
|
31
|
+
* @param data - The data to use for rendering the section title.
|
|
32
|
+
*
|
|
33
|
+
* @returns A element representing the section title.
|
|
34
|
+
*/
|
|
35
|
+
createSectionTitle(data) {
|
|
36
|
+
const toolbar = data.owner.toolbar;
|
|
37
|
+
const handle = super.createSectionTitle(data);
|
|
38
|
+
handle.classList.add('jp-AccordionPanel-title');
|
|
39
|
+
if (toolbar) {
|
|
40
|
+
handle.appendChild(toolbar.node);
|
|
41
|
+
}
|
|
42
|
+
return handle;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
DebuggerAccordionPanel.Renderer = Renderer;
|
|
46
|
+
})(DebuggerAccordionPanel || (DebuggerAccordionPanel = {}));
|
|
47
|
+
//# sourceMappingURL=panelbody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelbody.js","sourceRoot":"","sources":["../../src/panels/panelbody.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D;;GAEG;AACH,MAAM,KAAW,sBAAsB,CAqCtC;AArCD,WAAiB,sBAAsB;IACrC;;OAEG;IACH,MAAa,QAAS,SAAQ,cAAc,CAAC,QAAQ;QACnD;;;;;;WAMG;QACH,kBAAkB,CAAC,IAAmB;YACpC,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC9C,aAAa,CAAC,OAAO,CAAC;gBACpB,SAAS,EAAE,OAAO;aACnB,CAAC,CAAC;YACH,OAAO,OAAO,CAAC;QACjB,CAAC;QAED;;;;;;WAMG;QACH,kBAAkB,CAAC,IAAmB;YACpC,MAAM,OAAO,GAAI,IAAI,CAAC,KAA0B,CAAC,OAAO,CAAC;YACzD,MAAM,MAAM,GAAG,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAC9C,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YAChD,IAAI,OAAO,EAAE;gBACX,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aAClC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF;IAhCY,+BAAQ,WAgCpB,CAAA;AACH,CAAC,EArCgB,sBAAsB,KAAtB,sBAAsB,QAqCtC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ITranslator, TranslationBundle } from '@jupyterlab/translation';
|
|
2
|
+
import { Toolbar } from '@jupyterlab/ui-components';
|
|
3
|
+
import { Message } from '@lumino/messaging';
|
|
4
|
+
import { Panel } from '@lumino/widgets';
|
|
5
|
+
/**
|
|
6
|
+
* A base class for debugger panel element.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PanelWithToolbar extends Panel {
|
|
9
|
+
/**
|
|
10
|
+
* Instantiate a new Panel.
|
|
11
|
+
*
|
|
12
|
+
* @param options The instantiation options for a Debugger Panel.
|
|
13
|
+
*/
|
|
14
|
+
constructor(options: PanelWithToolbar.IOptions);
|
|
15
|
+
/**
|
|
16
|
+
* Handler to notify `AccordionPanel` title that its child widget is expanded.
|
|
17
|
+
* We can not rely on `lm-mod-expanded` class of Lumino to detect this event
|
|
18
|
+
* since this class is added to the target of `onClick` event, which is not
|
|
19
|
+
* always the title of `AccordionPanel`.
|
|
20
|
+
*
|
|
21
|
+
* @param {Message} msg
|
|
22
|
+
*
|
|
23
|
+
* TODO remove when @lumino/widgets 1.26.3 is released
|
|
24
|
+
*/
|
|
25
|
+
protected onAfterShow(msg: Message): void;
|
|
26
|
+
/**
|
|
27
|
+
* Handler to notify `AccordionPanel`'s title that its child widget is closed.
|
|
28
|
+
* @param {Message} msg
|
|
29
|
+
*
|
|
30
|
+
* TODO remove when @lumino/widgets 1.26.3 is released
|
|
31
|
+
*/
|
|
32
|
+
protected onAfterHide(msg: Message): void;
|
|
33
|
+
/**
|
|
34
|
+
* Widget toolbar
|
|
35
|
+
*/
|
|
36
|
+
get toolbar(): Toolbar;
|
|
37
|
+
/**
|
|
38
|
+
* The toolbar widget, it is not attached to current widget
|
|
39
|
+
* but is rendered by the sidebar panel.
|
|
40
|
+
*/
|
|
41
|
+
private _toolbar;
|
|
42
|
+
protected trans: TranslationBundle;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A namespace for PanelWidget `statics`.
|
|
46
|
+
*/
|
|
47
|
+
export declare namespace PanelWithToolbar {
|
|
48
|
+
/**
|
|
49
|
+
* Instantiation options for `PanelWidget`.
|
|
50
|
+
*/
|
|
51
|
+
interface IOptions extends Panel.IOptions {
|
|
52
|
+
/**
|
|
53
|
+
* The application language translator.
|
|
54
|
+
*/
|
|
55
|
+
translator?: ITranslator;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { nullTranslator } from '@jupyterlab/translation';
|
|
4
|
+
import { Toolbar } from '@jupyterlab/ui-components';
|
|
5
|
+
import { Panel } from '@lumino/widgets';
|
|
6
|
+
/**
|
|
7
|
+
* A base class for debugger panel element.
|
|
8
|
+
*/
|
|
9
|
+
export class PanelWithToolbar extends Panel {
|
|
10
|
+
/**
|
|
11
|
+
* Instantiate a new Panel.
|
|
12
|
+
*
|
|
13
|
+
* @param options The instantiation options for a Debugger Panel.
|
|
14
|
+
*/
|
|
15
|
+
constructor(options) {
|
|
16
|
+
super(options);
|
|
17
|
+
const translator = options.translator || nullTranslator;
|
|
18
|
+
this.trans = translator.load('jupyterlab');
|
|
19
|
+
this._toolbar = new Toolbar();
|
|
20
|
+
this._toolbar.addClass('jp-stack-panel-header');
|
|
21
|
+
// Add toolbar as widget to get notified by the lumino widget
|
|
22
|
+
this.addWidget(this._toolbar);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Handler to notify `AccordionPanel` title that its child widget is expanded.
|
|
26
|
+
* We can not rely on `lm-mod-expanded` class of Lumino to detect this event
|
|
27
|
+
* since this class is added to the target of `onClick` event, which is not
|
|
28
|
+
* always the title of `AccordionPanel`.
|
|
29
|
+
*
|
|
30
|
+
* @param {Message} msg
|
|
31
|
+
*
|
|
32
|
+
* TODO remove when @lumino/widgets 1.26.3 is released
|
|
33
|
+
*/
|
|
34
|
+
onAfterShow(msg) {
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = this.toolbar.node.parentElement) === null || _a === void 0 ? void 0 : _a.classList.add('jp-DebuggerPanel-expanded');
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Handler to notify `AccordionPanel`'s title that its child widget is closed.
|
|
40
|
+
* @param {Message} msg
|
|
41
|
+
*
|
|
42
|
+
* TODO remove when @lumino/widgets 1.26.3 is released
|
|
43
|
+
*/
|
|
44
|
+
onAfterHide(msg) {
|
|
45
|
+
var _a;
|
|
46
|
+
(_a = this.toolbar.node.parentElement) === null || _a === void 0 ? void 0 : _a.classList.remove('jp-DebuggerPanel-expanded');
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Widget toolbar
|
|
50
|
+
*/
|
|
51
|
+
get toolbar() {
|
|
52
|
+
return this._toolbar;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=panelwithtoolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelwithtoolbar.js","sourceRoot":"","sources":["../../src/panels/panelwithtoolbar.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAEL,cAAc,EAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC;;;;OAIG;IACH,YAAY,OAAkC;QAC5C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,cAAc,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE3C,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;QAChD,6DAA6D;QAC7D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IAED;;;;;;;;;OASG;IACO,WAAW,CAAC,GAAY;;QAChC,MAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,0CAAE,SAAS,CAAC,GAAG,CAAC,2BAA2B,EAAE;IAC9E,CAAC;IAED;;;;;OAKG;IACO,WAAW,CAAC,GAAY;;QAChC,MAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,0CAAE,SAAS,CAAC,MAAM,CAC/C,2BAA2B,EAC3B;IACJ,CAAC;IAED;;OAEG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CASF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IEditorServices } from '@jupyterlab/codeeditor';
|
|
2
2
|
import { ITranslator } from '@jupyterlab/translation';
|
|
3
|
-
import { Panel } from '@lumino/widgets';
|
|
4
3
|
import { IDebugger } from '../../tokens';
|
|
4
|
+
import { PanelWithToolbar } from '../panelwithtoolbar';
|
|
5
5
|
/**
|
|
6
6
|
* A Panel that shows a preview of the source code while debugging.
|
|
7
7
|
*/
|
|
8
|
-
export declare class Sources extends
|
|
8
|
+
export declare class Sources extends PanelWithToolbar {
|
|
9
9
|
/**
|
|
10
10
|
* Instantiate a new Sources preview Panel.
|
|
11
11
|
*
|
|
@@ -2,39 +2,42 @@
|
|
|
2
2
|
| Copyright (c) Jupyter Development Team.
|
|
3
3
|
| Distributed under the terms of the Modified BSD License.
|
|
4
4
|
|----------------------------------------------------------------------------*/
|
|
5
|
-
import { nullTranslator } from '@jupyterlab/translation';
|
|
6
5
|
import { ToolbarButton } from '@jupyterlab/ui-components';
|
|
7
|
-
import { Panel } from '@lumino/widgets';
|
|
8
6
|
import { viewBreakpointIcon } from '../../icons';
|
|
7
|
+
import { SourcePathComponent } from './sourcepath';
|
|
9
8
|
import { SourcesBody } from './body';
|
|
10
|
-
import {
|
|
9
|
+
import { ReactWidget } from '@jupyterlab/ui-components';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { PanelWithToolbar } from '../panelwithtoolbar';
|
|
11
12
|
/**
|
|
12
13
|
* A Panel that shows a preview of the source code while debugging.
|
|
13
14
|
*/
|
|
14
|
-
export class Sources extends
|
|
15
|
+
export class Sources extends PanelWithToolbar {
|
|
15
16
|
/**
|
|
16
17
|
* Instantiate a new Sources preview Panel.
|
|
17
18
|
*
|
|
18
19
|
* @param options The Sources instantiation options.
|
|
19
20
|
*/
|
|
20
21
|
constructor(options) {
|
|
21
|
-
super();
|
|
22
|
+
super(options);
|
|
22
23
|
const { model, service, editorServices } = options;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const header = new SourcesHeader(model, translator);
|
|
24
|
+
this.title.label = this.trans.__('Source');
|
|
25
|
+
this.toolbar.addClass('jp-DebuggerSources-header');
|
|
26
26
|
const body = new SourcesBody({
|
|
27
27
|
service,
|
|
28
28
|
model,
|
|
29
29
|
editorServices
|
|
30
30
|
});
|
|
31
|
-
|
|
31
|
+
this.toolbar.addItem('open', new ToolbarButton({
|
|
32
32
|
icon: viewBreakpointIcon,
|
|
33
33
|
onClick: () => model.open(),
|
|
34
|
-
tooltip: trans.__('Open in the Main Area')
|
|
34
|
+
tooltip: this.trans.__('Open in the Main Area')
|
|
35
35
|
}));
|
|
36
|
-
|
|
36
|
+
const sourcePath = ReactWidget.create(React.createElement(SourcePathComponent, { model: model }));
|
|
37
|
+
this.toolbar.addItem('sourcePath', sourcePath);
|
|
38
|
+
this.addClass('jp-DebuggerSources-header');
|
|
37
39
|
this.addWidget(body);
|
|
40
|
+
this.addClass('jp-DebuggerSources');
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/sources/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/sources/index.tsx"],"names":[],"mappings":"AAAA;;;+EAG+E;AAI/E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,gBAAgB;IAC3C;;;;OAIG;IACH,YAAY,OAAyB;QACnC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;QACnD,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;QAE3C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;QACnD,MAAM,IAAI,GAAG,IAAI,WAAW,CAAC;YAC3B,OAAO;YACP,KAAK;YACL,cAAc;SACf,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,OAAO,CAClB,MAAM,EACN,IAAI,aAAa,CAAC;YAChB,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,GAAS,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE;YACjC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC;SAChD,CAAC,CACH,CAAC;QACF,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CACnC,oBAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,GAAI,CACtC,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;CACF"}
|
|
@@ -13,7 +13,7 @@ export declare class SourcesModel implements IDebugger.Model.ISources {
|
|
|
13
13
|
/**
|
|
14
14
|
* Signal emitted when the current frame changes.
|
|
15
15
|
*/
|
|
16
|
-
readonly currentFrameChanged: ISignal<IDebugger.Model.ICallstack, IDebugger.IStackFrame>;
|
|
16
|
+
readonly currentFrameChanged: ISignal<IDebugger.Model.ICallstack, IDebugger.IStackFrame | null>;
|
|
17
17
|
/**
|
|
18
18
|
* Signal emitted when a source should be open in the main area.
|
|
19
19
|
*/
|
|
@@ -51,6 +51,6 @@ export declare namespace SourcesModel {
|
|
|
51
51
|
/**
|
|
52
52
|
* Signal emitted when the current frame changes.
|
|
53
53
|
*/
|
|
54
|
-
currentFrameChanged: ISignal<IDebugger.Model.ICallstack, IDebugger.IStackFrame>;
|
|
54
|
+
currentFrameChanged: ISignal<IDebugger.Model.ICallstack, IDebugger.IStackFrame | null>;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IDebugger } from '../../tokens';
|
|
3
|
+
/**
|
|
4
|
+
* A React component to display the path to a source.
|
|
5
|
+
*
|
|
6
|
+
* @param {object} props The component props.
|
|
7
|
+
* @param props.model The model for the sources.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SourcePathComponent: ({ model }: {
|
|
10
|
+
model: IDebugger.Model.ISources;
|
|
11
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { UseSignal } from '@jupyterlab/ui-components';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* A React component to display the path to a source.
|
|
7
|
+
*
|
|
8
|
+
* @param {object} props The component props.
|
|
9
|
+
* @param props.model The model for the sources.
|
|
10
|
+
*/
|
|
11
|
+
export const SourcePathComponent = ({ model }) => {
|
|
12
|
+
return (React.createElement(UseSignal, { signal: model.currentSourceChanged, initialSender: model }, (model) => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
return (React.createElement("span", { onClick: () => model === null || model === void 0 ? void 0 : model.open() }, (_b = (_a = model === null || model === void 0 ? void 0 : model.currentSource) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : ''));
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=sourcepath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourcepath.js","sourceRoot":"","sources":["../../../src/panels/sources/sourcepath.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,KAAK,EAGN,EAAe,EAAE;IAChB,OAAO,CACL,oBAAC,SAAS,IAAC,MAAM,EAAE,KAAK,CAAC,oBAAoB,EAAE,aAAa,EAAE,KAAK,IAChE,CAAC,KAAK,EAAe,EAAE;;QAAC,OAAA,CACvB,8BAAM,OAAO,EAAE,GAAS,EAAE,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,gBACrC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,0CAAE,IAAI,mCAAI,EAAE,CAC5B,CACR,CAAA;KAAA,CACS,CACb,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { IThemeManager } from '@jupyterlab/apputils';
|
|
|
2
2
|
import { CommandRegistry } from '@lumino/commands';
|
|
3
3
|
import { Panel } from '@lumino/widgets';
|
|
4
4
|
import { IDebugger } from '../../tokens';
|
|
5
|
+
import { ITranslator } from '@jupyterlab/translation';
|
|
5
6
|
/**
|
|
6
7
|
* A data grid that displays variables in a debugger session.
|
|
7
8
|
*/
|
|
@@ -12,6 +13,10 @@ export declare class VariablesBodyGrid extends Panel {
|
|
|
12
13
|
* @param options The instantiation options for a VariablesBodyGrid.
|
|
13
14
|
*/
|
|
14
15
|
constructor(options: VariablesBodyGrid.IOptions);
|
|
16
|
+
/**
|
|
17
|
+
* Get the latest hit variable
|
|
18
|
+
*/
|
|
19
|
+
get latestSelection(): IDebugger.IVariableSelection | null;
|
|
15
20
|
/**
|
|
16
21
|
* Set the variable filter list.
|
|
17
22
|
*
|
|
@@ -55,5 +60,9 @@ export declare namespace VariablesBodyGrid {
|
|
|
55
60
|
* An optional application theme manager to detect theme changes.
|
|
56
61
|
*/
|
|
57
62
|
themeManager?: IThemeManager | null;
|
|
63
|
+
/**
|
|
64
|
+
* The application language translator.
|
|
65
|
+
*/
|
|
66
|
+
translator?: ITranslator;
|
|
58
67
|
}
|
|
59
68
|
}
|