@jupyterlab/debugger 4.6.0-alpha.2 → 4.6.0-alpha.4

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 (116) hide show
  1. package/lib/config.d.ts +1 -1
  2. package/lib/dialogs/evaluate.d.ts +2 -2
  3. package/lib/dialogs/evaluate.js.map +1 -1
  4. package/lib/displayregistry.d.ts +1 -1
  5. package/lib/factory.d.ts +3 -2
  6. package/lib/factory.js.map +1 -1
  7. package/lib/handler.d.ts +9 -9
  8. package/lib/handler.js.map +1 -1
  9. package/lib/handlers/console.d.ts +4 -4
  10. package/lib/handlers/console.js.map +1 -1
  11. package/lib/handlers/editor.d.ts +5 -5
  12. package/lib/handlers/editor.js.map +1 -1
  13. package/lib/handlers/file.d.ts +5 -5
  14. package/lib/handlers/file.js.map +1 -1
  15. package/lib/handlers/notebook.d.ts +4 -4
  16. package/lib/handlers/notebook.js.map +1 -1
  17. package/lib/handlers/pausedoverlay.d.ts +3 -3
  18. package/lib/handlers/pausedoverlay.js.map +1 -1
  19. package/lib/hash.js +2 -1
  20. package/lib/hash.js.map +1 -1
  21. package/lib/model.d.ts +3 -3
  22. package/lib/model.js.map +1 -1
  23. package/lib/panels/breakpoints/body.d.ts +2 -2
  24. package/lib/panels/breakpoints/body.js.map +1 -1
  25. package/lib/panels/breakpoints/index.d.ts +4 -4
  26. package/lib/panels/breakpoints/index.js.map +1 -1
  27. package/lib/panels/breakpoints/model.d.ts +3 -2
  28. package/lib/panels/breakpoints/model.js.map +1 -1
  29. package/lib/panels/breakpoints/pauseonexceptions.d.ts +2 -2
  30. package/lib/panels/callstack/body.d.ts +1 -1
  31. package/lib/panels/callstack/index.d.ts +4 -4
  32. package/lib/panels/callstack/index.js.map +1 -1
  33. package/lib/panels/callstack/model.d.ts +4 -4
  34. package/lib/panels/callstack/model.js.map +1 -1
  35. package/lib/panels/kernelSources/body.d.ts +2 -2
  36. package/lib/panels/kernelSources/body.js.map +1 -1
  37. package/lib/panels/kernelSources/filter.d.ts +2 -2
  38. package/lib/panels/kernelSources/index.d.ts +2 -2
  39. package/lib/panels/kernelSources/index.js.map +1 -1
  40. package/lib/panels/kernelSources/model.d.ts +2 -2
  41. package/lib/panels/kernelSources/model.js.map +1 -1
  42. package/lib/panels/sources/body.d.ts +2 -2
  43. package/lib/panels/sources/body.js.map +1 -1
  44. package/lib/panels/sources/index.d.ts +3 -3
  45. package/lib/panels/sources/index.js.map +1 -1
  46. package/lib/panels/sources/model.d.ts +3 -3
  47. package/lib/panels/sources/model.js.map +1 -1
  48. package/lib/panels/sources/sourcepath.d.ts +2 -2
  49. package/lib/panels/variables/grid.d.ts +5 -5
  50. package/lib/panels/variables/gridpanel.d.ts +4 -4
  51. package/lib/panels/variables/gridpanel.js +5 -2
  52. package/lib/panels/variables/gridpanel.js.map +1 -1
  53. package/lib/panels/variables/index.d.ts +5 -5
  54. package/lib/panels/variables/index.js +1 -0
  55. package/lib/panels/variables/index.js.map +1 -1
  56. package/lib/panels/variables/mimerenderer.d.ts +3 -3
  57. package/lib/panels/variables/mimerenderer.js.map +1 -1
  58. package/lib/panels/variables/model.d.ts +2 -2
  59. package/lib/panels/variables/model.js.map +1 -1
  60. package/lib/panels/variables/scope.d.ts +4 -4
  61. package/lib/panels/variables/scope.js.map +1 -1
  62. package/lib/panels/variables/tree.d.ts +3 -3
  63. package/lib/panels/variables/tree.js +1 -1
  64. package/lib/panels/variables/tree.js.map +1 -1
  65. package/lib/service.d.ts +9 -8
  66. package/lib/service.js +4 -5
  67. package/lib/service.js.map +1 -1
  68. package/lib/session.d.ts +5 -5
  69. package/lib/session.js.map +1 -1
  70. package/lib/sidebar.d.ts +4 -4
  71. package/lib/sidebar.js.map +1 -1
  72. package/lib/sources.d.ts +6 -6
  73. package/lib/sources.js.map +1 -1
  74. package/lib/tokens.d.ts +11 -10
  75. package/lib/tokens.js.map +1 -1
  76. package/package.json +22 -22
  77. package/src/config.ts +1 -1
  78. package/src/dialogs/evaluate.ts +4 -3
  79. package/src/displayregistry.ts +1 -1
  80. package/src/factory.ts +3 -6
  81. package/src/handler.ts +12 -11
  82. package/src/handlers/console.ts +8 -6
  83. package/src/handlers/editor.ts +10 -18
  84. package/src/handlers/file.ts +6 -5
  85. package/src/handlers/notebook.ts +8 -10
  86. package/src/handlers/pausedoverlay.ts +4 -7
  87. package/src/hash.ts +2 -1
  88. package/src/model.ts +4 -3
  89. package/src/panels/breakpoints/body.tsx +3 -6
  90. package/src/panels/breakpoints/index.ts +5 -4
  91. package/src/panels/breakpoints/model.ts +3 -2
  92. package/src/panels/breakpoints/pauseonexceptions.tsx +2 -2
  93. package/src/panels/callstack/body.tsx +1 -1
  94. package/src/panels/callstack/index.ts +5 -4
  95. package/src/panels/callstack/model.ts +5 -4
  96. package/src/panels/kernelSources/body.tsx +4 -3
  97. package/src/panels/kernelSources/filter.tsx +2 -2
  98. package/src/panels/kernelSources/index.tsx +3 -2
  99. package/src/panels/kernelSources/model.ts +3 -2
  100. package/src/panels/sources/body.ts +5 -2
  101. package/src/panels/sources/index.tsx +4 -3
  102. package/src/panels/sources/model.ts +4 -3
  103. package/src/panels/sources/sourcepath.tsx +2 -2
  104. package/src/panels/variables/grid.ts +5 -5
  105. package/src/panels/variables/gridpanel.ts +12 -11
  106. package/src/panels/variables/index.ts +7 -5
  107. package/src/panels/variables/mimerenderer.ts +5 -7
  108. package/src/panels/variables/model.ts +3 -2
  109. package/src/panels/variables/scope.tsx +5 -8
  110. package/src/panels/variables/tree.tsx +7 -6
  111. package/src/service.ts +15 -17
  112. package/src/session.ts +7 -5
  113. package/src/sidebar.ts +5 -4
  114. package/src/sources.ts +9 -6
  115. package/src/tokens.ts +15 -15
  116. package/style/variables.css +2 -0
@@ -1,12 +1,13 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { ISignal, Signal } from '@lumino/signaling';
4
+ import type { ISignal } from '@lumino/signaling';
5
+ import { Signal } from '@lumino/signaling';
5
6
 
6
7
  import { DebuggerDisplayRegistry } from '../../displayregistry';
7
- import { IDebugger, IDebuggerDisplayRegistry } from '../../tokens';
8
- import { INotebookTracker } from '@jupyterlab/notebook';
9
- import { IConsoleTracker } from '@jupyterlab/console';
8
+ import type { IDebugger, IDebuggerDisplayRegistry } from '../../tokens';
9
+ import type { INotebookTracker } from '@jupyterlab/notebook';
10
+ import type { IConsoleTracker } from '@jupyterlab/console';
10
11
  /**
11
12
  * A model for a callstack.
12
13
  */
@@ -13,10 +13,11 @@ import {
13
13
 
14
14
  import { showErrorMessage } from '@jupyterlab/apputils';
15
15
 
16
- import { ITranslator, nullTranslator } from '@jupyterlab/translation';
16
+ import type { ITranslator } from '@jupyterlab/translation';
17
+ import { nullTranslator } from '@jupyterlab/translation';
17
18
 
18
- import { IDebugger } from '../../tokens';
19
- import { IRenderMime } from '@jupyterlab/rendermime';
19
+ import type { IDebugger } from '../../tokens';
20
+ import type { IRenderMime } from '@jupyterlab/rendermime';
20
21
 
21
22
  /**
22
23
  * The class for each source row.
@@ -5,10 +5,10 @@ import { UseSignal } from '@jupyterlab/ui-components';
5
5
 
6
6
  import React from 'react';
7
7
 
8
- import { IDebugger } from '../../tokens';
8
+ import type { IDebugger } from '../../tokens';
9
9
 
10
10
  import { Search } from '@jupyter/react-components';
11
- import { TranslationBundle } from '@jupyterlab/translation';
11
+ import type { TranslationBundle } from '@jupyterlab/translation';
12
12
 
13
13
  /**
14
14
  * The class name added to the filebrowser crumbs node.
@@ -3,7 +3,8 @@
3
3
  import * as React from 'react';
4
4
  import { ReactWidget } from '@jupyterlab/apputils';
5
5
 
6
- import { ITranslator, nullTranslator } from '@jupyterlab/translation';
6
+ import type { ITranslator } from '@jupyterlab/translation';
7
+ import { nullTranslator } from '@jupyterlab/translation';
7
8
 
8
9
  import { showErrorMessage } from '@jupyterlab/apputils';
9
10
 
@@ -13,7 +14,7 @@ import {
13
14
  ToolbarButton
14
15
  } from '@jupyterlab/ui-components';
15
16
 
16
- import { IDebugger } from '../../tokens';
17
+ import type { IDebugger } from '../../tokens';
17
18
 
18
19
  import { KernelSourcesBody } from './body';
19
20
  import { KernelSourcesFilter } from './filter';
@@ -1,11 +1,12 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { ISignal, Signal } from '@lumino/signaling';
4
+ import type { ISignal } from '@lumino/signaling';
5
+ import { Signal } from '@lumino/signaling';
5
6
 
6
7
  import { Debouncer } from '@lumino/polling';
7
8
 
8
- import { IDebugger } from '../../tokens';
9
+ import type { IDebugger } from '../../tokens';
9
10
 
10
11
  /**
11
12
  * The rate limit for the filter debouncer
@@ -1,7 +1,10 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { CodeEditorWrapper, IEditorServices } from '@jupyterlab/codeeditor';
4
+ import type {
5
+ CodeEditorWrapper,
6
+ IEditorServices
7
+ } from '@jupyterlab/codeeditor';
5
8
 
6
9
  import { Signal } from '@lumino/signaling';
7
10
 
@@ -11,7 +14,7 @@ import { Debugger } from '../..';
11
14
 
12
15
  import { EditorHandler } from '../../handlers/editor';
13
16
 
14
- import { IDebugger } from '../../tokens';
17
+ import type { IDebugger } from '../../tokens';
15
18
 
16
19
  /**
17
20
  * The body for a Sources Panel.
@@ -3,8 +3,9 @@
3
3
  | Distributed under the terms of the Modified BSD License.
4
4
  |----------------------------------------------------------------------------*/
5
5
 
6
- import { IEditorServices } from '@jupyterlab/codeeditor';
7
- import { ITranslator, nullTranslator } from '@jupyterlab/translation';
6
+ import type { IEditorServices } from '@jupyterlab/codeeditor';
7
+ import type { ITranslator } from '@jupyterlab/translation';
8
+ import { nullTranslator } from '@jupyterlab/translation';
8
9
  import {
9
10
  PanelWithToolbar,
10
11
  ReactWidget,
@@ -12,7 +13,7 @@ import {
12
13
  viewBreakpointIcon
13
14
  } from '@jupyterlab/ui-components';
14
15
  import React from 'react';
15
- import { IDebugger } from '../../tokens';
16
+ import type { IDebugger } from '../../tokens';
16
17
  import { SourcesBody } from './body';
17
18
  import { SourcePathComponent } from './sourcepath';
18
19
 
@@ -1,11 +1,12 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { ISignal, Signal } from '@lumino/signaling';
4
+ import type { ISignal } from '@lumino/signaling';
5
+ import { Signal } from '@lumino/signaling';
5
6
 
6
7
  import { DebuggerDisplayRegistry } from '../../displayregistry';
7
- import { IDebugger, IDebuggerDisplayRegistry } from '../../tokens';
8
- import { IEditorMimeTypeService } from '@jupyterlab/codeeditor';
8
+ import type { IDebugger, IDebuggerDisplayRegistry } from '../../tokens';
9
+ import type { IEditorMimeTypeService } from '@jupyterlab/codeeditor';
9
10
 
10
11
  /**
11
12
  * The model to keep track of the current source being displayed.
@@ -2,9 +2,9 @@
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
4
  import { UseSignal } from '@jupyterlab/ui-components';
5
- import { TranslationBundle } from '@jupyterlab/translation';
5
+ import type { TranslationBundle } from '@jupyterlab/translation';
6
6
  import React from 'react';
7
- import { IDebugger } from '../../tokens';
7
+ import type { IDebugger } from '../../tokens';
8
8
 
9
9
  /**
10
10
  * A React component to display the path to a source.
@@ -1,17 +1,17 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { IThemeManager } from '@jupyterlab/apputils';
4
+ import type { IThemeManager } from '@jupyterlab/apputils';
5
5
 
6
- import { ITranslator } from '@jupyterlab/translation';
6
+ import type { ITranslator } from '@jupyterlab/translation';
7
7
 
8
- import { CommandRegistry } from '@lumino/commands';
8
+ import type { CommandRegistry } from '@lumino/commands';
9
9
 
10
- import { Message } from '@lumino/messaging';
10
+ import type { Message } from '@lumino/messaging';
11
11
 
12
12
  import { Panel } from '@lumino/widgets';
13
13
 
14
- import { IDebugger } from '../../tokens';
14
+ import type { IDebugger } from '../../tokens';
15
15
 
16
16
  import type * as GridPanelModule from './gridpanel';
17
17
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { CommandRegistry } from '@lumino/commands';
4
+ import type { CommandRegistry } from '@lumino/commands';
5
5
  import {
6
6
  BasicKeyHandler,
7
7
  BasicMouseHandler,
@@ -10,17 +10,15 @@ import {
10
10
  DataModel,
11
11
  TextRenderer
12
12
  } from '@lumino/datagrid';
13
- import { ISignal, Signal } from '@lumino/signaling';
13
+ import type { ISignal } from '@lumino/signaling';
14
+ import { Signal } from '@lumino/signaling';
14
15
  import { Panel } from '@lumino/widgets';
15
16
 
16
- import { IThemeManager } from '@jupyterlab/apputils';
17
- import {
18
- ITranslator,
19
- nullTranslator,
20
- TranslationBundle
21
- } from '@jupyterlab/translation';
17
+ import type { IThemeManager } from '@jupyterlab/apputils';
18
+ import type { ITranslator, TranslationBundle } from '@jupyterlab/translation';
19
+ import { nullTranslator } from '@jupyterlab/translation';
22
20
 
23
- import { IDebugger } from '../../tokens';
21
+ import type { IDebugger } from '../../tokens';
24
22
  import { Debugger } from '../../';
25
23
 
26
24
  /**
@@ -344,7 +342,10 @@ namespace Private {
344
342
  node = palette.querySelector('.jp-mod-selection');
345
343
  const selectionFillColor = getComputedStyle(node!).color;
346
344
  node = palette.querySelector('.jp-mod-text');
347
- const textColor = getComputedStyle(node!).color;
345
+ const textStyle = getComputedStyle(node!);
346
+ const textColor = textStyle.color;
347
+ const fontFamily = textStyle.fontFamily;
348
+ const fontSize = textStyle.fontSize;
348
349
  document.body.removeChild(palette);
349
350
  return {
350
351
  style: {
@@ -358,7 +359,7 @@ namespace Private {
358
359
  selectionFillColor
359
360
  },
360
361
  textRenderer: new TextRenderer({
361
- font: '12px sans-serif',
362
+ font: `${fontSize} ${fontFamily}`,
362
363
  textColor,
363
364
  backgroundColor: '',
364
365
  verticalAlignment: 'center',
@@ -1,17 +1,18 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { IThemeManager } from '@jupyterlab/apputils';
5
- import { ITranslator, nullTranslator } from '@jupyterlab/translation';
4
+ import type { IThemeManager } from '@jupyterlab/apputils';
5
+ import type { ITranslator } from '@jupyterlab/translation';
6
+ import { nullTranslator } from '@jupyterlab/translation';
6
7
  import {
7
8
  PanelWithToolbar,
8
9
  tableRowsIcon,
9
10
  ToolbarButton,
10
11
  treeViewIcon
11
12
  } from '@jupyterlab/ui-components';
12
- import { CommandRegistry } from '@lumino/commands';
13
- import { Panel, Widget } from '@lumino/widgets';
14
- import { IDebugger } from '../../tokens';
13
+ import type { CommandRegistry } from '@lumino/commands';
14
+ import type { Panel, Widget } from '@lumino/widgets';
15
+ import type { IDebugger } from '../../tokens';
15
16
  import { VariablesBodyGrid } from './grid';
16
17
  import { ScopeSwitcher } from './scope';
17
18
  import { VariablesBodyTree } from './tree';
@@ -141,6 +142,7 @@ export class Variables extends PanelWithToolbar {
141
142
  */
142
143
  export const convertType = (variable: IDebugger.IVariable): string | number => {
143
144
  const { type, value } = variable;
145
+ // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
144
146
  switch (type) {
145
147
  case 'int':
146
148
  return parseInt(value, 10);
@@ -4,16 +4,14 @@
4
4
  */
5
5
 
6
6
  import { MainAreaWidget } from '@jupyterlab/apputils';
7
- import { IRenderMimeRegistry, MimeModel } from '@jupyterlab/rendermime';
8
- import {
9
- ITranslator,
10
- nullTranslator,
11
- TranslationBundle
12
- } from '@jupyterlab/translation';
7
+ import type { IRenderMimeRegistry } from '@jupyterlab/rendermime';
8
+ import { MimeModel } from '@jupyterlab/rendermime';
9
+ import type { ITranslator, TranslationBundle } from '@jupyterlab/translation';
10
+ import { nullTranslator } from '@jupyterlab/translation';
13
11
  import { PromiseDelegate } from '@lumino/coreutils';
14
12
  import { Panel } from '@lumino/widgets';
15
13
  import { murmur2 } from '../../hash';
16
- import { IDebugger } from '../../tokens';
14
+ import type { IDebugger } from '../../tokens';
17
15
 
18
16
  const RENDERER_PANEL_CLASS = 'jp-VariableRendererPanel';
19
17
  const RENDERER_PANEL_RENDERER_CLASS = 'jp-VariableRendererPanel-renderer';
@@ -1,9 +1,10 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { ISignal, Signal } from '@lumino/signaling';
4
+ import type { ISignal } from '@lumino/signaling';
5
+ import { Signal } from '@lumino/signaling';
5
6
 
6
- import { IDebugger } from '../../tokens';
7
+ import type { IDebugger } from '../../tokens';
7
8
 
8
9
  /**
9
10
  * A model for a variable explorer.
@@ -3,16 +3,13 @@
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
5
 
6
- import {
7
- ITranslator,
8
- nullTranslator,
9
- TranslationBundle
10
- } from '@jupyterlab/translation';
6
+ import type { ITranslator, TranslationBundle } from '@jupyterlab/translation';
7
+ import { nullTranslator } from '@jupyterlab/translation';
11
8
  import { HTMLSelect, ReactWidget, UseSignal } from '@jupyterlab/ui-components';
12
9
  import React, { useState } from 'react';
13
- import { IDebugger } from '../../tokens';
14
- import { VariablesBodyGrid } from './grid';
15
- import { VariablesBodyTree } from './tree';
10
+ import type { IDebugger } from '../../tokens';
11
+ import type { VariablesBodyGrid } from './grid';
12
+ import type { VariablesBodyTree } from './tree';
16
13
 
17
14
  /**
18
15
  * A React component to handle scope changes.
@@ -1,7 +1,8 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { ITranslator, nullTranslator } from '@jupyterlab/translation';
4
+ import type { ITranslator } from '@jupyterlab/translation';
5
+ import { nullTranslator } from '@jupyterlab/translation';
5
6
 
6
7
  import {
7
8
  getTreeItemElement,
@@ -13,9 +14,9 @@ import { Button, TreeItem, TreeView } from '@jupyter/react-components';
13
14
 
14
15
  import { ArrayExt } from '@lumino/algorithm';
15
16
 
16
- import { CommandRegistry } from '@lumino/commands';
17
+ import type { CommandRegistry } from '@lumino/commands';
17
18
 
18
- import { DebugProtocol } from '@vscode/debugprotocol';
19
+ import type { DebugProtocol } from '@vscode/debugprotocol';
19
20
 
20
21
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
21
22
 
@@ -23,9 +24,9 @@ import { convertType } from '.';
23
24
 
24
25
  import { Debugger } from '../../debugger';
25
26
 
26
- import { IDebugger } from '../../tokens';
27
+ import type { IDebugger } from '../../tokens';
27
28
 
28
- import { VariablesModel } from './model';
29
+ import type { VariablesModel } from './model';
29
30
 
30
31
  /**
31
32
  * The body for tree of variables.
@@ -367,7 +368,7 @@ const VariableComponent = (props: IVariableComponentProps): JSX.Element => {
367
368
  }}
368
369
  >
369
370
  <span className="jp-DebuggerVariables-name">{variable.name}</span>
370
- {details && (
371
+ {details != null && (
371
372
  <span className="jp-DebuggerVariables-detail">{details}</span>
372
373
  )}
373
374
  {hasMimeRenderer && showDetailsButton && (
package/src/service.ts CHANGED
@@ -1,27 +1,25 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { KernelSpec, Session } from '@jupyterlab/services';
4
+ import type { KernelSpec, Session } from '@jupyterlab/services';
5
5
 
6
- import {
7
- ITranslator,
8
- nullTranslator,
9
- TranslationBundle
10
- } from '@jupyterlab/translation';
6
+ import type { ITranslator, TranslationBundle } from '@jupyterlab/translation';
7
+ import { nullTranslator } from '@jupyterlab/translation';
11
8
 
12
- import { IDisposable } from '@lumino/disposable';
9
+ import type { IDisposable } from '@lumino/disposable';
13
10
 
14
- import { ISignal, Signal } from '@lumino/signaling';
11
+ import type { ISignal } from '@lumino/signaling';
12
+ import { Signal } from '@lumino/signaling';
15
13
 
16
- import { DebugProtocol } from '@vscode/debugprotocol';
14
+ import type { DebugProtocol } from '@vscode/debugprotocol';
17
15
 
18
16
  import { Debugger } from './debugger';
19
17
 
20
- import { VariablesModel } from './panels/variables/model';
18
+ import type { VariablesModel } from './panels/variables/model';
21
19
 
22
- import { IDebugger } from './tokens';
23
- import { IDebuggerDisplayRegistry } from './tokens';
24
- import { IEditorMimeTypeService } from '@jupyterlab/codeeditor';
20
+ import type { IDebugger } from './tokens';
21
+ import type { IDebuggerDisplayRegistry } from './tokens';
22
+ import type { IEditorMimeTypeService } from '@jupyterlab/codeeditor';
25
23
 
26
24
  /**
27
25
  * A concrete implementation of the IDebugger interface.
@@ -167,7 +165,7 @@ export class DebuggerService implements IDebugger, IDisposable {
167
165
  * Whether there exists a thread in stopped state.
168
166
  */
169
167
  hasStoppedThreads(): boolean {
170
- return this._model?.stoppedThreads.size > 0 ?? false;
168
+ return this._model.stoppedThreads.size > 0;
171
169
  }
172
170
 
173
171
  /**
@@ -218,12 +216,12 @@ export class DebuggerService implements IDebugger, IDisposable {
218
216
  if (!this.session) {
219
217
  throw new Error('No active debugger session');
220
218
  }
221
- await this.session.sendRequest('continue', {
222
- threadId: this._currentThread()
223
- });
224
219
  this._model.stoppedThreads.delete(this._currentThread());
225
220
  this._clearModel();
226
221
  this._clearSignals();
222
+ await this.session.sendRequest('continue', {
223
+ threadId: this._currentThread()
224
+ });
227
225
  } catch (err) {
228
226
  console.error('Error:', err.message);
229
227
  }
package/src/session.ts CHANGED
@@ -1,17 +1,19 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { KernelMessage, Session } from '@jupyterlab/services';
4
+ import type { KernelMessage, Session } from '@jupyterlab/services';
5
5
 
6
- import { ITranslator, nullTranslator } from '@jupyterlab/translation';
6
+ import type { ITranslator } from '@jupyterlab/translation';
7
+ import { nullTranslator } from '@jupyterlab/translation';
7
8
 
8
9
  import { PromiseDelegate } from '@lumino/coreutils';
9
10
 
10
- import { ISignal, Signal } from '@lumino/signaling';
11
+ import type { ISignal } from '@lumino/signaling';
12
+ import { Signal } from '@lumino/signaling';
11
13
 
12
- import { DebugProtocol } from '@vscode/debugprotocol';
14
+ import type { DebugProtocol } from '@vscode/debugprotocol';
13
15
 
14
- import { IDebugger } from './tokens';
16
+ import type { IDebugger } from './tokens';
15
17
 
16
18
  /**
17
19
  * A concrete implementation of IDebugger.ISession.
package/src/sidebar.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { IThemeManager } from '@jupyterlab/apputils';
4
+ import type { IThemeManager } from '@jupyterlab/apputils';
5
5
 
6
- import { IEditorServices } from '@jupyterlab/codeeditor';
6
+ import type { IEditorServices } from '@jupyterlab/codeeditor';
7
7
 
8
- import { ITranslator, nullTranslator } from '@jupyterlab/translation';
8
+ import type { ITranslator } from '@jupyterlab/translation';
9
+ import { nullTranslator } from '@jupyterlab/translation';
9
10
 
10
11
  import { bugIcon, SidePanel } from '@jupyterlab/ui-components';
11
12
 
@@ -21,7 +22,7 @@ import { KernelSources as KernelSourcesPanel } from './panels/kernelSources';
21
22
 
22
23
  import { Variables as VariablesPanel } from './panels/variables';
23
24
 
24
- import { IDebugger } from './tokens';
25
+ import type { IDebugger } from './tokens';
25
26
 
26
27
  /**
27
28
  * A debugger sidebar.
package/src/sources.ts CHANGED
@@ -1,14 +1,17 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { JupyterFrontEnd } from '@jupyterlab/application';
4
+ import type { JupyterFrontEnd } from '@jupyterlab/application';
5
5
  import { DOMUtils, MainAreaWidget, WidgetTracker } from '@jupyterlab/apputils';
6
- import { CodeEditorWrapper, IEditorServices } from '@jupyterlab/codeeditor';
7
- import { IConsoleTracker } from '@jupyterlab/console';
8
- import { IEditorTracker } from '@jupyterlab/fileeditor';
9
- import { INotebookTracker } from '@jupyterlab/notebook';
6
+ import type {
7
+ CodeEditorWrapper,
8
+ IEditorServices
9
+ } from '@jupyterlab/codeeditor';
10
+ import type { IConsoleTracker } from '@jupyterlab/console';
11
+ import type { IEditorTracker } from '@jupyterlab/fileeditor';
12
+ import type { INotebookTracker } from '@jupyterlab/notebook';
10
13
  import { textEditorIcon } from '@jupyterlab/ui-components';
11
- import { IDebugger } from './tokens';
14
+ import type { IDebugger } from './tokens';
12
15
 
13
16
  /**
14
17
  * The source and editor manager for a debugger instance.
package/src/tokens.ts CHANGED
@@ -1,25 +1,26 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
3
 
4
- import { CodeEditor, CodeEditorWrapper } from '@jupyterlab/codeeditor';
4
+ import type { CodeEditor, CodeEditorWrapper } from '@jupyterlab/codeeditor';
5
5
 
6
- import { KernelMessage, Session } from '@jupyterlab/services';
6
+ import type { KernelMessage, Session } from '@jupyterlab/services';
7
7
 
8
- import { ISharedText } from '@jupyter/ydoc';
8
+ import type { ISharedText } from '@jupyter/ydoc';
9
9
 
10
- import { ReadonlyJSONObject, Token } from '@lumino/coreutils';
10
+ import type { ReadonlyJSONObject } from '@lumino/coreutils';
11
+ import { Token } from '@lumino/coreutils';
11
12
 
12
- import { IDisposable, IObservableDisposable } from '@lumino/disposable';
13
+ import type { IDisposable, IObservableDisposable } from '@lumino/disposable';
13
14
 
14
- import { ISignal, Signal } from '@lumino/signaling';
15
+ import type { ISignal, Signal } from '@lumino/signaling';
15
16
 
16
- import { Panel } from '@lumino/widgets';
17
+ import type { Panel } from '@lumino/widgets';
17
18
 
18
- import { DebugProtocol } from '@vscode/debugprotocol';
19
+ import type { DebugProtocol } from '@vscode/debugprotocol';
19
20
 
20
- import { DebuggerHandler } from './handler';
21
+ import type { DebuggerHandler } from './handler';
21
22
 
22
- import { IDebuggerSourceDisplayProvider } from './displayregistry';
23
+ import type { IDebuggerSourceDisplayProvider } from './displayregistry';
23
24
 
24
25
  /**
25
26
  * An interface describing an application's visual debugger.
@@ -758,11 +759,10 @@ export namespace IDebugger {
758
759
  * #### Notes
759
760
  * This is experimental API
760
761
  */
761
- export interface IVariableSelection
762
- extends Pick<
763
- DebugProtocol.Variable,
764
- 'name' | 'type' | 'variablesReference' | 'value'
765
- > {}
762
+ export interface IVariableSelection extends Pick<
763
+ DebugProtocol.Variable,
764
+ 'name' | 'type' | 'variablesReference' | 'value'
765
+ > {}
766
766
 
767
767
  /**
768
768
  * Debugger sidebar interface.
@@ -87,6 +87,8 @@
87
87
 
88
88
  .jp-DebuggerVariables-colorPalette .jp-mod-text {
89
89
  color: var(--jp-content-font-color0);
90
+ font-family: var(--jp-datagrid-font-family, var(--jp-content-font-family));
91
+ font-size: var(--jp-datagrid-font-size, 12px);
90
92
  }
91
93
 
92
94
  .jp-VariableRendererPanel {