@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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { clearNode, WindowIdleValue } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
5
|
import { ToolBar } from 'vscode/vscode/vs/base/browser/ui/toolbar/toolbar';
|
|
@@ -26,10 +27,13 @@ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
|
26
27
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
27
28
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
28
29
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
29
|
-
import {
|
|
30
|
+
import { CellFoldingState, CellRevealType } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
31
|
+
import { NotebookEditor } from '@codingame/monaco-vscode-6f9bc782-77e0-5716-93bd-b05210c768c5-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditor';
|
|
30
32
|
import { CellKind, NotebookSetting, NotebookCellsChangeType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
31
33
|
import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
32
34
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
35
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
36
|
+
import { OutlineConfigKeys, OutlineTarget, OutlineConfigCollapseItemsValues } from '@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/workbench/services/outline/browser/outline';
|
|
33
37
|
import { IOutlineService } from 'vscode/vscode/vs/workbench/services/outline/browser/outline.service';
|
|
34
38
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
35
39
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
@@ -39,13 +43,14 @@ import { MenuItemAction, MenuId, MenuRegistry, registerAction2, Action2 } from '
|
|
|
39
43
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
40
44
|
import { RawContextKey, ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
41
45
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
42
|
-
import { MenuEntryActionViewItem,
|
|
46
|
+
import { MenuEntryActionViewItem, getActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
43
47
|
import { disposableTimeout, Delayer } from 'vscode/vscode/vs/base/common/async';
|
|
44
|
-
import { IOutlinePane } from 'vscode/vscode/vs/workbench/contrib/outline/browser/outline';
|
|
48
|
+
import { IOutlinePane } from '@codingame/monaco-vscode-0cd5242b-7b61-5f66-ac25-ffa40baf8e8f-common/vscode/vs/workbench/contrib/outline/browser/outline';
|
|
45
49
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
46
|
-
import { NOTEBOOK_IS_ACTIVE_EDITOR } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
50
|
+
import { NOTEBOOK_IS_ACTIVE_EDITOR } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
51
|
+
import { NotebookOutlineConstants } from '../../viewModel/notebookOutlineEntryFactory.js';
|
|
52
|
+
import { INotebookCellOutlineDataSourceFactory } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service';
|
|
53
|
+
import { NotebookExecutionType } from '@codingame/monaco-vscode-22790577-4553-50b6-978d-0acc75c394cc-common/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
49
54
|
import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
50
55
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
51
56
|
|
|
@@ -73,27 +78,25 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
|
|
|
73
78
|
this.templateId = NotebookOutlineTemplate.templateId;
|
|
74
79
|
}
|
|
75
80
|
renderTemplate(container) {
|
|
76
|
-
const elementDisposables = (
|
|
81
|
+
const elementDisposables = ( new DisposableStore());
|
|
77
82
|
container.classList.add('notebook-outline-element', 'show-file-icons');
|
|
78
83
|
const iconClass = document.createElement('div');
|
|
79
84
|
container.append(iconClass);
|
|
80
|
-
const iconLabel = (
|
|
85
|
+
const iconLabel = ( new IconLabel(container, { supportHighlights: true }));
|
|
81
86
|
const decoration = document.createElement('div');
|
|
82
87
|
decoration.className = 'element-decoration';
|
|
83
88
|
container.append(decoration);
|
|
84
89
|
const actionMenu = document.createElement('div');
|
|
85
90
|
actionMenu.className = 'action-menu';
|
|
86
91
|
container.append(actionMenu);
|
|
87
|
-
return (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
))
|
|
96
|
-
);
|
|
92
|
+
return ( new NotebookOutlineTemplate(
|
|
93
|
+
container,
|
|
94
|
+
iconClass,
|
|
95
|
+
iconLabel,
|
|
96
|
+
decoration,
|
|
97
|
+
actionMenu,
|
|
98
|
+
elementDisposables
|
|
99
|
+
));
|
|
97
100
|
}
|
|
98
101
|
renderElement(node, _index, template, _height) {
|
|
99
102
|
const extraClasses = [];
|
|
@@ -119,7 +122,7 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
|
|
|
119
122
|
template.decoration.innerText = '';
|
|
120
123
|
if (markerInfo) {
|
|
121
124
|
const problem = this._configurationService.getValue('problems.visibility');
|
|
122
|
-
const useBadges = this._configurationService.getValue(
|
|
125
|
+
const useBadges = this._configurationService.getValue(OutlineConfigKeys.problemsBadges);
|
|
123
126
|
if (!useBadges || !problem) {
|
|
124
127
|
template.decoration.classList.remove('bubble');
|
|
125
128
|
template.decoration.innerText = '';
|
|
@@ -136,7 +139,7 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
|
|
|
136
139
|
if (problem === undefined) {
|
|
137
140
|
return;
|
|
138
141
|
}
|
|
139
|
-
const useColors = this._configurationService.getValue(
|
|
142
|
+
const useColors = this._configurationService.getValue(OutlineConfigKeys.problemsColors);
|
|
140
143
|
if (!useColors || !problem) {
|
|
141
144
|
template.container.style.removeProperty('--outline-element-color');
|
|
142
145
|
template.decoration.style.setProperty('--outline-element-color', color?.toString() ?? 'inherit');
|
|
@@ -145,9 +148,12 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
|
|
|
145
148
|
template.container.style.setProperty('--outline-element-color', color?.toString() ?? 'inherit');
|
|
146
149
|
}
|
|
147
150
|
}
|
|
148
|
-
if (this._target ===
|
|
151
|
+
if (this._target === OutlineTarget.OutlinePane) {
|
|
152
|
+
if (!this._editor) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
149
155
|
const nbCell = node.element.cell;
|
|
150
|
-
const nbViewModel = this._editor
|
|
156
|
+
const nbViewModel = this._editor.getViewModel();
|
|
151
157
|
if (!nbViewModel) {
|
|
152
158
|
return;
|
|
153
159
|
}
|
|
@@ -156,21 +162,21 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
|
|
|
156
162
|
const scopedContextKeyService = template.elementDisposables.add(this._contextKeyService.createScoped(template.container));
|
|
157
163
|
NotebookOutlineContext.CellKind.bindTo(scopedContextKeyService).set(isCodeCell ? CellKind.Code : CellKind.Markup);
|
|
158
164
|
NotebookOutlineContext.CellHasChildren.bindTo(scopedContextKeyService).set(length > 0);
|
|
159
|
-
NotebookOutlineContext.CellHasHeader.bindTo(scopedContextKeyService).set(node.element.level !==
|
|
165
|
+
NotebookOutlineContext.CellHasHeader.bindTo(scopedContextKeyService).set(node.element.level !== NotebookOutlineConstants.NonHeaderOutlineLevel);
|
|
160
166
|
NotebookOutlineContext.OutlineElementTarget.bindTo(scopedContextKeyService).set(this._target);
|
|
161
167
|
this.setupFolding(isCodeCell, nbViewModel, scopedContextKeyService, template, nbCell);
|
|
162
|
-
const outlineEntryToolbar = template.elementDisposables.add((
|
|
168
|
+
const outlineEntryToolbar = template.elementDisposables.add(( new ToolBar(template.actionMenu, this._contextMenuService, {
|
|
163
169
|
actionViewItemProvider: action => {
|
|
164
170
|
if (action instanceof MenuItemAction) {
|
|
165
171
|
return this._instantiationService.createInstance(MenuEntryActionViewItem, action, undefined);
|
|
166
172
|
}
|
|
167
173
|
return undefined;
|
|
168
174
|
},
|
|
169
|
-
})))
|
|
175
|
+
})));
|
|
170
176
|
const menu = template.elementDisposables.add(this._menuService.createMenu(MenuId.NotebookOutlineActionMenu, scopedContextKeyService));
|
|
171
177
|
const actions = getOutlineToolbarActions(menu, { notebookEditor: this._editor, outlineEntry: node.element });
|
|
172
178
|
outlineEntryToolbar.setActions(actions.primary, actions.secondary);
|
|
173
|
-
this.setupToolbarListeners(outlineEntryToolbar, menu, actions, node.element, template);
|
|
179
|
+
this.setupToolbarListeners(this._editor, outlineEntryToolbar, menu, actions, node.element, template);
|
|
174
180
|
template.actionMenu.style.padding = '0 0.8em 0 0.4em';
|
|
175
181
|
}
|
|
176
182
|
}
|
|
@@ -183,7 +189,7 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
|
|
|
183
189
|
clearNode(templateData.actionMenu);
|
|
184
190
|
}
|
|
185
191
|
setupFolding(isCodeCell, nbViewModel, scopedContextKeyService, template, nbCell) {
|
|
186
|
-
const foldingState = isCodeCell ?
|
|
192
|
+
const foldingState = isCodeCell ? CellFoldingState.None : (nbCell.foldingState);
|
|
187
193
|
const foldingStateCtx = NotebookOutlineContext.CellFoldingState.bindTo(scopedContextKeyService);
|
|
188
194
|
foldingStateCtx.set(foldingState);
|
|
189
195
|
if (!isCodeCell) {
|
|
@@ -194,17 +200,17 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
|
|
|
194
200
|
}));
|
|
195
201
|
}
|
|
196
202
|
}
|
|
197
|
-
setupToolbarListeners(toolbar, menu, initActions, entry, templateData) {
|
|
203
|
+
setupToolbarListeners(editor, toolbar, menu, initActions, entry, templateData) {
|
|
198
204
|
let dropdownIsVisible = false;
|
|
199
205
|
let deferredUpdate;
|
|
200
206
|
toolbar.setActions(initActions.primary, initActions.secondary);
|
|
201
207
|
templateData.elementDisposables.add(menu.onDidChange(() => {
|
|
202
208
|
if (dropdownIsVisible) {
|
|
203
|
-
const actions = getOutlineToolbarActions(menu, { notebookEditor:
|
|
209
|
+
const actions = getOutlineToolbarActions(menu, { notebookEditor: editor, outlineEntry: entry });
|
|
204
210
|
deferredUpdate = () => toolbar.setActions(actions.primary, actions.secondary);
|
|
205
211
|
return;
|
|
206
212
|
}
|
|
207
|
-
const actions = getOutlineToolbarActions(menu, { notebookEditor:
|
|
213
|
+
const actions = getOutlineToolbarActions(menu, { notebookEditor: editor, outlineEntry: entry });
|
|
208
214
|
toolbar.setActions(actions.primary, actions.secondary);
|
|
209
215
|
}));
|
|
210
216
|
templateData.container.classList.remove('notebook-outline-toolbar-dropdown-active');
|
|
@@ -225,20 +231,16 @@ let NotebookOutlineRenderer = class NotebookOutlineRenderer {
|
|
|
225
231
|
}));
|
|
226
232
|
}
|
|
227
233
|
};
|
|
228
|
-
NotebookOutlineRenderer = (
|
|
229
|
-
(
|
|
230
|
-
(
|
|
231
|
-
(
|
|
232
|
-
(
|
|
233
|
-
(
|
|
234
|
-
(
|
|
235
|
-
], NotebookOutlineRenderer))
|
|
234
|
+
NotebookOutlineRenderer = ( __decorate([
|
|
235
|
+
( __param(2, IThemeService)),
|
|
236
|
+
( __param(3, IConfigurationService)),
|
|
237
|
+
( __param(4, IContextMenuService)),
|
|
238
|
+
( __param(5, IContextKeyService)),
|
|
239
|
+
( __param(6, IMenuService)),
|
|
240
|
+
( __param(7, IInstantiationService))
|
|
241
|
+
], NotebookOutlineRenderer));
|
|
236
242
|
function getOutlineToolbarActions(menu, args) {
|
|
237
|
-
|
|
238
|
-
const secondary = [];
|
|
239
|
-
const result = { primary, secondary };
|
|
240
|
-
createAndFillInActionBarActions(menu, { shouldForwardArgs: true, arg: args }, result);
|
|
241
|
-
return result;
|
|
243
|
+
return getActionBarActions(menu.getActions({ shouldForwardArgs: true, arg: args }), g => /^inline/.test(g));
|
|
242
244
|
}
|
|
243
245
|
class NotebookOutlineAccessibility {
|
|
244
246
|
getAriaLabel(element) {
|
|
@@ -266,7 +268,7 @@ let NotebookQuickPickProvider = class NotebookQuickPickProvider {
|
|
|
266
268
|
this.notebookCellOutlineDataSourceRef = notebookCellOutlineDataSourceRef;
|
|
267
269
|
this._configurationService = _configurationService;
|
|
268
270
|
this._themeService = _themeService;
|
|
269
|
-
this._disposables = (
|
|
271
|
+
this._disposables = ( new DisposableStore());
|
|
270
272
|
this.gotoShowCodeCellSymbols = this._configurationService.getValue(NotebookSetting.gotoSymbolsAllSymbols);
|
|
271
273
|
this._disposables.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
272
274
|
if (e.affectsConfiguration(NotebookSetting.gotoSymbolsAllSymbols)) {
|
|
@@ -282,7 +284,7 @@ let NotebookQuickPickProvider = class NotebookQuickPickProvider {
|
|
|
282
284
|
const result = [];
|
|
283
285
|
const { hasFileIcons } = this._themeService.getFileIconTheme();
|
|
284
286
|
const isSymbol = (element) => !!element.symbolKind;
|
|
285
|
-
const isCodeCell = (element) => (
|
|
287
|
+
const isCodeCell = (element) => (element.cell.cellKind === CellKind.Code && element.level === NotebookOutlineConstants.NonHeaderOutlineLevel);
|
|
286
288
|
for (let i = 0; i < bucket.length; i++) {
|
|
287
289
|
const element = bucket[i];
|
|
288
290
|
const nextElement = bucket[i + 1];
|
|
@@ -309,15 +311,15 @@ let NotebookQuickPickProvider = class NotebookQuickPickProvider {
|
|
|
309
311
|
this._disposables.dispose();
|
|
310
312
|
}
|
|
311
313
|
};
|
|
312
|
-
NotebookQuickPickProvider = (
|
|
313
|
-
(
|
|
314
|
-
(
|
|
315
|
-
], NotebookQuickPickProvider))
|
|
314
|
+
NotebookQuickPickProvider = ( __decorate([
|
|
315
|
+
( __param(1, IConfigurationService)),
|
|
316
|
+
( __param(2, IThemeService))
|
|
317
|
+
], NotebookQuickPickProvider));
|
|
316
318
|
let NotebookOutlinePaneProvider = class NotebookOutlinePaneProvider {
|
|
317
319
|
constructor(outlineDataSourceRef, _configurationService) {
|
|
318
320
|
this.outlineDataSourceRef = outlineDataSourceRef;
|
|
319
321
|
this._configurationService = _configurationService;
|
|
320
|
-
this._disposables = (
|
|
322
|
+
this._disposables = ( new DisposableStore());
|
|
321
323
|
this.showCodeCells = this._configurationService.getValue(NotebookSetting.outlineShowCodeCells);
|
|
322
324
|
this.showCodeCellSymbols = this._configurationService.getValue(NotebookSetting.outlineShowCodeCellSymbols);
|
|
323
325
|
this.showMarkdownHeadersOnly = this._configurationService.getValue(NotebookSetting.outlineShowMarkdownHeadersOnly);
|
|
@@ -353,9 +355,9 @@ let NotebookOutlinePaneProvider = class NotebookOutlinePaneProvider {
|
|
|
353
355
|
return undefined;
|
|
354
356
|
}
|
|
355
357
|
filterEntry(entry) {
|
|
356
|
-
if ((
|
|
358
|
+
if ((this.showMarkdownHeadersOnly && entry.cell.cellKind === CellKind.Markup && entry.level === NotebookOutlineConstants.NonHeaderOutlineLevel) ||
|
|
357
359
|
(!this.showCodeCells && entry.cell.cellKind === CellKind.Code) ||
|
|
358
|
-
(
|
|
360
|
+
(!this.showCodeCellSymbols && entry.cell.cellKind === CellKind.Code && entry.level > NotebookOutlineConstants.NonHeaderOutlineLevel)
|
|
359
361
|
) {
|
|
360
362
|
return true;
|
|
361
363
|
}
|
|
@@ -369,7 +371,7 @@ let NotebookOutlinePaneProvider = class NotebookOutlinePaneProvider {
|
|
|
369
371
|
if (!this.showMarkdownHeadersOnly) {
|
|
370
372
|
yield entry;
|
|
371
373
|
}
|
|
372
|
-
else if (entry.level <
|
|
374
|
+
else if (entry.level < NotebookOutlineConstants.NonHeaderOutlineLevel) {
|
|
373
375
|
yield entry;
|
|
374
376
|
}
|
|
375
377
|
}
|
|
@@ -377,7 +379,7 @@ let NotebookOutlinePaneProvider = class NotebookOutlinePaneProvider {
|
|
|
377
379
|
if (this.showCodeCellSymbols) {
|
|
378
380
|
yield entry;
|
|
379
381
|
}
|
|
380
|
-
else if (entry.level ===
|
|
382
|
+
else if (entry.level === NotebookOutlineConstants.NonHeaderOutlineLevel) {
|
|
381
383
|
yield entry;
|
|
382
384
|
}
|
|
383
385
|
}
|
|
@@ -387,14 +389,14 @@ let NotebookOutlinePaneProvider = class NotebookOutlinePaneProvider {
|
|
|
387
389
|
this._disposables.dispose();
|
|
388
390
|
}
|
|
389
391
|
};
|
|
390
|
-
NotebookOutlinePaneProvider = (
|
|
391
|
-
(
|
|
392
|
-
], NotebookOutlinePaneProvider))
|
|
392
|
+
NotebookOutlinePaneProvider = ( __decorate([
|
|
393
|
+
( __param(1, IConfigurationService))
|
|
394
|
+
], NotebookOutlinePaneProvider));
|
|
393
395
|
let NotebookBreadcrumbsProvider = class NotebookBreadcrumbsProvider {
|
|
394
396
|
constructor(outlineDataSourceRef, _configurationService) {
|
|
395
397
|
this.outlineDataSourceRef = outlineDataSourceRef;
|
|
396
398
|
this._configurationService = _configurationService;
|
|
397
|
-
this._disposables = (
|
|
399
|
+
this._disposables = ( new DisposableStore());
|
|
398
400
|
this.showCodeCells = this._configurationService.getValue(NotebookSetting.breadcrumbsShowCodeCells);
|
|
399
401
|
this._disposables.add(this._configurationService.onDidChangeConfiguration(e => {
|
|
400
402
|
if (e.affectsConfiguration(NotebookSetting.breadcrumbsShowCodeCells)) {
|
|
@@ -417,9 +419,9 @@ let NotebookBreadcrumbsProvider = class NotebookBreadcrumbsProvider {
|
|
|
417
419
|
this._disposables.dispose();
|
|
418
420
|
}
|
|
419
421
|
};
|
|
420
|
-
NotebookBreadcrumbsProvider = (
|
|
421
|
-
(
|
|
422
|
-
], NotebookBreadcrumbsProvider))
|
|
422
|
+
NotebookBreadcrumbsProvider = ( __decorate([
|
|
423
|
+
( __param(1, IConfigurationService))
|
|
424
|
+
], NotebookBreadcrumbsProvider));
|
|
423
425
|
class NotebookComparator {
|
|
424
426
|
constructor() {
|
|
425
427
|
this._collator = new WindowIdleValue(mainWindow, () => new Intl.Collator(undefined, { numeric: true }));
|
|
@@ -437,7 +439,7 @@ class NotebookComparator {
|
|
|
437
439
|
let NotebookCellOutline = class NotebookCellOutline {
|
|
438
440
|
get activeElement() {
|
|
439
441
|
this.checkDelayer();
|
|
440
|
-
if (this._target ===
|
|
442
|
+
if (this._target === OutlineTarget.OutlinePane) {
|
|
441
443
|
return this.config.treeDataSource.getActiveEntry();
|
|
442
444
|
}
|
|
443
445
|
else {
|
|
@@ -471,26 +473,26 @@ let NotebookCellOutline = class NotebookCellOutline {
|
|
|
471
473
|
this._languageFeaturesService = _languageFeaturesService;
|
|
472
474
|
this._notebookExecutionStateService = _notebookExecutionStateService;
|
|
473
475
|
this.outlineKind = 'notebookCells';
|
|
474
|
-
this._disposables = (
|
|
475
|
-
this._modelDisposables = (
|
|
476
|
-
this._dataSourceDisposables = (
|
|
477
|
-
this._onDidChange = (
|
|
476
|
+
this._disposables = ( new DisposableStore());
|
|
477
|
+
this._modelDisposables = ( new DisposableStore());
|
|
478
|
+
this._dataSourceDisposables = ( new DisposableStore());
|
|
479
|
+
this._onDidChange = ( new Emitter());
|
|
478
480
|
this.onDidChange = this._onDidChange.event;
|
|
479
|
-
this.delayerRecomputeState = this._disposables.add((
|
|
480
|
-
this.delayerRecomputeActive = this._disposables.add((
|
|
481
|
-
this.delayerRecomputeSymbols = this._disposables.add((
|
|
481
|
+
this.delayerRecomputeState = this._disposables.add(( new Delayer(300)));
|
|
482
|
+
this.delayerRecomputeActive = this._disposables.add(( new Delayer(200)));
|
|
483
|
+
this.delayerRecomputeSymbols = this._disposables.add(( new Delayer(2000)));
|
|
482
484
|
this.outlineShowCodeCellSymbols = this._configurationService.getValue(NotebookSetting.outlineShowCodeCellSymbols);
|
|
483
485
|
this.initializeOutline();
|
|
484
|
-
const delegate = (
|
|
486
|
+
const delegate = ( new NotebookOutlineVirtualDelegate());
|
|
485
487
|
const renderers = [this._instantiationService.createInstance(NotebookOutlineRenderer, this._editor.getControl(), this._target)];
|
|
486
|
-
const comparator = (
|
|
488
|
+
const comparator = ( new NotebookComparator());
|
|
487
489
|
const options = {
|
|
488
|
-
collapseByDefault: this._target ===
|
|
490
|
+
collapseByDefault: this._target === OutlineTarget.Breadcrumbs || (this._target === OutlineTarget.OutlinePane && this._configurationService.getValue(OutlineConfigKeys.collapseItems) === OutlineConfigCollapseItemsValues.Collapsed),
|
|
489
491
|
expandOnlyOnTwistieClick: true,
|
|
490
492
|
multipleSelectionSupport: false,
|
|
491
|
-
accessibilityProvider: (
|
|
492
|
-
identityProvider: { getId: element => (
|
|
493
|
-
keyboardNavigationLabelProvider: (
|
|
493
|
+
accessibilityProvider: ( new NotebookOutlineAccessibility()),
|
|
494
|
+
identityProvider: { getId: element => ( element.cell.uri.toString()) },
|
|
495
|
+
keyboardNavigationLabelProvider: ( new NotebookNavigationLabelProvider())
|
|
494
496
|
};
|
|
495
497
|
this.config = {
|
|
496
498
|
treeDataSource: this._treeDataSource,
|
|
@@ -566,16 +568,16 @@ let NotebookCellOutline = class NotebookCellOutline {
|
|
|
566
568
|
this.computeSymbols();
|
|
567
569
|
}
|
|
568
570
|
this._modelDisposables.add(this._editor.textModel.onDidChangeContent(contentChanges => {
|
|
569
|
-
if ((
|
|
571
|
+
if (( contentChanges.rawEvents.some(c => c.kind === NotebookCellsChangeType.ChangeCellContent ||
|
|
570
572
|
c.kind === NotebookCellsChangeType.ChangeCellInternalMetadata ||
|
|
571
573
|
c.kind === NotebookCellsChangeType.Move ||
|
|
572
|
-
c.kind === NotebookCellsChangeType.ModelChange)))
|
|
574
|
+
c.kind === NotebookCellsChangeType.ModelChange))) {
|
|
573
575
|
this.delayedRecomputeState();
|
|
574
576
|
}
|
|
575
577
|
}));
|
|
576
578
|
}
|
|
577
579
|
async computeSymbols(cancelToken = CancellationToken.None) {
|
|
578
|
-
if (this._target ===
|
|
580
|
+
if (this._target === OutlineTarget.OutlinePane && this.outlineShowCodeCellSymbols) {
|
|
579
581
|
void this.doComputeSymbols(cancelToken);
|
|
580
582
|
}
|
|
581
583
|
}
|
|
@@ -600,7 +602,7 @@ let NotebookCellOutline = class NotebookCellOutline {
|
|
|
600
602
|
const notebookEditorOptions = {
|
|
601
603
|
...options,
|
|
602
604
|
override: this._editor.input?.editorId,
|
|
603
|
-
cellRevealType:
|
|
605
|
+
cellRevealType: CellRevealType.NearTopIfOutsideViewport,
|
|
604
606
|
selection: entry.position,
|
|
605
607
|
viewState: undefined,
|
|
606
608
|
};
|
|
@@ -670,14 +672,14 @@ let NotebookCellOutline = class NotebookCellOutline {
|
|
|
670
672
|
this._outlineDataSourceReference?.dispose();
|
|
671
673
|
}
|
|
672
674
|
};
|
|
673
|
-
NotebookCellOutline = (
|
|
674
|
-
(
|
|
675
|
-
(
|
|
676
|
-
(
|
|
677
|
-
(
|
|
678
|
-
(
|
|
679
|
-
(
|
|
680
|
-
], NotebookCellOutline))
|
|
675
|
+
NotebookCellOutline = ( __decorate([
|
|
676
|
+
( __param(2, IThemeService)),
|
|
677
|
+
( __param(3, IEditorService)),
|
|
678
|
+
( __param(4, IInstantiationService)),
|
|
679
|
+
( __param(5, IConfigurationService)),
|
|
680
|
+
( __param(6, ILanguageFeaturesService)),
|
|
681
|
+
( __param(7, INotebookExecutionStateService))
|
|
682
|
+
], NotebookCellOutline));
|
|
681
683
|
let NotebookOutlineCreator = class NotebookOutlineCreator {
|
|
682
684
|
constructor(outlineService, _instantiationService) {
|
|
683
685
|
this._instantiationService = _instantiationService;
|
|
@@ -689,25 +691,25 @@ let NotebookOutlineCreator = class NotebookOutlineCreator {
|
|
|
689
691
|
}
|
|
690
692
|
async createOutline(editor, target, cancelToken) {
|
|
691
693
|
const outline = this._instantiationService.createInstance(NotebookCellOutline, editor, target);
|
|
692
|
-
if (target ===
|
|
694
|
+
if (target === OutlineTarget.QuickPick) {
|
|
693
695
|
await outline.doComputeSymbols(cancelToken);
|
|
694
696
|
}
|
|
695
697
|
return outline;
|
|
696
698
|
}
|
|
697
699
|
};
|
|
698
|
-
NotebookOutlineCreator = (
|
|
699
|
-
(
|
|
700
|
-
(
|
|
701
|
-
], NotebookOutlineCreator))
|
|
700
|
+
NotebookOutlineCreator = ( __decorate([
|
|
701
|
+
( __param(0, IOutlineService)),
|
|
702
|
+
( __param(1, IInstantiationService))
|
|
703
|
+
], NotebookOutlineCreator));
|
|
702
704
|
const NotebookOutlineContext = {
|
|
703
|
-
CellKind: (
|
|
704
|
-
CellHasChildren: (
|
|
705
|
-
CellHasHeader: (
|
|
706
|
-
CellFoldingState: (
|
|
707
|
-
OutlineElementTarget: (
|
|
705
|
+
CellKind: ( new RawContextKey('notebookCellKind', undefined)),
|
|
706
|
+
CellHasChildren: ( new RawContextKey('notebookCellHasChildren', false)),
|
|
707
|
+
CellHasHeader: ( new RawContextKey('notebookCellHasHeader', false)),
|
|
708
|
+
CellFoldingState: ( new RawContextKey('notebookCellFoldingState', CellFoldingState.None)),
|
|
709
|
+
OutlineElementTarget: ( new RawContextKey('notebookOutlineElementTarget', undefined)),
|
|
708
710
|
};
|
|
709
|
-
(
|
|
710
|
-
(
|
|
711
|
+
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookOutlineCreator, LifecyclePhase.Eventually);
|
|
712
|
+
( Registry.as(Extensions$1.Configuration)).registerConfiguration({
|
|
711
713
|
id: 'notebook',
|
|
712
714
|
order: 100,
|
|
713
715
|
type: 'object',
|
|
@@ -716,33 +718,33 @@ const NotebookOutlineContext = {
|
|
|
716
718
|
type: 'boolean',
|
|
717
719
|
default: true,
|
|
718
720
|
markdownDescription: ( localize(
|
|
719
|
-
|
|
721
|
+
7384,
|
|
720
722
|
"When enabled, notebook outline will show only markdown cells containing a header."
|
|
721
723
|
))
|
|
722
724
|
},
|
|
723
725
|
[NotebookSetting.outlineShowCodeCells]: {
|
|
724
726
|
type: 'boolean',
|
|
725
727
|
default: false,
|
|
726
|
-
markdownDescription: ( localize(
|
|
728
|
+
markdownDescription: ( localize(7385, "When enabled, notebook outline shows code cells."))
|
|
727
729
|
},
|
|
728
730
|
[NotebookSetting.outlineShowCodeCellSymbols]: {
|
|
729
731
|
type: 'boolean',
|
|
730
732
|
default: true,
|
|
731
733
|
markdownDescription: ( localize(
|
|
732
|
-
|
|
734
|
+
7386,
|
|
733
735
|
"When enabled, notebook outline shows code cell symbols. Relies on `notebook.outline.showCodeCells` being enabled."
|
|
734
736
|
))
|
|
735
737
|
},
|
|
736
738
|
[NotebookSetting.breadcrumbsShowCodeCells]: {
|
|
737
739
|
type: 'boolean',
|
|
738
740
|
default: true,
|
|
739
|
-
markdownDescription: ( localize(
|
|
741
|
+
markdownDescription: ( localize(7387, "When enabled, notebook breadcrumbs contain code cells."))
|
|
740
742
|
},
|
|
741
743
|
[NotebookSetting.gotoSymbolsAllSymbols]: {
|
|
742
744
|
type: 'boolean',
|
|
743
745
|
default: true,
|
|
744
746
|
markdownDescription: ( localize(
|
|
745
|
-
|
|
747
|
+
7388,
|
|
746
748
|
"When enabled, the Go to Symbol Quick Pick will display full code symbols from the notebook, as well as Markdown headers."
|
|
747
749
|
))
|
|
748
750
|
},
|
|
@@ -750,23 +752,20 @@ const NotebookOutlineContext = {
|
|
|
750
752
|
});
|
|
751
753
|
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|
752
754
|
submenu: MenuId.NotebookOutlineFilter,
|
|
753
|
-
title: ( localize(
|
|
755
|
+
title: ( localize(7389, "Filter Entries")),
|
|
754
756
|
icon: Codicon.filter,
|
|
755
757
|
group: 'navigation',
|
|
756
758
|
order: -1,
|
|
757
|
-
when: (
|
|
758
|
-
(ContextKeyExpr.equals('view', IOutlinePane.Id)),
|
|
759
|
-
NOTEBOOK_IS_ACTIVE_EDITOR
|
|
760
|
-
))),
|
|
759
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', IOutlinePane.Id)), NOTEBOOK_IS_ACTIVE_EDITOR)),
|
|
761
760
|
});
|
|
762
761
|
registerAction2(class ToggleShowMarkdownHeadersOnly extends Action2 {
|
|
763
762
|
constructor() {
|
|
764
763
|
super({
|
|
765
764
|
id: 'notebook.outline.toggleShowMarkdownHeadersOnly',
|
|
766
|
-
title: ( localize(
|
|
765
|
+
title: ( localize(7390, "Markdown Headers Only")),
|
|
767
766
|
f1: false,
|
|
768
767
|
toggled: {
|
|
769
|
-
condition: (
|
|
768
|
+
condition: ( ContextKeyExpr.equals('config.notebook.outline.showMarkdownHeadersOnly', true))
|
|
770
769
|
},
|
|
771
770
|
menu: {
|
|
772
771
|
id: MenuId.NotebookOutlineFilter,
|
|
@@ -784,10 +783,10 @@ registerAction2(class ToggleCodeCellEntries extends Action2 {
|
|
|
784
783
|
constructor() {
|
|
785
784
|
super({
|
|
786
785
|
id: 'notebook.outline.toggleCodeCells',
|
|
787
|
-
title: ( localize(
|
|
786
|
+
title: ( localize(7391, "Code Cells")),
|
|
788
787
|
f1: false,
|
|
789
788
|
toggled: {
|
|
790
|
-
condition: (
|
|
789
|
+
condition: ( ContextKeyExpr.equals('config.notebook.outline.showCodeCells', true))
|
|
791
790
|
},
|
|
792
791
|
menu: {
|
|
793
792
|
id: MenuId.NotebookOutlineFilter,
|
|
@@ -806,10 +805,10 @@ registerAction2(class ToggleCodeCellSymbolEntries extends Action2 {
|
|
|
806
805
|
constructor() {
|
|
807
806
|
super({
|
|
808
807
|
id: 'notebook.outline.toggleCodeCellSymbols',
|
|
809
|
-
title: ( localize(
|
|
808
|
+
title: ( localize(7392, "Code Cell Symbols")),
|
|
810
809
|
f1: false,
|
|
811
810
|
toggled: {
|
|
812
|
-
condition: (
|
|
811
|
+
condition: ( ContextKeyExpr.equals('config.notebook.outline.showCodeCellSymbols', true))
|
|
813
812
|
},
|
|
814
813
|
menu: {
|
|
815
814
|
id: MenuId.NotebookOutlineFilter,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
4
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
4
5
|
import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
5
6
|
|
|
6
7
|
var NotebookProfileType;
|
|
7
|
-
( (
|
|
8
|
+
(function (NotebookProfileType) {
|
|
8
9
|
NotebookProfileType["default"] = "default";
|
|
9
10
|
NotebookProfileType["jupyter"] = "jupyter";
|
|
10
11
|
NotebookProfileType["colab"] = "colab";
|
|
11
|
-
})(NotebookProfileType || (NotebookProfileType = {}))
|
|
12
|
+
})(NotebookProfileType || (NotebookProfileType = {}));
|
|
12
13
|
const profiles = {
|
|
13
14
|
[NotebookProfileType.default]: {
|
|
14
15
|
[NotebookSetting.focusIndicator]: 'gutter',
|
|
@@ -52,7 +53,7 @@ registerAction2(class extends Action2 {
|
|
|
52
53
|
constructor() {
|
|
53
54
|
super({
|
|
54
55
|
id: 'notebook.setProfile',
|
|
55
|
-
title: ( localize(
|
|
56
|
+
title: ( localize(7393, "Set Profile"))
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
async run(accessor, args) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { HierarchicalKind } from "vscode/vscode/vs/base/common/hierarchicalKind";
|
|
3
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { CodeActionProvider } from "vscode/vscode/vs/editor/common/languages";
|
|
5
|
+
import { ITextModel } from "vscode/vscode/vs/editor/common/model";
|
|
6
|
+
import { ILanguageFeaturesService } from "vscode/vscode/vs/editor/common/services/languageFeatures";
|
|
7
|
+
import { IInstantiationService, ServicesAccessor } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
|
+
import { IProgress, IProgressStep } from "vscode/vscode/vs/platform/progress/common/progress";
|
|
9
|
+
import { IWorkbenchContribution } from "vscode/vscode/vs/workbench/common/contributions";
|
|
10
|
+
import { NotebookTextModel } from "../../../common/model/notebookTextModel.js";
|
|
11
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
12
|
+
import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel } from "@codingame/monaco-vscode-99f24462-c56d-5407-83fb-2ea9dd33cc8c-common/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy";
|
|
13
|
+
import { IStoredFileWorkingCopySaveParticipant, IStoredFileWorkingCopySaveParticipantContext } from "@codingame/monaco-vscode-base-service-override/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService";
|
|
14
|
+
import { IWorkingCopyFileService } from "vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service";
|
|
15
|
+
export declare abstract class NotebookSaveParticipant implements IStoredFileWorkingCopySaveParticipant {
|
|
16
|
+
private readonly _editorService;
|
|
17
|
+
constructor(_editorService: IEditorService);
|
|
18
|
+
abstract participate(workingCopy: IStoredFileWorkingCopy<IStoredFileWorkingCopyModel>, context: IStoredFileWorkingCopySaveParticipantContext, progress: IProgress<IProgressStep>, token: CancellationToken): Promise<void>;
|
|
19
|
+
protected canParticipate(): boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare class CodeActionParticipantUtils {
|
|
22
|
+
static checkAndRunFormatCodeAction(accessor: ServicesAccessor, notebookModel: NotebookTextModel, progress: IProgress<IProgressStep>, token: CancellationToken): Promise<boolean>;
|
|
23
|
+
static applyOnSaveGenericCodeActions(accessor: ServicesAccessor, model: ITextModel, codeActionsOnSave: readonly HierarchicalKind[], excludes: readonly HierarchicalKind[], progress: IProgress<IProgressStep>, token: CancellationToken): Promise<void>;
|
|
24
|
+
static applyOnSaveFormatCodeAction(accessor: ServicesAccessor, model: ITextModel, formatCodeActionOnSave: HierarchicalKind, excludes: readonly HierarchicalKind[], extensionId: string | undefined, progress: IProgress<IProgressStep>, token: CancellationToken): Promise<boolean>;
|
|
25
|
+
static getActionsToRun(model: ITextModel, codeActionKind: HierarchicalKind, excludes: readonly HierarchicalKind[], languageFeaturesService: ILanguageFeaturesService, progress: IProgress<CodeActionProvider>, token: CancellationToken): Promise<import("vscode/vscode/vs/editor/contrib/codeAction/common/types").CodeActionSet>;
|
|
26
|
+
}
|
|
27
|
+
export declare class SaveParticipantsContribution extends Disposable implements IWorkbenchContribution {
|
|
28
|
+
private readonly instantiationService;
|
|
29
|
+
private readonly workingCopyFileService;
|
|
30
|
+
constructor(instantiationService: IInstantiationService, workingCopyFileService: IWorkingCopyFileService);
|
|
31
|
+
private registerSaveParticipants;
|
|
32
|
+
}
|