@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/src/design/rule.ts
CHANGED
|
@@ -1,51 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 定义了 zIndex 的层级
|
|
3
3
|
*/
|
|
4
|
-
export const StackingLevel =
|
|
4
|
+
export const StackingLevel = {
|
|
5
5
|
/**
|
|
6
6
|
* 基础层级
|
|
7
7
|
*/
|
|
8
|
+
Base: 0,
|
|
8
9
|
Background: 0,
|
|
9
10
|
|
|
10
|
-
/**
|
|
11
|
-
* IDE 的主要内容区域,基础控件
|
|
12
|
-
*/
|
|
13
11
|
Workbench: 1,
|
|
12
|
+
WorkbenchEditor: 1,
|
|
14
13
|
|
|
15
|
-
/**
|
|
16
|
-
* 顶部的工具栏
|
|
17
|
-
*/
|
|
18
14
|
Toolbar: 2,
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
* xterm.css 中 decoration 的 z-index 是 7,所以这里要比它大一点
|
|
22
|
-
*/
|
|
23
|
-
XtermDecoration: 8,
|
|
16
|
+
XtermDecoration: 8, // xterm.css 中 decoration 的 z-index 是 7,所以这里要比它大一点
|
|
24
17
|
|
|
25
|
-
/**
|
|
26
|
-
* 顶部工具栏的下拉菜单
|
|
27
|
-
*/
|
|
28
18
|
ToolbarDropdown: 10,
|
|
29
19
|
|
|
30
|
-
EditorTabbarCurrent: 11,
|
|
31
|
-
|
|
32
20
|
ResizeHandle: 12,
|
|
33
21
|
|
|
34
|
-
EditorTabbarOverlay: 15,
|
|
35
|
-
|
|
36
22
|
EditorFloatingContainer: 20,
|
|
37
23
|
|
|
38
|
-
|
|
24
|
+
/**
|
|
25
|
+
* 一级弹窗
|
|
26
|
+
*/
|
|
39
27
|
Popup: 100,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// #region 顶级弹窗区域
|
|
28
|
+
PopoverComponent: 1000,
|
|
29
|
+
PopoverComponentArrow: 1001,
|
|
43
30
|
Overlay: 800,
|
|
44
|
-
PopoverComponent: 999,
|
|
45
|
-
PopoverComponentArrow: 1000,
|
|
46
31
|
OverlayTop: 1000,
|
|
47
|
-
|
|
48
|
-
} as const);
|
|
32
|
+
} as const;
|
|
49
33
|
|
|
50
34
|
export const StackingLevelStr = Object.fromEntries(
|
|
51
35
|
Object.entries(StackingLevel).map(([key, value]) => [key, value.toString()]),
|
package/src/index.ts
CHANGED
package/src/layout/constants.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
2
|
|
|
3
3
|
import { Injectable } from '@opensumi/di';
|
|
4
|
-
import { IDesignLayoutConfig,
|
|
4
|
+
import { IDesignLayoutConfig, isMacintosh } from '@opensumi/ide-core-common';
|
|
5
5
|
|
|
6
6
|
import { electronEnv } from '../utils/electron';
|
|
7
7
|
|
|
@@ -25,48 +25,15 @@ export const DEFAULT_LAYOUT_VIEW_SIZE: ILayoutViewSize = {
|
|
|
25
25
|
accordionHeaderSizeHeight: 24,
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
export enum ConfigPriority {
|
|
29
|
-
ModuleDefined,
|
|
30
|
-
UserDefined,
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 支持多档优先级配置
|
|
35
|
-
*/
|
|
36
|
-
class ConfigAtom<T> {
|
|
37
|
-
/**
|
|
38
|
-
* index 越高,优先级越高
|
|
39
|
-
*/
|
|
40
|
-
protected _value: (T | undefined)[] = [];
|
|
41
|
-
constructor(public defaultValue: T) {}
|
|
42
|
-
|
|
43
|
-
setValue(value: T | undefined, priority: number) {
|
|
44
|
-
this._value[priority] = value;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
getValue(): T {
|
|
48
|
-
let value = this.defaultValue;
|
|
49
|
-
|
|
50
|
-
for (let i = this._value.length - 1; i >= 0; i--) {
|
|
51
|
-
if (isDefined(this._value[i])) {
|
|
52
|
-
value = this._value[i]!;
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return value;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
28
|
@Injectable()
|
|
62
29
|
export class LayoutViewSizeConfig implements ILayoutViewSize {
|
|
63
|
-
#menubarHeight
|
|
64
|
-
#editorTabsHeight
|
|
65
|
-
#bigSurTitleBarHeight
|
|
66
|
-
#titleBarHeight
|
|
67
|
-
#panelTitleBarHeight
|
|
68
|
-
#statusBarHeight
|
|
69
|
-
#accordionHeaderSizeHeight
|
|
30
|
+
#menubarHeight: number;
|
|
31
|
+
#editorTabsHeight: number;
|
|
32
|
+
#bigSurTitleBarHeight: number;
|
|
33
|
+
#titleBarHeight: number;
|
|
34
|
+
#panelTitleBarHeight: number;
|
|
35
|
+
#statusBarHeight: number;
|
|
36
|
+
#accordionHeaderSizeHeight: number;
|
|
70
37
|
|
|
71
38
|
private inited = false;
|
|
72
39
|
init(layoutViewSize: Partial<ILayoutViewSize> = {}) {
|
|
@@ -75,62 +42,63 @@ export class LayoutViewSizeConfig implements ILayoutViewSize {
|
|
|
75
42
|
}
|
|
76
43
|
this.inited = true;
|
|
77
44
|
|
|
78
|
-
this.#menubarHeight
|
|
79
|
-
this.#editorTabsHeight
|
|
80
|
-
this.#bigSurTitleBarHeight
|
|
81
|
-
this.#titleBarHeight
|
|
82
|
-
this.#panelTitleBarHeight
|
|
83
|
-
this.#statusBarHeight
|
|
84
|
-
this.#accordionHeaderSizeHeight
|
|
45
|
+
this.#menubarHeight = layoutViewSize.menubarHeight || DEFAULT_LAYOUT_VIEW_SIZE.menubarHeight;
|
|
46
|
+
this.#editorTabsHeight = layoutViewSize.editorTabsHeight || DEFAULT_LAYOUT_VIEW_SIZE.editorTabsHeight;
|
|
47
|
+
this.#bigSurTitleBarHeight = layoutViewSize.bigSurTitleBarHeight || DEFAULT_LAYOUT_VIEW_SIZE.bigSurTitleBarHeight;
|
|
48
|
+
this.#titleBarHeight = layoutViewSize.titleBarHeight || DEFAULT_LAYOUT_VIEW_SIZE.titleBarHeight;
|
|
49
|
+
this.#panelTitleBarHeight = layoutViewSize.panelTitleBarHeight || DEFAULT_LAYOUT_VIEW_SIZE.panelTitleBarHeight;
|
|
50
|
+
this.#statusBarHeight = layoutViewSize.statusBarHeight || DEFAULT_LAYOUT_VIEW_SIZE.statusBarHeight;
|
|
51
|
+
this.#accordionHeaderSizeHeight =
|
|
52
|
+
layoutViewSize.accordionHeaderSizeHeight || DEFAULT_LAYOUT_VIEW_SIZE.accordionHeaderSizeHeight;
|
|
85
53
|
}
|
|
86
54
|
|
|
87
55
|
get menubarHeight(): number {
|
|
88
|
-
return this.#menubarHeight
|
|
56
|
+
return this.#menubarHeight;
|
|
89
57
|
}
|
|
90
|
-
setMenubarHeight(value: number
|
|
91
|
-
this.#menubarHeight
|
|
58
|
+
setMenubarHeight(value: number) {
|
|
59
|
+
this.#menubarHeight = value;
|
|
92
60
|
}
|
|
93
61
|
|
|
94
62
|
get editorTabsHeight(): number {
|
|
95
|
-
return this.#editorTabsHeight
|
|
63
|
+
return this.#editorTabsHeight;
|
|
96
64
|
}
|
|
97
|
-
setEditorTabsHeight(value: number
|
|
98
|
-
this.#editorTabsHeight
|
|
65
|
+
setEditorTabsHeight(value: number) {
|
|
66
|
+
this.#editorTabsHeight = value;
|
|
99
67
|
}
|
|
100
68
|
|
|
101
69
|
get bigSurTitleBarHeight(): number {
|
|
102
|
-
return this.#bigSurTitleBarHeight
|
|
70
|
+
return this.#bigSurTitleBarHeight;
|
|
103
71
|
}
|
|
104
|
-
setBigSurTitleBarHeight(value: number
|
|
105
|
-
this.#bigSurTitleBarHeight
|
|
72
|
+
setBigSurTitleBarHeight(value: number) {
|
|
73
|
+
this.#bigSurTitleBarHeight = value;
|
|
106
74
|
}
|
|
107
75
|
|
|
108
76
|
get titleBarHeight(): number {
|
|
109
|
-
return this.#titleBarHeight
|
|
77
|
+
return this.#titleBarHeight;
|
|
110
78
|
}
|
|
111
|
-
setTitleBarHeight(value: number
|
|
112
|
-
this.#titleBarHeight
|
|
79
|
+
setTitleBarHeight(value: number) {
|
|
80
|
+
this.#titleBarHeight = value;
|
|
113
81
|
}
|
|
114
82
|
|
|
115
83
|
get panelTitleBarHeight(): number {
|
|
116
|
-
return this.#panelTitleBarHeight
|
|
84
|
+
return this.#panelTitleBarHeight;
|
|
117
85
|
}
|
|
118
|
-
setPanelTitleBarHeight(value: number
|
|
119
|
-
this.#panelTitleBarHeight
|
|
86
|
+
setPanelTitleBarHeight(value: number) {
|
|
87
|
+
this.#panelTitleBarHeight = value;
|
|
120
88
|
}
|
|
121
89
|
|
|
122
90
|
get statusBarHeight(): number {
|
|
123
|
-
return this.#statusBarHeight
|
|
91
|
+
return this.#statusBarHeight;
|
|
124
92
|
}
|
|
125
|
-
setStatusBarHeight(value: number
|
|
126
|
-
this.#statusBarHeight
|
|
93
|
+
setStatusBarHeight(value: number) {
|
|
94
|
+
this.#statusBarHeight = value;
|
|
127
95
|
}
|
|
128
96
|
|
|
129
97
|
get accordionHeaderSizeHeight(): number {
|
|
130
|
-
return this.#accordionHeaderSizeHeight
|
|
98
|
+
return this.#accordionHeaderSizeHeight;
|
|
131
99
|
}
|
|
132
|
-
setAccordionHeaderSizeHeight(value: number
|
|
133
|
-
this.#accordionHeaderSizeHeight
|
|
100
|
+
setAccordionHeaderSizeHeight(value: number) {
|
|
101
|
+
this.#accordionHeaderSizeHeight = value;
|
|
134
102
|
}
|
|
135
103
|
|
|
136
104
|
protected supportNewMacHeaderBar = electronEnv.osRelease ? parseFloat(electronEnv.osRelease) >= 20 : false;
|
package/src/layout/index.ts
CHANGED
package/lib/layout/render.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/layout/render.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,UAAU,UAAW,IAAI,sBAMnC,CAAC"}
|
package/lib/layout/render.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderView = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const react_is_1 = tslib_1.__importDefault(require("react-is"));
|
|
7
|
-
const react_providers_1 = require("../react-providers");
|
|
8
|
-
const renderView = (view) => (react_1.default.createElement(react_1.default.Fragment, null, view && react_is_1.default.isValidElementType(view.component) ? (react_1.default.createElement(react_providers_1.ErrorBoundary, null, view.component && react_1.default.createElement(view.component, view.initialProps))) : null));
|
|
9
|
-
exports.renderView = renderView;
|
|
10
|
-
//# sourceMappingURL=render.js.map
|
package/lib/layout/render.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/layout/render.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,gEAA+B;AAE/B,wDAAmD;AAI5C,MAAM,UAAU,GAAG,CAAC,IAAW,EAAE,EAAE,CAAC,CACvC,8DACG,IAAI,IAAI,kBAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CACpD,8BAAC,+BAAa,QAAE,IAAI,CAAC,SAAS,IAAI,eAAK,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAiB,CAC1G,CAAC,CAAC,CAAC,IAAI,CACP,CACJ,CAAC;AANS,QAAA,UAAU,cAMnB"}
|
package/src/layout/render.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactIs from 'react-is';
|
|
3
|
-
|
|
4
|
-
import { ErrorBoundary } from '../react-providers';
|
|
5
|
-
|
|
6
|
-
import { View } from './layout.interface';
|
|
7
|
-
|
|
8
|
-
export const renderView = (view?: View) => (
|
|
9
|
-
<>
|
|
10
|
-
{view && ReactIs.isValidElementType(view.component) ? (
|
|
11
|
-
<ErrorBoundary>{view.component && React.createElement(view.component, view.initialProps)}</ErrorBoundary>
|
|
12
|
-
) : null}
|
|
13
|
-
</>
|
|
14
|
-
);
|