@opensumi/ide-core-browser 3.9.1-next-1749204089.0 → 3.9.1-next-1749538805.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/lib/common/common.command.d.ts.map +1 -1
- package/lib/common/common.command.js +1 -1
- package/lib/common/common.command.js.map +1 -1
- package/lib/components/layout/default-layout.js +5 -5
- package/lib/components/layout/default-layout.js.map +1 -1
- package/lib/components/resize/resize.js +1 -1
- package/lib/components/resize/resize.js.map +1 -1
- package/lib/dom/fastdom.d.ts +18 -0
- package/lib/dom/fastdom.d.ts.map +1 -1
- package/lib/dom/fastdom.js +34 -0
- package/lib/dom/fastdom.js.map +1 -1
- package/lib/keybinding/keybinding.d.ts +2 -1
- package/lib/keybinding/keybinding.d.ts.map +1 -1
- package/lib/keybinding/keybinding.js +14 -2
- package/lib/keybinding/keybinding.js.map +1 -1
- package/lib/layout/layout.interface.d.ts +1 -2
- package/lib/layout/layout.interface.d.ts.map +1 -1
- package/lib/layout/layout.interface.js.map +1 -1
- package/lib/react-providers/config-provider.d.ts +1 -1
- package/lib/react-providers/slot.d.ts +16 -4
- package/lib/react-providers/slot.d.ts.map +1 -1
- package/lib/react-providers/slot.js +14 -7
- package/lib/react-providers/slot.js.map +1 -1
- package/lib/style/icon/icon.d.ts +1 -1
- package/lib/style/icon/icon.d.ts.map +1 -1
- package/lib/style/icon/ide-iconfont.d.ts +1 -1
- package/lib/style/icon/ide-iconfont.d.ts.map +1 -1
- package/lib/style/icon/ide-iconfont.js +1 -1
- package/lib/style/icon/ide-iconfont.js.map +1 -1
- package/package.json +6 -5
- package/src/common/common.command.ts +2 -1
- package/src/components/layout/default-layout.tsx +6 -6
- package/src/components/resize/resize.tsx +1 -1
- package/src/dom/fastdom.ts +34 -0
- package/src/keybinding/keybinding.ts +21 -3
- package/src/layout/layout.interface.ts +1 -3
- package/src/react-providers/config-provider.tsx +1 -1
- package/src/react-providers/slot.tsx +26 -7
- package/src/style/icon/ide-iconfont.ts +1 -1
|
@@ -16,11 +16,11 @@ const logger = getDebugLogger();
|
|
|
16
16
|
export type SlotLocation = string;
|
|
17
17
|
export const SlotLocation = {
|
|
18
18
|
top: 'top',
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
view: 'view',
|
|
20
|
+
extendView: 'extendView',
|
|
21
21
|
main: 'main',
|
|
22
22
|
statusBar: 'statusBar',
|
|
23
|
-
|
|
23
|
+
panel: 'panel',
|
|
24
24
|
extra: 'extra',
|
|
25
25
|
float: 'float',
|
|
26
26
|
action: 'action',
|
|
@@ -55,9 +55,9 @@ export enum TabbarContextKeys {
|
|
|
55
55
|
|
|
56
56
|
export function getTabbarCtxKey(location: string): TabbarContextKeys {
|
|
57
57
|
const standardTabbarCtxKeys = {
|
|
58
|
-
[SlotLocation.
|
|
59
|
-
[SlotLocation.
|
|
60
|
-
[SlotLocation.
|
|
58
|
+
[SlotLocation.view]: TabbarContextKeys.activeViewlet,
|
|
59
|
+
[SlotLocation.extendView]: TabbarContextKeys.activeExtendViewlet,
|
|
60
|
+
[SlotLocation.panel]: TabbarContextKeys.activePanel,
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
return standardTabbarCtxKeys[location] || 'activeExtendViewlet';
|
|
@@ -125,6 +125,17 @@ export interface RendererProps {
|
|
|
125
125
|
}
|
|
126
126
|
export type Renderer = React.ComponentType<RendererProps>;
|
|
127
127
|
|
|
128
|
+
export interface TabbarBehaviorConfig {
|
|
129
|
+
/** 是否为后置位置(bar 在 panel 右侧或底下) */
|
|
130
|
+
isLatter?: boolean;
|
|
131
|
+
/** 支持的操作类型 */
|
|
132
|
+
supportedActions?: {
|
|
133
|
+
expand?: boolean;
|
|
134
|
+
toggle?: boolean;
|
|
135
|
+
accordion?: boolean;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
128
139
|
export class SlotRendererRegistry {
|
|
129
140
|
static DefaultRenderer({ components }: RendererProps) {
|
|
130
141
|
return (
|
|
@@ -148,11 +159,15 @@ export class SlotRendererRegistry {
|
|
|
148
159
|
}
|
|
149
160
|
|
|
150
161
|
protected tabbarLocation = new Set<string>();
|
|
162
|
+
protected tabbarConfigs: Map<string, TabbarBehaviorConfig> = new Map();
|
|
151
163
|
|
|
152
164
|
protected rendererRegistry: Map<string, Renderer> = new Map();
|
|
153
165
|
|
|
154
|
-
registerSlotRenderer(slot: string, renderer: Renderer) {
|
|
166
|
+
registerSlotRenderer(slot: string, renderer: Renderer, tabbarConfig?: TabbarBehaviorConfig) {
|
|
155
167
|
this.rendererRegistry.set(slot, renderer);
|
|
168
|
+
if (tabbarConfig) {
|
|
169
|
+
this.tabbarConfigs.set(slot, tabbarConfig);
|
|
170
|
+
}
|
|
156
171
|
}
|
|
157
172
|
|
|
158
173
|
getSlotRenderer(slot: string): Renderer {
|
|
@@ -168,6 +183,10 @@ export class SlotRendererRegistry {
|
|
|
168
183
|
isTabbar(slot: string) {
|
|
169
184
|
return this.tabbarLocation.has(slot);
|
|
170
185
|
}
|
|
186
|
+
|
|
187
|
+
getTabbarConfig(slot: string): TabbarBehaviorConfig | undefined {
|
|
188
|
+
return this.tabbarConfigs.get(slot);
|
|
189
|
+
}
|
|
171
190
|
}
|
|
172
191
|
|
|
173
192
|
export const slotRendererRegistry = new SlotRendererRegistry();
|