@opensumi/sumi 2.15.9 → 2.16.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/build.ts +7 -3
- package/package.json +3 -3
- package/sumi-browser.d.ts +8 -1
- package/sumi-worker/sumi-worker.d.ts +8 -0
- package/vscode/typings/vscode.d.ts +65 -36
- package/vscode/typings/vscode.proposed.d.ts +64 -46
package/build.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { readAllMainPackages } from '../../scripts/pkg';
|
|
2
|
-
import { collectPkgContains, collectPkgVersionList } from '../../scripts/manifest';
|
|
3
1
|
import path from 'path';
|
|
4
|
-
|
|
2
|
+
|
|
5
3
|
import { ensureFileSync, writeFileSync } from 'fs-extra';
|
|
6
4
|
|
|
5
|
+
import { collectPkgContains, collectPkgVersionList } from '../../scripts/manifest';
|
|
6
|
+
import { readAllMainPackages } from '../../scripts/pkg';
|
|
7
|
+
|
|
8
|
+
import pkg from './package.json';
|
|
9
|
+
|
|
10
|
+
|
|
7
11
|
(async () => {
|
|
8
12
|
const manifestFile = path.join(__dirname, 'manifest.json');
|
|
9
13
|
const packageDir = path.join(__dirname, '../../packages');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/sumi",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
4
4
|
"typings": "index.d.ts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"build": "ts-node ./build"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@opensumi/ide-components": "2.
|
|
15
|
+
"@opensumi/ide-components": "2.16.0",
|
|
16
16
|
"@types/react": "^16.9.33",
|
|
17
17
|
"vscode-uri": "^3.0.2"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "2e554d00571802f550619c810b804b5c91b1cfd1"
|
|
20
20
|
}
|
package/sumi-browser.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ interface IComponentMethod {
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
interface IComponentProps<N, W = any> {
|
|
6
|
+
sumiExtendSet: {
|
|
7
|
+
set<T = IComponentMethod>(methods: T): void;
|
|
8
|
+
};
|
|
9
|
+
sumiExtendService: {
|
|
10
|
+
node: N;
|
|
11
|
+
worker: W;
|
|
12
|
+
};
|
|
6
13
|
kaitianExtendSet: {
|
|
7
14
|
set<T = IComponentMethod>(methods: T): void;
|
|
8
15
|
};
|
|
@@ -26,8 +33,8 @@ declare module 'kaitian-browser' {
|
|
|
26
33
|
declare module 'sumi-browser' {
|
|
27
34
|
export * from '@opensumi/ide-components';
|
|
28
35
|
|
|
29
|
-
import type vscode from 'vscode';
|
|
30
36
|
import React from 'react';
|
|
37
|
+
import type vscode from 'vscode';
|
|
31
38
|
import { URI as Uri } from 'vscode-uri';
|
|
32
39
|
|
|
33
40
|
import { ROTATE_TYPE, ANIM_TYPE } from '@opensumi/ide-components';
|
|
@@ -89,6 +89,14 @@ declare module 'sumi-worker' {
|
|
|
89
89
|
*/
|
|
90
90
|
readonly enableScripts?: boolean;
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Controls whether forms are enabled in the webview content or not.
|
|
94
|
+
*
|
|
95
|
+
* Defaults to true if {@link WebviewOptions.enableScripts scripts are enabled}. Otherwise defaults to false.
|
|
96
|
+
* Explicitly setting this property to either true or false overrides the default.
|
|
97
|
+
*/
|
|
98
|
+
readonly enableForms?: boolean;
|
|
99
|
+
|
|
92
100
|
/**
|
|
93
101
|
* Controls whether command uris are enabled in webview content or not.
|
|
94
102
|
*
|
|
@@ -346,48 +346,48 @@ declare module 'vscode' {
|
|
|
346
346
|
handleTerminalLink(link: T): ProviderResult<void>;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
349
|
+
/**
|
|
350
|
+
* A link on a terminal line.
|
|
351
|
+
*/
|
|
352
|
+
export class TerminalLink {
|
|
353
|
+
/**
|
|
354
|
+
* The start index of the link on {@link TerminalLinkContext.line}.
|
|
355
|
+
*/
|
|
356
|
+
startIndex: number;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* The length of the link on {@link TerminalLinkContext.line}.
|
|
360
|
+
*/
|
|
361
|
+
length: number;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The tooltip text when you hover over this link.
|
|
365
|
+
*
|
|
366
|
+
* If a tooltip is provided, is will be displayed in a string that includes instructions on
|
|
367
|
+
* how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary
|
|
368
|
+
* depending on OS, user settings, and localization.
|
|
369
|
+
*/
|
|
370
|
+
tooltip?: string;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Creates a new terminal link.
|
|
374
|
+
* @param startIndex The start index of the link on {@link TerminalLinkContext.line}.
|
|
375
|
+
* @param length The length of the link on {@link TerminalLinkContext.line}.
|
|
376
|
+
* @param tooltip The tooltip text when you hover over this link.
|
|
377
|
+
*
|
|
378
|
+
* If a tooltip is provided, is will be displayed in a string that includes instructions on
|
|
379
|
+
* how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary
|
|
380
|
+
* depending on OS, user settings, and localization.
|
|
381
|
+
*/
|
|
382
|
+
constructor(startIndex: number, length: number, tooltip?: string);
|
|
383
|
+
}
|
|
384
384
|
|
|
385
385
|
|
|
386
386
|
/**
|
|
387
387
|
* Provides a terminal profile for the contributed terminal profile when launched via the UI or
|
|
388
388
|
* command.
|
|
389
389
|
*/
|
|
390
|
-
|
|
390
|
+
export interface TerminalProfileProvider {
|
|
391
391
|
/**
|
|
392
392
|
* Provide the terminal profile.
|
|
393
393
|
* @param token A cancellation token that indicates the result is no longer needed.
|
|
@@ -814,6 +814,15 @@ declare module 'vscode' {
|
|
|
814
814
|
*/
|
|
815
815
|
readonly enableScripts?: boolean;
|
|
816
816
|
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Controls whether forms are enabled in the webview content or not.
|
|
820
|
+
*
|
|
821
|
+
* Defaults to true if {@link WebviewOptions.enableScripts scripts are enabled}. Otherwise defaults to false.
|
|
822
|
+
* Explicitly setting this property to either true or false overrides the default.
|
|
823
|
+
*/
|
|
824
|
+
readonly enableForms?: boolean;
|
|
825
|
+
|
|
817
826
|
/**
|
|
818
827
|
* Controls whether command uris are enabled in webview content or not.
|
|
819
828
|
*
|
|
@@ -3001,6 +3010,20 @@ declare module 'vscode' {
|
|
|
3001
3010
|
SymbolicLink = 64,
|
|
3002
3011
|
}
|
|
3003
3012
|
|
|
3013
|
+
//#region FileSystemProvider stat readonly - https://github.com/microsoft/vscode/issues/73122
|
|
3014
|
+
|
|
3015
|
+
export enum FilePermission {
|
|
3016
|
+
/**
|
|
3017
|
+
* The file is readonly.
|
|
3018
|
+
*
|
|
3019
|
+
* *Note:* All `FileStat` from a `FileSystemProvider` that is registered with
|
|
3020
|
+
* the option `isReadonly: true` will be implicitly handled as if `FilePermission.Readonly`
|
|
3021
|
+
* is set. As a consequence, it is not possible to have a readonly file system provider
|
|
3022
|
+
* registered where some `FileStat` are not readonly.
|
|
3023
|
+
*/
|
|
3024
|
+
Readonly = 1
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3004
3027
|
/**
|
|
3005
3028
|
* The `FileStat`-type represents metadata about a file
|
|
3006
3029
|
*/
|
|
@@ -3022,6 +3045,12 @@ declare module 'vscode' {
|
|
|
3022
3045
|
* The size in bytes.
|
|
3023
3046
|
*/
|
|
3024
3047
|
size: number;
|
|
3048
|
+
/**
|
|
3049
|
+
* The permissions of the file, e.g. whether the file is readonly.
|
|
3050
|
+
*
|
|
3051
|
+
* *Note:* This value might be a bitmask, e.g. `FilePermission.Readonly | FilePermission.Other`.
|
|
3052
|
+
*/
|
|
3053
|
+
permissions?: FilePermission;
|
|
3025
3054
|
}
|
|
3026
3055
|
|
|
3027
3056
|
/**
|
|
@@ -208,34 +208,34 @@ declare module 'vscode' {
|
|
|
208
208
|
*/
|
|
209
209
|
export class FileDecoration {
|
|
210
210
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
/**
|
|
212
|
+
* A very short string that represents this decoration.
|
|
213
|
+
*/
|
|
214
214
|
badge?: string;
|
|
215
215
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
/**
|
|
217
|
+
* A human-readable tooltip for this decoration.
|
|
218
|
+
*/
|
|
219
219
|
tooltip?: string;
|
|
220
220
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
/**
|
|
222
|
+
* The color of this decoration.
|
|
223
|
+
*/
|
|
224
224
|
color?: ThemeColor;
|
|
225
225
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
/**
|
|
227
|
+
* A flag expressing that this decoration should be
|
|
228
|
+
* propagated to its parents.
|
|
229
|
+
*/
|
|
230
230
|
propagate?: boolean;
|
|
231
231
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Creates a new decoration.
|
|
234
|
+
*
|
|
235
|
+
* @param badge A letter that represents the decoration.
|
|
236
|
+
* @param tooltip The tooltip of the decoration.
|
|
237
|
+
* @param color The color of the decoration.
|
|
238
|
+
*/
|
|
239
239
|
constructor(badge?: string, tooltip?: string, color?: ThemeColor);
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -245,35 +245,35 @@ declare module 'vscode' {
|
|
|
245
245
|
*/
|
|
246
246
|
export interface FileDecorationProvider {
|
|
247
247
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
248
|
+
/**
|
|
249
|
+
* An optional event to signal that decorations for one or many files have changed.
|
|
250
|
+
*
|
|
251
|
+
* *Note* that this event should be used to propagate information about children.
|
|
252
|
+
*
|
|
253
|
+
* @see {@link EventEmitter}
|
|
254
|
+
*/
|
|
255
255
|
onDidChange: Event<undefined | Uri | Uri[]>;
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
257
|
+
/**
|
|
258
|
+
* An optional event to signal that decorations for one or many files have changed.
|
|
259
|
+
*
|
|
260
|
+
* *Note* that this event should be used to propagate information about children.
|
|
261
|
+
*
|
|
262
|
+
* @see [EventEmitter](#EventEmitter)
|
|
263
|
+
*/
|
|
264
|
+
onDidChangeFileDecorations?: Event<undefined | Uri | Uri[]>;
|
|
265
265
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
266
|
+
/**
|
|
267
|
+
* Provide decorations for a given uri.
|
|
268
|
+
*
|
|
269
|
+
* *Note* that this function is only called when a file gets rendered in the UI.
|
|
270
|
+
* This means a decoration from a descendent that propagates upwards must be signaled
|
|
271
|
+
* to the editor via the {@link FileDecorationProvider.onDidChangeFileDecorations onDidChangeFileDecorations}-event.
|
|
272
|
+
*
|
|
273
|
+
* @param uri The uri of the file to provide a decoration for.
|
|
274
|
+
* @param token A cancellation token.
|
|
275
|
+
* @returns A decoration or a thenable that resolves to such.
|
|
276
|
+
*/
|
|
277
277
|
provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration>;
|
|
278
278
|
}
|
|
279
279
|
|
|
@@ -659,4 +659,22 @@ declare module 'vscode' {
|
|
|
659
659
|
provideInlayHints(model: TextDocument, range: Range, token: CancellationToken): ProviderResult<InlayHint[]>;
|
|
660
660
|
}
|
|
661
661
|
//#endregion
|
|
662
|
+
|
|
663
|
+
//#region https://github.com/Microsoft/vscode/issues/15178
|
|
664
|
+
|
|
665
|
+
// TODO@API must be a class
|
|
666
|
+
export interface OpenEditorInfo {
|
|
667
|
+
name: string;
|
|
668
|
+
resource: Uri;
|
|
669
|
+
isActive: boolean;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export namespace window {
|
|
673
|
+
export const openEditors: ReadonlyArray<OpenEditorInfo>;
|
|
674
|
+
|
|
675
|
+
// todo@API proper event type
|
|
676
|
+
export const onDidChangeOpenEditors: Event<void>;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
//#endregion
|
|
662
680
|
}
|