@opensumi/ide-core-browser 3.2.5-next-1724743242.0 → 3.2.5
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/lib/ai-native/command.d.ts +0 -6
- package/lib/ai-native/command.d.ts.map +1 -1
- package/lib/ai-native/command.js +1 -7
- package/lib/ai-native/command.js.map +1 -1
- package/lib/bootstrap/app.d.ts.map +1 -1
- package/lib/bootstrap/app.js +1 -4
- package/lib/bootstrap/app.js.map +1 -1
- package/lib/components/ai-native/enhanceIcon/index.d.ts +0 -4
- package/lib/components/ai-native/enhanceIcon/index.d.ts.map +1 -1
- package/lib/components/ai-native/enhanceIcon/index.js +1 -1
- package/lib/components/ai-native/enhanceIcon/index.js.map +1 -1
- package/lib/components/ai-native/interactive-input/index.d.ts.map +1 -1
- package/lib/components/ai-native/interactive-input/index.js +1 -1
- package/lib/components/ai-native/interactive-input/index.js.map +1 -1
- package/lib/components/ai-native/thumbs/index.d.ts.map +1 -1
- package/lib/components/ai-native/thumbs/index.js +2 -2
- package/lib/components/ai-native/thumbs/index.js.map +1 -1
- package/lib/components/layout/default-layout.d.ts +6 -7
- package/lib/components/layout/default-layout.d.ts.map +1 -1
- package/lib/components/layout/default-layout.js +5 -11
- package/lib/components/layout/default-layout.js.map +1 -1
- package/lib/components/layout/split-panel.d.ts.map +1 -1
- package/lib/components/layout/split-panel.js +1 -3
- package/lib/components/layout/split-panel.js.map +1 -1
- package/lib/components/layout/split-panel.service.d.ts +0 -4
- package/lib/components/layout/split-panel.service.d.ts.map +1 -1
- package/lib/components/layout/split-panel.service.js +0 -16
- package/lib/components/layout/split-panel.service.js.map +1 -1
- package/lib/contextkey/ai-native.d.ts +0 -1
- package/lib/contextkey/ai-native.d.ts.map +1 -1
- package/lib/contextkey/ai-native.js +1 -2
- package/lib/contextkey/ai-native.js.map +1 -1
- package/lib/design/rule.d.ts +10 -19
- package/lib/design/rule.d.ts.map +1 -1
- package/lib/design/rule.js +9 -22
- package/lib/design/rule.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/layout/constants.d.ts +7 -11
- package/lib/layout/constants.d.ts.map +1 -1
- package/lib/layout/constants.js +36 -66
- package/lib/layout/constants.js.map +1 -1
- package/lib/layout/index.d.ts +0 -1
- package/lib/layout/index.d.ts.map +1 -1
- package/lib/layout/index.js +0 -1
- package/lib/layout/index.js.map +1 -1
- package/package.json +8 -5
- package/src/ai-native/command.ts +0 -8
- package/src/bootstrap/app.ts +0 -4
- package/src/components/ai-native/enhanceIcon/index.tsx +0 -8
- package/src/components/ai-native/interactive-input/index.tsx +0 -3
- package/src/components/ai-native/thumbs/index.tsx +0 -8
- package/src/components/layout/default-layout.tsx +4 -22
- package/src/components/layout/split-panel.service.ts +0 -16
- package/src/components/layout/split-panel.tsx +1 -4
- package/src/contextkey/ai-native.ts +0 -1
- package/src/design/rule.ts +10 -26
- package/src/index.ts +1 -1
- package/src/layout/constants.ts +37 -69
- package/src/layout/index.ts +0 -1
- package/lib/layout/render.d.ts +0 -4
- package/lib/layout/render.d.ts.map +0 -1
- package/lib/layout/render.js +0 -10
- package/lib/layout/render.js.map +0 -1
- package/src/layout/render.tsx +0 -14
package/lib/design/rule.d.ts
CHANGED
|
@@ -1,36 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 定义了 zIndex 的层级
|
|
3
3
|
*/
|
|
4
|
-
export declare const StackingLevel:
|
|
4
|
+
export declare const StackingLevel: {
|
|
5
5
|
/**
|
|
6
6
|
* 基础层级
|
|
7
7
|
*/
|
|
8
|
+
readonly Base: 0;
|
|
8
9
|
readonly Background: 0;
|
|
9
|
-
/**
|
|
10
|
-
* IDE 的主要内容区域,基础控件
|
|
11
|
-
*/
|
|
12
10
|
readonly Workbench: 1;
|
|
13
|
-
|
|
14
|
-
* 顶部的工具栏
|
|
15
|
-
*/
|
|
11
|
+
readonly WorkbenchEditor: 1;
|
|
16
12
|
readonly Toolbar: 2;
|
|
17
|
-
/**
|
|
18
|
-
* xterm.css 中 decoration 的 z-index 是 7,所以这里要比它大一点
|
|
19
|
-
*/
|
|
20
13
|
readonly XtermDecoration: 8;
|
|
21
|
-
/**
|
|
22
|
-
* 顶部工具栏的下拉菜单
|
|
23
|
-
*/
|
|
24
14
|
readonly ToolbarDropdown: 10;
|
|
25
|
-
readonly EditorTabbarCurrent: 11;
|
|
26
15
|
readonly ResizeHandle: 12;
|
|
27
|
-
readonly EditorTabbarOverlay: 15;
|
|
28
16
|
readonly EditorFloatingContainer: 20;
|
|
17
|
+
/**
|
|
18
|
+
* 一级弹窗
|
|
19
|
+
*/
|
|
29
20
|
readonly Popup: 100;
|
|
21
|
+
readonly PopoverComponent: 1000;
|
|
22
|
+
readonly PopoverComponentArrow: 1001;
|
|
30
23
|
readonly Overlay: 800;
|
|
31
|
-
readonly PopoverComponent: 999;
|
|
32
|
-
readonly PopoverComponentArrow: 1000;
|
|
33
24
|
readonly OverlayTop: 1000;
|
|
34
|
-
}
|
|
35
|
-
export declare const StackingLevelStr: Record<"Background" | "
|
|
25
|
+
};
|
|
26
|
+
export declare const StackingLevelStr: Record<"Background" | "Base" | "Workbench" | "WorkbenchEditor" | "Toolbar" | "XtermDecoration" | "ToolbarDropdown" | "ResizeHandle" | "EditorFloatingContainer" | "Popup" | "PopoverComponent" | "PopoverComponentArrow" | "Overlay" | "OverlayTop", string>;
|
|
36
27
|
//# sourceMappingURL=rule.d.ts.map
|
package/lib/design/rule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/design/rule.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB;;OAEG;;
|
|
1
|
+
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/design/rule.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB;;OAEG;;;;;;;;;;IAiBH;;OAEG;;;;;;CAMK,CAAC;AAEX,eAAO,MAAM,gBAAgB,8PAEkB,CAAC"}
|
package/lib/design/rule.js
CHANGED
|
@@ -4,40 +4,27 @@ exports.StackingLevelStr = exports.StackingLevel = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* 定义了 zIndex 的层级
|
|
6
6
|
*/
|
|
7
|
-
exports.StackingLevel =
|
|
7
|
+
exports.StackingLevel = {
|
|
8
8
|
/**
|
|
9
9
|
* 基础层级
|
|
10
10
|
*/
|
|
11
|
+
Base: 0,
|
|
11
12
|
Background: 0,
|
|
12
|
-
/**
|
|
13
|
-
* IDE 的主要内容区域,基础控件
|
|
14
|
-
*/
|
|
15
13
|
Workbench: 1,
|
|
16
|
-
|
|
17
|
-
* 顶部的工具栏
|
|
18
|
-
*/
|
|
14
|
+
WorkbenchEditor: 1,
|
|
19
15
|
Toolbar: 2,
|
|
20
|
-
/**
|
|
21
|
-
* xterm.css 中 decoration 的 z-index 是 7,所以这里要比它大一点
|
|
22
|
-
*/
|
|
23
16
|
XtermDecoration: 8,
|
|
24
|
-
/**
|
|
25
|
-
* 顶部工具栏的下拉菜单
|
|
26
|
-
*/
|
|
27
17
|
ToolbarDropdown: 10,
|
|
28
|
-
EditorTabbarCurrent: 11,
|
|
29
18
|
ResizeHandle: 12,
|
|
30
|
-
EditorTabbarOverlay: 15,
|
|
31
19
|
EditorFloatingContainer: 20,
|
|
32
|
-
|
|
20
|
+
/**
|
|
21
|
+
* 一级弹窗
|
|
22
|
+
*/
|
|
33
23
|
Popup: 100,
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
PopoverComponent: 1000,
|
|
25
|
+
PopoverComponentArrow: 1001,
|
|
36
26
|
Overlay: 800,
|
|
37
|
-
PopoverComponent: 999,
|
|
38
|
-
PopoverComponentArrow: 1000,
|
|
39
27
|
OverlayTop: 1000,
|
|
40
|
-
|
|
41
|
-
});
|
|
28
|
+
};
|
|
42
29
|
exports.StackingLevelStr = Object.fromEntries(Object.entries(exports.StackingLevel).map(([key, value]) => [key, value.toString()]));
|
|
43
30
|
//# sourceMappingURL=rule.js.map
|
package/lib/design/rule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.js","sourceRoot":"","sources":["../../src/design/rule.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,aAAa,GAAG
|
|
1
|
+
{"version":3,"file":"rule.js","sourceRoot":"","sources":["../../src/design/rule.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,aAAa,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,CAAC;IACP,UAAU,EAAE,CAAC;IAEb,SAAS,EAAE,CAAC;IACZ,eAAe,EAAE,CAAC;IAElB,OAAO,EAAE,CAAC;IAEV,eAAe,EAAE,CAAC;IAElB,eAAe,EAAE,EAAE;IAEnB,YAAY,EAAE,EAAE;IAEhB,uBAAuB,EAAE,EAAE;IAE3B;;OAEG;IACH,KAAK,EAAE,GAAG;IACV,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,OAAO,EAAE,GAAG;IACZ,UAAU,EAAE,IAAI;CACR,CAAC;AAEE,QAAA,gBAAgB,GAAG,MAAM,CAAC,WAAW,CAChD,MAAM,CAAC,OAAO,CAAC,qBAAa,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAC/B,CAAC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,2BAA2B,CAAC;AAG1C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AAGzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,cAAc,eAAe,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAE3B,cAAc,OAAO,CAAC;AAEtB,cAAc,oBAAoB,CAAC;AAEnC,cAAc,mBAAmB,CAAC;AAElC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAE7B,cAAc,mBAAmB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
// 输出所有 common 里面会有的内容
|
|
4
5
|
tslib_1.__exportStar(require("@opensumi/ide-core-common"), exports);
|
|
5
6
|
// 输出当前 browser 特有的内容
|
|
6
7
|
tslib_1.__exportStar(require("./react-hooks"), exports);
|
|
@@ -37,5 +38,4 @@ tslib_1.__exportStar(require("./encoding-registry"), exports);
|
|
|
37
38
|
tslib_1.__exportStar(require("./markdown"), exports);
|
|
38
39
|
tslib_1.__exportStar(require("./extensions"), exports);
|
|
39
40
|
tslib_1.__exportStar(require("./static-resource"), exports);
|
|
40
|
-
tslib_1.__exportStar(require("./context-key"), exports);
|
|
41
41
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAE1C,qBAAqB;AACrB,wDAA8B;AAC9B,4DAAkC;AAClC,2DAAiC;AACjC,sDAA4B;AAC5B,wDAA8B;AAC9B,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B;AAC9B,mDAAyB;AACzB,+CAAqB;AACrB,oDAA0B;AAC1B,qDAA2B;AAC3B,4DAAkC;AAClC,sDAA4B;AAC5B,mDAAyB;AAEzB,SAAS;AACT,mDAAyB;AACzB,kDAAwB;AACxB,mDAAyB;AAEzB,wDAA8B;AAE9B,mDAAyB;AAEzB,mDAAyB;AACzB,uDAA6B;AAC7B,qDAA2B;AAE3B,gDAAsB;AAEtB,6DAAmC;AAEnC,4DAAkC;AAElC,mDAAyB;AACzB,mDAAyB;AACzB,qDAA2B;AAC3B,8DAAoC;AACpC,qDAA2B;AAC3B,uDAA6B;AAE7B,4DAAkC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,sBAAsB;AACtB,oEAA0C;AAE1C,qBAAqB;AACrB,wDAA8B;AAC9B,4DAAkC;AAClC,2DAAiC;AACjC,sDAA4B;AAC5B,wDAA8B;AAC9B,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B;AAC9B,mDAAyB;AACzB,+CAAqB;AACrB,oDAA0B;AAC1B,qDAA2B;AAC3B,4DAAkC;AAClC,sDAA4B;AAC5B,mDAAyB;AAEzB,SAAS;AACT,mDAAyB;AACzB,kDAAwB;AACxB,mDAAyB;AAEzB,wDAA8B;AAE9B,mDAAyB;AAEzB,mDAAyB;AACzB,uDAA6B;AAC7B,qDAA2B;AAE3B,gDAAsB;AAEtB,6DAAmC;AAEnC,4DAAkC;AAElC,mDAAyB;AACzB,mDAAyB;AACzB,qDAA2B;AAC3B,8DAAoC;AACpC,qDAA2B;AAC3B,uDAA6B;AAE7B,4DAAkC"}
|
|
@@ -9,28 +9,24 @@ export interface ILayoutViewSize {
|
|
|
9
9
|
accordionHeaderSizeHeight: number;
|
|
10
10
|
}
|
|
11
11
|
export declare const DEFAULT_LAYOUT_VIEW_SIZE: ILayoutViewSize;
|
|
12
|
-
export declare enum ConfigPriority {
|
|
13
|
-
ModuleDefined = 0,
|
|
14
|
-
UserDefined = 1
|
|
15
|
-
}
|
|
16
12
|
export declare class LayoutViewSizeConfig implements ILayoutViewSize {
|
|
17
13
|
#private;
|
|
18
14
|
private inited;
|
|
19
15
|
init(layoutViewSize?: Partial<ILayoutViewSize>): void;
|
|
20
16
|
get menubarHeight(): number;
|
|
21
|
-
setMenubarHeight(value: number
|
|
17
|
+
setMenubarHeight(value: number): void;
|
|
22
18
|
get editorTabsHeight(): number;
|
|
23
|
-
setEditorTabsHeight(value: number
|
|
19
|
+
setEditorTabsHeight(value: number): void;
|
|
24
20
|
get bigSurTitleBarHeight(): number;
|
|
25
|
-
setBigSurTitleBarHeight(value: number
|
|
21
|
+
setBigSurTitleBarHeight(value: number): void;
|
|
26
22
|
get titleBarHeight(): number;
|
|
27
|
-
setTitleBarHeight(value: number
|
|
23
|
+
setTitleBarHeight(value: number): void;
|
|
28
24
|
get panelTitleBarHeight(): number;
|
|
29
|
-
setPanelTitleBarHeight(value: number
|
|
25
|
+
setPanelTitleBarHeight(value: number): void;
|
|
30
26
|
get statusBarHeight(): number;
|
|
31
|
-
setStatusBarHeight(value: number
|
|
27
|
+
setStatusBarHeight(value: number): void;
|
|
32
28
|
get accordionHeaderSizeHeight(): number;
|
|
33
|
-
setAccordionHeaderSizeHeight(value: number
|
|
29
|
+
setAccordionHeaderSizeHeight(value: number): void;
|
|
34
30
|
protected supportNewMacHeaderBar: boolean;
|
|
35
31
|
calcElectronHeaderHeight(): number;
|
|
36
32
|
calcOnlyTitleBarHeight(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/layout/constants.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/layout/constants.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAe,MAAM,2BAA2B,CAAC;AAI7E,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED,eAAO,MAAM,wBAAwB,EAAE,eAQtC,CAAC;AAEF,qBACa,oBAAqB,YAAW,eAAe;;IAS1D,OAAO,CAAC,MAAM,CAAS;IACvB,IAAI,CAAC,cAAc,GAAE,OAAO,CAAC,eAAe,CAAM;IAgBlD,IAAI,aAAa,IAAI,MAAM,CAE1B;IACD,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAI9B,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IACD,mBAAmB,CAAC,KAAK,EAAE,MAAM;IAIjC,IAAI,oBAAoB,IAAI,MAAM,CAEjC;IACD,uBAAuB,CAAC,KAAK,EAAE,MAAM;IAIrC,IAAI,cAAc,IAAI,MAAM,CAE3B;IACD,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAI/B,IAAI,mBAAmB,IAAI,MAAM,CAEhC;IACD,sBAAsB,CAAC,KAAK,EAAE,MAAM;IAIpC,IAAI,eAAe,IAAI,MAAM,CAE5B;IACD,kBAAkB,CAAC,KAAK,EAAE,MAAM;IAIhC,IAAI,yBAAyB,IAAI,MAAM,CAEtC;IACD,4BAA4B,CAAC,KAAK,EAAE,MAAM;IAI1C,SAAS,CAAC,sBAAsB,UAA2E;IAE3G,wBAAwB,IAAI,MAAM;IAQlC,sBAAsB,IAAI,MAAM;CAMjC;AAED,qBACa,kBAAmB,YAAW,mBAAmB;IAC5D,OAAO,CAAC,cAAc,CAIpB;IAEF,SAAS,CAAC,GAAG,KAAK,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC,EAAE,GAAG,IAAI;IAIvE,IAAI,0BAA0B,IAAI,OAAO,CAExC;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;CACF"}
|
package/lib/layout/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _LayoutViewSizeConfig_menubarHeight, _LayoutViewSizeConfig_editorTabsHeight, _LayoutViewSizeConfig_bigSurTitleBarHeight, _LayoutViewSizeConfig_titleBarHeight, _LayoutViewSizeConfig_panelTitleBarHeight, _LayoutViewSizeConfig_statusBarHeight, _LayoutViewSizeConfig_accordionHeaderSizeHeight;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.DesignLayoutConfig = exports.LayoutViewSizeConfig = exports.
|
|
4
|
+
exports.DesignLayoutConfig = exports.LayoutViewSizeConfig = exports.DEFAULT_LAYOUT_VIEW_SIZE = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
|
|
7
7
|
const di_1 = require("@opensumi/di");
|
|
@@ -16,45 +16,15 @@ exports.DEFAULT_LAYOUT_VIEW_SIZE = {
|
|
|
16
16
|
statusBarHeight: 24,
|
|
17
17
|
accordionHeaderSizeHeight: 24,
|
|
18
18
|
};
|
|
19
|
-
var ConfigPriority;
|
|
20
|
-
(function (ConfigPriority) {
|
|
21
|
-
ConfigPriority[ConfigPriority["ModuleDefined"] = 0] = "ModuleDefined";
|
|
22
|
-
ConfigPriority[ConfigPriority["UserDefined"] = 1] = "UserDefined";
|
|
23
|
-
})(ConfigPriority = exports.ConfigPriority || (exports.ConfigPriority = {}));
|
|
24
|
-
/**
|
|
25
|
-
* 支持多档优先级配置
|
|
26
|
-
*/
|
|
27
|
-
class ConfigAtom {
|
|
28
|
-
constructor(defaultValue) {
|
|
29
|
-
this.defaultValue = defaultValue;
|
|
30
|
-
/**
|
|
31
|
-
* index 越高,优先级越高
|
|
32
|
-
*/
|
|
33
|
-
this._value = [];
|
|
34
|
-
}
|
|
35
|
-
setValue(value, priority) {
|
|
36
|
-
this._value[priority] = value;
|
|
37
|
-
}
|
|
38
|
-
getValue() {
|
|
39
|
-
let value = this.defaultValue;
|
|
40
|
-
for (let i = this._value.length - 1; i >= 0; i--) {
|
|
41
|
-
if ((0, ide_core_common_1.isDefined)(this._value[i])) {
|
|
42
|
-
value = this._value[i];
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return value;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
19
|
let LayoutViewSizeConfig = class LayoutViewSizeConfig {
|
|
50
20
|
constructor() {
|
|
51
|
-
_LayoutViewSizeConfig_menubarHeight.set(this,
|
|
52
|
-
_LayoutViewSizeConfig_editorTabsHeight.set(this,
|
|
53
|
-
_LayoutViewSizeConfig_bigSurTitleBarHeight.set(this,
|
|
54
|
-
_LayoutViewSizeConfig_titleBarHeight.set(this,
|
|
55
|
-
_LayoutViewSizeConfig_panelTitleBarHeight.set(this,
|
|
56
|
-
_LayoutViewSizeConfig_statusBarHeight.set(this,
|
|
57
|
-
_LayoutViewSizeConfig_accordionHeaderSizeHeight.set(this,
|
|
21
|
+
_LayoutViewSizeConfig_menubarHeight.set(this, void 0);
|
|
22
|
+
_LayoutViewSizeConfig_editorTabsHeight.set(this, void 0);
|
|
23
|
+
_LayoutViewSizeConfig_bigSurTitleBarHeight.set(this, void 0);
|
|
24
|
+
_LayoutViewSizeConfig_titleBarHeight.set(this, void 0);
|
|
25
|
+
_LayoutViewSizeConfig_panelTitleBarHeight.set(this, void 0);
|
|
26
|
+
_LayoutViewSizeConfig_statusBarHeight.set(this, void 0);
|
|
27
|
+
_LayoutViewSizeConfig_accordionHeaderSizeHeight.set(this, void 0);
|
|
58
28
|
this.inited = false;
|
|
59
29
|
this.supportNewMacHeaderBar = electron_1.electronEnv.osRelease ? parseFloat(electron_1.electronEnv.osRelease) >= 20 : false;
|
|
60
30
|
}
|
|
@@ -63,55 +33,55 @@ let LayoutViewSizeConfig = class LayoutViewSizeConfig {
|
|
|
63
33
|
return;
|
|
64
34
|
}
|
|
65
35
|
this.inited = true;
|
|
66
|
-
tslib_1.
|
|
67
|
-
tslib_1.
|
|
68
|
-
tslib_1.
|
|
69
|
-
tslib_1.
|
|
70
|
-
tslib_1.
|
|
71
|
-
tslib_1.
|
|
72
|
-
tslib_1.
|
|
36
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_menubarHeight, layoutViewSize.menubarHeight || exports.DEFAULT_LAYOUT_VIEW_SIZE.menubarHeight, "f");
|
|
37
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_editorTabsHeight, layoutViewSize.editorTabsHeight || exports.DEFAULT_LAYOUT_VIEW_SIZE.editorTabsHeight, "f");
|
|
38
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_bigSurTitleBarHeight, layoutViewSize.bigSurTitleBarHeight || exports.DEFAULT_LAYOUT_VIEW_SIZE.bigSurTitleBarHeight, "f");
|
|
39
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_titleBarHeight, layoutViewSize.titleBarHeight || exports.DEFAULT_LAYOUT_VIEW_SIZE.titleBarHeight, "f");
|
|
40
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_panelTitleBarHeight, layoutViewSize.panelTitleBarHeight || exports.DEFAULT_LAYOUT_VIEW_SIZE.panelTitleBarHeight, "f");
|
|
41
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_statusBarHeight, layoutViewSize.statusBarHeight || exports.DEFAULT_LAYOUT_VIEW_SIZE.statusBarHeight, "f");
|
|
42
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_accordionHeaderSizeHeight, layoutViewSize.accordionHeaderSizeHeight || exports.DEFAULT_LAYOUT_VIEW_SIZE.accordionHeaderSizeHeight, "f");
|
|
73
43
|
}
|
|
74
44
|
get menubarHeight() {
|
|
75
|
-
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_menubarHeight, "f")
|
|
45
|
+
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_menubarHeight, "f");
|
|
76
46
|
}
|
|
77
|
-
setMenubarHeight(value
|
|
78
|
-
tslib_1.
|
|
47
|
+
setMenubarHeight(value) {
|
|
48
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_menubarHeight, value, "f");
|
|
79
49
|
}
|
|
80
50
|
get editorTabsHeight() {
|
|
81
|
-
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_editorTabsHeight, "f")
|
|
51
|
+
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_editorTabsHeight, "f");
|
|
82
52
|
}
|
|
83
|
-
setEditorTabsHeight(value
|
|
84
|
-
tslib_1.
|
|
53
|
+
setEditorTabsHeight(value) {
|
|
54
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_editorTabsHeight, value, "f");
|
|
85
55
|
}
|
|
86
56
|
get bigSurTitleBarHeight() {
|
|
87
|
-
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_bigSurTitleBarHeight, "f")
|
|
57
|
+
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_bigSurTitleBarHeight, "f");
|
|
88
58
|
}
|
|
89
|
-
setBigSurTitleBarHeight(value
|
|
90
|
-
tslib_1.
|
|
59
|
+
setBigSurTitleBarHeight(value) {
|
|
60
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_bigSurTitleBarHeight, value, "f");
|
|
91
61
|
}
|
|
92
62
|
get titleBarHeight() {
|
|
93
|
-
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_titleBarHeight, "f")
|
|
63
|
+
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_titleBarHeight, "f");
|
|
94
64
|
}
|
|
95
|
-
setTitleBarHeight(value
|
|
96
|
-
tslib_1.
|
|
65
|
+
setTitleBarHeight(value) {
|
|
66
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_titleBarHeight, value, "f");
|
|
97
67
|
}
|
|
98
68
|
get panelTitleBarHeight() {
|
|
99
|
-
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_panelTitleBarHeight, "f")
|
|
69
|
+
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_panelTitleBarHeight, "f");
|
|
100
70
|
}
|
|
101
|
-
setPanelTitleBarHeight(value
|
|
102
|
-
tslib_1.
|
|
71
|
+
setPanelTitleBarHeight(value) {
|
|
72
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_panelTitleBarHeight, value, "f");
|
|
103
73
|
}
|
|
104
74
|
get statusBarHeight() {
|
|
105
|
-
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_statusBarHeight, "f")
|
|
75
|
+
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_statusBarHeight, "f");
|
|
106
76
|
}
|
|
107
|
-
setStatusBarHeight(value
|
|
108
|
-
tslib_1.
|
|
77
|
+
setStatusBarHeight(value) {
|
|
78
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_statusBarHeight, value, "f");
|
|
109
79
|
}
|
|
110
80
|
get accordionHeaderSizeHeight() {
|
|
111
|
-
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_accordionHeaderSizeHeight, "f")
|
|
81
|
+
return tslib_1.__classPrivateFieldGet(this, _LayoutViewSizeConfig_accordionHeaderSizeHeight, "f");
|
|
112
82
|
}
|
|
113
|
-
setAccordionHeaderSizeHeight(value
|
|
114
|
-
tslib_1.
|
|
83
|
+
setAccordionHeaderSizeHeight(value) {
|
|
84
|
+
tslib_1.__classPrivateFieldSet(this, _LayoutViewSizeConfig_accordionHeaderSizeHeight, value, "f");
|
|
115
85
|
}
|
|
116
86
|
calcElectronHeaderHeight() {
|
|
117
87
|
if (ide_core_common_1.isMacintosh) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/layout/constants.ts"],"names":[],"mappings":";;;;;AAAA,iEAAiC;AAEjC,qCAA0C;AAC1C,+
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/layout/constants.ts"],"names":[],"mappings":"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"}
|
package/lib/layout/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC"}
|
package/lib/layout/index.js
CHANGED
|
@@ -6,5 +6,4 @@ tslib_1.__exportStar(require("./layout-hooks"), exports);
|
|
|
6
6
|
tslib_1.__exportStar(require("./layout.interface"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./accordion/view-context-key.registry"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./accordion/tab-bar-toolbar"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./render"), exports);
|
|
10
9
|
//# sourceMappingURL=index.js.map
|
package/lib/layout/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,yDAA+B;AAC/B,6DAAmC;AACnC,gFAAsD;AACtD,sEAA4C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,yDAA+B;AAC/B,6DAAmC;AACnC,gFAAsD;AACtD,sEAA4C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-core-browser",
|
|
3
|
-
"version": "3.2.5
|
|
3
|
+
"version": "3.2.5",
|
|
4
4
|
"description": "@opensumi/ide-core-browser",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib",
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
"build": "tsc --build ../../configs/ts/references/tsconfig.core-browser.json"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@opensumi/ide-components": "3.2.5
|
|
22
|
-
"@opensumi/ide-connection": "3.2.5
|
|
23
|
-
"@opensumi/ide-core-common": "3.2.5
|
|
21
|
+
"@opensumi/ide-components": "3.2.5",
|
|
22
|
+
"@opensumi/ide-connection": "3.2.5",
|
|
23
|
+
"@opensumi/ide-core-common": "3.2.5",
|
|
24
24
|
"@opensumi/vscode-debugprotocol": "1.49.0-beta.1",
|
|
25
25
|
"@vscode/codicons": "0.0.35",
|
|
26
26
|
"ajv": "^6.10.0",
|
|
27
27
|
"classnames": "2.5.1",
|
|
28
|
+
"font-awesome": "^4.7.0",
|
|
28
29
|
"fuzzy": "^0.1.3",
|
|
29
30
|
"jsonc-parser": "^2.1.0",
|
|
30
31
|
"keycode": "^2.2.0",
|
|
@@ -32,7 +33,9 @@
|
|
|
32
33
|
"mobx": "^6.12.0",
|
|
33
34
|
"mobx-react-lite": "^4.0.5",
|
|
34
35
|
"react": "^18.2.0",
|
|
36
|
+
"react-autosize-textarea": "^7.0.0",
|
|
35
37
|
"react-ctxmenu-trigger": "^1.0.0",
|
|
38
|
+
"react-custom-scrollbars": "^4.2.1",
|
|
36
39
|
"react-dom": "^18.2.0",
|
|
37
40
|
"react-is": "^18.2.0",
|
|
38
41
|
"react-window": "^1.8.5",
|
|
@@ -44,5 +47,5 @@
|
|
|
44
47
|
"react": "^18.2.0",
|
|
45
48
|
"react-dom": "^18.2.0"
|
|
46
49
|
},
|
|
47
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "879ad36cb2e8e5bc9d928cf7d8bb003de7f0b7b3"
|
|
48
51
|
}
|
package/src/ai-native/command.ts
CHANGED
|
@@ -25,11 +25,3 @@ export const AI_CHAT_VISIBLE = {
|
|
|
25
25
|
export const AI_CODE_ACTION = {
|
|
26
26
|
id: 'ai.code.action',
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
export const AI_MULTI_LINE_COMPLETION_HIDE = {
|
|
30
|
-
id: 'ai.multiLine.completion.hide',
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const AI_MULTI_LINE_COMPLETION_ACCEPT = {
|
|
34
|
-
id: 'ai.multiLine.completion.accept',
|
|
35
|
-
};
|
package/src/bootstrap/app.ts
CHANGED
|
@@ -101,7 +101,6 @@ export class ClientApp implements IClientApp, IDisposable {
|
|
|
101
101
|
constructor(protected opts: IClientAppOpts) {
|
|
102
102
|
const {
|
|
103
103
|
modules,
|
|
104
|
-
contributions,
|
|
105
104
|
iconStyleSheets,
|
|
106
105
|
useCdnIcon,
|
|
107
106
|
editorBackgroundImage,
|
|
@@ -173,9 +172,6 @@ export class ClientApp implements IClientApp, IDisposable {
|
|
|
173
172
|
|
|
174
173
|
this.config = this.runtime.mergeAppConfig(this.config);
|
|
175
174
|
|
|
176
|
-
if (contributions) {
|
|
177
|
-
this.injector.addProviders(...contributions);
|
|
178
|
-
}
|
|
179
175
|
this.initBaseProvider();
|
|
180
176
|
this.initFields();
|
|
181
177
|
this.appendIconStyleSheets(iconStyleSheets, useCdnIcon);
|
|
@@ -18,10 +18,6 @@ interface IEnhanceIconProps {
|
|
|
18
18
|
icon?: string;
|
|
19
19
|
iconClass?: string;
|
|
20
20
|
children?: React.ReactNode;
|
|
21
|
-
tabIndex?: number;
|
|
22
|
-
role?: string;
|
|
23
|
-
ariaLabel?: string;
|
|
24
|
-
ariaPressed?: boolean | 'mixed' | 'false' | 'true' | undefined;
|
|
25
21
|
}
|
|
26
22
|
|
|
27
23
|
export const EnhanceIcon = React.forwardRef<HTMLDivElement | null, IEnhanceIconProps>(
|
|
@@ -31,10 +27,6 @@ export const EnhanceIcon = React.forwardRef<HTMLDivElement | null, IEnhanceIconP
|
|
|
31
27
|
style={props.wrapperStyle}
|
|
32
28
|
onClick={props.onClick}
|
|
33
29
|
ref={ref}
|
|
34
|
-
tabIndex={props.tabIndex}
|
|
35
|
-
role={props.role}
|
|
36
|
-
aria-label={props.ariaLabel}
|
|
37
|
-
aria-pressed={props.ariaPressed}
|
|
38
30
|
>
|
|
39
31
|
<Icon
|
|
40
32
|
className={cls(props.className, styles.icon)}
|
|
@@ -172,9 +172,6 @@ export const InteractiveInput = React.forwardRef(
|
|
|
172
172
|
wrapperClassName={styles.send_icon}
|
|
173
173
|
className={getIcon('send-solid')}
|
|
174
174
|
onClick={handleSend}
|
|
175
|
-
tabIndex={0}
|
|
176
|
-
role='button'
|
|
177
|
-
ariaLabel={localize('aiNative.chat.enter.send')}
|
|
178
175
|
/>
|
|
179
176
|
</Popover>
|
|
180
177
|
)}
|
|
@@ -70,10 +70,6 @@ export const Thumbs = (props: ThumbsProps) => {
|
|
|
70
70
|
wrapperClassName={wrapperClassName}
|
|
71
71
|
onClick={() => handleClick('up')}
|
|
72
72
|
className={getExternalIcon(thumbsupIcon, KTICON_OWNER)}
|
|
73
|
-
tabIndex={0}
|
|
74
|
-
role='button'
|
|
75
|
-
ariaLabel={localize('aiNative.inline.chat.operate.thumbsup.title')}
|
|
76
|
-
ariaPressed={thumbsupIcon === 'thumbs-fill' ? 'true' : 'false'}
|
|
77
73
|
/>
|
|
78
74
|
</Popover>
|
|
79
75
|
)}
|
|
@@ -83,10 +79,6 @@ export const Thumbs = (props: ThumbsProps) => {
|
|
|
83
79
|
wrapperClassName={wrapperClassName}
|
|
84
80
|
onClick={() => handleClick('down')}
|
|
85
81
|
className={getExternalIcon(thumbsdownIcon, KTICON_OWNER)}
|
|
86
|
-
tabIndex={0}
|
|
87
|
-
role='button'
|
|
88
|
-
ariaLabel={localize('aiNative.inline.chat.operate.thumbsdown.title')}
|
|
89
|
-
ariaPressed={thumbsdownIcon === 'thumbsdown-fill' ? 'true' : 'false'}
|
|
90
82
|
/>
|
|
91
83
|
</Popover>
|
|
92
84
|
)}
|
|
@@ -5,26 +5,14 @@ import { SlotRenderer } from '../../react-providers/slot';
|
|
|
5
5
|
import { BoxPanel } from './box-panel';
|
|
6
6
|
import { SplitPanel } from './split-panel';
|
|
7
7
|
|
|
8
|
-
export interface ILayoutConfigCache {
|
|
9
|
-
[key: string]: { size: number; currentId: string };
|
|
10
|
-
}
|
|
11
|
-
|
|
12
8
|
export const getStorageValue = () => {
|
|
13
9
|
// 启动时渲染的颜色和尺寸,弱依赖
|
|
14
|
-
let savedLayout:
|
|
10
|
+
let savedLayout: { [key: string]: { size: number; currentId: string } } = {};
|
|
15
11
|
let savedColors: { [colorKey: string]: string } = {};
|
|
16
12
|
try {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
savedLayout = JSON.parse(layoutConfigStr);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const themeConfigStr = localStorage.getItem('theme');
|
|
23
|
-
if (themeConfigStr) {
|
|
24
|
-
savedColors = JSON.parse(themeConfigStr);
|
|
25
|
-
}
|
|
13
|
+
savedLayout = JSON.parse(localStorage.getItem('layout') || '{}');
|
|
14
|
+
savedColors = JSON.parse(localStorage.getItem('theme') || '{}');
|
|
26
15
|
} catch (err) {}
|
|
27
|
-
|
|
28
16
|
return {
|
|
29
17
|
layout: savedLayout,
|
|
30
18
|
colors: savedColors,
|
|
@@ -54,13 +42,7 @@ export function ToolbarActionBasedLayout(
|
|
|
54
42
|
/>
|
|
55
43
|
<SplitPanel id='main-vertical' minResize={300} flexGrow={1} direction='top-to-bottom'>
|
|
56
44
|
<SlotRenderer flex={2} flexGrow={1} minResize={200} slot='main' />
|
|
57
|
-
<SlotRenderer
|
|
58
|
-
flex={1}
|
|
59
|
-
defaultSize={layout.bottom?.currentId ? layout.bottom?.size : 24}
|
|
60
|
-
minResize={160}
|
|
61
|
-
slot='bottom'
|
|
62
|
-
isTabbar={true}
|
|
63
|
-
/>
|
|
45
|
+
<SlotRenderer flex={1} defaultSize={layout.bottom?.size} minResize={160} slot='bottom' isTabbar={true} />
|
|
64
46
|
</SplitPanel>
|
|
65
47
|
<SlotRenderer
|
|
66
48
|
slot='right'
|
|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
4
4
|
import { Deferred, Disposable, IDisposable } from '@opensumi/ide-core-common';
|
|
5
5
|
|
|
6
|
-
import { AppConfig, SlotRenderer } from '../../react-providers';
|
|
7
6
|
import { RESIZE_LOCK } from '../resize/resize';
|
|
8
7
|
|
|
9
8
|
import { SplitPanelProps } from './split-panel';
|
|
@@ -20,16 +19,12 @@ export interface ISplitPanelService extends IDisposable {
|
|
|
20
19
|
props: SplitPanelProps,
|
|
21
20
|
): React.ReactElement;
|
|
22
21
|
interceptProps(props: SplitPanelProps): SplitPanelProps;
|
|
23
|
-
checkChildNoResize(child: React.ReactNode): boolean;
|
|
24
22
|
setRootNode(node: HTMLElement): void;
|
|
25
23
|
whenReady: Promise<void>;
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
@Injectable({ multiple: true })
|
|
29
27
|
export class SplitPanelService extends Disposable implements ISplitPanelService {
|
|
30
|
-
@Autowired(AppConfig)
|
|
31
|
-
appConfig: AppConfig;
|
|
32
|
-
|
|
33
28
|
constructor(protected readonly panelId: string) {
|
|
34
29
|
super();
|
|
35
30
|
}
|
|
@@ -87,17 +82,6 @@ export class SplitPanelService extends Disposable implements ISplitPanelService
|
|
|
87
82
|
}
|
|
88
83
|
}
|
|
89
84
|
|
|
90
|
-
checkChildNoResize(child: React.ReactNode) {
|
|
91
|
-
if (child && (child as React.ReactElement).type === SlotRenderer) {
|
|
92
|
-
// slot render must have modules
|
|
93
|
-
const modules = this.appConfig.layoutConfig[(child as React.ReactElement).props?.slot]?.modules;
|
|
94
|
-
if (!modules || modules.length === 0) {
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
85
|
public renderSplitPanel(component: React.JSX.Element, children: React.ReactNode[], props: SplitPanelProps) {
|
|
102
86
|
return React.cloneElement(component, { ...props, ...component.props }, children);
|
|
103
87
|
}
|
|
@@ -247,10 +247,7 @@ export const SplitPanel: React.FC<SplitPanelProps> = (props) => {
|
|
|
247
247
|
} else if (getProp(childList[index - 1], 'flexGrow')) {
|
|
248
248
|
flexMode = ResizeFlexMode.Next;
|
|
249
249
|
}
|
|
250
|
-
const noResize =
|
|
251
|
-
splitPanelService.checkChildNoResize(targetElement) ||
|
|
252
|
-
getProp(targetElement, 'noResize') ||
|
|
253
|
-
locks[index - 1];
|
|
250
|
+
const noResize = getProp(targetElement, 'noResize') || locks[index - 1];
|
|
254
251
|
if (!noResize) {
|
|
255
252
|
result.push(
|
|
256
253
|
<ResizeHandle
|
|
@@ -5,4 +5,3 @@ export const InlineCompletionIsTrigger = new RawContextKey('ai.native.inlineComp
|
|
|
5
5
|
export const InlineHintWidgetIsVisible = new RawContextKey('ai.native.inlineHintWidgetIsVisible', false);
|
|
6
6
|
export const InlineInputWidgetIsVisible = new RawContextKey('ai.native.inlineInputWidgetIsVisible', false);
|
|
7
7
|
export const InlineDiffPartialEditsIsVisible = new RawContextKey('ai.native.inlineDiffPartialEditsIsVisible', false);
|
|
8
|
-
export const MultiLineCompletionsIsVisible = new RawContextKey('ai.native.multiLineCompletionsIsVisible', false);
|