@codingame/monaco-vscode-notebook-service-override 11.1.2 → 12.0.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/index.d.ts +2 -1
- package/index.js +64 -1
- package/package.json +47 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +43 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +109 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +13 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +72 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +23 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +30 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +76 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +10 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +52 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +28 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +51 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +21 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +69 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +460 -382
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +124 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +87 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +16 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +9 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +40 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +115 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +111 -117
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +11 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +5 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +113 -198
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +25 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +115 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +76 -147
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +45 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +30 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +19 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +59 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +11 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +69 -113
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +194 -184
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +51 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +14 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +57 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +29 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +17 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +14 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +21 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +30 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +134 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +164 -121
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +37 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +131 -55
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +12 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +75 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +31 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +78 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +45 -42
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +96 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +57 -54
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +74 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +6 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.d.ts +53 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +2 -1
- package/worker.js +2 -1
- package/workers/notebook.worker.d.ts +1 -0
- package/notebook.js +0 -50
- package/workers/notebook.worker.js +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { IAccessibleViewImplentation } from "vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
3
|
+
import { AccessibleViewType, AccessibleContentProvider } from "vscode/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
4
|
+
export declare class NotebookAccessibilityHelp implements IAccessibleViewImplentation {
|
|
5
|
+
readonly priority = 105;
|
|
6
|
+
readonly name = "notebook";
|
|
7
|
+
readonly when: import("vscode/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
|
|
8
|
+
readonly type: AccessibleViewType;
|
|
9
|
+
getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
|
|
10
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { NOTEBOOK_EDITOR_FOCUSED, IS_COMPOSITE_NOTEBOOK } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { AccessibleContentProvider } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
4
|
+
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
5
|
+
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
4
6
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
5
7
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
6
8
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
@@ -9,8 +11,8 @@ class NotebookAccessibilityHelp {
|
|
|
9
11
|
constructor() {
|
|
10
12
|
this.priority = 105;
|
|
11
13
|
this.name = 'notebook';
|
|
12
|
-
this.when = (
|
|
13
|
-
this.type =
|
|
14
|
+
this.when = ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( IS_COMPOSITE_NOTEBOOK.negate())));
|
|
15
|
+
this.type = AccessibleViewType.Help;
|
|
14
16
|
}
|
|
15
17
|
getProvider(accessor) {
|
|
16
18
|
const activeEditor = accessor.get(ICodeEditorService).getActiveCodeEditor()
|
|
@@ -25,66 +27,64 @@ class NotebookAccessibilityHelp {
|
|
|
25
27
|
function getAccessibilityHelpText() {
|
|
26
28
|
return [
|
|
27
29
|
( localize(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
7637,
|
|
31
|
+
'The notebook view is a collection of code and markdown cells. Code cells can be executed and will produce output directly below the cell.'
|
|
32
|
+
)),
|
|
31
33
|
( localize(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
7638,
|
|
35
|
+
'The Edit Cell command{0} will focus on the cell input.',
|
|
36
|
+
'<keybinding:notebook.cell.edit>'
|
|
37
|
+
)),
|
|
36
38
|
( localize(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
7639,
|
|
40
|
+
'The Quit Edit command{0} will set focus on the cell container. The default (Escape) key may need to be pressed twice first exit the virtual cursor if active.',
|
|
41
|
+
'<keybinding:notebook.cell.quitEdit>'
|
|
42
|
+
)),
|
|
41
43
|
( localize(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
7640,
|
|
45
|
+
'The Focus Output command{0} will set focus in the cell\'s output.',
|
|
46
|
+
'<keybinding:notebook.cell.focusInOutput>'
|
|
47
|
+
)),
|
|
46
48
|
( localize(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
7641,
|
|
50
|
+
'The Focus Next Cell Editor command{0} will set focus in the next cell\'s editor.',
|
|
51
|
+
'<keybinding:notebook.focusNextEditor>'
|
|
52
|
+
)),
|
|
51
53
|
( localize(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
7642,
|
|
55
|
+
'The Focus Previous Cell Editor command{0} will set focus in the previous cell\'s editor.',
|
|
56
|
+
'<keybinding:notebook.focusPreviousEditor>'
|
|
57
|
+
)),
|
|
56
58
|
( localize(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
7643,
|
|
60
|
+
'The up and down arrows will also move focus between cells while focused on the outer cell container.'
|
|
61
|
+
)),
|
|
60
62
|
( localize(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
7644,
|
|
64
|
+
'The Execute Cell command{0} executes the cell that currently has focus.',
|
|
65
|
+
'<keybinding:notebook.cell.executeAndFocusContainer>'
|
|
66
|
+
)),
|
|
65
67
|
( localize(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
7645,
|
|
69
|
+
'The Insert Cell Above{0} and Below{1} commands will create new empty code cells.',
|
|
70
|
+
'<keybinding:notebook.cell.insertCodeCellAbove>',
|
|
71
|
+
'<keybinding:notebook.cell.insertCodeCellBelow>'
|
|
72
|
+
)),
|
|
71
73
|
( localize(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
7646,
|
|
75
|
+
'The Change Cell to Code/Markdown commands are used to switch between cell types.'
|
|
76
|
+
))
|
|
75
77
|
].join('\n');
|
|
76
78
|
}
|
|
77
79
|
function getAccessibilityHelpProvider(accessor, editor) {
|
|
78
80
|
const helpText = getAccessibilityHelpText();
|
|
79
|
-
return (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
))
|
|
87
|
-
);
|
|
81
|
+
return ( new AccessibleContentProvider(
|
|
82
|
+
AccessibleViewProviderId.Notebook,
|
|
83
|
+
{ type: AccessibleViewType.Help },
|
|
84
|
+
() => helpText,
|
|
85
|
+
() => editor.focus(),
|
|
86
|
+
AccessibilityVerbositySettingId.Notebook
|
|
87
|
+
));
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export { NotebookAccessibilityHelp };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AccessibleViewType, AccessibleContentProvider } from "vscode/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
2
|
+
import { IAccessibleViewImplentation } from "vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
3
|
+
import { ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
5
|
+
export declare class NotebookAccessibleView implements IAccessibleViewImplentation {
|
|
6
|
+
readonly priority = 100;
|
|
7
|
+
readonly name = "notebook";
|
|
8
|
+
readonly type = AccessibleViewType.View;
|
|
9
|
+
readonly when: import("vscode/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
|
|
10
|
+
getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare function getAccessibleOutputProvider(editorService: IEditorService): AccessibleContentProvider | undefined;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
2
3
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
4
|
+
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
5
|
+
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
6
|
+
import { NOTEBOOK_CELL_LIST_FOCUSED } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
5
7
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
8
|
+
import { InputFocusedContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
9
|
+
import { getAllOutputsText } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper';
|
|
6
10
|
|
|
7
11
|
class NotebookAccessibleView {
|
|
8
12
|
constructor() {
|
|
9
13
|
this.priority = 100;
|
|
10
14
|
this.name = 'notebook';
|
|
11
|
-
this.type =
|
|
12
|
-
this.when = ( ContextKeyExpr.and(
|
|
15
|
+
this.type = AccessibleViewType.View;
|
|
16
|
+
this.when = ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated())));
|
|
13
17
|
}
|
|
14
18
|
getProvider(accessor) {
|
|
15
19
|
const editorService = accessor.get(IEditorService);
|
|
@@ -26,45 +30,19 @@ function getAccessibleOutputProvider(editorService) {
|
|
|
26
30
|
return;
|
|
27
31
|
}
|
|
28
32
|
const viewCell = notebookViewModel.viewCells[selections[0].start];
|
|
29
|
-
|
|
30
|
-
const decoder = ( new TextDecoder());
|
|
31
|
-
for (let i = 0; i < viewCell.outputsViewModels.length; i++) {
|
|
32
|
-
const outputViewModel = viewCell.outputsViewModels[i];
|
|
33
|
-
const outputTextModel = viewCell.model.outputs[i];
|
|
34
|
-
const [mimeTypes, pick] = outputViewModel.resolveMimeTypes(notebookEditor.textModel, undefined);
|
|
35
|
-
const mimeType = mimeTypes[pick].mimeType;
|
|
36
|
-
let buffer = outputTextModel.outputs.find(output => output.mime === mimeType);
|
|
37
|
-
if (!buffer || mimeType.startsWith('image')) {
|
|
38
|
-
buffer = outputTextModel.outputs.find(output => !output.mime.startsWith('image'));
|
|
39
|
-
}
|
|
40
|
-
let text = `${mimeType}`;
|
|
41
|
-
if (buffer) {
|
|
42
|
-
const charLimit = 100_000;
|
|
43
|
-
text = decoder.decode(buffer.data.slice(0, charLimit).buffer);
|
|
44
|
-
if (buffer.data.byteLength > charLimit) {
|
|
45
|
-
text = text + '...(truncated)';
|
|
46
|
-
}
|
|
47
|
-
if (mimeType.endsWith('error')) {
|
|
48
|
-
text = text.replace(/\\u001b\[[0-9;]*m/gi, '').replaceAll('\\n', '\n');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const index = viewCell.outputsViewModels.length > 1
|
|
52
|
-
? `Cell output ${i + 1} of ${viewCell.outputsViewModels.length}\n`
|
|
53
|
-
: '';
|
|
54
|
-
outputContent = outputContent.concat(`${index}${text}\n`);
|
|
55
|
-
}
|
|
33
|
+
const outputContent = getAllOutputsText(notebookDocument, viewCell);
|
|
56
34
|
if (!outputContent) {
|
|
57
35
|
return;
|
|
58
36
|
}
|
|
59
37
|
return ( new AccessibleContentProvider(
|
|
60
|
-
|
|
61
|
-
{ type:
|
|
38
|
+
AccessibleViewProviderId.Notebook,
|
|
39
|
+
{ type: AccessibleViewType.View },
|
|
62
40
|
() => { return outputContent; },
|
|
63
41
|
() => {
|
|
64
42
|
notebookEditor?.setFocus(selections[0]);
|
|
65
|
-
|
|
43
|
+
notebookEditor.focus();
|
|
66
44
|
},
|
|
67
|
-
|
|
45
|
+
AccessibilityVerbositySettingId.Notebook
|
|
68
46
|
));
|
|
69
47
|
}
|
|
70
48
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ContributedNotebookRendererEntrypoint, RendererMessagingSpec } from "vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
2
|
+
declare const NotebookEditorContribution: Readonly<{
|
|
3
|
+
type: "type";
|
|
4
|
+
displayName: "displayName";
|
|
5
|
+
selector: "selector";
|
|
6
|
+
priority: "priority";
|
|
7
|
+
}>;
|
|
8
|
+
export interface INotebookEditorContribution {
|
|
9
|
+
readonly [NotebookEditorContribution.type]: string;
|
|
10
|
+
readonly [NotebookEditorContribution.displayName]: string;
|
|
11
|
+
readonly [NotebookEditorContribution.selector]?: readonly {
|
|
12
|
+
filenamePattern?: string;
|
|
13
|
+
excludeFileNamePattern?: string;
|
|
14
|
+
}[];
|
|
15
|
+
readonly [NotebookEditorContribution.priority]?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const NotebookRendererContribution: Readonly<{
|
|
18
|
+
id: "id";
|
|
19
|
+
displayName: "displayName";
|
|
20
|
+
mimeTypes: "mimeTypes";
|
|
21
|
+
entrypoint: "entrypoint";
|
|
22
|
+
hardDependencies: "dependencies";
|
|
23
|
+
optionalDependencies: "optionalDependencies";
|
|
24
|
+
requiresMessaging: "requiresMessaging";
|
|
25
|
+
}>;
|
|
26
|
+
export interface INotebookRendererContribution {
|
|
27
|
+
readonly [NotebookRendererContribution.id]?: string;
|
|
28
|
+
readonly [NotebookRendererContribution.displayName]: string;
|
|
29
|
+
readonly [NotebookRendererContribution.mimeTypes]?: readonly string[];
|
|
30
|
+
readonly [NotebookRendererContribution.entrypoint]: ContributedNotebookRendererEntrypoint;
|
|
31
|
+
readonly [NotebookRendererContribution.hardDependencies]: readonly string[];
|
|
32
|
+
readonly [NotebookRendererContribution.optionalDependencies]: readonly string[];
|
|
33
|
+
readonly [NotebookRendererContribution.requiresMessaging]: RendererMessagingSpec;
|
|
34
|
+
}
|
|
35
|
+
declare const NotebookPreloadContribution: Readonly<{
|
|
36
|
+
type: "type";
|
|
37
|
+
entrypoint: "entrypoint";
|
|
38
|
+
localResourceRoots: "localResourceRoots";
|
|
39
|
+
}>;
|
|
40
|
+
interface INotebookPreloadContribution {
|
|
41
|
+
readonly [NotebookPreloadContribution.type]: string;
|
|
42
|
+
readonly [NotebookPreloadContribution.entrypoint]: string;
|
|
43
|
+
readonly [NotebookPreloadContribution.localResourceRoots]: readonly string[];
|
|
44
|
+
}
|
|
45
|
+
export declare const notebooksExtensionPoint: import("vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry").IExtensionPoint<INotebookEditorContribution[]>;
|
|
46
|
+
export declare const notebookRendererExtensionPoint: import("vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry").IExtensionPoint<INotebookRendererContribution[]>;
|
|
47
|
+
export declare const notebookPreloadExtensionPoint: import("vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry").IExtensionPoint<INotebookPreloadContribution[]>;
|
|
48
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
3
4
|
import { NotebookEditorPriority } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
@@ -6,13 +7,13 @@ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/d
|
|
|
6
7
|
import { Extensions } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
7
8
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
8
9
|
|
|
9
|
-
const NotebookEditorContribution = (
|
|
10
|
+
const NotebookEditorContribution = ( Object.freeze({
|
|
10
11
|
type: 'type',
|
|
11
12
|
displayName: 'displayName',
|
|
12
13
|
selector: 'selector',
|
|
13
14
|
priority: 'priority',
|
|
14
|
-
}))
|
|
15
|
-
const NotebookRendererContribution = (
|
|
15
|
+
}));
|
|
16
|
+
const NotebookRendererContribution = ( Object.freeze({
|
|
16
17
|
id: 'id',
|
|
17
18
|
displayName: 'displayName',
|
|
18
19
|
mimeTypes: 'mimeTypes',
|
|
@@ -20,14 +21,14 @@ const NotebookRendererContribution = ( (Object.freeze({
|
|
|
20
21
|
hardDependencies: 'dependencies',
|
|
21
22
|
optionalDependencies: 'optionalDependencies',
|
|
22
23
|
requiresMessaging: 'requiresMessaging',
|
|
23
|
-
}))
|
|
24
|
-
const NotebookPreloadContribution = (
|
|
24
|
+
}));
|
|
25
|
+
const NotebookPreloadContribution = ( Object.freeze({
|
|
25
26
|
type: 'type',
|
|
26
27
|
entrypoint: 'entrypoint',
|
|
27
28
|
localResourceRoots: 'localResourceRoots',
|
|
28
|
-
}))
|
|
29
|
+
}));
|
|
29
30
|
const notebookProviderContribution = {
|
|
30
|
-
description: ( localize(
|
|
31
|
+
description: ( localize(7683, 'Contributes notebook document provider.')),
|
|
31
32
|
type: 'array',
|
|
32
33
|
defaultSnippets: [{ body: [{ type: '', displayName: '', 'selector': [{ 'filenamePattern': '' }] }] }],
|
|
33
34
|
items: {
|
|
@@ -40,25 +41,25 @@ const notebookProviderContribution = {
|
|
|
40
41
|
properties: {
|
|
41
42
|
[NotebookEditorContribution.type]: {
|
|
42
43
|
type: 'string',
|
|
43
|
-
description: ( localize(
|
|
44
|
+
description: ( localize(7684, 'Type of the notebook.')),
|
|
44
45
|
},
|
|
45
46
|
[NotebookEditorContribution.displayName]: {
|
|
46
47
|
type: 'string',
|
|
47
|
-
description: ( localize(
|
|
48
|
+
description: ( localize(7685, 'Human readable name of the notebook.')),
|
|
48
49
|
},
|
|
49
50
|
[NotebookEditorContribution.selector]: {
|
|
50
51
|
type: 'array',
|
|
51
|
-
description: ( localize(
|
|
52
|
+
description: ( localize(7686, 'Set of globs that the notebook is for.')),
|
|
52
53
|
items: {
|
|
53
54
|
type: 'object',
|
|
54
55
|
properties: {
|
|
55
56
|
filenamePattern: {
|
|
56
57
|
type: 'string',
|
|
57
|
-
description: ( localize(
|
|
58
|
+
description: ( localize(7687, 'Glob that the notebook is enabled for.')),
|
|
58
59
|
},
|
|
59
60
|
excludeFileNamePattern: {
|
|
60
61
|
type: 'string',
|
|
61
|
-
description: ( localize(
|
|
62
|
+
description: ( localize(7688, 'Glob that the notebook is disabled for.'))
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -66,7 +67,7 @@ const notebookProviderContribution = {
|
|
|
66
67
|
[NotebookEditorContribution.priority]: {
|
|
67
68
|
type: 'string',
|
|
68
69
|
markdownDeprecationMessage: ( localize(
|
|
69
|
-
|
|
70
|
+
7689,
|
|
70
71
|
'Controls if the custom editor is enabled automatically when the user opens a file. This may be overridden by users using the `workbench.editorAssociations` setting.'
|
|
71
72
|
)),
|
|
72
73
|
enum: [
|
|
@@ -75,22 +76,22 @@ const notebookProviderContribution = {
|
|
|
75
76
|
],
|
|
76
77
|
markdownEnumDescriptions: [
|
|
77
78
|
( localize(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
7690,
|
|
80
|
+
'The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource.'
|
|
81
|
+
)),
|
|
81
82
|
( localize(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
7691,
|
|
84
|
+
'The editor is not automatically used when the user opens a resource, but a user can switch to the editor using the `Reopen With` command.'
|
|
85
|
+
)),
|
|
85
86
|
],
|
|
86
87
|
default: 'default'
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
};
|
|
91
|
-
const defaultRendererSnippet = (
|
|
92
|
+
const defaultRendererSnippet = ( Object.freeze({ id: '', displayName: '', mimeTypes: [''], entrypoint: '' }));
|
|
92
93
|
const notebookRendererContribution = {
|
|
93
|
-
description: ( localize(
|
|
94
|
+
description: ( localize(7692, 'Contributes notebook output renderer provider.')),
|
|
94
95
|
type: 'array',
|
|
95
96
|
defaultSnippets: [{ body: [defaultRendererSnippet] }],
|
|
96
97
|
items: {
|
|
@@ -105,18 +106,18 @@ const notebookRendererContribution = {
|
|
|
105
106
|
properties: {
|
|
106
107
|
[NotebookRendererContribution.id]: {
|
|
107
108
|
type: 'string',
|
|
108
|
-
description: ( localize(
|
|
109
|
+
description: ( localize(7693, 'Unique identifier of the notebook output renderer.')),
|
|
109
110
|
},
|
|
110
111
|
[NotebookRendererContribution.displayName]: {
|
|
111
112
|
type: 'string',
|
|
112
|
-
description: ( localize(
|
|
113
|
+
description: ( localize(7694, 'Human readable name of the notebook output renderer.')),
|
|
113
114
|
},
|
|
114
115
|
[NotebookRendererContribution.hardDependencies]: {
|
|
115
116
|
type: 'array',
|
|
116
117
|
uniqueItems: true,
|
|
117
118
|
items: { type: 'string' },
|
|
118
119
|
markdownDescription: ( localize(
|
|
119
|
-
|
|
120
|
+
7695,
|
|
120
121
|
'List of kernel dependencies the renderer requires. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer can be used.'
|
|
121
122
|
)),
|
|
122
123
|
},
|
|
@@ -125,7 +126,7 @@ const notebookRendererContribution = {
|
|
|
125
126
|
uniqueItems: true,
|
|
126
127
|
items: { type: 'string' },
|
|
127
128
|
markdownDescription: ( localize(
|
|
128
|
-
|
|
129
|
+
7696,
|
|
129
130
|
'List of soft kernel dependencies the renderer can make use of. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer will be preferred over renderers that don\'t interact with the kernel.'
|
|
130
131
|
)),
|
|
131
132
|
},
|
|
@@ -138,17 +139,17 @@ const notebookRendererContribution = {
|
|
|
138
139
|
],
|
|
139
140
|
enumDescriptions: [
|
|
140
141
|
( localize(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
7697,
|
|
143
|
+
'Messaging is required. The renderer will only be used when it\'s part of an extension that can be run in an extension host.'
|
|
144
|
+
)),
|
|
144
145
|
( localize(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
( localize(
|
|
146
|
+
7698,
|
|
147
|
+
'The renderer is better with messaging available, but it\'s not requried.'
|
|
148
|
+
)),
|
|
149
|
+
( localize(7699, 'The renderer does not require messaging.')),
|
|
149
150
|
],
|
|
150
151
|
description: ( localize(
|
|
151
|
-
|
|
152
|
+
7700,
|
|
152
153
|
'Defines how and if the renderer needs to communicate with an extension host, via `createRendererMessaging`. Renderers with stronger messaging requirements may not work in all environments.'
|
|
153
154
|
)),
|
|
154
155
|
},
|
|
@@ -164,13 +165,13 @@ const notebookRendererContribution = {
|
|
|
164
165
|
properties: {
|
|
165
166
|
[NotebookRendererContribution.mimeTypes]: {
|
|
166
167
|
type: 'array',
|
|
167
|
-
description: ( localize(
|
|
168
|
+
description: ( localize(7701, 'Set of globs that the notebook is for.')),
|
|
168
169
|
items: {
|
|
169
170
|
type: 'string'
|
|
170
171
|
}
|
|
171
172
|
},
|
|
172
173
|
[NotebookRendererContribution.entrypoint]: {
|
|
173
|
-
description: ( localize(
|
|
174
|
+
description: ( localize(7702, 'File to load in the webview to render the extension.')),
|
|
174
175
|
type: 'string',
|
|
175
176
|
},
|
|
176
177
|
}
|
|
@@ -181,17 +182,17 @@ const notebookRendererContribution = {
|
|
|
181
182
|
],
|
|
182
183
|
properties: {
|
|
183
184
|
[NotebookRendererContribution.entrypoint]: {
|
|
184
|
-
description: ( localize(
|
|
185
|
+
description: ( localize(7702, 'File to load in the webview to render the extension.')),
|
|
185
186
|
type: 'object',
|
|
186
187
|
required: ['extends', 'path'],
|
|
187
188
|
properties: {
|
|
188
189
|
extends: {
|
|
189
190
|
type: 'string',
|
|
190
|
-
description: ( localize(
|
|
191
|
+
description: ( localize(7703, 'Existing renderer that this one extends.')),
|
|
191
192
|
},
|
|
192
193
|
path: {
|
|
193
194
|
type: 'string',
|
|
194
|
-
description: ( localize(
|
|
195
|
+
description: ( localize(7702, 'File to load in the webview to render the extension.')),
|
|
195
196
|
},
|
|
196
197
|
}
|
|
197
198
|
},
|
|
@@ -203,7 +204,7 @@ const notebookRendererContribution = {
|
|
|
203
204
|
}
|
|
204
205
|
};
|
|
205
206
|
const notebookPreloadContribution = {
|
|
206
|
-
description: ( localize(
|
|
207
|
+
description: ( localize(7704, 'Contributes notebook preloads.')),
|
|
207
208
|
type: 'array',
|
|
208
209
|
defaultSnippets: [{ body: [{ type: '', entrypoint: '' }] }],
|
|
209
210
|
items: {
|
|
@@ -215,17 +216,17 @@ const notebookPreloadContribution = {
|
|
|
215
216
|
properties: {
|
|
216
217
|
[NotebookPreloadContribution.type]: {
|
|
217
218
|
type: 'string',
|
|
218
|
-
description: ( localize(
|
|
219
|
+
description: ( localize(7705, 'Type of the notebook.')),
|
|
219
220
|
},
|
|
220
221
|
[NotebookPreloadContribution.entrypoint]: {
|
|
221
222
|
type: 'string',
|
|
222
|
-
description: ( localize(
|
|
223
|
+
description: ( localize(7706, 'Path to file loaded in the webview.')),
|
|
223
224
|
},
|
|
224
225
|
[NotebookPreloadContribution.localResourceRoots]: {
|
|
225
226
|
type: 'array',
|
|
226
227
|
items: { type: 'string' },
|
|
227
228
|
description: ( localize(
|
|
228
|
-
|
|
229
|
+
7707,
|
|
229
230
|
'Paths to additional resources that should be allowed in the webview.'
|
|
230
231
|
)),
|
|
231
232
|
},
|
|
@@ -272,17 +273,17 @@ class NotebooksDataRenderer extends Disposable {
|
|
|
272
273
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
273
274
|
}
|
|
274
275
|
const headers = [
|
|
275
|
-
( localize(
|
|
276
|
-
( localize(
|
|
276
|
+
( localize(7708, "ID")),
|
|
277
|
+
( localize(7709, "Name")),
|
|
277
278
|
];
|
|
278
|
-
const rows = (
|
|
279
|
+
const rows = ( contrib
|
|
279
280
|
.sort((a, b) => a.type.localeCompare(b.type))
|
|
280
281
|
.map(notebook => {
|
|
281
282
|
return [
|
|
282
283
|
notebook.type,
|
|
283
284
|
notebook.displayName
|
|
284
285
|
];
|
|
285
|
-
}))
|
|
286
|
+
}));
|
|
286
287
|
return {
|
|
287
288
|
data: {
|
|
288
289
|
headers,
|
|
@@ -306,17 +307,17 @@ class NotebookRenderersDataRenderer extends Disposable {
|
|
|
306
307
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
307
308
|
}
|
|
308
309
|
const headers = [
|
|
309
|
-
( localize(
|
|
310
|
-
( localize(
|
|
310
|
+
( localize(7710, "Name")),
|
|
311
|
+
( localize(7711, "Mimetypes")),
|
|
311
312
|
];
|
|
312
|
-
const rows = (
|
|
313
|
+
const rows = ( contrib
|
|
313
314
|
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
|
314
315
|
.map(notebookRenderer => {
|
|
315
316
|
return [
|
|
316
317
|
notebookRenderer.displayName,
|
|
317
318
|
notebookRenderer.mimeTypes.join(',')
|
|
318
319
|
];
|
|
319
|
-
}))
|
|
320
|
+
}));
|
|
320
321
|
return {
|
|
321
322
|
data: {
|
|
322
323
|
headers,
|
|
@@ -326,21 +327,21 @@ class NotebookRenderersDataRenderer extends Disposable {
|
|
|
326
327
|
};
|
|
327
328
|
}
|
|
328
329
|
}
|
|
329
|
-
(
|
|
330
|
+
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
330
331
|
id: 'notebooks',
|
|
331
|
-
label: ( localize(
|
|
332
|
+
label: ( localize(7712, "Notebooks")),
|
|
332
333
|
access: {
|
|
333
334
|
canToggle: false
|
|
334
335
|
},
|
|
335
|
-
renderer: (
|
|
336
|
+
renderer: ( new SyncDescriptor(NotebooksDataRenderer)),
|
|
336
337
|
});
|
|
337
|
-
(
|
|
338
|
+
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
338
339
|
id: 'notebookRenderer',
|
|
339
|
-
label: ( localize(
|
|
340
|
+
label: ( localize(7713, "Notebook Renderers")),
|
|
340
341
|
access: {
|
|
341
342
|
canToggle: false
|
|
342
343
|
},
|
|
343
|
-
renderer: (
|
|
344
|
+
renderer: ( new SyncDescriptor(NotebookRenderersDataRenderer)),
|
|
344
345
|
});
|
|
345
346
|
|
|
346
347
|
export { notebookPreloadExtensionPoint, notebookRendererExtensionPoint, notebooksExtensionPoint };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
3
|
+
import { Disposable, IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
5
|
+
import { INotebookCellStatusBarService } from "vscode/vscode/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.service";
|
|
6
|
+
import { INotebookCellStatusBarItemList, INotebookCellStatusBarItemProvider } from "vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
7
|
+
export declare class NotebookCellStatusBarService extends Disposable implements INotebookCellStatusBarService {
|
|
8
|
+
readonly _serviceBrand: undefined;
|
|
9
|
+
private readonly _onDidChangeProviders;
|
|
10
|
+
readonly onDidChangeProviders: Event<void>;
|
|
11
|
+
private readonly _onDidChangeItems;
|
|
12
|
+
readonly onDidChangeItems: Event<void>;
|
|
13
|
+
private readonly _providers;
|
|
14
|
+
registerCellStatusBarItemProvider(provider: INotebookCellStatusBarItemProvider): IDisposable;
|
|
15
|
+
getStatusBarItemsForCell(docUri: URI, cellIndex: number, viewType: string, token: CancellationToken): Promise<INotebookCellStatusBarItemList[]>;
|
|
16
|
+
}
|