@jupyterlab/debugger 3.3.0-alpha.6 → 4.0.0-alpha.1

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.
Files changed (72) hide show
  1. package/lib/debugger.d.ts +8 -1
  2. package/lib/debugger.js +9 -1
  3. package/lib/debugger.js.map +1 -1
  4. package/lib/handler.d.ts +31 -2
  5. package/lib/handler.js +61 -65
  6. package/lib/handler.js.map +1 -1
  7. package/lib/index.d.ts +1 -1
  8. package/lib/index.js +1 -1
  9. package/lib/index.js.map +1 -1
  10. package/lib/model.d.ts +8 -1
  11. package/lib/model.js +10 -0
  12. package/lib/model.js.map +1 -1
  13. package/lib/panels/breakpoints/body.d.ts +0 -1
  14. package/lib/panels/breakpoints/index.d.ts +2 -1
  15. package/lib/panels/breakpoints/index.js +7 -10
  16. package/lib/panels/breakpoints/index.js.map +1 -1
  17. package/lib/panels/callstack/body.d.ts +0 -1
  18. package/lib/panels/callstack/index.d.ts +2 -1
  19. package/lib/panels/callstack/index.js +24 -20
  20. package/lib/panels/callstack/index.js.map +1 -1
  21. package/lib/panels/callstack/model.d.ts +3 -3
  22. package/lib/panels/callstack/model.js +3 -1
  23. package/lib/panels/callstack/model.js.map +1 -1
  24. package/lib/panels/sources/index.d.ts +2 -2
  25. package/lib/panels/sources/index.js +14 -9
  26. package/lib/panels/sources/index.js.map +1 -1
  27. package/lib/panels/sources/model.d.ts +2 -2
  28. package/lib/panels/sources/sourcepath.d.ts +10 -0
  29. package/lib/panels/sources/sourcepath.js +17 -0
  30. package/lib/panels/sources/sourcepath.js.map +1 -0
  31. package/lib/panels/variables/grid.d.ts +9 -0
  32. package/lib/panels/variables/grid.js +83 -9
  33. package/lib/panels/variables/grid.js.map +1 -1
  34. package/lib/panels/variables/index.d.ts +10 -2
  35. package/lib/panels/variables/index.js +36 -14
  36. package/lib/panels/variables/index.js.map +1 -1
  37. package/lib/panels/variables/mimerenderer.d.ts +31 -0
  38. package/lib/panels/variables/mimerenderer.js +44 -0
  39. package/lib/panels/variables/mimerenderer.js.map +1 -0
  40. package/lib/panels/variables/scope.d.ts +0 -1
  41. package/lib/panels/variables/tree.d.ts +17 -1
  42. package/lib/panels/variables/tree.js +44 -8
  43. package/lib/panels/variables/tree.js.map +1 -1
  44. package/lib/service.d.ts +14 -0
  45. package/lib/service.js +45 -13
  46. package/lib/service.js.map +1 -1
  47. package/lib/sidebar.d.ts +3 -40
  48. package/lib/sidebar.js +13 -60
  49. package/lib/sidebar.js.map +1 -1
  50. package/lib/tokens.d.ts +95 -16
  51. package/lib/tokens.js +4 -0
  52. package/lib/tokens.js.map +1 -1
  53. package/package.json +25 -25
  54. package/style/base.css +4 -0
  55. package/style/breakpoints.css +2 -0
  56. package/style/callstack.css +2 -0
  57. package/style/icons.css +4 -4
  58. package/style/sidebar.css +5 -52
  59. package/style/sources.css +6 -1
  60. package/style/variables.css +34 -4
  61. package/lib/panels/breakpoints/header.d.ts +0 -16
  62. package/lib/panels/breakpoints/header.js +0 -30
  63. package/lib/panels/breakpoints/header.js.map +0 -1
  64. package/lib/panels/callstack/header.d.ts +0 -16
  65. package/lib/panels/callstack/header.js +0 -30
  66. package/lib/panels/callstack/header.js.map +0 -1
  67. package/lib/panels/sources/header.d.ts +0 -19
  68. package/lib/panels/sources/header.js +0 -48
  69. package/lib/panels/sources/header.js.map +0 -1
  70. package/lib/panels/variables/header.d.ts +0 -16
  71. package/lib/panels/variables/header.js +0 -30
  72. package/lib/panels/variables/header.js.map +0 -1
package/lib/sidebar.js CHANGED
@@ -1,8 +1,8 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
  import { nullTranslator } from '@jupyterlab/translation';
4
- import { bugIcon } from '@jupyterlab/ui-components';
5
- import { Panel, SplitPanel, Widget } from '@lumino/widgets';
4
+ import { bugIcon, SidePanel } from '@jupyterlab/ui-components';
5
+ import { Widget } from '@lumino/widgets';
6
6
  import { Breakpoints as BreakpointsPanel } from './panels/breakpoints';
7
7
  import { Callstack as CallstackPanel } from './panels/callstack';
8
8
  import { Sources as SourcesPanel } from './panels/sources';
@@ -10,19 +10,19 @@ import { Variables as VariablesPanel } from './panels/variables';
10
10
  /**
11
11
  * A debugger sidebar.
12
12
  */
13
- export class DebuggerSidebar extends Panel {
13
+ export class DebuggerSidebar extends SidePanel {
14
14
  /**
15
15
  * Instantiate a new Debugger.Sidebar
16
16
  *
17
17
  * @param options The instantiation options for a Debugger.Sidebar
18
18
  */
19
19
  constructor(options) {
20
- super();
20
+ const translator = options.translator || nullTranslator;
21
+ super({ translator });
21
22
  this.id = 'jp-debugger-sidebar';
22
23
  this.title.icon = bugIcon;
23
24
  this.addClass('jp-DebuggerSidebar');
24
25
  const { callstackCommands, editorServices, service, themeManager } = options;
25
- const translator = options.translator || nullTranslator;
26
26
  const model = service.model;
27
27
  this.variables = new VariablesPanel({
28
28
  model: model.variables,
@@ -48,59 +48,15 @@ export class DebuggerSidebar extends Panel {
48
48
  translator
49
49
  });
50
50
  const header = new DebuggerSidebar.Header();
51
- this.addWidget(header);
51
+ this.header.addWidget(header);
52
52
  model.titleChanged.connect((_, title) => {
53
53
  header.title.label = title;
54
54
  });
55
- this._body = new SplitPanel();
56
- this._body.orientation = 'vertical';
57
- this._body.addClass('jp-DebuggerSidebar-body');
58
- this.addWidget(this._body);
59
- this.addItem(this.variables);
60
- this.addItem(this.callstack);
61
- this.addItem(this.breakpoints);
62
- this.addItem(this.sources);
63
- }
64
- /**
65
- * Add an item at the end of the sidebar.
66
- *
67
- * @param widget - The widget to add to the sidebar.
68
- *
69
- * #### Notes
70
- * If the widget is already contained in the sidebar, it will be moved.
71
- * The item can be removed from the sidebar by setting its parent to `null`.
72
- */
73
- addItem(widget) {
74
- this._body.addWidget(widget);
75
- }
76
- /**
77
- * Insert an item at the specified index.
78
- *
79
- * @param index - The index at which to insert the widget.
80
- *
81
- * @param widget - The widget to insert into to the sidebar.
82
- *
83
- * #### Notes
84
- * If the widget is already contained in the sidebar, it will be moved.
85
- * The item can be removed from the sidebar by setting its parent to `null`.
86
- */
87
- insertItem(index, widget) {
88
- this._body.insertWidget(index, widget);
89
- }
90
- /**
91
- * A read-only array of the sidebar items.
92
- */
93
- get items() {
94
- return this._body.widgets;
95
- }
96
- /**
97
- * Dispose the sidebar.
98
- */
99
- dispose() {
100
- if (this.isDisposed) {
101
- return;
102
- }
103
- super.dispose();
55
+ this.content.addClass('jp-DebuggerSidebar-body');
56
+ this.addWidget(this.variables);
57
+ this.addWidget(this.callstack);
58
+ this.addWidget(this.breakpoints);
59
+ this.addWidget(this.sources);
104
60
  }
105
61
  }
106
62
  /**
@@ -117,7 +73,7 @@ export class DebuggerSidebar extends Panel {
117
73
  constructor() {
118
74
  super({ node: Private.createHeader() });
119
75
  this.title.changed.connect(_ => {
120
- this.node.querySelector('h2').textContent = this.title.label;
76
+ this.node.textContent = this.title.label;
121
77
  });
122
78
  }
123
79
  }
@@ -132,13 +88,10 @@ var Private;
132
88
  * Create a sidebar header node.
133
89
  */
134
90
  function createHeader() {
135
- const header = document.createElement('div');
136
- header.classList.add('jp-stack-panel-header');
137
91
  const title = document.createElement('h2');
138
92
  title.textContent = '-';
139
93
  title.classList.add('jp-left-truncated');
140
- header.appendChild(title);
141
- return header;
94
+ return title;
142
95
  }
143
96
  Private.createHeader = createHeader;
144
97
  })(Private || (Private = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.js","sourceRoot":"","sources":["../src/sidebar.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAM3D,OAAO,EAAe,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAA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;IACH,SAAgB,YAAY;QAC1B,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAE3C,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC;QACxB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAEzC,OAAO,KAAK,CAAC;IACf,CAAC;IAPe,oBAAY,eAO3B,CAAA;AACH,CAAC,EAZS,OAAO,KAAP,OAAO,QAYhB"}
package/lib/tokens.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { CodeEditor, CodeEditorWrapper } from '@jupyterlab/codeeditor';
2
2
  import { KernelMessage, Session } from '@jupyterlab/services';
3
- import { Token } from '@lumino/coreutils';
3
+ import { ReadonlyJSONObject, Token } from '@lumino/coreutils';
4
4
  import { IObservableDisposable } from '@lumino/disposable';
5
5
  import { ISignal, Signal } from '@lumino/signaling';
6
- import { Widget } from '@lumino/widgets';
6
+ import { Panel } from '@lumino/widgets';
7
7
  import { DebugProtocol } from 'vscode-debugprotocol';
8
+ import { DebuggerHandler } from './handler';
8
9
  /**
9
10
  * An interface describing an application's visual debugger.
10
11
  */
@@ -61,6 +62,14 @@ export interface IDebugger {
61
62
  * @param variablesReference The variable reference to request.
62
63
  */
63
64
  inspectVariable(variablesReference: number): Promise<DebugProtocol.Variable[]>;
65
+ /**
66
+ * Request rich representation of a variable.
67
+ *
68
+ * @param variableName The variable name to request
69
+ * @param variablesReference The variable reference to request
70
+ * @returns The mime renderer data model
71
+ */
72
+ inspectRichVariable(variableName: string, variablesReference?: number): Promise<IDebugger.IRichVariable>;
64
73
  /**
65
74
  * Requests all the defined variables and display them in the
66
75
  * table view.
@@ -194,6 +203,11 @@ export declare namespace IDebugger {
194
203
  */
195
204
  getTmpFileParams(kernel: string): IConfig.FileParams;
196
205
  }
206
+ /**
207
+ * An interface for debugger handler.
208
+ */
209
+ interface IHandler extends DebuggerHandler.IHandler {
210
+ }
197
211
  /**
198
212
  * An interface for a scope.
199
213
  */
@@ -264,6 +278,19 @@ export declare namespace IDebugger {
264
278
  */
265
279
  interface IStackFrame extends DebugProtocol.StackFrame {
266
280
  }
281
+ /**
282
+ * A reply to an rich inspection request.
283
+ */
284
+ interface IRichVariable {
285
+ /**
286
+ * The MIME bundle data returned from an rich inspection request.
287
+ */
288
+ data: ReadonlyJSONObject;
289
+ /**
290
+ * Any metadata that accompanies the MIME bundle returning from a rich inspection request.
291
+ */
292
+ metadata: ReadonlyJSONObject;
293
+ }
267
294
  /**
268
295
  * An interface for a variable.
269
296
  */
@@ -342,6 +369,7 @@ export declare namespace IDebugger {
342
369
  restart: DebugProtocol.RestartArguments;
343
370
  restartFrame: DebugProtocol.RestartFrameArguments;
344
371
  reverseContinue: DebugProtocol.ReverseContinueArguments;
372
+ richInspectVariables: IRichVariablesArguments;
345
373
  scopes: DebugProtocol.ScopesArguments;
346
374
  setBreakpoints: DebugProtocol.SetBreakpointsArguments;
347
375
  setExceptionBreakpoints: DebugProtocol.SetExceptionBreakpointsArguments;
@@ -384,6 +412,7 @@ export declare namespace IDebugger {
384
412
  restart: DebugProtocol.RestartResponse;
385
413
  restartFrame: DebugProtocol.RestartFrameResponse;
386
414
  reverseContinue: DebugProtocol.ReverseContinueResponse;
415
+ richInspectVariables: IRichVariablesResponse;
387
416
  scopes: DebugProtocol.ScopesResponse;
388
417
  setBreakpoints: DebugProtocol.SetBreakpointsResponse;
389
418
  setExceptionBreakpoints: DebugProtocol.SetExceptionBreakpointsResponse;
@@ -415,13 +444,17 @@ export declare namespace IDebugger {
415
444
  */
416
445
  interface IDebugInfoResponse extends DebugProtocol.Response {
417
446
  body: {
418
- isStarted: boolean;
447
+ breakpoints: IDebugInfoBreakpoints[];
419
448
  hashMethod: string;
420
449
  hashSeed: number;
421
- breakpoints: IDebugInfoBreakpoints[];
450
+ isStarted: boolean;
451
+ /**
452
+ * Whether the kernel supports variable rich rendering or not.
453
+ */
454
+ richRendering?: boolean;
455
+ stoppedThreads: number[];
422
456
  tmpFilePrefix: string;
423
457
  tmpFileSuffix: string;
424
- stoppedThreads: number[];
425
458
  };
426
459
  }
427
460
  /**
@@ -447,6 +480,34 @@ export declare namespace IDebugger {
447
480
  variables: DebugProtocol.Variable[];
448
481
  };
449
482
  }
483
+ /**
484
+ * Arguments for 'richVariables' request
485
+ *
486
+ * This is an addition to the Debug Adapter Protocol to support
487
+ * render rich variable representation.
488
+ */
489
+ interface IRichVariablesArguments {
490
+ /**
491
+ * Variable name
492
+ */
493
+ variableName: string;
494
+ /**
495
+ * Frame Id
496
+ */
497
+ frameId?: number;
498
+ }
499
+ /**
500
+ * Arguments for 'richVariables' request
501
+ *
502
+ * This is an addition to the Debug Adapter Protocol to support
503
+ * rich rendering of variables.
504
+ */
505
+ interface IRichVariablesResponse extends DebugProtocol.Response {
506
+ /**
507
+ * Variable mime type data
508
+ */
509
+ body: IRichVariable;
510
+ }
450
511
  /**
451
512
  * Response to the 'kernel_info_request' request.
452
513
  * This interface extends the IInfoReply by adding the `debugger` key
@@ -458,21 +519,31 @@ export declare namespace IDebugger {
458
519
  }
459
520
  }
460
521
  /**
461
- * Debugger sidebar interface.
522
+ * Select variable in the variables explorer.
462
523
  */
463
- interface ISidebar extends Widget {
524
+ interface IVariableSelection extends Pick<DebugProtocol.Variable, 'name' | 'type' | 'variablesReference' | 'value'> {
525
+ }
526
+ /**
527
+ * Debugger variables explorer interface.
528
+ */
529
+ interface IVariablesPanel {
464
530
  /**
465
- * Add item at the end of the sidebar.
531
+ * Select variable in the variables explorer.
466
532
  */
467
- addItem(widget: Widget): void;
533
+ latestSelection: IVariableSelection | null;
468
534
  /**
469
- * Insert item at a specified index.
535
+ * Variable view mode.
470
536
  */
471
- insertItem(index: number, widget: Widget): void;
537
+ viewMode: 'tree' | 'table';
538
+ }
539
+ /**
540
+ * Debugger sidebar interface.
541
+ */
542
+ interface ISidebar extends Panel {
472
543
  /**
473
- * Return all items that were added to sidebar.
544
+ * Debugger variables explorer.
474
545
  */
475
- readonly items: readonly Widget[];
546
+ variables: IVariablesPanel;
476
547
  }
477
548
  /**
478
549
  * A utility to find text editors used by the debugger.
@@ -568,11 +639,11 @@ export declare namespace IDebugger {
568
639
  /**
569
640
  * Signal emitted when the current frame has changed.
570
641
  */
571
- readonly currentFrameChanged: ISignal<this, IDebugger.IStackFrame>;
642
+ readonly currentFrameChanged: ISignal<this, IDebugger.IStackFrame | null>;
572
643
  /**
573
644
  * The current frame.
574
645
  */
575
- frame: IDebugger.IStackFrame;
646
+ frame: IDebugger.IStackFrame | null;
576
647
  /**
577
648
  * The frames for the callstack.
578
649
  */
@@ -594,6 +665,10 @@ export declare namespace IDebugger {
594
665
  * The callstack UI model.
595
666
  */
596
667
  readonly callstack: ICallstack;
668
+ /**
669
+ * Whether the kernel support rich variable rendering based on mime type.
670
+ */
671
+ hasRichVariableRendering: boolean;
597
672
  /**
598
673
  * The variables UI model.
599
674
  */
@@ -626,7 +701,7 @@ export declare namespace IDebugger {
626
701
  /**
627
702
  * Signal emitted when the current frame changes.
628
703
  */
629
- readonly currentFrameChanged: ISignal<IDebugger.Model.ICallstack, IDebugger.IStackFrame>;
704
+ readonly currentFrameChanged: ISignal<IDebugger.Model.ICallstack, IDebugger.IStackFrame | null>;
630
705
  /**
631
706
  * Return the current source.
632
707
  */
@@ -685,3 +760,7 @@ export declare const IDebuggerSources: Token<IDebugger.ISources>;
685
760
  * The debugger configuration token.
686
761
  */
687
762
  export declare const IDebuggerSidebar: Token<IDebugger.ISidebar>;
763
+ /**
764
+ * The debugger handler token.
765
+ */
766
+ export declare const IDebuggerHandler: Token<IDebugger.IHandler>;
package/lib/tokens.js CHANGED
@@ -17,4 +17,8 @@ export const IDebuggerSources = new Token('@jupyterlab/debugger:IDebuggerSources
17
17
  * The debugger configuration token.
18
18
  */
19
19
  export const IDebuggerSidebar = new Token('@jupyterlab/debugger:IDebuggerSidebar');
20
+ /**
21
+ * The debugger handler token.
22
+ */
23
+ export const IDebuggerHandler = new Token('@jupyterlab/debugger:IDebuggerHandler');
20
24
  //# sourceMappingURL=tokens.js.map
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;AAM3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AA8xB1C;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,KAAK,CAAY,gCAAgC,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,KAAK,CACtC,sCAAsC,CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,KAAK,CACvC,uCAAuC,CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,KAAK,CACvC,uCAAuC,CACxC,CAAC"}
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAM3D,OAAO,EAAsB,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAs3B9D;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,KAAK,CAAY,gCAAgC,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,KAAK,CACtC,sCAAsC,CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,KAAK,CACvC,uCAAuC,CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,KAAK,CACvC,uCAAuC,CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,KAAK,CACvC,uCAAuC,CACxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyterlab/debugger",
3
- "version": "3.3.0-alpha.6",
3
+ "version": "4.0.0-alpha.1",
4
4
  "description": "JupyterLab - Debugger Extension",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -48,29 +48,29 @@
48
48
  "watch": "tsc -b --watch"
49
49
  },
50
50
  "dependencies": {
51
- "@jupyterlab/application": "^3.3.0-alpha.6",
52
- "@jupyterlab/apputils": "^3.3.0-alpha.6",
53
- "@jupyterlab/cells": "^3.3.0-alpha.6",
54
- "@jupyterlab/codeeditor": "^3.3.0-alpha.6",
55
- "@jupyterlab/codemirror": "^3.3.0-alpha.6",
56
- "@jupyterlab/console": "^3.3.0-alpha.6",
57
- "@jupyterlab/coreutils": "^5.3.0-alpha.6",
58
- "@jupyterlab/docregistry": "^3.3.0-alpha.6",
59
- "@jupyterlab/fileeditor": "^3.3.0-alpha.6",
60
- "@jupyterlab/notebook": "^3.3.0-alpha.6",
61
- "@jupyterlab/observables": "^4.3.0-alpha.6",
62
- "@jupyterlab/rendermime": "^3.3.0-alpha.6",
63
- "@jupyterlab/services": "^6.3.0-alpha.6",
64
- "@jupyterlab/translation": "^3.3.0-alpha.6",
65
- "@jupyterlab/ui-components": "^3.3.0-alpha.6",
66
- "@lumino/algorithm": "^1.3.3",
67
- "@lumino/commands": "^1.12.0",
68
- "@lumino/coreutils": "^1.5.3",
69
- "@lumino/datagrid": "^0.28.0",
70
- "@lumino/disposable": "^1.4.3",
71
- "@lumino/messaging": "^1.4.3",
72
- "@lumino/signaling": "^1.4.3",
73
- "@lumino/widgets": "^1.26.0",
51
+ "@jupyterlab/application": "^4.0.0-alpha.1",
52
+ "@jupyterlab/apputils": "^4.0.0-alpha.1",
53
+ "@jupyterlab/cells": "^4.0.0-alpha.1",
54
+ "@jupyterlab/codeeditor": "^4.0.0-alpha.1",
55
+ "@jupyterlab/codemirror": "^4.0.0-alpha.1",
56
+ "@jupyterlab/console": "^4.0.0-alpha.1",
57
+ "@jupyterlab/coreutils": "^6.0.0-alpha.1",
58
+ "@jupyterlab/docregistry": "^4.0.0-alpha.1",
59
+ "@jupyterlab/fileeditor": "^4.0.0-alpha.1",
60
+ "@jupyterlab/notebook": "^4.0.0-alpha.1",
61
+ "@jupyterlab/observables": "^5.0.0-alpha.1",
62
+ "@jupyterlab/rendermime": "^4.0.0-alpha.1",
63
+ "@jupyterlab/services": "^7.0.0-alpha.1",
64
+ "@jupyterlab/translation": "^4.0.0-alpha.1",
65
+ "@jupyterlab/ui-components": "^4.0.0-alpha.16",
66
+ "@lumino/algorithm": "^1.9.1",
67
+ "@lumino/commands": "^1.19.0",
68
+ "@lumino/coreutils": "^1.11.1",
69
+ "@lumino/datagrid": "^0.34.0",
70
+ "@lumino/disposable": "^1.10.1",
71
+ "@lumino/messaging": "^1.10.1",
72
+ "@lumino/signaling": "^1.10.1",
73
+ "@lumino/widgets": "^1.30.0",
74
74
  "codemirror": "~5.61.0",
75
75
  "react": "^17.0.1",
76
76
  "vscode-debugprotocol": "^1.37.0"
@@ -78,7 +78,7 @@
78
78
  "devDependencies": {
79
79
  "@babel/core": "^7.10.2",
80
80
  "@babel/preset-env": "^7.10.2",
81
- "@jupyterlab/testutils": "^3.3.0-alpha.6",
81
+ "@jupyterlab/testutils": "^4.0.0-alpha.1",
82
82
  "@types/codemirror": "^0.0.109",
83
83
  "@types/jest": "^26.0.10",
84
84
  "@types/react-dom": "^17.0.0",
package/style/base.css CHANGED
@@ -19,3 +19,7 @@
19
19
  #jp-debugger .jp-switch-label {
20
20
  margin-right: 0px;
21
21
  }
22
+
23
+ .jp-DebuggerBugButton[aria-pressed='true'] path {
24
+ fill: var(--jp-warn-color0);
25
+ }
@@ -6,6 +6,8 @@
6
6
  .jp-DebuggerBreakpoints {
7
7
  display: flex;
8
8
  flex-direction: column;
9
+ min-height: 50px;
10
+ padding-top: 3px;
9
11
  }
10
12
 
11
13
  .jp-DebuggerBreakpoints-body {
@@ -6,6 +6,8 @@
6
6
  .jp-DebuggerCallstack {
7
7
  display: flex;
8
8
  flex-direction: column;
9
+ min-height: 50px;
10
+ padding-top: 3px;
9
11
  }
10
12
 
11
13
  .jp-DebuggerCallstack-body {
package/style/icons.css CHANGED
@@ -3,8 +3,8 @@
3
3
  | Distributed under the terms of the Modified BSD License.
4
4
  |----------------------------------------------------------------------------*/
5
5
 
6
- button.jp-Button.bp3-button.bp3-minimal.jp-TreeView.jp-TreeView,
7
- button.jp-Button.bp3-button.bp3-minimal.jp-TreeView.jp-TableView {
6
+ button.jp-Button.jp-mod-minimal.jp-TreeView.jp-TreeView,
7
+ button.jp-Button.jp-mod-minimal.jp-TreeView.jp-TableView {
8
8
  display: flex;
9
9
  align-items: center;
10
10
  -webkit-transition: 0.4s;
@@ -12,12 +12,12 @@ button.jp-Button.bp3-button.bp3-minimal.jp-TreeView.jp-TableView {
12
12
  width: 35px;
13
13
  }
14
14
 
15
- button.jp-Button.bp3-button.bp3-minimal.jp-TreeView:hover {
15
+ button.jp-Button.jp-mod-minimal.jp-TreeView:hover {
16
16
  cursor: pointer;
17
17
  background-color: var(--jp-layout-color1);
18
18
  }
19
19
 
20
- button.jp-Button.bp3-button.bp3-minimal.jp-TableView:hover {
20
+ button.jp-Button.jp-mod-minimal.jp-TableView:hover {
21
21
  cursor: pointer;
22
22
  background-color: var(--jp-layout-color1);
23
23
  }
package/style/sidebar.css CHANGED
@@ -3,57 +3,10 @@
3
3
  | Distributed under the terms of the Modified BSD License.
4
4
  |----------------------------------------------------------------------------*/
5
5
 
6
- .jp-DebuggerSidebar {
7
- --jp-debugger-header-height: 24px;
8
- }
9
-
10
- .jp-DebuggerSidebar {
11
- color: var(--jp-ui-font-color1);
12
- background: var(--jp-layout-color1);
13
- font-size: var(--jp-ui-font-size1);
14
- }
15
-
16
- .jp-DebuggerSidebar .p-SplitPanel-child {
17
- z-index: auto;
18
- }
19
-
20
- .jp-DebuggerSidebar .jp-DebuggerSidebar-body {
21
- height: calc(100% - var(--jp-debugger-header-height));
22
- }
23
-
24
- .jp-DebuggerSidebar .jp-stack-panel-header {
25
- border-bottom: solid var(--jp-border-width) var(--jp-border-color1);
26
- box-shadow: var(--jp-toolbar-box-shadow);
27
- display: flex;
28
- flex-direction: row;
29
- align-items: center;
30
- min-height: 24px;
31
- height: var(--jp-debugger-header-height);
32
- }
33
-
34
- .jp-DebuggerSidebar > .jp-stack-panel-header {
35
- background-color: var(--jp-layout-color1);
36
- }
37
-
38
- .jp-DebuggerSidebar .jp-stack-panel-header h2 {
39
- text-transform: uppercase;
6
+ .jp-SidePanel-header > h2 {
7
+ /* Set font-size to override default h2 sizing but keeping default --jp-ui-font-size0 */
8
+ font-size: 100%;
40
9
  font-weight: 600;
41
- font-size: var(--jp-ui-font-size0);
42
- color: var(--jp-ui-font-color1);
43
- padding-left: 8px;
44
- padding-right: 4px;
45
- }
46
-
47
- .jp-DebuggerSidebar-body .jp-stack-panel-header {
48
- border-top: solid var(--jp-border-width) var(--jp-border-color1);
49
- background-color: var(--jp-layout-color2);
50
- }
51
-
52
- .jp-DebuggerSidebar-body .jp-DebuggerVariables .jp-stack-panel-header {
53
- border-top: none;
54
- }
55
-
56
- .jp-DebuggerSidebar-body .jp-Toolbar {
57
- background: var(--jp-layout-color2);
58
- box-shadow: none;
10
+ margin: 0px auto 0px 0px;
11
+ padding: 4px 10px;
59
12
  }
package/style/sources.css CHANGED
@@ -3,6 +3,11 @@
3
3
  | Distributed under the terms of the Modified BSD License.
4
4
  |----------------------------------------------------------------------------*/
5
5
 
6
+ .jp-DebuggerSources {
7
+ min-height: 50px;
8
+ margin-top: 3px;
9
+ }
10
+
6
11
  [data-jp-debugger='true'].jp-Editor .jp-mod-readOnly {
7
12
  background: var(--jp-layout-color2);
8
13
  height: 100%;
@@ -13,7 +18,7 @@
13
18
  }
14
19
 
15
20
  .jp-DebuggerSources-body {
16
- height: calc(100% - var(--jp-statusbar-height));
21
+ height: 100%;
17
22
  }
18
23
 
19
24
  .jp-DebuggerSources-header > div > span {
@@ -6,6 +6,8 @@
6
6
  .jp-DebuggerVariables {
7
7
  display: flex;
8
8
  flex-direction: column;
9
+ min-height: 50px;
10
+ padding-top: 3px;
9
11
  }
10
12
 
11
13
  .jp-DebuggerVariables-body {
@@ -30,14 +32,42 @@
30
32
  padding: 5px 0 0 0;
31
33
  cursor: pointer;
32
34
  color: var(--jp-content-font-color1);
35
+ display: flex;
36
+ align-items: center;
33
37
  }
34
38
 
35
- .jp-DebuggerVariables-body ul li > ul {
36
- margin-left: 12px;
39
+ .jp-DebuggerVariables-body ul li:hover .jp-DebuggerVariables-renderVariable {
40
+ display: block;
41
+ }
42
+
43
+ .jp-DebuggerVariables-body .jp-DebuggerVariables-hspacer {
44
+ flex: 1 1 auto;
45
+ }
46
+
47
+ .jp-DebuggerVariables-body .jp-DebuggerVariables-renderVariable {
48
+ flex: 0 0 auto;
49
+ border: none;
50
+ background: none;
51
+ cursor: pointer;
52
+ display: none;
53
+ padding: 0px 8px;
54
+ }
55
+
56
+ .jp-DebuggerVariables-body .jp-DebuggerVariables-renderVariable:active {
57
+ transform: scale(1.272) translateX(-4px);
58
+ overflow: hidden;
59
+ }
60
+
61
+ .jp-DebuggerVariables-body .jp-DebuggerVariables-renderVariable:hover {
62
+ background-color: var(--jp-layout-color2);
37
63
  }
38
64
 
39
- .jp-DebuggerVariables .jp-stack-panel-header .jp-Toolbar {
40
- margin-left: auto;
65
+ .jp-DebuggerVariables-body .jp-DebuggerVariables-renderVariable:disabled {
66
+ cursor: default;
67
+ }
68
+
69
+ .jp-DebuggerVariables-body ul li > ul {
70
+ margin-left: 12px;
41
71
  }
42
72
 
43
73
  .jp-DebuggerVariables-grid {
@@ -1,16 +0,0 @@
1
- import { ITranslator } from '@jupyterlab/translation';
2
- import { Toolbar } from '@jupyterlab/ui-components';
3
- import { Widget } from '@lumino/widgets';
4
- /**
5
- * The header for a Breakpoints Panel.
6
- */
7
- export declare class BreakpointsHeader extends Widget {
8
- /**
9
- * Instantiate a new BreakpointsHeader.
10
- */
11
- constructor(translator?: ITranslator);
12
- /**
13
- * The toolbar for the breakpoints header.
14
- */
15
- readonly toolbar: Toolbar<Widget>;
16
- }