@opensumi/ide-core-browser 3.9.1-next-1749175927.0 → 3.9.1-next-1749196667.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 +0 -18
- package/lib/dom/fastdom.d.ts.map +1 -1
- package/lib/dom/fastdom.js +0 -34
- package/lib/dom/fastdom.js.map +1 -1
- package/lib/keybinding/keybinding.d.ts +1 -2
- package/lib/keybinding/keybinding.d.ts.map +1 -1
- package/lib/keybinding/keybinding.js +2 -14
- package/lib/keybinding/keybinding.js.map +1 -1
- package/lib/layout/layout.interface.d.ts +2 -1
- 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 +4 -16
- package/lib/react-providers/slot.d.ts.map +1 -1
- package/lib/react-providers/slot.js +7 -14
- 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 +5 -6
- package/src/common/common.command.ts +1 -2
- package/src/components/layout/default-layout.tsx +6 -6
- package/src/components/resize/resize.tsx +1 -1
- package/src/dom/fastdom.ts +0 -34
- package/src/keybinding/keybinding.ts +3 -21
- package/src/layout/layout.interface.ts +3 -1
- package/src/react-providers/config-provider.tsx +1 -1
- package/src/react-providers/slot.tsx +7 -26
- 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
|
+
left: 'left',
|
|
20
|
+
right: 'right',
|
|
21
21
|
main: 'main',
|
|
22
22
|
statusBar: 'statusBar',
|
|
23
|
-
|
|
23
|
+
bottom: 'bottom',
|
|
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.left]: TabbarContextKeys.activeViewlet,
|
|
59
|
+
[SlotLocation.right]: TabbarContextKeys.activeExtendViewlet,
|
|
60
|
+
[SlotLocation.bottom]: TabbarContextKeys.activePanel,
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
return standardTabbarCtxKeys[location] || 'activeExtendViewlet';
|
|
@@ -125,17 +125,6 @@ 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
|
-
|
|
139
128
|
export class SlotRendererRegistry {
|
|
140
129
|
static DefaultRenderer({ components }: RendererProps) {
|
|
141
130
|
return (
|
|
@@ -159,15 +148,11 @@ export class SlotRendererRegistry {
|
|
|
159
148
|
}
|
|
160
149
|
|
|
161
150
|
protected tabbarLocation = new Set<string>();
|
|
162
|
-
protected tabbarConfigs: Map<string, TabbarBehaviorConfig> = new Map();
|
|
163
151
|
|
|
164
152
|
protected rendererRegistry: Map<string, Renderer> = new Map();
|
|
165
153
|
|
|
166
|
-
registerSlotRenderer(slot: string, renderer: Renderer
|
|
154
|
+
registerSlotRenderer(slot: string, renderer: Renderer) {
|
|
167
155
|
this.rendererRegistry.set(slot, renderer);
|
|
168
|
-
if (tabbarConfig) {
|
|
169
|
-
this.tabbarConfigs.set(slot, tabbarConfig);
|
|
170
|
-
}
|
|
171
156
|
}
|
|
172
157
|
|
|
173
158
|
getSlotRenderer(slot: string): Renderer {
|
|
@@ -183,10 +168,6 @@ export class SlotRendererRegistry {
|
|
|
183
168
|
isTabbar(slot: string) {
|
|
184
169
|
return this.tabbarLocation.has(slot);
|
|
185
170
|
}
|
|
186
|
-
|
|
187
|
-
getTabbarConfig(slot: string): TabbarBehaviorConfig | undefined {
|
|
188
|
-
return this.tabbarConfigs.get(slot);
|
|
189
|
-
}
|
|
190
171
|
}
|
|
191
172
|
|
|
192
173
|
export const slotRendererRegistry = new SlotRendererRegistry();
|