@opensumi/ide-core-browser 2.18.2 → 2.18.3
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.
|
@@ -10,8 +10,8 @@ export interface IExternalPreferenceProvider<T = any> {
|
|
|
10
10
|
scope: PreferenceScope;
|
|
11
11
|
}>;
|
|
12
12
|
}
|
|
13
|
-
export declare function registerExternalPreferenceProvider<T>(name:
|
|
14
|
-
export declare function getExternalPreferenceProvider(name:
|
|
13
|
+
export declare function registerExternalPreferenceProvider<T>(name: string, provider: IExternalPreferenceProvider<T>): void;
|
|
14
|
+
export declare function getExternalPreferenceProvider(name: string): IExternalPreferenceProvider<any> | undefined;
|
|
15
15
|
export declare function getPreferenceThemeId(): string;
|
|
16
16
|
export declare function getPreferenceIconThemeId(): string;
|
|
17
17
|
export declare function getPreferenceLanguageId(defaultPreferences?: IPreferences): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"early-preferences.d.ts","sourceRoot":"","sources":["../../src/preferences/early-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"early-preferences.d.ts","sourceRoot":"","sources":["../../src/preferences/early-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAqB,MAAM,2BAA2B,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,MAAM,WAAW,2BAA2B,CAAC,CAAC,GAAG,GAAG;IAClD,GAAG,CAAC,KAAK,EAAE,eAAe,GAAG,CAAC,GAAG,SAAS,CAAC;IAC3C,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,eAAe,CAAA;KAAE,CAAC,CAAC;CAC7E;AAID,wBAAgB,kCAAkC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,2BAA2B,CAAC,CAAC,CAAC,QAK3G;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,gDAUzD;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAED,wBAAgB,uBAAuB,CAAC,kBAAkB,CAAC,EAAE,YAAY,GAAG,MAAM,CAIjF;AAGD,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,QAiCjF;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,cAAc,EACvB,UAAU,CAAC,EAAE,eAAe,GAC3B;IAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAAE,CAiBlD;AAED,wBAAgB,uBAAuB,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC,CAEtF"}
|
|
@@ -24,20 +24,20 @@ function getExternalPreferenceProvider(name) {
|
|
|
24
24
|
}
|
|
25
25
|
exports.getExternalPreferenceProvider = getExternalPreferenceProvider;
|
|
26
26
|
function getPreferenceThemeId() {
|
|
27
|
-
return getExternalPreference(
|
|
27
|
+
return getExternalPreference("general.theme" /* Theme */).value;
|
|
28
28
|
}
|
|
29
29
|
exports.getPreferenceThemeId = getPreferenceThemeId;
|
|
30
30
|
function getPreferenceIconThemeId() {
|
|
31
|
-
return getExternalPreference(
|
|
31
|
+
return getExternalPreference("general.icon" /* Icon */).value;
|
|
32
32
|
}
|
|
33
33
|
exports.getPreferenceIconThemeId = getPreferenceIconThemeId;
|
|
34
34
|
function getPreferenceLanguageId(defaultPreferences) {
|
|
35
35
|
// 因为语言加载的时机比较早,因此会优先从 defaultPreferences 里面读取
|
|
36
|
-
const langFromDefaultPreferences = defaultPreferences && defaultPreferences[
|
|
37
|
-
return langFromDefaultPreferences || getExternalPreference(
|
|
36
|
+
const langFromDefaultPreferences = defaultPreferences && defaultPreferences["general.language" /* Language */];
|
|
37
|
+
return langFromDefaultPreferences || getExternalPreference("general.language" /* Language */).value || 'zh-CN';
|
|
38
38
|
}
|
|
39
39
|
exports.getPreferenceLanguageId = getPreferenceLanguageId;
|
|
40
|
-
// 默认使用localStorage
|
|
40
|
+
// 默认使用 localStorage
|
|
41
41
|
function registerLocalStorageProvider(key, workspaceFolder) {
|
|
42
42
|
function getScopePrefix(scope) {
|
|
43
43
|
if (scope === preference_scope_1.PreferenceScope.Workspace) {
|
|
@@ -73,11 +73,12 @@ function registerLocalStorageProvider(key, workspaceFolder) {
|
|
|
73
73
|
}
|
|
74
74
|
exports.registerLocalStorageProvider = registerLocalStorageProvider;
|
|
75
75
|
function getExternalPreference(preferenceName, schema, untilScope) {
|
|
76
|
+
var _a;
|
|
76
77
|
const scopes = untilScope
|
|
77
78
|
? preference_scope_1.PreferenceScope.getReversedScopes().filter((s) => s <= untilScope)
|
|
78
79
|
: preference_scope_1.PreferenceScope.getReversedScopes();
|
|
79
80
|
for (const scope of scopes) {
|
|
80
|
-
const value = providers.get(preferenceName).get(scope);
|
|
81
|
+
const value = (_a = providers.get(preferenceName)) === null || _a === void 0 ? void 0 : _a.get(scope);
|
|
81
82
|
if (value !== undefined) {
|
|
82
83
|
return {
|
|
83
84
|
value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"early-preferences.js","sourceRoot":"","sources":["../../src/preferences/early-preferences.ts"],"names":[],"mappings":";;;AAIA,+DAA2D;AAC3D,yDAAqD;AASrD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAuC,CAAC;AAEjE,SAAgB,kCAAkC,CAAI,
|
|
1
|
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K,IAAI,MAAM,EAAE;QAC1B,MAAM,KAAK,GAAG,MAAA,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,0CAAE,GAAG,CAAC,KAAK,CAAC,CAAC;QACxD,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,OAAO;gBACL,KAAK;gBACL,KAAK;aACN,CAAC;SACH;KACF;IACD,OAAO;QACL,KAAK,EAAE,MAAM,IAAI,MAAM,CAAC,OAAO;QAC/B,KAAK,EAAE,kCAAe,CAAC,OAAO;KAC/B,CAAC;AACJ,CAAC;AArBD,sDAqBC;AAED,SAAgB,uBAAuB;IACrC,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;AACzC,CAAC;AAFD,0DAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-core-browser",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.3",
|
|
4
4
|
"description": "@opensumi/ide-core-browser",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib"
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"build": "tsc --build ../../configs/ts/references/tsconfig.core-browser.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@opensumi/ide-components": "2.18.
|
|
21
|
-
"@opensumi/ide-connection": "2.18.
|
|
22
|
-
"@opensumi/ide-core-common": "2.18.
|
|
20
|
+
"@opensumi/ide-components": "2.18.3",
|
|
21
|
+
"@opensumi/ide-connection": "2.18.3",
|
|
22
|
+
"@opensumi/ide-core-common": "2.18.3",
|
|
23
23
|
"@opensumi/vscode-debugprotocol": "1.49.0-beta.1",
|
|
24
24
|
"@vscode/codicons": "0.0.27",
|
|
25
25
|
"ajv": "^6.10.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"vscode-languageserver-protocol": "3.16.0",
|
|
52
52
|
"vscode-textmate": "5.4.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "7e10dbebe40ce48e1e1e3defaf96180c461f8888"
|
|
55
55
|
}
|