@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.
Files changed (39) hide show
  1. package/lib/common/common.command.d.ts.map +1 -1
  2. package/lib/common/common.command.js +1 -1
  3. package/lib/common/common.command.js.map +1 -1
  4. package/lib/components/layout/default-layout.js +5 -5
  5. package/lib/components/layout/default-layout.js.map +1 -1
  6. package/lib/components/resize/resize.js +1 -1
  7. package/lib/components/resize/resize.js.map +1 -1
  8. package/lib/dom/fastdom.d.ts +18 -0
  9. package/lib/dom/fastdom.d.ts.map +1 -1
  10. package/lib/dom/fastdom.js +34 -0
  11. package/lib/dom/fastdom.js.map +1 -1
  12. package/lib/keybinding/keybinding.d.ts +2 -1
  13. package/lib/keybinding/keybinding.d.ts.map +1 -1
  14. package/lib/keybinding/keybinding.js +14 -2
  15. package/lib/keybinding/keybinding.js.map +1 -1
  16. package/lib/layout/layout.interface.d.ts +1 -2
  17. package/lib/layout/layout.interface.d.ts.map +1 -1
  18. package/lib/layout/layout.interface.js.map +1 -1
  19. package/lib/react-providers/config-provider.d.ts +1 -1
  20. package/lib/react-providers/slot.d.ts +16 -4
  21. package/lib/react-providers/slot.d.ts.map +1 -1
  22. package/lib/react-providers/slot.js +14 -7
  23. package/lib/react-providers/slot.js.map +1 -1
  24. package/lib/style/icon/icon.d.ts +1 -1
  25. package/lib/style/icon/icon.d.ts.map +1 -1
  26. package/lib/style/icon/ide-iconfont.d.ts +1 -1
  27. package/lib/style/icon/ide-iconfont.d.ts.map +1 -1
  28. package/lib/style/icon/ide-iconfont.js +1 -1
  29. package/lib/style/icon/ide-iconfont.js.map +1 -1
  30. package/package.json +6 -5
  31. package/src/common/common.command.ts +2 -1
  32. package/src/components/layout/default-layout.tsx +6 -6
  33. package/src/components/resize/resize.tsx +1 -1
  34. package/src/dom/fastdom.ts +34 -0
  35. package/src/keybinding/keybinding.ts +21 -3
  36. package/src/layout/layout.interface.ts +1 -3
  37. package/src/react-providers/config-provider.tsx +1 -1
  38. package/src/react-providers/slot.tsx +26 -7
  39. 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
- left: 'left',
20
- right: 'right',
19
+ view: 'view',
20
+ extendView: 'extendView',
21
21
  main: 'main',
22
22
  statusBar: 'statusBar',
23
- bottom: 'bottom',
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.left]: TabbarContextKeys.activeViewlet,
59
- [SlotLocation.right]: TabbarContextKeys.activeExtendViewlet,
60
- [SlotLocation.bottom]: TabbarContextKeys.activePanel,
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();
@@ -1,4 +1,4 @@
1
- export const IDE_ICONFONT_CN_CSS = '//at.alicdn.com/t/a/font_1432262_dmfdujwulz.css';
1
+ export const IDE_ICONFONT_CN_CSS = '//at.alicdn.com/t/a/font_1432262_eyib2sbslul.css';
2
2
 
3
3
  export const IDE_ICONFONT_CN_JS = IDE_ICONFONT_CN_CSS.replace(/\.css$/, '.js');
4
4