@codingame/monaco-vscode-api 26.1.2 → 26.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/package.json +8 -8
  2. package/services.js +3 -3
  3. package/vscode/src/vs/platform/product/common/product.js +1 -1
  4. package/vscode/src/vs/platform/window/common/window.d.ts +1 -0
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.d.ts +1 -1
  6. package/vscode/src/vs/workbench/services/storage/browser/storageService.d.ts +5 -1
  7. package/vscode/src/vs/workbench/services/storage/browser/storageService.js +32 -16
  8. package/vscode/src/vs/workbench/services/workspaces/browser/workspaces.d.ts +2 -2
  9. package/vscode/src/vs/workbench/services/workspaces/browser/workspaces.js +4 -4
  10. package/workbench.js +2 -2
  11. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +0 -7
  12. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +0 -11
  13. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +0 -20
  14. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +0 -150
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +0 -22
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +0 -338
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +0 -18
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +0 -58
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +0 -75
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +0 -364
  21. package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +0 -21
  22. package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +0 -36
  23. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +0 -110
  24. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +0 -692
  25. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +0 -40
  26. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +0 -158
@@ -1,40 +0,0 @@
1
- import { URI } from "../../../../base/common/uri.js";
2
- import { ITextModelService } from "../../../../editor/common/services/resolverService.service.js";
3
- import { ITextResourceConfigurationService } from "../../../../editor/common/services/textResourceConfiguration.service.js";
4
- import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js";
5
- import { IFileDialogService } from "../../../../platform/dialogs/common/dialogs.service.js";
6
- import { IFileService } from "../../../../platform/files/common/files.service.js";
7
- import { ILabelService } from "../../../../platform/label/common/label.service.js";
8
- import { IInteractiveHistoryService } from "../../interactive/browser/interactiveHistoryService.service.js";
9
- import { NotebookTextModel } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/common/model/notebookTextModel";
10
- import { ICompositeNotebookEditorInput, NotebookEditorInput } from "../../notebook/common/notebookEditorInput.js";
11
- import { INotebookEditorModelResolverService } from "../../notebook/common/notebookEditorModelResolverService.service.js";
12
- import { INotebookService } from "../../notebook/common/notebookService.service.js";
13
- import { ICustomEditorLabelService } from "../../../services/editor/common/customEditorLabelService.service.js";
14
- import { IEditorService } from "../../../services/editor/common/editorService.service.js";
15
- import { IExtensionService } from "../../../services/extensions/common/extensions.service.js";
16
- import { IFilesConfigurationService } from "../../../services/filesConfiguration/common/filesConfigurationService.service.js";
17
- import { ThemeIcon } from "../../../../base/common/themables.js";
18
- import { IWorkbenchEnvironmentService } from "../../../services/environment/common/environmentService.service.js";
19
- import { IPathService } from "../../../services/path/common/pathService.service.js";
20
- export declare class ReplEditorInput extends NotebookEditorInput implements ICompositeNotebookEditorInput {
21
- readonly historyService: IInteractiveHistoryService;
22
- private readonly _textModelService;
23
- static ID: string;
24
- private inputModelRef;
25
- private isScratchpad;
26
- private label;
27
- private isDisposing;
28
- constructor(resource: URI, label: string | undefined, _notebookService: INotebookService, _notebookModelResolverService: INotebookEditorModelResolverService, _fileDialogService: IFileDialogService, labelService: ILabelService, fileService: IFileService, filesConfigurationService: IFilesConfigurationService, extensionService: IExtensionService, editorService: IEditorService, textResourceConfigurationService: ITextResourceConfigurationService, customEditorLabelService: ICustomEditorLabelService, historyService: IInteractiveHistoryService, _textModelService: ITextModelService, configurationService: IConfigurationService, environmentService: IWorkbenchEnvironmentService, pathService: IPathService);
29
- getIcon(): ThemeIcon | undefined;
30
- private createEditorLabel;
31
- get typeId(): string;
32
- get editorId(): string | undefined;
33
- getName(): string;
34
- get editorInputs(): this[];
35
- get capabilities(): number;
36
- resolve(): Promise<import("../../notebook/common/notebookCommon.js").IResolvedNotebookEditorModel | null>;
37
- private ensureInputBoxCell;
38
- resolveInput(notebook: NotebookTextModel): Promise<import("../../../../editor/common/model.js").ITextModel>;
39
- dispose(): void;
40
- }
@@ -1,158 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
3
- import { ITextModelService } from '../../../../editor/common/services/resolverService.service.js';
4
- import { ITextResourceConfigurationService } from '../../../../editor/common/services/textResourceConfiguration.service.js';
5
- import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
6
- import { IFileDialogService } from '../../../../platform/dialogs/common/dialogs.service.js';
7
- import { IFileService } from '../../../../platform/files/common/files.service.js';
8
- import { ILabelService } from '../../../../platform/label/common/label.service.js';
9
- import { EditorInputCapabilities } from '../../../common/editor.js';
10
- import { IInteractiveHistoryService } from '../../interactive/browser/interactiveHistoryService.service.js';
11
- import { NotebookSetting, CellKind, CellEditType } from '../../notebook/common/notebookCommon.js';
12
- import { NotebookEditorInput } from '../../notebook/common/notebookEditorInput.js';
13
- import { INotebookEditorModelResolverService } from '../../notebook/common/notebookEditorModelResolverService.service.js';
14
- import { INotebookService } from '../../notebook/common/notebookService.service.js';
15
- import { ICustomEditorLabelService } from '../../../services/editor/common/customEditorLabelService.service.js';
16
- import { IEditorService } from '../../../services/editor/common/editorService.service.js';
17
- import { IExtensionService } from '../../../services/extensions/common/extensions.service.js';
18
- import { IFilesConfigurationService } from '../../../services/filesConfiguration/common/filesConfigurationService.service.js';
19
- import { Codicon } from '../../../../base/common/codicons.js';
20
- import { localize } from '../../../../nls.js';
21
- import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
22
- import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.service.js';
23
- import { IPathService } from '../../../services/path/common/pathService.service.js';
24
-
25
- var ReplEditorInput_1;
26
- const replTabIcon = registerIcon("repl-editor-label-icon", Codicon.debugLineByLine, ( localize(10941, "Icon of the REPL editor label.")));
27
- let ReplEditorInput = class ReplEditorInput extends NotebookEditorInput {
28
- static {
29
- ReplEditorInput_1 = this;
30
- }
31
- static {
32
- this.ID = "workbench.editorinputs.replEditorInput";
33
- }
34
- constructor(
35
- resource,
36
- label,
37
- _notebookService,
38
- _notebookModelResolverService,
39
- _fileDialogService,
40
- labelService,
41
- fileService,
42
- filesConfigurationService,
43
- extensionService,
44
- editorService,
45
- textResourceConfigurationService,
46
- customEditorLabelService,
47
- historyService,
48
- _textModelService,
49
- configurationService,
50
- environmentService,
51
- pathService
52
- ) {
53
- super(
54
- resource,
55
- undefined,
56
- "jupyter-notebook",
57
- {},
58
- _notebookService,
59
- _notebookModelResolverService,
60
- _fileDialogService,
61
- labelService,
62
- fileService,
63
- filesConfigurationService,
64
- extensionService,
65
- editorService,
66
- textResourceConfigurationService,
67
- customEditorLabelService,
68
- environmentService,
69
- pathService
70
- );
71
- this.historyService = historyService;
72
- this._textModelService = _textModelService;
73
- this.isDisposing = false;
74
- this.isScratchpad = resource.scheme === "untitled" && configurationService.getValue(NotebookSetting.InteractiveWindowPromptToSave) !== true;
75
- this.label = label ?? this.createEditorLabel(resource);
76
- }
77
- getIcon() {
78
- return replTabIcon;
79
- }
80
- createEditorLabel(resource) {
81
- if (!resource) {
82
- return "REPL";
83
- }
84
- if (resource.scheme === "untitled") {
85
- const match = ( new RegExp("Untitled-(\\d+).")).exec(resource.path);
86
- if (match?.length === 2) {
87
- return `REPL - ${match[1]}`;
88
- }
89
- }
90
- const filename = resource.path.split("/").pop();
91
- return filename ? `REPL - ${filename}` : "REPL";
92
- }
93
- get typeId() {
94
- return ReplEditorInput_1.ID;
95
- }
96
- get editorId() {
97
- return "repl";
98
- }
99
- getName() {
100
- return this.label;
101
- }
102
- get editorInputs() {
103
- return [this];
104
- }
105
- get capabilities() {
106
- const capabilities = super.capabilities;
107
- const scratchPad = this.isScratchpad ? EditorInputCapabilities.Scratchpad : 0;
108
- return capabilities | EditorInputCapabilities.Readonly | scratchPad;
109
- }
110
- async resolve() {
111
- const model = await super.resolve();
112
- if (model) {
113
- this.ensureInputBoxCell(model.notebook);
114
- }
115
- return model;
116
- }
117
- ensureInputBoxCell(notebook) {
118
- const lastCell = notebook.cells[notebook.cells.length - 1];
119
- if (!lastCell || lastCell.cellKind === CellKind.Markup || lastCell.outputs.length > 0 || lastCell.internalMetadata.executionOrder !== undefined) {
120
- notebook.applyEdits([{
121
- editType: CellEditType.Replace,
122
- index: notebook.cells.length,
123
- count: 0,
124
- cells: [{
125
- cellKind: CellKind.Code,
126
- language: "python",
127
- mime: undefined,
128
- outputs: [],
129
- source: ""
130
- }]
131
- }], true, undefined, () => undefined, undefined, false);
132
- }
133
- }
134
- async resolveInput(notebook) {
135
- if (this.inputModelRef) {
136
- return this.inputModelRef.object.textEditorModel;
137
- }
138
- const lastCell = notebook.cells[notebook.cells.length - 1];
139
- if (!lastCell) {
140
- throw ( new Error("The REPL editor requires at least one cell for the input box."));
141
- }
142
- this.inputModelRef = await this._textModelService.createModelReference(lastCell.uri);
143
- return this.inputModelRef.object.textEditorModel;
144
- }
145
- dispose() {
146
- if (!this.isDisposing) {
147
- this.isDisposing = true;
148
- this.editorModelReference?.object.revert({
149
- soft: true
150
- });
151
- this.inputModelRef?.dispose();
152
- super.dispose();
153
- }
154
- }
155
- };
156
- ReplEditorInput = ReplEditorInput_1 = ( __decorate([( __param(2, INotebookService)), ( __param(3, INotebookEditorModelResolverService)), ( __param(4, IFileDialogService)), ( __param(5, ILabelService)), ( __param(6, IFileService)), ( __param(7, IFilesConfigurationService)), ( __param(8, IExtensionService)), ( __param(9, IEditorService)), ( __param(10, ITextResourceConfigurationService)), ( __param(11, ICustomEditorLabelService)), ( __param(12, IInteractiveHistoryService)), ( __param(13, ITextModelService)), ( __param(14, IConfigurationService)), ( __param(15, IWorkbenchEnvironmentService)), ( __param(16, IPathService))], ReplEditorInput));
157
-
158
- export { ReplEditorInput };