@jupyterlab/debugger 3.3.0-alpha.9 → 3.3.0
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/debugger.d.ts +2 -1
- package/lib/debugger.js +3 -2
- package/lib/debugger.js.map +1 -1
- package/lib/handler.d.ts +1 -1
- package/lib/handler.js +16 -5
- package/lib/handler.js.map +1 -1
- package/lib/handlers/editor.d.ts +8 -0
- package/lib/handlers/editor.js +12 -0
- package/lib/handlers/editor.js.map +1 -1
- package/lib/handlers/file.d.ts +1 -0
- package/lib/handlers/file.js +6 -1
- package/lib/handlers/file.js.map +1 -1
- package/lib/handlers/notebook.js +12 -2
- package/lib/handlers/notebook.js.map +1 -1
- package/lib/icons.d.ts +2 -0
- package/lib/icons.js +10 -0
- package/lib/icons.js.map +1 -1
- package/lib/model.d.ts +5 -0
- package/lib/model.js +3 -0
- package/lib/model.js.map +1 -1
- package/lib/panels/breakpoints/body.d.ts +1 -1
- package/lib/panels/breakpoints/body.js +1 -1
- package/lib/panels/breakpoints/body.js.map +1 -1
- package/lib/panels/breakpoints/header.d.ts +1 -1
- package/lib/panels/breakpoints/header.js +1 -1
- package/lib/panels/breakpoints/header.js.map +1 -1
- package/lib/panels/breakpoints/index.d.ts +18 -0
- package/lib/panels/breakpoints/index.js +11 -5
- package/lib/panels/breakpoints/index.js.map +1 -1
- package/lib/panels/callstack/body.d.ts +1 -1
- package/lib/panels/callstack/body.js +2 -2
- package/lib/panels/callstack/body.js.map +1 -1
- package/lib/panels/callstack/header.d.ts +1 -1
- package/lib/panels/callstack/header.js +1 -1
- package/lib/panels/callstack/header.js.map +1 -1
- package/lib/panels/callstack/index.js +1 -1
- package/lib/panels/callstack/index.js.map +1 -1
- package/lib/panels/kernelSources/body.d.ts +47 -0
- package/lib/panels/kernelSources/body.js +86 -0
- package/lib/panels/kernelSources/body.js.map +1 -0
- package/lib/panels/kernelSources/filter.d.ts +12 -0
- package/lib/panels/kernelSources/filter.js +19 -0
- package/lib/panels/kernelSources/filter.js.map +1 -0
- package/lib/panels/kernelSources/header.d.ts +19 -0
- package/lib/panels/kernelSources/header.js +33 -0
- package/lib/panels/kernelSources/header.js.map +1 -0
- package/lib/panels/kernelSources/index.d.ts +39 -0
- package/lib/panels/kernelSources/index.js +59 -0
- package/lib/panels/kernelSources/index.js.map +1 -0
- package/lib/panels/kernelSources/model.d.ts +64 -0
- package/lib/panels/kernelSources/model.js +102 -0
- package/lib/panels/kernelSources/model.js.map +1 -0
- package/lib/panels/sources/header.d.ts +1 -1
- package/lib/panels/sources/header.js +1 -1
- package/lib/panels/sources/header.js.map +1 -1
- package/lib/panels/sources/index.js +1 -1
- package/lib/panels/sources/index.js.map +1 -1
- package/lib/panels/variables/grid.d.ts +0 -9
- package/lib/panels/variables/grid.js +11 -30
- package/lib/panels/variables/grid.js.map +1 -1
- package/lib/panels/variables/header.d.ts +1 -1
- package/lib/panels/variables/header.js +1 -1
- package/lib/panels/variables/header.js.map +1 -1
- package/lib/panels/variables/index.d.ts +1 -9
- package/lib/panels/variables/index.js +4 -22
- package/lib/panels/variables/index.js.map +1 -1
- package/lib/panels/variables/mimerenderer.d.ts +15 -2
- package/lib/panels/variables/mimerenderer.js +48 -17
- package/lib/panels/variables/mimerenderer.js.map +1 -1
- package/lib/panels/variables/model.d.ts +3 -0
- package/lib/panels/variables/model.js +7 -0
- package/lib/panels/variables/model.js.map +1 -1
- package/lib/panels/variables/scope.d.ts +1 -1
- package/lib/panels/variables/scope.js +2 -1
- package/lib/panels/variables/scope.js.map +1 -1
- package/lib/panels/variables/tree.d.ts +2 -6
- package/lib/panels/variables/tree.js +13 -11
- package/lib/panels/variables/tree.js.map +1 -1
- package/lib/service.d.ts +17 -7
- package/lib/service.js +99 -15
- package/lib/service.js.map +1 -1
- package/lib/session.d.ts +23 -1
- package/lib/session.js +39 -5
- package/lib/session.js.map +1 -1
- package/lib/sidebar.d.ts +9 -0
- package/lib/sidebar.js +9 -1
- package/lib/sidebar.js.map +1 -1
- package/lib/tokens.d.ts +93 -25
- package/lib/tokens.js.map +1 -1
- package/package.json +22 -21
- package/style/base.css +1 -0
- package/style/icons/open-kernel-source.svg +6 -0
- package/style/icons/pause.svg +6 -0
- package/style/icons.css +14 -6
- package/style/kernelSources.css +42 -0
- package/style/variables.css +14 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import {
|
|
4
|
-
import { ReactWidget } from '@jupyterlab/ui-components';
|
|
3
|
+
import { ReactWidget } from '@jupyterlab/apputils';
|
|
5
4
|
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import { PathExt } from '@jupyterlab/coreutils';
|
|
6
6
|
/**
|
|
7
7
|
* The body for a Callstack Panel.
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../src/panels/callstack/body.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../src/panels/callstack/body.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIhD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;OAIG;IACH,YAAY,KAAiC;QAC3C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,oBAAC,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Q,CAAC,CAAC;QAC/C,OAAO,GAAG,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,gCACG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;;QAAC,OAAA,CACjB,4BACE,GAAG,EAAE,GAAG,CAAC,EAAE,EACX,OAAO,EAAE,GAAS,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EACpC,SAAS,EACP,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,EAAE,MAAK,GAAG,CAAC,EAAE;gBACrB,CAAC,CAAC,oCAAoC;gBACtC,CAAC,CAAC,2BAA2B;YAGjC,8BAAM,SAAS,EAAE,gCAAgC,IAAG,GAAG,CAAC,IAAI,CAAQ;YACpE,8BACE,SAAS,EAAE,oCAAoC,EAC/C,KAAK,QAAE,GAAG,CAAC,MAAM,0CAAE,IAAI,IAEtB,eAAe,CAAC,GAAG,CAAC,CAChB,CACJ,CACN,CAAA;KAAA,CAAC,CACC,CACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { Toolbar } from '@jupyterlab/apputils';
|
|
3
4
|
import { nullTranslator } from '@jupyterlab/translation';
|
|
4
|
-
import { Toolbar } from '@jupyterlab/ui-components';
|
|
5
5
|
import { PanelLayout, Widget } from '@lumino/widgets';
|
|
6
6
|
/**
|
|
7
7
|
* The header for a Callstack Panel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/panels/callstack/header.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/panels/callstack/header.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAe,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,MAAM;IACzC;;OAEG;IACH,YAAY,UAAwB;QAClC,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAejD;;WAEG;QACM,YAAO,GAAG,IAAI,OAAO,EAAE,CAAC;QAjB/B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QAEjD,UAAU,GAAG,UAAU,IAAI,cAAc,CAAC;QAC1C,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE5C,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjE,KAAK,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;QAE/C,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QACjC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACxB,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CAMF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { CommandToolbarButton } from '@jupyterlab/apputils';
|
|
3
4
|
import { nullTranslator } from '@jupyterlab/translation';
|
|
4
|
-
import { CommandToolbarButton } from '@jupyterlab/ui-components';
|
|
5
5
|
import { Panel } from '@lumino/widgets';
|
|
6
6
|
import { CallstackBody } from './body';
|
|
7
7
|
import { CallstackHeader } from './header';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/callstack/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/callstack/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAe,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAItE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAClC;;;;OAIG;IACH,YAAY,OAA2B;QACrC,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QACpC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,cAAc,CAAC;QACxD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC;QAC/C,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;QAEtC,MAAM,CAAC,OAAO,CAAC,OAAO,CACpB,UAAU,EACV,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,QAAQ;SACtB,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,OAAO,CACpB,WAAW,EACX,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,SAAS;SACvB,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,OAAO,CACpB,WAAW,EACX,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,IAAI;SAClB,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,OAAO,CACpB,SAAS,EACT,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,MAAM;SACpB,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,OAAO,CACpB,UAAU,EACV,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,OAAO;SACrB,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,OAAO,CACpB,UAAU,EACV,IAAI,oBAAoB,CAAC;YACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,EAAE,EAAE,QAAQ,CAAC,QAAQ;SACtB,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAErB,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ITranslator } from '@jupyterlab/translation';
|
|
2
|
+
import { Widget } from '@lumino/widgets';
|
|
3
|
+
import { IDebugger } from '../../tokens';
|
|
4
|
+
/**
|
|
5
|
+
* The body for a Sources Panel.
|
|
6
|
+
*/
|
|
7
|
+
export declare class KernelSourcesBody extends Widget {
|
|
8
|
+
/**
|
|
9
|
+
* Instantiate a new Body for the KernelSourcesBody widget.
|
|
10
|
+
*
|
|
11
|
+
* @param options The instantiation options for a KernelSourcesBody.
|
|
12
|
+
*/
|
|
13
|
+
constructor(options: KernelSourcesBody.IOptions);
|
|
14
|
+
/**
|
|
15
|
+
* Show or hide the filter box.
|
|
16
|
+
*/
|
|
17
|
+
toggleFilterbox(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Clear the content of the kernel source read-only editor.
|
|
20
|
+
*/
|
|
21
|
+
private _clear;
|
|
22
|
+
private _model;
|
|
23
|
+
private _kernelSourcesFilter;
|
|
24
|
+
private _debuggerService;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A namespace for SourcesBody `statics`.
|
|
28
|
+
*/
|
|
29
|
+
export declare namespace KernelSourcesBody {
|
|
30
|
+
/**
|
|
31
|
+
* Instantiation options for `Breakpoints`.
|
|
32
|
+
*/
|
|
33
|
+
interface IOptions {
|
|
34
|
+
/**
|
|
35
|
+
* The debug service.
|
|
36
|
+
*/
|
|
37
|
+
service: IDebugger;
|
|
38
|
+
/**
|
|
39
|
+
* The sources model.
|
|
40
|
+
*/
|
|
41
|
+
model: IDebugger.Model.IKernelSources;
|
|
42
|
+
/**
|
|
43
|
+
* The application language translator
|
|
44
|
+
*/
|
|
45
|
+
translator?: ITranslator;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { openKernelSourceIcon } from '../../icons';
|
|
4
|
+
import { ToolbarButton } from '@jupyterlab/apputils';
|
|
5
|
+
import { showErrorMessage } from '@jupyterlab/apputils';
|
|
6
|
+
import { nullTranslator } from '@jupyterlab/translation';
|
|
7
|
+
import { PanelLayout, Widget } from '@lumino/widgets';
|
|
8
|
+
import { KernelSourcesFilter } from './filter';
|
|
9
|
+
/**
|
|
10
|
+
* The class name added to the filterbox node.
|
|
11
|
+
*/
|
|
12
|
+
const FILTERBOX_CLASS = 'jp-DebuggerKernelSource-filterBox';
|
|
13
|
+
/**
|
|
14
|
+
* The class name added to hide the filterbox node.
|
|
15
|
+
*/
|
|
16
|
+
const FILTERBOX_HIDDEN_CLASS = 'jp-DebuggerKernelSource-filterBox-hidden';
|
|
17
|
+
/**
|
|
18
|
+
* The body for a Sources Panel.
|
|
19
|
+
*/
|
|
20
|
+
export class KernelSourcesBody extends Widget {
|
|
21
|
+
/**
|
|
22
|
+
* Instantiate a new Body for the KernelSourcesBody widget.
|
|
23
|
+
*
|
|
24
|
+
* @param options The instantiation options for a KernelSourcesBody.
|
|
25
|
+
*/
|
|
26
|
+
constructor(options) {
|
|
27
|
+
var _a;
|
|
28
|
+
super();
|
|
29
|
+
this._model = options.model;
|
|
30
|
+
this._debuggerService = options.service;
|
|
31
|
+
const trans = ((_a = options.translator) !== null && _a !== void 0 ? _a : nullTranslator).load('jupyterlab');
|
|
32
|
+
this.layout = new PanelLayout();
|
|
33
|
+
this.addClass('jp-DebuggerKernelSources-body');
|
|
34
|
+
this._kernelSourcesFilter = KernelSourcesFilter({
|
|
35
|
+
model: this._model
|
|
36
|
+
});
|
|
37
|
+
this._kernelSourcesFilter.addClass(FILTERBOX_CLASS);
|
|
38
|
+
this._kernelSourcesFilter.addClass(FILTERBOX_HIDDEN_CLASS);
|
|
39
|
+
this.layout.addWidget(this._kernelSourcesFilter);
|
|
40
|
+
this._model.changed.connect((_, kernelSources) => {
|
|
41
|
+
this._clear();
|
|
42
|
+
if (kernelSources) {
|
|
43
|
+
kernelSources.forEach(module => {
|
|
44
|
+
const name = module.name;
|
|
45
|
+
const path = module.path;
|
|
46
|
+
const button = new ToolbarButton({
|
|
47
|
+
icon: openKernelSourceIcon,
|
|
48
|
+
label: name,
|
|
49
|
+
tooltip: path
|
|
50
|
+
});
|
|
51
|
+
button.node.addEventListener('dblclick', () => {
|
|
52
|
+
this._debuggerService
|
|
53
|
+
.getSource({
|
|
54
|
+
sourceReference: 0,
|
|
55
|
+
path: path
|
|
56
|
+
})
|
|
57
|
+
.then(source => {
|
|
58
|
+
this._model.open(source);
|
|
59
|
+
})
|
|
60
|
+
.catch(reason => {
|
|
61
|
+
void showErrorMessage(trans.__('Fail to get source'), trans.__("Fail to get '%1' source:\n%2", path, reason));
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
this.layout.addWidget(button);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Show or hide the filter box.
|
|
71
|
+
*/
|
|
72
|
+
toggleFilterbox() {
|
|
73
|
+
this._kernelSourcesFilter.node.classList.contains(FILTERBOX_HIDDEN_CLASS)
|
|
74
|
+
? this._kernelSourcesFilter.node.classList.remove(FILTERBOX_HIDDEN_CLASS)
|
|
75
|
+
: this._kernelSourcesFilter.node.classList.add(FILTERBOX_HIDDEN_CLASS);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Clear the content of the kernel source read-only editor.
|
|
79
|
+
*/
|
|
80
|
+
_clear() {
|
|
81
|
+
while (this.layout.widgets.length > 1) {
|
|
82
|
+
this.layout.removeWidgetAt(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../src/panels/kernelSources/body.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAe,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAe,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MA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@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactWidget } from '@jupyterlab/apputils';
|
|
2
|
+
import { IDebugger } from '../../tokens';
|
|
3
|
+
/**
|
|
4
|
+
* The class name added to the filebrowser crumbs node.
|
|
5
|
+
*/
|
|
6
|
+
export interface IFilterBoxProps {
|
|
7
|
+
model: IDebugger.Model.IKernelSources;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A widget which hosts a input textbox to filter on file names.
|
|
11
|
+
*/
|
|
12
|
+
export declare const KernelSourcesFilter: (props: IFilterBoxProps) => ReactWidget;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { ReactWidget, UseSignal } from '@jupyterlab/apputils';
|
|
4
|
+
import { InputGroup } from '@jupyterlab/ui-components';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
const FilterBox = (props) => {
|
|
7
|
+
const onFilterChange = (e) => {
|
|
8
|
+
const filter = e.target.value;
|
|
9
|
+
props.model.filter = filter;
|
|
10
|
+
};
|
|
11
|
+
return (React.createElement(InputGroup, { type: "text", onChange: onFilterChange, placeholder: "Filter the kernel sources", value: props.model.filter }));
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A widget which hosts a input textbox to filter on file names.
|
|
15
|
+
*/
|
|
16
|
+
export const KernelSourcesFilter = (props) => {
|
|
17
|
+
return ReactWidget.create(React.createElement(UseSignal, { signal: props.model.filterChanged, initialArgs: props.model.filter }, model => React.createElement(FilterBox, { model: props.model })));
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../src/panels/kernelSources/filter.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,SAAS,GAAG,CAAC,KAAsB,EAAE,EAAE;IAC3C,MAAM,cAAc,GAAG,CAAC,CAAM,EAAE,EAAE;QAChC,MAAM,MAAM,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC;QACpD,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAC9B,CAAC,CAAC;IACF,OAAO,CACL,oBAAC,UAAU,IACT,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAC,2BAA2B,EACvC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GACzB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAsB,EAAe,EAAE;IACzE,OAAO,WAAW,CAAC,MAAM,CACvB,oBAAC,SAAS,IACR,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa,EACjC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,IAE9B,KAAK,CAAC,EAAE,CAAC,oBAAC,SAAS,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,CACjC,CACb,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Toolbar } from '@jupyterlab/apputils';
|
|
2
|
+
import { ITranslator } from '@jupyterlab/translation';
|
|
3
|
+
import { Widget } from '@lumino/widgets';
|
|
4
|
+
import { IDebugger } from '../../tokens';
|
|
5
|
+
/**
|
|
6
|
+
* The header for a Kernel Source Panel.
|
|
7
|
+
*/
|
|
8
|
+
export declare class KernelSourcesHeader extends Widget {
|
|
9
|
+
/**
|
|
10
|
+
* Instantiate a new SourcesHeader.
|
|
11
|
+
*
|
|
12
|
+
* @param model The model for the Sources.
|
|
13
|
+
*/
|
|
14
|
+
constructor(model: IDebugger.Model.IKernelSources, translator?: ITranslator);
|
|
15
|
+
/**
|
|
16
|
+
* The toolbar for the sources header.
|
|
17
|
+
*/
|
|
18
|
+
readonly toolbar: Toolbar<Widget>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { Toolbar } from '@jupyterlab/apputils';
|
|
4
|
+
import { nullTranslator } from '@jupyterlab/translation';
|
|
5
|
+
import { PanelLayout, Widget } from '@lumino/widgets';
|
|
6
|
+
/**
|
|
7
|
+
* The header for a Kernel Source Panel.
|
|
8
|
+
*/
|
|
9
|
+
export class KernelSourcesHeader extends Widget {
|
|
10
|
+
/**
|
|
11
|
+
* Instantiate a new SourcesHeader.
|
|
12
|
+
*
|
|
13
|
+
* @param model The model for the Sources.
|
|
14
|
+
*/
|
|
15
|
+
constructor(model, translator) {
|
|
16
|
+
super({ node: document.createElement('div') });
|
|
17
|
+
/**
|
|
18
|
+
* The toolbar for the sources header.
|
|
19
|
+
*/
|
|
20
|
+
this.toolbar = new Toolbar();
|
|
21
|
+
this.node.classList.add('jp-stack-panel-header');
|
|
22
|
+
translator = translator || nullTranslator;
|
|
23
|
+
const trans = translator.load('jupyterlab');
|
|
24
|
+
const layout = new PanelLayout();
|
|
25
|
+
this.layout = layout;
|
|
26
|
+
const title = new Widget({ node: document.createElement('h2') });
|
|
27
|
+
title.node.textContent = trans.__('Kernel Sources');
|
|
28
|
+
layout.addWidget(title);
|
|
29
|
+
layout.addWidget(this.toolbar);
|
|
30
|
+
this.addClass('jp-DebuggerSources-header');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/panels/kernelSources/header.tsx"],"names":[],"mappings":"AAAA,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';
|
|
4
|
+
/**
|
|
5
|
+
* A Panel that shows a preview of the source code while debugging.
|
|
6
|
+
*/
|
|
7
|
+
export declare class KernelSources extends Panel {
|
|
8
|
+
/**
|
|
9
|
+
* Instantiate a new Sources preview Panel.
|
|
10
|
+
*
|
|
11
|
+
* @param options The Sources instantiation options.
|
|
12
|
+
*/
|
|
13
|
+
constructor(options: KernelSources.IOptions);
|
|
14
|
+
set filter(filter: string);
|
|
15
|
+
private _model;
|
|
16
|
+
private _body;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A namespace for `Sources` statics.
|
|
20
|
+
*/
|
|
21
|
+
export declare namespace KernelSources {
|
|
22
|
+
/**
|
|
23
|
+
* The options used to create a Sources.
|
|
24
|
+
*/
|
|
25
|
+
interface IOptions {
|
|
26
|
+
/**
|
|
27
|
+
* The debugger service.
|
|
28
|
+
*/
|
|
29
|
+
service: IDebugger;
|
|
30
|
+
/**
|
|
31
|
+
* The model for the sources.
|
|
32
|
+
*/
|
|
33
|
+
model: IDebugger.Model.IKernelSources;
|
|
34
|
+
/**
|
|
35
|
+
* The application language translator
|
|
36
|
+
*/
|
|
37
|
+
translator?: ITranslator;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { nullTranslator } from '@jupyterlab/translation';
|
|
4
|
+
import { showErrorMessage } from '@jupyterlab/apputils';
|
|
5
|
+
import { ToolbarButton } from '@jupyterlab/apputils';
|
|
6
|
+
import { refreshIcon, searchIcon } from '@jupyterlab/ui-components';
|
|
7
|
+
import { Panel } from '@lumino/widgets';
|
|
8
|
+
import { KernelSourcesBody } from './body';
|
|
9
|
+
import { KernelSourcesHeader } from './header';
|
|
10
|
+
/**
|
|
11
|
+
* A Panel that shows a preview of the source code while debugging.
|
|
12
|
+
*/
|
|
13
|
+
export class KernelSources extends Panel {
|
|
14
|
+
/**
|
|
15
|
+
* Instantiate a new Sources preview Panel.
|
|
16
|
+
*
|
|
17
|
+
* @param options The Sources instantiation options.
|
|
18
|
+
*/
|
|
19
|
+
constructor(options) {
|
|
20
|
+
var _a;
|
|
21
|
+
super();
|
|
22
|
+
const { model, service } = options;
|
|
23
|
+
this._model = model;
|
|
24
|
+
const trans = ((_a = options.translator) !== null && _a !== void 0 ? _a : nullTranslator).load('jupyterlab');
|
|
25
|
+
this.title.label = trans.__('Kernel Sources');
|
|
26
|
+
const header = new KernelSourcesHeader(model, options.translator);
|
|
27
|
+
header.addClass('jp-DebuggerKernelSources-header');
|
|
28
|
+
this._body = new KernelSourcesBody({
|
|
29
|
+
service,
|
|
30
|
+
model,
|
|
31
|
+
translator: options.translator
|
|
32
|
+
});
|
|
33
|
+
header.toolbar.addItem('open-filter', new ToolbarButton({
|
|
34
|
+
icon: searchIcon,
|
|
35
|
+
onClick: async () => {
|
|
36
|
+
this._body.toggleFilterbox();
|
|
37
|
+
},
|
|
38
|
+
tooltip: trans.__('Toggle search filter')
|
|
39
|
+
}));
|
|
40
|
+
header.toolbar.addItem('refresh', new ToolbarButton({
|
|
41
|
+
icon: refreshIcon,
|
|
42
|
+
onClick: () => {
|
|
43
|
+
this._model.kernelSources = [];
|
|
44
|
+
void service.displayModules().catch(reason => {
|
|
45
|
+
void showErrorMessage(trans.__('Fail to get kernel sources'), trans.__('Fail to get kernel sources:\n%2', reason));
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
tooltip: trans.__('Refresh kernel sources')
|
|
49
|
+
}));
|
|
50
|
+
this.addClass('jp-DebuggerKernelSources-header');
|
|
51
|
+
this.addClass('jp-DebuggerKernelSources');
|
|
52
|
+
this.addWidget(header);
|
|
53
|
+
this.addWidget(this._body);
|
|
54
|
+
}
|
|
55
|
+
set filter(filter) {
|
|
56
|
+
this._model.filter = filter;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
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AI,aAAa,CAAC;YAChB,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,KAAK,IAAmB,EAAE;gBACjC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;YAC/B,CAAC;YACD,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAAC;SAC1C,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,OAAO,CACpB,SAAS,EACT,IAAI,aAAa,CAAC;YAChB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,CAAC,aAAa,GAAG,EAAE,CAAC;gBAC/B,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;oBAC3C,KAAK,gBAAgB,CACnB,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAAC,EACtC,KAAK,CAAC,EAAE,CAAC,iCAAiC,EAAE,MAAM,CAAC,CACpD,CAAC;gBACJ,CAAC,CAAC,CAAC;YACL,CAAC;YACD,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAAC;SAC5C,CAAC,CACH,CAAC;QAEF,IAAI,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC;QAE1C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,IAAW,MAAM,CAAC,MAAc;QAC9B,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IAC9B,CAAC;CAIF"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ISignal } from '@lumino/signaling';
|
|
2
|
+
import { IDebugger } from '../../tokens';
|
|
3
|
+
/**
|
|
4
|
+
* The model to keep track of the current source being displayed.
|
|
5
|
+
*/
|
|
6
|
+
export declare class KernelSourcesModel implements IDebugger.Model.IKernelSources {
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Get the filter.
|
|
10
|
+
*/
|
|
11
|
+
get filter(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Set the filter.
|
|
14
|
+
* The update
|
|
15
|
+
*/
|
|
16
|
+
set filter(filter: string);
|
|
17
|
+
/**
|
|
18
|
+
* Get the kernel sources.
|
|
19
|
+
*/
|
|
20
|
+
get kernelSources(): IDebugger.KernelSource[] | null;
|
|
21
|
+
/**
|
|
22
|
+
* Set the kernel sources and emit a changed signal.
|
|
23
|
+
*/
|
|
24
|
+
set kernelSources(kernelSources: IDebugger.KernelSource[] | null);
|
|
25
|
+
/**
|
|
26
|
+
* Signal emitted when the current source changes.
|
|
27
|
+
*/
|
|
28
|
+
get changed(): ISignal<this, IDebugger.KernelSource[] | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Signal emitted when the current source changes.
|
|
31
|
+
*/
|
|
32
|
+
get filterChanged(): ISignal<this, string>;
|
|
33
|
+
/**
|
|
34
|
+
* Signal emitted when a kernel source should be open in the main area.
|
|
35
|
+
*/
|
|
36
|
+
get kernelSourceOpened(): ISignal<this, IDebugger.Source | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Open a source in the main area.
|
|
39
|
+
*/
|
|
40
|
+
open(kernelSource: IDebugger.Source): void;
|
|
41
|
+
private getFilteredKernelSources;
|
|
42
|
+
private refresh;
|
|
43
|
+
private _kernelSources;
|
|
44
|
+
private _filteredKernelSources;
|
|
45
|
+
private _filter;
|
|
46
|
+
private _refreshDebouncer;
|
|
47
|
+
private _changed;
|
|
48
|
+
private _filterChanged;
|
|
49
|
+
private _kernelSourceOpened;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A namespace for SourcesModel `statics`.
|
|
53
|
+
*/
|
|
54
|
+
export declare namespace KernelSourcesModel {
|
|
55
|
+
/**
|
|
56
|
+
* The options used to initialize a SourcesModel object.
|
|
57
|
+
*/
|
|
58
|
+
interface IOptions {
|
|
59
|
+
/**
|
|
60
|
+
* Signal emitted when the current frame changes.
|
|
61
|
+
*/
|
|
62
|
+
currentFrameChanged: ISignal<IDebugger.Model.ICallstack, IDebugger.IStackFrame | null>;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { Signal } from '@lumino/signaling';
|
|
4
|
+
import { Debouncer } from '@lumino/polling';
|
|
5
|
+
/**
|
|
6
|
+
* The rate limit for the filter debouncer
|
|
7
|
+
*/
|
|
8
|
+
const DEBOUNCER_RATE_LIMIT_MS = 500;
|
|
9
|
+
const compare = (a, b) => {
|
|
10
|
+
if (a.name < b.name) {
|
|
11
|
+
return -1;
|
|
12
|
+
}
|
|
13
|
+
if (a.name > b.name) {
|
|
14
|
+
return 1;
|
|
15
|
+
}
|
|
16
|
+
return 0;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The model to keep track of the current source being displayed.
|
|
20
|
+
*/
|
|
21
|
+
export class KernelSourcesModel {
|
|
22
|
+
constructor() {
|
|
23
|
+
this._kernelSources = null;
|
|
24
|
+
this._filteredKernelSources = null;
|
|
25
|
+
this._filter = '';
|
|
26
|
+
this._changed = new Signal(this);
|
|
27
|
+
this._filterChanged = new Signal(this);
|
|
28
|
+
this._kernelSourceOpened = new Signal(this);
|
|
29
|
+
this.refresh = this.refresh.bind(this);
|
|
30
|
+
this._refreshDebouncer = new Debouncer(this.refresh, DEBOUNCER_RATE_LIMIT_MS);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the filter.
|
|
34
|
+
*/
|
|
35
|
+
get filter() {
|
|
36
|
+
return this._filter;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Set the filter.
|
|
40
|
+
* The update
|
|
41
|
+
*/
|
|
42
|
+
set filter(filter) {
|
|
43
|
+
this._filter = filter;
|
|
44
|
+
this._filterChanged.emit(filter);
|
|
45
|
+
void this._refreshDebouncer.invoke();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get the kernel sources.
|
|
49
|
+
*/
|
|
50
|
+
get kernelSources() {
|
|
51
|
+
return this._kernelSources;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Set the kernel sources and emit a changed signal.
|
|
55
|
+
*/
|
|
56
|
+
set kernelSources(kernelSources) {
|
|
57
|
+
this._kernelSources = kernelSources;
|
|
58
|
+
this.refresh();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Signal emitted when the current source changes.
|
|
62
|
+
*/
|
|
63
|
+
get changed() {
|
|
64
|
+
return this._changed;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Signal emitted when the current source changes.
|
|
68
|
+
*/
|
|
69
|
+
get filterChanged() {
|
|
70
|
+
return this._filterChanged;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Signal emitted when a kernel source should be open in the main area.
|
|
74
|
+
*/
|
|
75
|
+
get kernelSourceOpened() {
|
|
76
|
+
return this._kernelSourceOpened;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Open a source in the main area.
|
|
80
|
+
*/
|
|
81
|
+
open(kernelSource) {
|
|
82
|
+
this._kernelSourceOpened.emit(kernelSource);
|
|
83
|
+
}
|
|
84
|
+
getFilteredKernelSources() {
|
|
85
|
+
const regexp = new RegExp(this._filter);
|
|
86
|
+
return this._kernelSources.filter(module => regexp.test(module.name));
|
|
87
|
+
}
|
|
88
|
+
refresh() {
|
|
89
|
+
if (this._kernelSources) {
|
|
90
|
+
this._filteredKernelSources = this._filter
|
|
91
|
+
? this.getFilteredKernelSources()
|
|
92
|
+
: this._kernelSources;
|
|
93
|
+
this._filteredKernelSources.sort(compare);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
this._kernelSources = new Array();
|
|
97
|
+
this._filteredKernelSources = new Array();
|
|
98
|
+
}
|
|
99
|
+
this._changed.emit(this._filteredKernelSources);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/panels/kernelSources/model.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C;;GAEG;AACH,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAEpC,MAAM,OAAO,GAAG,CAAC,CAAyB,EAAE,CAAyB,EAAE,EAAE;IACvE,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE;QACnB,OAAO,CAAC,CAAC,CAAC;KACX;IACD,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE;QACnB,OAAO,CAAC,CAAC;KACV;IACD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAC7B;QAsFQ,mBAAc,GAAoC,IAAI,CAAC;QACvD,2BAAsB,GAAoC,IAAI,CAAC;QAC/D,YAAO,GAAG,EAAE,CAAC;QAEb,aAAQ,GAAG,IAAI,MAAM,CAAwC,IAAI,CAAC,CAAC;QACnE,mBAAc,GAAG,IAAI,MAAM,CAAe,IAAI,CAAC,CAAC;QAChD,wBAAmB,GAAG,IAAI,MAAM,CAAgC,IAAI,CAAC,CAAC;QA3F5E,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,iBAAiB,GAAG,IAAI,SAAS,CACpC,IAAI,CAAC,OAAO,EACZ,uBAAuB,CACxB,CAAC;IACJ,CAAC;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AC,CAAC,IAAI,CAAC,cAAc,CAAC;YACxB,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC3C;aAAM;YACL,IAAI,CAAC,cAAc,GAAG,IAAI,KAAK,EAA0B,CAAC;YAC1D,IAAI,CAAC,sBAAsB,GAAG,IAAI,KAAK,EAA0B,CAAC;SACnE;QACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAClD,CAAC;CASF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { ReactWidget, Toolbar, UseSignal } from '@jupyterlab/apputils';
|
|
3
4
|
import { nullTranslator } from '@jupyterlab/translation';
|
|
4
|
-
import { ReactWidget, Toolbar, UseSignal } from '@jupyterlab/ui-components';
|
|
5
5
|
import { PanelLayout, Widget } from '@lumino/widgets';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/panels/sources/header.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/panels/sources/header.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAe,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAItD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,MAAM;IACvC;;;;OAIG;IACH,YAAY,KAA+B,EAAE,UAAwB;Q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,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,8 +2,8 @@
|
|
|
2
2
|
| Copyright (c) Jupyter Development Team.
|
|
3
3
|
| Distributed under the terms of the Modified BSD License.
|
|
4
4
|
|----------------------------------------------------------------------------*/
|
|
5
|
+
import { ToolbarButton } from '@jupyterlab/apputils';
|
|
5
6
|
import { nullTranslator } from '@jupyterlab/translation';
|
|
6
|
-
import { ToolbarButton } from '@jupyterlab/ui-components';
|
|
7
7
|
import { Panel } from '@lumino/widgets';
|
|
8
8
|
import { viewBreakpointIcon } from '../../icons';
|
|
9
9
|
import { SourcesBody } from './body';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/sources/index.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/panels/sources/index.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;AAE/E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,OAAO,EAAe,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK;IAChC;;;;OAIG;IACH,YAAY,OAAyB;QACnC,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;QACn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