@codingame/monaco-vscode-api 26.1.2 → 26.2.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/package.json +8 -8
- package/services.js +3 -3
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/window/common/window.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/services/storage/browser/storageService.d.ts +5 -1
- package/vscode/src/vs/workbench/services/storage/browser/storageService.js +32 -16
- package/vscode/src/vs/workbench/services/workspaces/browser/workspaces.d.ts +2 -2
- package/vscode/src/vs/workbench/services/workspaces/browser/workspaces.js +4 -4
- package/workbench.js +2 -2
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +0 -11
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +0 -150
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +0 -338
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +0 -364
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +0 -21
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +0 -36
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +0 -110
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +0 -692
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +0 -158
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-base-service-override": "26.
|
|
19
|
-
"@codingame/monaco-vscode-environment-service-override": "26.
|
|
20
|
-
"@codingame/monaco-vscode-extensions-service-override": "26.
|
|
21
|
-
"@codingame/monaco-vscode-files-service-override": "26.
|
|
22
|
-
"@codingame/monaco-vscode-host-service-override": "26.
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "26.
|
|
24
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "26.
|
|
18
|
+
"@codingame/monaco-vscode-base-service-override": "26.2.0",
|
|
19
|
+
"@codingame/monaco-vscode-environment-service-override": "26.2.0",
|
|
20
|
+
"@codingame/monaco-vscode-extensions-service-override": "26.2.0",
|
|
21
|
+
"@codingame/monaco-vscode-files-service-override": "26.2.0",
|
|
22
|
+
"@codingame/monaco-vscode-host-service-override": "26.2.0",
|
|
23
|
+
"@codingame/monaco-vscode-layout-service-override": "26.2.0",
|
|
24
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "26.2.0",
|
|
25
25
|
"@vscode/iconv-lite-umd": "0.7.1",
|
|
26
26
|
"dompurify": "3.3.1",
|
|
27
27
|
"jschardet": "3.1.4",
|
package/services.js
CHANGED
|
@@ -409,10 +409,10 @@ export { IAgentSessionsService } from './vscode/src/vs/workbench/contrib/chat/br
|
|
|
409
409
|
export { IUserAttentionService } from './vscode/src/vs/workbench/services/userAttention/common/userAttentionService.service.js';
|
|
410
410
|
export { ICodeCompareModelService } from './vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.service.js';
|
|
411
411
|
|
|
412
|
-
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "b6a47e94e326b5c209d118cf0f994d6065585705-
|
|
413
|
-
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"b6a47e94e326b5c209d118cf0f994d6065585705-
|
|
412
|
+
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "b6a47e94e326b5c209d118cf0f994d6065585705-9ade5d8e-36e4-4b3f-b71f-da4d77f9124b") {
|
|
413
|
+
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"b6a47e94e326b5c209d118cf0f994d6065585705-9ade5d8e-36e4-4b3f-b71f-da4d77f9124b"}, ${window.monacoVscodeApiBuildId} is already loaded`);
|
|
414
414
|
}
|
|
415
|
-
window.monacoVscodeApiBuildId = "b6a47e94e326b5c209d118cf0f994d6065585705-
|
|
415
|
+
window.monacoVscodeApiBuildId = "b6a47e94e326b5c209d118cf0f994d6065585705-9ade5d8e-36e4-4b3f-b71f-da4d77f9124b";
|
|
416
416
|
function registerCommands(options) {
|
|
417
417
|
function asMenuId(menu) {
|
|
418
418
|
switch (menu) {
|
|
@@ -73,6 +73,7 @@ export interface IOpenEmptyWindowOptions extends IBaseOpenWindowsOptions {
|
|
|
73
73
|
}
|
|
74
74
|
export type IWindowOpenable = IWorkspaceToOpen | IFolderToOpen | IFileToOpen;
|
|
75
75
|
export interface IBaseWindowOpenable {
|
|
76
|
+
id?: string;
|
|
76
77
|
label?: string;
|
|
77
78
|
}
|
|
78
79
|
export interface IWorkspaceToOpen extends IBaseWindowOpenable {
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { IContextViewService } from "../../../../../../platform/contextview/brow
|
|
|
19
19
|
import { IHoverService } from "../../../../../../platform/hover/browser/hover.service.js";
|
|
20
20
|
import { IInstantiationService } from "../../../../../../platform/instantiation/common/instantiation.js";
|
|
21
21
|
import { NotebookFindFilters } from "./findFilters.js";
|
|
22
|
-
import { IShowNotebookFindWidgetOptions } from "
|
|
22
|
+
import { IShowNotebookFindWidgetOptions } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget";
|
|
23
23
|
import { INotebookEditor } from "../../notebookBrowser.js";
|
|
24
24
|
export declare const findFilterButton: ThemeIcon;
|
|
25
25
|
export declare class NotebookFindInputFilterButton extends Disposable {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Disposable, IDisposable } from "../../../../base/common/lifecycle.js";
|
|
1
|
+
import { Disposable, DisposableStore, IDisposable } from "../../../../base/common/lifecycle.js";
|
|
2
2
|
import { IStorage, IStorageDatabase, IStorageItemsChangeEvent, IUpdateRequest } from "../../../../base/parts/storage/common/storage.js";
|
|
3
3
|
import { ILogService } from "../../../../platform/log/common/log.service.js";
|
|
4
4
|
import { AbstractStorageService, StorageScope } from "../../../../platform/storage/common/storage.js";
|
|
@@ -13,6 +13,7 @@ export declare class BrowserStorageService extends AbstractStorageService {
|
|
|
13
13
|
private applicationStorage;
|
|
14
14
|
private applicationStorageDatabase;
|
|
15
15
|
private readonly applicationStoragePromise;
|
|
16
|
+
private readonly applicationStorageDisposables;
|
|
16
17
|
private profileStorage;
|
|
17
18
|
private profileStorageDatabase;
|
|
18
19
|
private profileStorageProfile;
|
|
@@ -25,8 +26,11 @@ export declare class BrowserStorageService extends AbstractStorageService {
|
|
|
25
26
|
private registerListeners;
|
|
26
27
|
protected doInitialize(): Promise<void>;
|
|
27
28
|
private createApplicationStorage;
|
|
29
|
+
protected createApplicationStorageDatabase(disposableStore: DisposableStore): Promise<IStorageDatabase>;
|
|
28
30
|
private createProfileStorage;
|
|
31
|
+
protected createProfileStorageDatabase(profile: IUserDataProfile, disposableStore: DisposableStore): Promise<IStorageDatabase>;
|
|
29
32
|
private createWorkspaceStorage;
|
|
33
|
+
protected createWorkspaceStorageDatabase(workspace: IAnyWorkspaceIdentifier, disposableStore: DisposableStore): Promise<IStorageDatabase>;
|
|
30
34
|
private updateIsNew;
|
|
31
35
|
protected getStorage(scope: StorageScope): IStorage | undefined;
|
|
32
36
|
protected getLogDetails(scope: StorageScope): string | undefined;
|
|
@@ -15,6 +15,12 @@ import { AbstractStorageService, StorageScope, isProfileUsingDefaultStorage, IS_
|
|
|
15
15
|
import { isUserDataProfile } from '../../../../platform/userDataProfile/common/userDataProfile.js';
|
|
16
16
|
|
|
17
17
|
var BrowserStorageService_1;
|
|
18
|
+
function isIIndexedDBStorageDatabase(thing) {
|
|
19
|
+
return thing instanceof IndexedDBStorageDatabase || thing instanceof InMemoryIndexedDBStorageDatabase;
|
|
20
|
+
}
|
|
21
|
+
function getIIndexedDBStorageDatabase(database) {
|
|
22
|
+
return isIIndexedDBStorageDatabase(database) ? database : undefined;
|
|
23
|
+
}
|
|
18
24
|
let BrowserStorageService = class BrowserStorageService extends AbstractStorageService {
|
|
19
25
|
static {
|
|
20
26
|
BrowserStorageService_1 = this;
|
|
@@ -24,7 +30,7 @@ let BrowserStorageService = class BrowserStorageService extends AbstractStorageS
|
|
|
24
30
|
}
|
|
25
31
|
get hasPendingUpdate() {
|
|
26
32
|
return Boolean(
|
|
27
|
-
this.applicationStorageDatabase?.hasPendingUpdate || this.profileStorageDatabase?.hasPendingUpdate || this.workspaceStorageDatabase?.hasPendingUpdate
|
|
33
|
+
getIIndexedDBStorageDatabase(this.applicationStorageDatabase)?.hasPendingUpdate || getIIndexedDBStorageDatabase(this.profileStorageDatabase)?.hasPendingUpdate || getIIndexedDBStorageDatabase(this.workspaceStorageDatabase)?.hasPendingUpdate
|
|
28
34
|
);
|
|
29
35
|
}
|
|
30
36
|
constructor(workspace, userDataProfileService, logService) {
|
|
@@ -35,6 +41,7 @@ let BrowserStorageService = class BrowserStorageService extends AbstractStorageS
|
|
|
35
41
|
this.userDataProfileService = userDataProfileService;
|
|
36
42
|
this.logService = logService;
|
|
37
43
|
this.applicationStoragePromise = ( new DeferredPromise());
|
|
44
|
+
this.applicationStorageDisposables = this._register(( new DisposableStore()));
|
|
38
45
|
this.profileStorageDisposables = this._register(( new DisposableStore()));
|
|
39
46
|
this.workspaceStorageDisposables = this._register(( new DisposableStore()));
|
|
40
47
|
this.profileStorageProfile = this.userDataProfileService.currentProfile;
|
|
@@ -53,8 +60,7 @@ let BrowserStorageService = class BrowserStorageService extends AbstractStorageS
|
|
|
53
60
|
]);
|
|
54
61
|
}
|
|
55
62
|
async createApplicationStorage() {
|
|
56
|
-
|
|
57
|
-
this.applicationStorageDatabase = this._register(applicationStorageIndexedDB);
|
|
63
|
+
this.applicationStorageDatabase = await this.createApplicationStorageDatabase(this.applicationStorageDisposables);
|
|
58
64
|
this.applicationStorage = this._register(( new Storage(this.applicationStorageDatabase)));
|
|
59
65
|
this._register(
|
|
60
66
|
this.applicationStorage.onDidChangeStorage(e => this.emitDidChangeValue(StorageScope.APPLICATION, e))
|
|
@@ -62,26 +68,29 @@ let BrowserStorageService = class BrowserStorageService extends AbstractStorageS
|
|
|
62
68
|
await this.applicationStorage.init();
|
|
63
69
|
this.updateIsNew(this.applicationStorage);
|
|
64
70
|
this.applicationStoragePromise.complete({
|
|
65
|
-
|
|
71
|
+
database: this.applicationStorageDatabase,
|
|
66
72
|
storage: this.applicationStorage
|
|
67
73
|
});
|
|
68
74
|
}
|
|
75
|
+
async createApplicationStorageDatabase(disposableStore) {
|
|
76
|
+
const applicationStorageIndexedDB = await IndexedDBStorageDatabase.createApplicationStorage(this.logService);
|
|
77
|
+
return disposableStore.add(applicationStorageIndexedDB);
|
|
78
|
+
}
|
|
69
79
|
async createProfileStorage(profile) {
|
|
70
80
|
this.profileStorageDisposables.clear();
|
|
71
81
|
this.profileStorageProfile = profile;
|
|
72
82
|
if (isProfileUsingDefaultStorage(this.profileStorageProfile)) {
|
|
73
83
|
const {
|
|
74
|
-
|
|
84
|
+
database: applicationStorageDatabase,
|
|
75
85
|
storage: applicationStorage
|
|
76
86
|
} = await this.applicationStoragePromise.p;
|
|
77
|
-
this.profileStorageDatabase =
|
|
87
|
+
this.profileStorageDatabase = applicationStorageDatabase;
|
|
78
88
|
this.profileStorage = applicationStorage;
|
|
79
89
|
this.profileStorageDisposables.add(
|
|
80
90
|
this.profileStorage.onDidChangeStorage(e => this.emitDidChangeValue(StorageScope.PROFILE, e))
|
|
81
91
|
);
|
|
82
92
|
} else {
|
|
83
|
-
|
|
84
|
-
this.profileStorageDatabase = this.profileStorageDisposables.add(profileStorageIndexedDB);
|
|
93
|
+
this.profileStorageDatabase = await this.createProfileStorageDatabase(this.profileStorageProfile, this.profileStorageDisposables);
|
|
85
94
|
this.profileStorage = this.profileStorageDisposables.add(( new Storage(this.profileStorageDatabase)));
|
|
86
95
|
this.profileStorageDisposables.add(
|
|
87
96
|
this.profileStorage.onDidChangeStorage(e => this.emitDidChangeValue(StorageScope.PROFILE, e))
|
|
@@ -90,10 +99,13 @@ let BrowserStorageService = class BrowserStorageService extends AbstractStorageS
|
|
|
90
99
|
this.updateIsNew(this.profileStorage);
|
|
91
100
|
}
|
|
92
101
|
}
|
|
102
|
+
async createProfileStorageDatabase(profile, disposableStore) {
|
|
103
|
+
const profileStorageIndexedDB = await IndexedDBStorageDatabase.createProfileStorage(profile, this.logService);
|
|
104
|
+
return disposableStore.add(profileStorageIndexedDB);
|
|
105
|
+
}
|
|
93
106
|
async createWorkspaceStorage() {
|
|
94
107
|
this.workspaceStorageDisposables.clear();
|
|
95
|
-
|
|
96
|
-
this.workspaceStorageDatabase = this.workspaceStorageDisposables.add(workspaceStorageIndexedDB);
|
|
108
|
+
this.workspaceStorageDatabase = await this.createWorkspaceStorageDatabase(this.workspace, this.workspaceStorageDisposables);
|
|
97
109
|
this.workspaceStorage = this.workspaceStorageDisposables.add(( new Storage(this.workspaceStorageDatabase)));
|
|
98
110
|
this.workspaceStorageDisposables.add(
|
|
99
111
|
this.workspaceStorage.onDidChangeStorage(e => this.emitDidChangeValue(StorageScope.WORKSPACE, e))
|
|
@@ -101,6 +113,10 @@ let BrowserStorageService = class BrowserStorageService extends AbstractStorageS
|
|
|
101
113
|
await this.workspaceStorage.init();
|
|
102
114
|
this.updateIsNew(this.workspaceStorage);
|
|
103
115
|
}
|
|
116
|
+
async createWorkspaceStorageDatabase(workspace, disposableStore) {
|
|
117
|
+
const workspaceStorageIndexedDB = await IndexedDBStorageDatabase.createWorkspaceStorage(workspace.id, this.logService);
|
|
118
|
+
return disposableStore.add(workspaceStorageIndexedDB);
|
|
119
|
+
}
|
|
104
120
|
updateIsNew(storage) {
|
|
105
121
|
const firstOpen = storage.getBoolean(IS_NEW_KEY);
|
|
106
122
|
if (firstOpen === undefined) {
|
|
@@ -122,11 +138,11 @@ let BrowserStorageService = class BrowserStorageService extends AbstractStorageS
|
|
|
122
138
|
getLogDetails(scope) {
|
|
123
139
|
switch (scope) {
|
|
124
140
|
case StorageScope.APPLICATION:
|
|
125
|
-
return this.applicationStorageDatabase?.name;
|
|
141
|
+
return getIIndexedDBStorageDatabase(this.applicationStorageDatabase)?.name;
|
|
126
142
|
case StorageScope.PROFILE:
|
|
127
|
-
return this.profileStorageDatabase?.name;
|
|
143
|
+
return getIIndexedDBStorageDatabase(this.profileStorageDatabase)?.name;
|
|
128
144
|
default:
|
|
129
|
-
return this.workspaceStorageDatabase?.name;
|
|
145
|
+
return getIIndexedDBStorageDatabase(this.workspaceStorageDatabase)?.name;
|
|
130
146
|
}
|
|
131
147
|
}
|
|
132
148
|
async switchToProfile(toProfile) {
|
|
@@ -174,9 +190,9 @@ let BrowserStorageService = class BrowserStorageService extends AbstractStorageS
|
|
|
174
190
|
await this.getStorage(scope)?.whenFlushed();
|
|
175
191
|
}
|
|
176
192
|
await Promises.settled([
|
|
177
|
-
this.applicationStorageDatabase?.clear() ?? Promise.resolve(),
|
|
178
|
-
this.profileStorageDatabase?.clear() ?? Promise.resolve(),
|
|
179
|
-
this.workspaceStorageDatabase?.clear() ?? Promise.resolve()
|
|
193
|
+
getIIndexedDBStorageDatabase(this.applicationStorageDatabase)?.clear() ?? Promise.resolve(),
|
|
194
|
+
getIIndexedDBStorageDatabase(this.profileStorageDatabase)?.clear() ?? Promise.resolve(),
|
|
195
|
+
getIIndexedDBStorageDatabase(this.workspaceStorageDatabase)?.clear() ?? Promise.resolve()
|
|
180
196
|
]);
|
|
181
197
|
}
|
|
182
198
|
hasScope(scope) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier } from "../../../../platform/workspace/common/workspace.js";
|
|
2
2
|
import { URI } from "../../../../base/common/uri.js";
|
|
3
|
-
export declare function getWorkspaceIdentifier(workspaceUri: URI): IWorkspaceIdentifier;
|
|
4
|
-
export declare function getSingleFolderWorkspaceIdentifier(folderUri: URI): ISingleFolderWorkspaceIdentifier;
|
|
3
|
+
export declare function getWorkspaceIdentifier(workspaceUri: URI, id?: string): IWorkspaceIdentifier;
|
|
4
|
+
export declare function getSingleFolderWorkspaceIdentifier(folderUri: URI, id?: string): ISingleFolderWorkspaceIdentifier;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import { hash } from '../../../../base/common/hash.js';
|
|
3
3
|
|
|
4
|
-
function getWorkspaceIdentifier(workspaceUri) {
|
|
4
|
+
function getWorkspaceIdentifier(workspaceUri, id) {
|
|
5
5
|
return {
|
|
6
|
-
id: getWorkspaceId(workspaceUri),
|
|
6
|
+
id: id ?? getWorkspaceId(workspaceUri),
|
|
7
7
|
configPath: workspaceUri
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
function getSingleFolderWorkspaceIdentifier(folderUri) {
|
|
10
|
+
function getSingleFolderWorkspaceIdentifier(folderUri, id) {
|
|
11
11
|
return {
|
|
12
|
-
id: getWorkspaceId(folderUri),
|
|
12
|
+
id: id ?? getWorkspaceId(folderUri),
|
|
13
13
|
uri: folderUri
|
|
14
14
|
};
|
|
15
15
|
}
|
package/workbench.js
CHANGED
|
@@ -30,10 +30,10 @@ function resolveWorkspace(configuration) {
|
|
|
30
30
|
workspace = configuration.workspaceProvider.workspace;
|
|
31
31
|
}
|
|
32
32
|
if (workspace != null && isWorkspaceToOpen(workspace)) {
|
|
33
|
-
return getWorkspaceIdentifier$1(workspace.workspaceUri);
|
|
33
|
+
return getWorkspaceIdentifier$1(workspace.workspaceUri, workspace.id);
|
|
34
34
|
}
|
|
35
35
|
if (workspace != null && isFolderToOpen(workspace)) {
|
|
36
|
-
return getSingleFolderWorkspaceIdentifier(workspace.folderUri);
|
|
36
|
+
return getSingleFolderWorkspaceIdentifier(workspace.folderUri, workspace.id);
|
|
37
37
|
}
|
|
38
38
|
return UNKNOWN_EMPTY_WINDOW_WORKSPACE;
|
|
39
39
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RawContextKey } from "../../../../platform/contextkey/common/contextkey.js";
|
|
2
|
-
export declare const INTERACTIVE_INPUT_CURSOR_BOUNDARY: RawContextKey<"top" | "none" | "bottom" | "both">;
|
|
3
|
-
export declare const ReplEditorSettings: {
|
|
4
|
-
interactiveWindowAlwaysScrollOnNewCell: string;
|
|
5
|
-
executeWithShiftEnter: string;
|
|
6
|
-
showExecutionHint: string;
|
|
7
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
|
|
3
|
-
|
|
4
|
-
const INTERACTIVE_INPUT_CURSOR_BOUNDARY = ( new RawContextKey("interactiveInputCursorAtBoundary", "none"));
|
|
5
|
-
const ReplEditorSettings = {
|
|
6
|
-
interactiveWindowAlwaysScrollOnNewCell: "interactiveWindow.alwaysScrollOnNewCell",
|
|
7
|
-
executeWithShiftEnter: "interactiveWindow.executeWithShiftEnter",
|
|
8
|
-
showExecutionHint: "interactiveWindow.showExecutionHint"
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { INTERACTIVE_INPUT_CURSOR_BOUNDARY, ReplEditorSettings };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "../../../../base/common/lifecycle.js";
|
|
2
|
-
import { ICodeEditor, IContentWidget, IContentWidgetPosition } from "../../../../editor/browser/editorBrowser.js";
|
|
3
|
-
import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js";
|
|
4
|
-
import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
|
|
5
|
-
export declare class ReplInputHintContentWidget extends Disposable implements IContentWidget {
|
|
6
|
-
private readonly editor;
|
|
7
|
-
private readonly configurationService;
|
|
8
|
-
private readonly keybindingService;
|
|
9
|
-
private static readonly ID;
|
|
10
|
-
private domNode;
|
|
11
|
-
private ariaLabel;
|
|
12
|
-
private label;
|
|
13
|
-
constructor(editor: ICodeEditor, configurationService: IConfigurationService, keybindingService: IKeybindingService);
|
|
14
|
-
getId(): string;
|
|
15
|
-
getPosition(): IContentWidgetPosition | null;
|
|
16
|
-
getDomNode(): HTMLElement;
|
|
17
|
-
private setHint;
|
|
18
|
-
private getKeybinding;
|
|
19
|
-
dispose(): void;
|
|
20
|
-
}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { $, addDisposableListener } from '../../../../base/browser/dom.js';
|
|
4
|
-
import { status } from '../../../../base/browser/ui/aria/aria.js';
|
|
5
|
-
import { KeybindingLabel } from '../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';
|
|
6
|
-
import { Event } from '../../../../base/common/event.js';
|
|
7
|
-
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
8
|
-
import { OS } from '../../../../base/common/platform.js';
|
|
9
|
-
import { ContentWidgetPositionPreference } from '../../../../editor/browser/editorBrowser.js';
|
|
10
|
-
import { EditorOption } from '../../../../editor/common/config/editorOptions.js';
|
|
11
|
-
import { Position } from '../../../../editor/common/core/position.js';
|
|
12
|
-
import { localize } from '../../../../nls.js';
|
|
13
|
-
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
|
|
14
|
-
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
15
|
-
import { AccessibilityVerbositySettingId } from '../../accessibility/browser/accessibilityConfiguration.js';
|
|
16
|
-
import { AccessibilityCommandId } from '../../accessibility/common/accessibilityCommands.js';
|
|
17
|
-
import { ReplEditorSettings } from './interactiveCommon.js';
|
|
18
|
-
|
|
19
|
-
var ReplInputHintContentWidget_1;
|
|
20
|
-
let ReplInputHintContentWidget = class ReplInputHintContentWidget extends Disposable {
|
|
21
|
-
static {
|
|
22
|
-
ReplInputHintContentWidget_1 = this;
|
|
23
|
-
}
|
|
24
|
-
static {
|
|
25
|
-
this.ID = "replInput.widget.emptyHint";
|
|
26
|
-
}
|
|
27
|
-
constructor(editor, configurationService, keybindingService) {
|
|
28
|
-
super();
|
|
29
|
-
this.editor = editor;
|
|
30
|
-
this.configurationService = configurationService;
|
|
31
|
-
this.keybindingService = keybindingService;
|
|
32
|
-
this.ariaLabel = "";
|
|
33
|
-
this._register(this.editor.onDidChangeConfiguration(e => {
|
|
34
|
-
if (this.domNode && e.hasChanged(EditorOption.fontInfo)) {
|
|
35
|
-
this.editor.applyFontInfo(this.domNode);
|
|
36
|
-
}
|
|
37
|
-
}));
|
|
38
|
-
const onDidFocusEditorText = Event.debounce(this.editor.onDidFocusEditorText, () => undefined, 500);
|
|
39
|
-
this._register(onDidFocusEditorText(() => {
|
|
40
|
-
if (this.editor.hasTextFocus() && this.ariaLabel && configurationService.getValue(AccessibilityVerbositySettingId.ReplEditor)) {
|
|
41
|
-
status(this.ariaLabel);
|
|
42
|
-
}
|
|
43
|
-
}));
|
|
44
|
-
this._register(configurationService.onDidChangeConfiguration(e => {
|
|
45
|
-
if (e.affectsConfiguration(ReplEditorSettings.executeWithShiftEnter)) {
|
|
46
|
-
this.setHint();
|
|
47
|
-
}
|
|
48
|
-
}));
|
|
49
|
-
this.editor.addContentWidget(this);
|
|
50
|
-
}
|
|
51
|
-
getId() {
|
|
52
|
-
return ReplInputHintContentWidget_1.ID;
|
|
53
|
-
}
|
|
54
|
-
getPosition() {
|
|
55
|
-
return {
|
|
56
|
-
position: {
|
|
57
|
-
lineNumber: 1,
|
|
58
|
-
column: 1
|
|
59
|
-
},
|
|
60
|
-
preference: [ContentWidgetPositionPreference.EXACT]
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
getDomNode() {
|
|
64
|
-
if (!this.domNode) {
|
|
65
|
-
this.domNode = $(".empty-editor-hint");
|
|
66
|
-
this.domNode.style.width = "max-content";
|
|
67
|
-
this.domNode.style.paddingLeft = "4px";
|
|
68
|
-
this.setHint();
|
|
69
|
-
this._register(addDisposableListener(this.domNode, "click", () => {
|
|
70
|
-
this.editor.focus();
|
|
71
|
-
}));
|
|
72
|
-
this.editor.applyFontInfo(this.domNode);
|
|
73
|
-
const lineHeight = this.editor.getLineHeightForPosition(( new Position(1, 1)));
|
|
74
|
-
this.domNode.style.lineHeight = lineHeight + "px";
|
|
75
|
-
}
|
|
76
|
-
return this.domNode;
|
|
77
|
-
}
|
|
78
|
-
setHint() {
|
|
79
|
-
if (!this.domNode) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
while (this.domNode.firstChild) {
|
|
83
|
-
this.domNode.removeChild(this.domNode.firstChild);
|
|
84
|
-
}
|
|
85
|
-
const hintElement = $("div.empty-hint-text");
|
|
86
|
-
hintElement.style.cursor = "text";
|
|
87
|
-
hintElement.style.whiteSpace = "nowrap";
|
|
88
|
-
const keybinding = this.getKeybinding();
|
|
89
|
-
const keybindingHintLabel = keybinding?.getLabel();
|
|
90
|
-
if (keybinding && keybindingHintLabel) {
|
|
91
|
-
const actionPart = ( localize(8901, "Press {0} to execute. ", keybindingHintLabel));
|
|
92
|
-
const [before, after] = ( actionPart.split(keybindingHintLabel).map(fragment => {
|
|
93
|
-
const hintPart = $("span", undefined, fragment);
|
|
94
|
-
hintPart.style.fontStyle = "italic";
|
|
95
|
-
return hintPart;
|
|
96
|
-
}));
|
|
97
|
-
hintElement.appendChild(before);
|
|
98
|
-
if (this.label) {
|
|
99
|
-
this.label.dispose();
|
|
100
|
-
}
|
|
101
|
-
this.label = this._register(( new KeybindingLabel(hintElement, OS)));
|
|
102
|
-
this.label.set(keybinding);
|
|
103
|
-
this.label.element.style.width = "min-content";
|
|
104
|
-
this.label.element.style.display = "inline";
|
|
105
|
-
hintElement.appendChild(after);
|
|
106
|
-
this.domNode.append(hintElement);
|
|
107
|
-
const helpKeybinding = this.keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibilityHelp)?.getLabel();
|
|
108
|
-
const helpInfo = helpKeybinding ? ( localize(8902, "Use {0} for accessibility help. ", helpKeybinding)) : ( localize(8903, "Run the Open Accessibility Help command for more information. "));
|
|
109
|
-
this.ariaLabel = actionPart.concat(helpInfo, ( localize(
|
|
110
|
-
8904,
|
|
111
|
-
" Toggle {0} in settings to disable this hint.",
|
|
112
|
-
AccessibilityVerbositySettingId.ReplEditor
|
|
113
|
-
)));
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
getKeybinding() {
|
|
117
|
-
const keybindings = this.keybindingService.lookupKeybindings("interactive.execute");
|
|
118
|
-
const shiftEnterConfig = this.configurationService.getValue(ReplEditorSettings.executeWithShiftEnter);
|
|
119
|
-
const hasEnterChord = (kb, modifier = "") => {
|
|
120
|
-
const chords = kb.getDispatchChords();
|
|
121
|
-
const chord = modifier + "Enter";
|
|
122
|
-
const chordAlt = modifier + "[Enter]";
|
|
123
|
-
return chords.length === 1 && (chords[0] === chord || chords[0] === chordAlt);
|
|
124
|
-
};
|
|
125
|
-
if (shiftEnterConfig) {
|
|
126
|
-
const keybinding = keybindings.find(kb => hasEnterChord(kb, "shift+"));
|
|
127
|
-
if (keybinding) {
|
|
128
|
-
return keybinding;
|
|
129
|
-
}
|
|
130
|
-
} else {
|
|
131
|
-
let keybinding = keybindings.find(kb => hasEnterChord(kb));
|
|
132
|
-
if (keybinding) {
|
|
133
|
-
return keybinding;
|
|
134
|
-
}
|
|
135
|
-
keybinding = this.keybindingService.lookupKeybindings("python.execInREPLEnter").find(kb => hasEnterChord(kb));
|
|
136
|
-
if (keybinding) {
|
|
137
|
-
return keybinding;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return keybindings?.[0];
|
|
141
|
-
}
|
|
142
|
-
dispose() {
|
|
143
|
-
super.dispose();
|
|
144
|
-
this.editor.removeContentWidget(this);
|
|
145
|
-
this.label?.dispose();
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
ReplInputHintContentWidget = ReplInputHintContentWidget_1 = ( __decorate([( __param(1, IConfigurationService)), ( __param(2, IKeybindingService))], ReplInputHintContentWidget));
|
|
149
|
-
|
|
150
|
-
export { ReplInputHintContentWidget };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Disposable, IDisposable } from "../../../../../../base/common/lifecycle.js";
|
|
2
|
-
import { IInstantiationService } from "../../../../../../platform/instantiation/common/instantiation.js";
|
|
3
|
-
import { ICellViewModel, INotebookEditor, INotebookEditorContribution, INotebookViewModel } from "../../notebookBrowser.js";
|
|
4
|
-
export declare function formatCellDuration(duration: number, showMilliseconds?: boolean): string;
|
|
5
|
-
export declare class NotebookStatusBarController extends Disposable {
|
|
6
|
-
private readonly _notebookEditor;
|
|
7
|
-
private readonly _itemFactory;
|
|
8
|
-
private readonly _visibleCells;
|
|
9
|
-
private readonly _observer;
|
|
10
|
-
constructor(_notebookEditor: INotebookEditor, _itemFactory: (vm: INotebookViewModel, cell: ICellViewModel) => IDisposable);
|
|
11
|
-
private _updateEverything;
|
|
12
|
-
private _updateVisibleCells;
|
|
13
|
-
dispose(): void;
|
|
14
|
-
}
|
|
15
|
-
export declare class ExecutionStateCellStatusBarContrib extends Disposable implements INotebookEditorContribution {
|
|
16
|
-
static id: string;
|
|
17
|
-
constructor(notebookEditor: INotebookEditor, instantiationService: IInstantiationService);
|
|
18
|
-
}
|
|
19
|
-
export declare class TimerCellStatusBarContrib extends Disposable implements INotebookEditorContribution {
|
|
20
|
-
static id: string;
|
|
21
|
-
constructor(notebookEditor: INotebookEditor, instantiationService: IInstantiationService);
|
|
22
|
-
}
|