@opensumi/ide-design 2.27.3-rc-1713855854.0 → 2.27.3-rc-1714367598.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 (50) hide show
  1. package/lib/browser/design.contribution.d.ts +4 -1
  2. package/lib/browser/design.contribution.d.ts.map +1 -1
  3. package/lib/browser/design.contribution.js +25 -1
  4. package/lib/browser/design.contribution.js.map +1 -1
  5. package/lib/browser/index.d.ts.map +1 -1
  6. package/lib/browser/index.js +2 -1
  7. package/lib/browser/index.js.map +1 -1
  8. package/lib/browser/layout/layout-config.d.ts +6 -0
  9. package/lib/browser/layout/layout-config.d.ts.map +1 -0
  10. package/lib/browser/layout/layout-config.js +11 -0
  11. package/lib/browser/layout/layout-config.js.map +1 -0
  12. package/lib/browser/menu-bar/logo.svg +1 -0
  13. package/lib/browser/menu-bar/menu-bar.contribution.d.ts +8 -0
  14. package/lib/browser/menu-bar/menu-bar.contribution.d.ts.map +1 -0
  15. package/lib/browser/menu-bar/menu-bar.contribution.js +45 -0
  16. package/lib/browser/menu-bar/menu-bar.contribution.js.map +1 -0
  17. package/lib/browser/menu-bar/menu-bar.module.less +107 -0
  18. package/lib/browser/menu-bar/menu-bar.view.d.ts +3 -0
  19. package/lib/browser/menu-bar/menu-bar.view.d.ts.map +1 -0
  20. package/lib/browser/menu-bar/menu-bar.view.js +99 -0
  21. package/lib/browser/menu-bar/menu-bar.view.js.map +1 -0
  22. package/lib/browser/override/override.module.less +3 -0
  23. package/lib/browser/style/design.module.less +9 -7
  24. package/lib/browser/style/global.less +22 -2
  25. package/lib/common/constants.d.ts +4 -0
  26. package/lib/common/constants.d.ts.map +1 -0
  27. package/lib/common/constants.js +7 -0
  28. package/lib/common/constants.js.map +1 -0
  29. package/lib/common/index.d.ts +2 -0
  30. package/lib/common/index.d.ts.map +1 -0
  31. package/lib/common/index.js +5 -0
  32. package/lib/common/index.js.map +1 -0
  33. package/lib/index.d.ts +1 -0
  34. package/lib/index.d.ts.map +1 -1
  35. package/lib/index.js +3 -0
  36. package/lib/index.js.map +1 -1
  37. package/package.json +6 -6
  38. package/src/browser/design.contribution.ts +30 -1
  39. package/src/browser/index.ts +2 -1
  40. package/src/browser/layout/layout-config.ts +9 -0
  41. package/src/browser/menu-bar/logo.svg +1 -0
  42. package/src/browser/menu-bar/menu-bar.contribution.tsx +48 -0
  43. package/src/browser/menu-bar/menu-bar.module.less +107 -0
  44. package/src/browser/menu-bar/menu-bar.view.tsx +136 -0
  45. package/src/browser/override/override.module.less +3 -0
  46. package/src/browser/style/design.module.less +9 -7
  47. package/src/browser/style/global.less +22 -2
  48. package/src/common/constants.ts +3 -0
  49. package/src/common/index.ts +1 -0
  50. package/src/index.ts +1 -0
@@ -3,7 +3,10 @@ import { FileServiceClient } from '@opensumi/ide-file-service/lib/browser/file-s
3
3
  export declare class DesignCoreContribution implements ClientAppContribution, SlotRendererContribution {
4
4
  protected readonly fileSystem: FileServiceClient;
5
5
  private readonly designThemeFileSystemProvider;
6
- initialize(): Promise<void>;
6
+ private appConfig;
7
+ private layoutViewSize;
8
+ private designLayoutConfig;
9
+ initialize(): void;
7
10
  registerRenderer(registry: SlotRendererRegistry): void;
8
11
  }
9
12
  //# sourceMappingURL=design.contribution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"design.contribution.d.ts","sourceRoot":"","sources":["../../src/browser/design.contribution.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EAGrB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAK/F,qBAEa,sBAAuB,YAAW,qBAAqB,EAAE,wBAAwB;IAE5F,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IAGjD,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAgC;IAExE,UAAU;IAIhB,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI;CAKvD"}
1
+ {"version":3,"file":"design.contribution.d.ts","sourceRoot":"","sources":["../../src/browser/design.contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,qBAAqB,EAGrB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAM/F,qBAEa,sBAAuB,YAAW,qBAAqB,EAAE,wBAAwB;IAE5F,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IAGjD,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAgC;IAG9E,OAAO,CAAC,SAAS,CAAY;IAG7B,OAAO,CAAC,cAAc,CAAuB;IAG7C,OAAO,CAAC,kBAAkB,CAAqB;IAE/C,UAAU;IAqBV,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI;CAKvD"}
@@ -4,14 +4,26 @@ exports.DesignCoreContribution = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const di_1 = require("@opensumi/di");
6
6
  const ide_core_browser_1 = require("@opensumi/ide-core-browser");
7
+ const constants_1 = require("@opensumi/ide-core-browser/lib/layout/constants");
7
8
  const ide_core_common_1 = require("@opensumi/ide-core-common");
8
9
  const ide_file_service_1 = require("@opensumi/ide-file-service");
9
10
  const file_service_client_1 = require("@opensumi/ide-file-service/lib/browser/file-service-client");
11
+ const layout_config_1 = require("./layout/layout-config");
10
12
  const tabbar_view_1 = require("./layout/tabbar.view");
11
13
  const file_system_provider_1 = require("./theme/file-system.provider");
12
14
  let DesignCoreContribution = class DesignCoreContribution {
13
- async initialize() {
15
+ initialize() {
16
+ const { useMenubarView } = this.designLayoutConfig;
14
17
  this.fileSystem.registerProvider(ide_core_common_1.Schemes.design, this.designThemeFileSystemProvider);
18
+ let layoutConfig = this.appConfig.layoutConfig;
19
+ if (useMenubarView) {
20
+ this.layoutViewSize.setMenubarHeight(48);
21
+ layoutConfig = Object.assign(Object.assign({}, layoutConfig), layout_config_1.DesignMenubarLayoutConfig);
22
+ }
23
+ this.layoutViewSize.setEditorTabsHeight(36);
24
+ this.layoutViewSize.setStatusBarHeight(36);
25
+ this.layoutViewSize.setAccordionHeaderSizeHeight(36);
26
+ this.appConfig.layoutConfig = layoutConfig;
15
27
  }
16
28
  registerRenderer(registry) {
17
29
  registry.registerSlotRenderer(ide_core_browser_1.SlotLocation.left, tabbar_view_1.DesignLeftTabRenderer);
@@ -27,6 +39,18 @@ tslib_1.__decorate([
27
39
  (0, di_1.Autowired)(),
28
40
  tslib_1.__metadata("design:type", file_system_provider_1.DesignThemeFileSystemProvider)
29
41
  ], DesignCoreContribution.prototype, "designThemeFileSystemProvider", void 0);
42
+ tslib_1.__decorate([
43
+ (0, di_1.Autowired)(ide_core_browser_1.AppConfig),
44
+ tslib_1.__metadata("design:type", Object)
45
+ ], DesignCoreContribution.prototype, "appConfig", void 0);
46
+ tslib_1.__decorate([
47
+ (0, di_1.Autowired)(constants_1.LayoutViewSizeConfig),
48
+ tslib_1.__metadata("design:type", constants_1.LayoutViewSizeConfig)
49
+ ], DesignCoreContribution.prototype, "layoutViewSize", void 0);
50
+ tslib_1.__decorate([
51
+ (0, di_1.Autowired)(constants_1.DesignLayoutConfig),
52
+ tslib_1.__metadata("design:type", constants_1.DesignLayoutConfig)
53
+ ], DesignCoreContribution.prototype, "designLayoutConfig", void 0);
30
54
  DesignCoreContribution = tslib_1.__decorate([
31
55
  (0, di_1.Injectable)(),
32
56
  (0, ide_core_browser_1.Domain)(ide_core_browser_1.ClientAppContribution, ide_core_browser_1.SlotRendererContribution)
@@ -1 +1 @@
1
- {"version":3,"file":"design.contribution.js","sourceRoot":"","sources":["../../src/browser/design.contribution.ts"],"names":[],"mappings":";;;;AAAA,qCAAqD;AACrD,iEAMoC;AACpC,+DAAoD;AACpD,iEAAgE;AAChE,oGAA+F;AAE/F,sDAA8G;AAC9G,uEAA6E;AAItE,IAAM,sBAAsB,GAA5B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AM,cAAc,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAO,MAAM,4BAA4B,CAAC;AAuBhE,qBACa,YAAa,SAAQ,aAAa;IAC7C,SAAS,EAAE,QAAQ,EAAE,CAA4B;IAEjD,WAAW,aAAc,QAAQ,UAkE/B;CACH"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAO,MAAM,4BAA4B,CAAC;AAwBhE,qBACa,YAAa,SAAQ,aAAa;IAC7C,SAAS,EAAE,QAAQ,EAAE,CAAuD;IAE5E,WAAW,aAAc,QAAQ,UAkE/B;CACH"}
@@ -12,6 +12,7 @@ const browser_2 = require("@opensumi/ide-editor/lib/browser");
12
12
  const ide_theme_1 = require("@opensumi/ide-theme");
13
13
  const theme_store_1 = require("@opensumi/ide-theme/lib/browser/theme-store");
14
14
  const design_contribution_1 = require("./design.contribution");
15
+ const menu_bar_contribution_1 = require("./menu-bar/menu-bar.contribution");
15
16
  const editor_tab_service_1 = require("./override/editor-tab.service");
16
17
  const menu_service_1 = require("./override/menu.service");
17
18
  const split_panel_service_2 = require("./override/split-panel.service");
@@ -21,7 +22,7 @@ const light_theme_1 = tslib_1.__importDefault(require("./theme/light-theme"));
21
22
  let DesignModule = class DesignModule extends ide_core_browser_1.BrowserModule {
22
23
  constructor() {
23
24
  super(...arguments);
24
- this.providers = [design_contribution_1.DesignCoreContribution];
25
+ this.providers = [menu_bar_contribution_1.DesignMenuBarContribution, design_contribution_1.DesignCoreContribution];
25
26
  this.preferences = (injector) => {
26
27
  import('./style/global.less');
27
28
  const designStyleService = injector.get(design_1.IDesignStyleService);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";;;;AAAA,qCAA8D;AAC9D,iEAAgE;AAChE,8GAA0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AC;yBACzD;wBACD,OAAO,QAAQ,CAAC;oBAClB,CAAC;iBACF;gBACD,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,IAAI;aAChB,EACD;gBACE,KAAK,EAAE,2BAAiB;gBACxB,QAAQ,EAAE,2CAAsB;gBAChC,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,IAAI;aAChB,EACD;gBACE,KAAK,EAAE,wCAAkB;gBACzB,QAAQ,EAAE,6CAAuB;gBACjC,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,IAAI;aAChB,EACD;gBACE,KAAK,EAAE,yBAAe;gBACtB,QAAQ,EAAE,0CAA2B;aACtC,CACF,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CAAA,CAAA;AAtEY,YAAY;IADxB,IAAA,eAAU,GAAE;GACA,YAAY,CAsExB;AAtEY,oCAAY"}
@@ -0,0 +1,6 @@
1
+ export declare const DesignMenubarLayoutConfig: {
2
+ [x: string]: {
3
+ modules: string[];
4
+ };
5
+ };
6
+ //# sourceMappingURL=layout-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-config.d.ts","sourceRoot":"","sources":["../../../src/browser/layout/layout-config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DesignMenubarLayoutConfig = void 0;
4
+ const ide_core_browser_1 = require("@opensumi/ide-core-browser");
5
+ const common_1 = require("../../common");
6
+ exports.DesignMenubarLayoutConfig = {
7
+ [ide_core_browser_1.SlotLocation.top]: {
8
+ modules: [common_1.DESIGN_MENUBAR_CONTAINER_VIEW_ID],
9
+ },
10
+ };
11
+ //# sourceMappingURL=layout-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-config.js","sourceRoot":"","sources":["../../../src/browser/layout/layout-config.ts"],"names":[],"mappings":";;;AAAA,iEAA0D;AAE1D,yCAAgE;AAEnD,QAAA,yBAAyB,GAAG;IACvC,CAAC,+BAAY,CAAC,GAAG,CAAC,EAAE;QAClB,OAAO,EAAE,CAAC,yCAAgC,CAAC;KAC5C;CACF,CAAC"}
@@ -0,0 +1 @@
1
+ <svg id="layer_1" data-name="layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 86.97 78.11"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#fc3d50;}</style></defs><path d="M64.89,27.54A53.23,53.23,0,0,0,42.64,6.24C39.4,4.54,35.92,4.7,32,5.05c-2.73.25-5.19.15-11.76-.11l-1,0a6.15,6.15,0,0,0-5.43,2.29c-3,3.87-2,11.34-1,14.75,2.83,9.74,8,18.45,14.5,24.53a60.15,60.15,0,0,0,6.17,5C38,54.67,45,58.58,52.4,59l.8,0a16.12,16.12,0,0,0,14.58-9.23C71.46,41.77,67.55,32.41,64.89,27.54Z"/><path class="cls-1" d="M10.05,58.75c-3.83,0-6.49-1.22-7.9-3.61C-1.2,49.47,9.22,39.08,13.86,34.88l1.67-1.51,1,1.51A14.51,14.51,0,0,0,18.07,37L19,38l-1.21,1.29c-4.74,5-5.44,7.92-5.16,8.4.57,1,2.14,1.17,3.35,1.17a19.18,19.18,0,0,0,4.09-.53c1-.23,2-.48,3.05-.76.75-.2,1.49-.42,2.23-.64A91,91,0,0,0,50.13,35.5c0-.06,0-.12,0-.18a6.55,6.55,0,0,1,5.76-7.26,6.36,6.36,0,0,1,3.22.43c1-.89,1.92-1.8,2.81-2.72,2.15-2.18,4.9-5.63,5.88-9.61a1.6,1.6,0,0,0-.08-1.34c-.38-.48-1.53-.76-3.08-.76A30.62,30.62,0,0,0,57,15.34l-1.19.36-.64-.76a14.07,14.07,0,0,0-2-1.91l-2-1.61,3-1.2C61,7.47,67,6,71.37,6c5,0,7.19,1.89,8.12,3.47a5.92,5.92,0,0,1,.36,4.69c-1.31,4.88-7.69,12.32-16.73,19.55l0,.1a6.55,6.55,0,0,1-5.77,7.26,6.61,6.61,0,0,1-.76.05,6.47,6.47,0,0,1-2.84-.66c-2,1.27-3.94,2.49-5.92,3.63C35.31,51.31,24.38,56.1,16.22,58A28.15,28.15,0,0,1,10.05,58.75Z"/><path d="M71.38,7.51c3.38,0,5.74.91,6.82,2.74a4.51,4.51,0,0,1,.21,3.53c-1.23,4.53-7.55,12-16.95,19.34a5.05,5.05,0,0,1-4.26,6.47,3.9,3.9,0,0,1-.59,0,5,5,0,0,1-2.89-.92c-2.11,1.4-4.32,2.77-6.62,4.09C34,50.33,23.43,54.78,15.89,56.49a27.13,27.13,0,0,1-5.84.76c-3.27,0-5.48-1-6.61-2.87C1.54,51.15,5.91,44.11,14.87,36l.35-.31A16.31,16.31,0,0,0,17,38l-.25.26c-4.31,4.59-6.37,8.49-5.36,10.19.75,1.27,2.33,1.91,4.64,1.91a20.42,20.42,0,0,0,4.42-.57c1-.24,2.08-.49,3.11-.77.76-.21,1.52-.42,2.27-.65a92.24,92.24,0,0,0,26-12.19,5,5,0,0,1,4.22-6.62,3.77,3.77,0,0,1,.58,0,5,5,0,0,1,2.7.79C60.58,29.18,61.8,28,63,26.82c2.74-2.8,5.3-6.41,6.26-10.3.75-3.09-1.66-4-4.62-4a32.59,32.59,0,0,0-8.08,1.34l-.25.08A15.56,15.56,0,0,0,54,11.86l.62-.25c6.81-2.72,12.54-4.1,16.72-4.1m0-3C66.77,4.51,60.6,6,53.55,8.83l-.62.25L48.18,11l4,3.21A13.73,13.73,0,0,1,54,15.91l1.27,1.51,1.89-.57.25-.08a29.1,29.1,0,0,1,7.21-1.21,6.53,6.53,0,0,1,1.72.18l0,.06a20.5,20.5,0,0,1-5.49,8.92c-.67.7-1.38,1.39-2.11,2.07a8.16,8.16,0,0,0-2.09-.28,7.26,7.26,0,0,0-.93.06,8,8,0,0,0-7.13,8.17A90.11,90.11,0,0,1,25,45.49l-2.2.62c-1,.27-2,.52-3,.75a18,18,0,0,1-3.75.49,4.45,4.45,0,0,1-1.83-.28c.25-.91,1.38-3.2,4.73-6.76l.25-.27,1.92-2-1.9-2a12.73,12.73,0,0,1-1.42-1.87l-1.9-3-2.65,2.4-.35.32C-.64,46-1.12,52.56.86,55.9c1.17,2,3.71,4.35,9.19,4.35a30,30,0,0,0,6.51-.83c8.3-1.89,19.38-6.73,32-14,1.77-1,3.56-2.11,5.32-3.24a7.93,7.93,0,0,0,2.69.47,7.26,7.26,0,0,0,.93-.06,8.06,8.06,0,0,0,7.14-8.18C73.75,27,79.92,19.69,81.3,14.56a7.39,7.39,0,0,0-.51-5.84C79.65,6.8,77.1,4.51,71.38,4.51Z"/><path class="cls-1" d="M25,48.8C17.71,42,12,32.37,8.85,21.57,7.74,17.73,6.54,9.24,10,4.64a7.73,7.73,0,0,1,6.47-3.07h.46l1.13,0c4.35.17,7,.28,9,.28,1.35,0,2.43,0,3.6-.15,1.43-.13,3-.26,4.48-.26a15.94,15.94,0,0,1,7.71,1.68A60.3,60.3,0,0,1,65.47,23.31l.63,1-.77.85c-1,1.11-2.11,2.25-3.31,3.38l-1.34,1.25-1-1.55A52.53,52.53,0,0,0,39.39,9.8,8.72,8.72,0,0,0,35.17,9c-1.21,0-2.54.12-3.8.23s-2.71.18-4.28.18c-2.21,0-4.9-.11-9.36-.29l-1.25,0a1.53,1.53,0,0,0-.5,0c-.08.13-.79,1.17-.8,4.19A23.52,23.52,0,0,0,16,19.48c2.77,9.52,7.75,18,14,23.85.55.52,1.14,1,1.74,1.55l1.85,1.57-2.23.95c-1.68.73-3.29,1.36-4.77,1.88l-.86.3Z"/><path d="M35.17,3a14.67,14.67,0,0,1,7,1.5,58.7,58.7,0,0,1,22,19.62Q62.79,25.73,61,27.41A53.87,53.87,0,0,0,40.09,8.47a10.24,10.24,0,0,0-4.92-1c-1.27,0-2.64.12-3.94.24s-2.61.17-4.14.17c-2.18,0-4.87-.11-9.32-.29l-1.08,0h-.21c-1.1,0-1.44.33-1.7.67s-1.09,1.81-1.1,5.06a25.11,25.11,0,0,0,.92,6.61c2.84,9.78,8,18.49,14.44,24.53.58.54,1.18,1.07,1.8,1.6-1.69.72-3.24,1.33-4.68,1.84L26,47.71c-7.54-7-12.84-16.72-15.7-26.56C8.65,15.5,7.64,3.07,16.48,3.07h.39c5,.2,8,.33,10.22.33,1.4,0,2.54-.05,3.73-.16C32.28,3.12,33.73,3,35.17,3m0-3C33.58,0,32,.13,30.55.26a33.81,33.81,0,0,1-3.46.15c-2,0-4.66-.11-9-.28L17,.08h-.51A9.2,9.2,0,0,0,8.8,3.74C5,8.8,6.14,17.59,7.41,22,10.63,33,16.49,43,23.94,49.9l.13.12.05,0,1.33,1.23,1.71-.6c1.51-.54,3.15-1.18,4.86-1.92l4.45-1.91-3.69-3.13c-.62-.53-1.17-1-1.69-1.5C25,36.56,20.17,28.33,17.48,19.06a22.06,22.06,0,0,1-.8-5.76,10.27,10.27,0,0,1,.3-2.73l.67,0c4.49.18,7.2.29,9.44.29,1.62,0,3-.06,4.41-.19,1.23-.11,2.52-.22,3.67-.22a7.35,7.35,0,0,1,3.52.65A50.88,50.88,0,0,1,58.44,29l1.93,3.11L63,29.6c1.24-1.17,2.39-2.34,3.41-3.48L68,24.41l-1.25-1.92A61.78,61.78,0,0,0,43.57,1.85,17.4,17.4,0,0,0,35.17,0Z"/><path class="cls-1" d="M81.4,74.71C79,73.93,67,69.9,64.21,67.16a8.37,8.37,0,0,1,3.74-14,8.19,8.19,0,0,1,2.15-.28A8.42,8.42,0,0,1,76,55.34c2.72,2.72,6.76,14.8,7.54,17.19l1,3.23Z"/><path d="M70.1,54.37a6.92,6.92,0,0,1,4.88,2c2.6,2.6,7,16,7.18,16.6l.14.42-.43-.14c-.57-.18-14-4.58-16.6-7.18a6.86,6.86,0,0,1,3.07-11.5,7,7,0,0,1,1.76-.23m0-3a9.86,9.86,0,0,0-6.94,16.86C66,71.05,76.53,74.7,80.94,76.14l.43.14L87,78.11,85.15,72.5,85,72.07c-1.44-4.42-5.1-15-7.91-17.79a9.92,9.92,0,0,0-7-2.91Z"/><path class="cls-2" d="M68.85,64.44a3.22,3.22,0,1,1,4.56-4.56c1.26,1.26,5.47,10,5.47,10s-8.77-4.21-10-5.47Zm0,0"/><path class="cls-1" d="M53.88,62.73l-.94,0c-8.35-.43-16.11-4.79-21.15-8.38-.63-.45-1.25-.9-1.86-1.37l-2-1.54,2.34-1c1.47-.64,3-1.36,4.61-2.13l.8-.38.72.51c7.56,5.33,13.39,6.66,17,6.84l.56,0a11.27,11.27,0,0,0,6-1.75A10.73,10.73,0,0,0,64,48.9a14.34,14.34,0,0,0,.73-8.61A31.32,31.32,0,0,0,62.32,33L61.84,32l.9-.73c1.2-1,2.36-2,3.46-3l1.47-1.35.88,1.79C71.61,34.91,74.47,44,70.77,52A18.61,18.61,0,0,1,53.88,62.73Z"/><path d="M67.21,29.37c3.3,6.7,5.42,15,2.19,22a17.16,17.16,0,0,1-15.52,9.83l-.86,0c-7.29-.37-14.52-4-20.36-8.1l-1.82-1.34q2.21-1,4.65-2.15c7.84,5.52,14,6.92,17.76,7.11l.63,0a12.79,12.79,0,0,0,6.8-2,12.24,12.24,0,0,0,4.65-5.24,15.76,15.76,0,0,0,.84-9.5,32.3,32.3,0,0,0-2.48-7.62c1.24-1,2.41-2,3.52-3m.92-4.91-2.95,2.69c-1.07,1-2.22,2-3.4,2.94L60,31.55l1,2.1a30.18,30.18,0,0,1,2.26,6.91,12.9,12.9,0,0,1-.61,7.71,9.26,9.26,0,0,1-3.52,4,9.81,9.81,0,0,1-5.21,1.52H53.4c-3.37-.18-8.91-1.45-16.18-6.58l-1.44-1-1.59.76c-1.58.76-3.11,1.47-4.56,2.11L25,51.08,29,54.16c.62.47,1.26.94,1.89,1.39,5.2,3.7,13.23,8.21,21.95,8.65.33,0,.67,0,1,0A20.1,20.1,0,0,0,72.13,52.66c4-8.57,1-18.12-2.23-24.62l-1.77-3.58Z"/><path class="cls-1" d="M25.56,14.26a17.41,17.41,0,0,1-8-1.66.72.72,0,0,1-.29-1,.71.71,0,0,1,1-.28c.1.05,7.38,3.87,18.43-1.11a.71.71,0,0,1,1,.36.71.71,0,0,1-.36.95A28.35,28.35,0,0,1,25.56,14.26Z"/><path class="cls-1" d="M78.2,10.25C75.79,6.16,67,6.68,54.66,11.61l-.62.25A15.56,15.56,0,0,1,56.29,14l.25-.08c2.58-.77,14.24-3.68,12.7,2.62-1,3.89-3.52,7.5-6.26,10.3-1.18,1.21-2.4,2.36-3.65,3.48a5,5,0,0,0-7.5,5.87,92.24,92.24,0,0,1-26,12.19c-.75.23-1.51.44-2.27.65-1,.28-2.07.53-3.11.77-4.77,1.08-7.91.62-9.06-1.34-1-1.7,1.05-5.6,5.36-10.19L17,38a15.59,15.59,0,0,1-1.75-2.31l-.35.31c-9,8.12-13.33,15.16-11.43,18.39,1.13,1.91,3.34,2.87,6.61,2.87a27.13,27.13,0,0,0,5.84-.76C23.43,54.78,34,50.33,47.1,42.8c2.3-1.32,4.51-2.69,6.62-4.09a5,5,0,0,0,2.89.92,3.9,3.9,0,0,0,.59,0,5,5,0,0,0,4.26-6.47c9.4-7.39,15.72-14.81,16.95-19.34A4.51,4.51,0,0,0,78.2,10.25Z"/></svg>
@@ -0,0 +1,8 @@
1
+ import { ComponentContribution, ComponentRegistry, Disposable } from '@opensumi/ide-core-browser';
2
+ export declare class DesignMenuBarContribution extends Disposable implements ComponentContribution {
3
+ private readonly menubarStore;
4
+ private readonly menuRegistry;
5
+ constructor();
6
+ registerComponent(registry: ComponentRegistry): void;
7
+ }
8
+ //# sourceMappingURL=menu-bar.contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-bar.contribution.d.ts","sourceRoot":"","sources":["../../../src/browser/menu-bar/menu-bar.contribution.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,UAAU,EAAU,MAAM,4BAA4B,CAAC;AAQ1G,qBACa,yBAA0B,SAAQ,UAAW,YAAW,qBAAqB;IAExF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAG5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;;IA0B7C,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;CAMrD"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DesignMenuBarContribution = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const di_1 = require("@opensumi/di");
6
+ const ide_core_browser_1 = require("@opensumi/ide-core-browser");
7
+ const next_1 = require("@opensumi/ide-core-browser/lib/menu/next");
8
+ const menu_bar_store_1 = require("@opensumi/ide-menu-bar/lib/browser/menu-bar.store");
9
+ const common_1 = require("../../common");
10
+ const menu_bar_view_1 = require("./menu-bar.view");
11
+ let DesignMenuBarContribution = class DesignMenuBarContribution extends ide_core_browser_1.Disposable {
12
+ constructor() {
13
+ super();
14
+ this.menubarStore.unregisterMenusBarByCompact(next_1.MenuId.DesignMenuBarTopExtra);
15
+ this.addDispose(this.menubarStore.onDidMenuBarChange((menubarItems) => {
16
+ this.menuRegistry.registerMenuItems(next_1.MenuId.DesignMenuBarTopExtra, menubarItems.map((item) => ({
17
+ label: item.label,
18
+ submenu: item.id,
19
+ iconClass: item.iconClass,
20
+ group: '1_navigation',
21
+ order: 100,
22
+ })));
23
+ }));
24
+ }
25
+ registerComponent(registry) {
26
+ registry.register(common_1.DESIGN_MENUBAR_CONTAINER_VIEW_ID, {
27
+ component: menu_bar_view_1.DesignMenuBarView,
28
+ id: common_1.DESIGN_MENUBAR_CONTAINER_VIEW_ID,
29
+ });
30
+ }
31
+ };
32
+ tslib_1.__decorate([
33
+ (0, di_1.Autowired)(menu_bar_store_1.MenubarStore),
34
+ tslib_1.__metadata("design:type", menu_bar_store_1.MenubarStore)
35
+ ], DesignMenuBarContribution.prototype, "menubarStore", void 0);
36
+ tslib_1.__decorate([
37
+ (0, di_1.Autowired)(next_1.IMenuRegistry),
38
+ tslib_1.__metadata("design:type", next_1.IMenuRegistry)
39
+ ], DesignMenuBarContribution.prototype, "menuRegistry", void 0);
40
+ DesignMenuBarContribution = tslib_1.__decorate([
41
+ (0, ide_core_browser_1.Domain)(ide_core_browser_1.ComponentContribution),
42
+ tslib_1.__metadata("design:paramtypes", [])
43
+ ], DesignMenuBarContribution);
44
+ exports.DesignMenuBarContribution = DesignMenuBarContribution;
45
+ //# sourceMappingURL=menu-bar.contribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-bar.contribution.js","sourceRoot":"","sources":["../../../src/browser/menu-bar/menu-bar.contribution.tsx"],"names":[],"mappings":";;;;AAAA,qCAAyC;AACzC,iEAA0G;AAC1G,mEAA6G;AAC7G,sFAAiF;AAEjF,yCAAgE;AAEhE,mDAAoD;AAG7C,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,6BAAU;IAOvD;QACE,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,YAAY,CAAC,2BAA2B,CAAC,aAAM,CAAC,qBAAqB,CAAC,CAAC;QAE5E,IAAI,CAAC,UAAU,CACb,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,YAA4B,EAAE,EAAE;YACpE,IAAI,CAAC,YAAY,CAAC,iBAAiB,CACjC,aAAM,CAAC,qBAAqB,EAC5B,YAAY,CAAC,GAAG,CACd,CAAC,IAAkB,EAAE,EAAE,CACrB,CAAC;gBACC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,EAAE;gBAChB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,KAAK,EAAE,cAAc;gBACrB,KAAK,EAAE,GAAG;aACM,CAAA,CACrB,CACF,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,QAA2B;QAC3C,QAAQ,CAAC,QAAQ,CAAC,yCAAgC,EAAE;YAClD,SAAS,EAAE,iCAAiB;YAC5B,EAAE,EAAE,yCAAgC;SACrC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AApCC;IAAC,IAAA,cAAS,EAAC,6BAAY,CAAC;sCACO,6BAAY;+DAAC;AAE5C;IAAC,IAAA,cAAS,EAAC,oBAAa,CAAC;sCACM,oBAAa;+DAAC;AALlC,yBAAyB;IADrC,IAAA,yBAAM,EAAC,wCAAqB,CAAC;;GACjB,yBAAyB,CAqCrC;AArCY,8DAAyB"}
@@ -0,0 +1,107 @@
1
+ .menu_bar_view {
2
+ display: flex;
3
+ background-color: var(--kt-menubar-background);
4
+ align-items: center;
5
+ width: 100%;
6
+
7
+ .container {
8
+ display: flex;
9
+ justify-content: space-between;
10
+ width: inherit;
11
+ align-items: center;
12
+ padding: 0 12px 0 8px;
13
+
14
+ .left {
15
+ display: flex;
16
+ align-items: center;
17
+ z-index: 2;
18
+
19
+ .enhance_menu {
20
+ padding: 8px;
21
+ }
22
+
23
+ .dividing {
24
+ margin-left: 5px;
25
+ width: 2px;
26
+ height: 12px;
27
+ background-color: var(--editorGroup-border);
28
+ }
29
+
30
+ .top_menus_bar {
31
+ margin-left: 6px;
32
+ display: flex;
33
+ align-items: center;
34
+ border-radius: 6px;
35
+
36
+ .ai_enhance_menu {
37
+ padding: 8px 6px;
38
+ height: 32px;
39
+ }
40
+
41
+ .caret_icon {
42
+ font-size: 14px;
43
+ margin-left: 4px;
44
+ }
45
+
46
+ .logo_container {
47
+ display: flex;
48
+ align-items: center;
49
+
50
+ .extra_top_icon {
51
+ width: 16px;
52
+ height: 16px;
53
+ background-repeat: no-repeat;
54
+ background-size: 100%;
55
+
56
+ &::before {
57
+ content: initial;
58
+ }
59
+
60
+ &:hover {
61
+ background-color: transparent;
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+
68
+ .center {
69
+ text-align: center;
70
+ position: absolute;
71
+ left: 0;
72
+ right: 0;
73
+ z-index: 1;
74
+
75
+ .run {
76
+ .btn {
77
+ border-radius: 6px;
78
+ padding: 0 13px 0 11px;
79
+ border: 0;
80
+ }
81
+ span {
82
+ color: #58ce5f;
83
+ font-size: 12px;
84
+ }
85
+ }
86
+ }
87
+
88
+ .right {
89
+ display: flex;
90
+ align-items: center;
91
+ z-index: 2;
92
+
93
+ .input {
94
+ margin-right: 16px;
95
+ width: 240px;
96
+ flex-shrink: 0;
97
+
98
+ .input_wrapper {
99
+ height: 32px;
100
+ background-color: var(--design-borderColor-common);
101
+ border-radius: 8px;
102
+ border: 1px solid var(--design-input-foreground);
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ export declare const DesignMenuBarView: () => React.JSX.Element;
3
+ //# sourceMappingURL=menu-bar.view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-bar.view.d.ts","sourceRoot":"","sources":["../../../src/browser/menu-bar/menu-bar.view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAwE/B,eAAO,MAAM,iBAAiB,yBA8D7B,CAAC"}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DesignMenuBarView = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
6
+ const React = tslib_1.__importStar(require("react"));
7
+ const ide_core_browser_1 = require("@opensumi/ide-core-browser");
8
+ const components_1 = require("@opensumi/ide-core-browser/lib/components");
9
+ const ai_native_1 = require("@opensumi/ide-core-browser/lib/components/ai-native");
10
+ const constants_1 = require("@opensumi/ide-core-browser/lib/layout/constants");
11
+ const view_id_1 = require("@opensumi/ide-core-browser/lib/layout/view-id");
12
+ const next_1 = require("@opensumi/ide-core-browser/lib/menu/next");
13
+ const ide_core_common_1 = require("@opensumi/ide-core-common");
14
+ const ide_main_layout_1 = require("@opensumi/ide-main-layout");
15
+ const common_1 = require("../../common");
16
+ const logo_svg_1 = tslib_1.__importDefault(require("./logo.svg"));
17
+ const menu_bar_module_less_1 = tslib_1.__importDefault(require("./menu-bar.module.less"));
18
+ const DesignMenuBarRender = () => {
19
+ const contextmenuService = (0, ide_core_browser_1.useInjectable)(next_1.AbstractContextMenuService);
20
+ const designLayoutConfig = (0, ide_core_browser_1.useInjectable)(constants_1.DesignLayoutConfig);
21
+ const ctxMenuRenderer = (0, ide_core_browser_1.useInjectable)(next_1.ICtxMenuRenderer);
22
+ const iconRef = React.useRef(null);
23
+ const [anchor, setAnchor] = React.useState(undefined);
24
+ React.useEffect(() => {
25
+ if (iconRef.current) {
26
+ const rect = iconRef.current.getBoundingClientRect();
27
+ const { x, y, height } = rect;
28
+ setAnchor({
29
+ x,
30
+ y: y + height + 4,
31
+ });
32
+ }
33
+ }, []);
34
+ const extraTopMenus = React.useMemo(() => contextmenuService.createMenu({
35
+ id: next_1.MenuId.DesignMenuBarTopExtra,
36
+ }), [contextmenuService]);
37
+ const handleClick = React.useCallback(() => {
38
+ if (!anchor) {
39
+ return;
40
+ }
41
+ const menuNodes = extraTopMenus.getMergedMenuNodes();
42
+ extraTopMenus.dispose();
43
+ ctxMenuRenderer.show({
44
+ anchor,
45
+ menuNodes,
46
+ });
47
+ }, [anchor, extraTopMenus]);
48
+ const logo = React.useMemo(() => designLayoutConfig.menubarLogo || logo_svg_1.default, [designLayoutConfig.menubarLogo]);
49
+ return (React.createElement(React.Fragment, null,
50
+ React.createElement(ai_native_1.EnhanceIcon, { wrapperClassName: menu_bar_module_less_1.default.ai_enhance_menu, ref: iconRef, onClick: handleClick },
51
+ React.createElement("div", { className: menu_bar_module_less_1.default.logo_container },
52
+ React.createElement("img", { className: menu_bar_module_less_1.default.extra_top_icon, src: logo, alt: '' }),
53
+ React.createElement(components_1.Icon, { className: (0, classnames_1.default)((0, ide_core_browser_1.getIcon)('down'), menu_bar_module_less_1.default.caret_icon) })))));
54
+ };
55
+ const DesignMenuBarView = () => {
56
+ const commandService = (0, ide_core_browser_1.useInjectable)(ide_core_common_1.CommandService);
57
+ const mainLayoutService = (0, ide_core_browser_1.useInjectable)(ide_main_layout_1.IMainLayoutService);
58
+ const aiNativeConfigService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.AINativeConfigService);
59
+ const [isLeftPanelVisible, setIsVisiablePanel] = React.useState(false);
60
+ React.useEffect(() => {
61
+ requestAnimationFrame(() => {
62
+ setIsVisiablePanel(isVisiable());
63
+ });
64
+ const tabbarService = mainLayoutService.getTabbarService(ide_core_browser_1.SlotLocation.left);
65
+ const toDispose = tabbarService.onCurrentChange(({ previousId, currentId }) => {
66
+ if (previousId && !currentId) {
67
+ setIsVisiablePanel(false);
68
+ }
69
+ else if (!previousId && currentId) {
70
+ setIsVisiablePanel(true);
71
+ }
72
+ });
73
+ return () => {
74
+ toDispose.dispose();
75
+ };
76
+ }, []);
77
+ const handleLeftMenuVisiable = React.useCallback(() => {
78
+ commandService.executeCommand('main-layout.left-panel.toggle');
79
+ requestAnimationFrame(() => {
80
+ setIsVisiablePanel(isVisiable());
81
+ });
82
+ }, []);
83
+ const isVisiable = React.useCallback(() => {
84
+ const tabbarService = mainLayoutService.getTabbarService(ide_core_browser_1.SlotLocation.left);
85
+ return !!tabbarService.currentContainerId;
86
+ }, [mainLayoutService]);
87
+ return (React.createElement("div", { id: view_id_1.VIEW_CONTAINERS.MENUBAR, className: menu_bar_module_less_1.default.menu_bar_view, style: { height: aiNativeConfigService.layoutViewSize.menubarHeight } },
88
+ React.createElement("div", { className: menu_bar_module_less_1.default.container },
89
+ React.createElement("div", { className: menu_bar_module_less_1.default.left },
90
+ React.createElement(ai_native_1.EnhanceIcon, { wrapperClassName: menu_bar_module_less_1.default.enhance_menu, icon: isLeftPanelVisible ? 'left-nav-open' : 'left-nav-close', onClick: handleLeftMenuVisiable }),
91
+ React.createElement("span", { className: menu_bar_module_less_1.default.dividing }),
92
+ React.createElement("div", { className: menu_bar_module_less_1.default.top_menus_bar },
93
+ React.createElement(DesignMenuBarRender, null)),
94
+ React.createElement(ide_core_browser_1.SlotRenderer, { slot: common_1.DESIGN_MENU_BAR_LEFT, flex: 1, overflow: 'initial' })),
95
+ React.createElement("div", { className: menu_bar_module_less_1.default.right },
96
+ React.createElement(ide_core_browser_1.SlotRenderer, { slot: common_1.DESIGN_MENU_BAR_RIGHT, flex: 1, overflow: 'initial' })))));
97
+ };
98
+ exports.DesignMenuBarView = DesignMenuBarView;
99
+ //# sourceMappingURL=menu-bar.view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-bar.view.js","sourceRoot":"","sources":["../../../src/browser/menu-bar/menu-bar.view.tsx"],"names":[],"mappings":";;;;AAAA,oEAA6B;AAC7B,qDAA+B;AAE/B,iEAAuH;AACvH,0EAAiE;AACjE,mFAAkF;AAClF,+EAAqF;AACrF,2EAAgF;AAChF,mEAAgH;AAChH,+DAA2D;AAC3D,+DAA+D;AAE/D,yCAA2E;AAE3E,kEAAsC;AACtC,0FAA4C;AAE5C,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAC/B,MAAM,kBAAkB,GAAG,IAAA,gCAAa,EAA6B,iCAA0B,CAAC,CAAC;IACjG,MAAM,kBAAkB,GAAG,IAAA,gCAAa,EAAqB,8BAAkB,CAAC,CAAC;IACjF,MAAM,eAAe,GAAG,IAAA,gCAAa,EAAmB,uBAAgB,CAAC,CAAC;IAE1E,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IAC1D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAuC,SAAS,CAAC,CAAC;IAE5F,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;YACrD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAE9B,SAAS,CAAC;gBACR,CAAC;gBACD,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC;aAClB,CA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G,iBAAiB,CAAC,gBAAgB,CAAC,+BAAY,CAAC,IAAI,CAAC,CAAC;QAC5E,OAAO,CAAC,CAAC,aAAa,CAAC,kBAAkB,CAAC;IAC5C,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAExB,OAAO,CACL,6BACE,EAAE,EAAE,yBAAe,CAAC,OAAO,EAC3B,SAAS,EAAE,8BAAM,CAAC,aAAa,EAC/B,KAAK,EAAE,EAAE,MAAM,EAAE,qBAAqB,CAAC,cAAc,CAAC,aAAa,EAAE;QAErE,6BAAK,SAAS,EAAE,8BAAM,CAAC,SAAS;YAC9B,6BAAK,SAAS,EAAE,8BAAM,CAAC,IAAI;gBACzB,oBAAC,uBAAW,IACV,gBAAgB,EAAE,8BAAM,CAAC,YAAY,EACrC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,EAC7D,OAAO,EAAE,sBAAsB,GAC/B;gBACF,8BAAM,SAAS,EAAE,8BAAM,CAAC,QAAQ,GAAS;gBACzC,6BAAK,SAAS,EAAE,8BAAM,CAAC,aAAa;oBAClC,oBAAC,mBAAmB,OAAG,CACnB;gBACN,oBAAC,+BAAY,IAAC,IAAI,EAAE,6BAAoB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAI,CACtE;YACN,6BAAK,SAAS,EAAE,8BAAM,CAAC,KAAK;gBAC1B,oBAAC,+BAAY,IAAC,IAAI,EAAE,8BAAqB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAI,CACvE,CACF,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AA9DW,QAAA,iBAAiB,qBA8D5B"}
@@ -97,6 +97,9 @@
97
97
  }
98
98
 
99
99
  &:not(.disabled):hover {
100
+ background: var(--menu-selectionBackground) !important;
101
+ color: var(--menu-selectionForeground) !important;
102
+
100
103
  .shortcut {
101
104
  color: var(--menu-selectionForeground);
102
105
  }
@@ -310,10 +310,6 @@ div[class*='design-editor_tab_block_container__'] {
310
310
  * ---------------- Override editor panel bottom tabbar style ---------------------
311
311
  */
312
312
  :global(.design_bottom_slot) {
313
- .design-tab_bar {
314
- height: 100%;
315
- }
316
-
317
313
  .design-tab_panel {
318
314
  &::before {
319
315
  content: none;
@@ -327,7 +323,6 @@ div[class*='design-editor_tab_block_container__'] {
327
323
 
328
324
  .design-bottom_bar_container {
329
325
  width: 100%;
330
- height: 32px;
331
326
  }
332
327
 
333
328
  .design-variable_repl_bar {
@@ -541,6 +536,9 @@ div[class*='design-editor_tab_block_container__'] {
541
536
 
542
537
  &::-webkit-scrollbar {
543
538
  width: 4px;
539
+ &:hover {
540
+ width: 10px;
541
+ }
544
542
  }
545
543
  }
546
544
 
@@ -580,8 +578,8 @@ div[class*='design-editor_tab_block_container__'] {
580
578
  }
581
579
 
582
580
  &:hover {
583
- color: var(--design-text-hoverForeground);
584
- background-color: var(--activityBar-activeBorder);
581
+ background-color: var(--badge-background);
582
+ color: var(--badge-foreground);
585
583
  border-radius: 4px;
586
584
  opacity: 1;
587
585
  }
@@ -717,5 +715,9 @@ div[class*='design-editor_tab_block_container__'] {
717
715
  &::-webkit-scrollbar {
718
716
  width: 4px;
719
717
  height: 4px;
718
+
719
+ &:hover {
720
+ width: 10px;
721
+ }
720
722
  }
721
723
  }
@@ -35,6 +35,9 @@
35
35
  &::-webkit-scrollbar {
36
36
  width: 4px;
37
37
  margin: 20px;
38
+ &:hover {
39
+ width: 10px;
40
+ }
38
41
  }
39
42
  }
40
43
 
@@ -146,9 +149,15 @@ html {
146
149
 
147
150
  .vertical {
148
151
  width: 4px !important;
152
+ &:hover {
153
+ width: 10px !important;
154
+ }
149
155
 
150
156
  .slider {
151
157
  width: 4px !important;
158
+ &:hover {
159
+ width: 10px !important;
160
+ }
152
161
  left: unset !important;
153
162
  right: 0;
154
163
  border-radius: 4px !important;
@@ -157,10 +166,15 @@ html {
157
166
 
158
167
  .horizontal {
159
168
  height: 4px !important;
160
-
169
+ &:hover {
170
+ height: 10px !important;
171
+ }
161
172
  .slider {
162
173
  border-radius: 4px !important;
163
174
  height: 4px !important;
175
+ &:hover {
176
+ height: 10px !important;
177
+ }
164
178
  }
165
179
  }
166
180
  }
@@ -175,6 +189,9 @@ html {
175
189
  .xterm .xterm-viewport {
176
190
  &::-webkit-scrollbar {
177
191
  width: 4px;
192
+ &:hover {
193
+ width: 10px;
194
+ }
178
195
  }
179
196
  }
180
197
 
@@ -280,6 +297,9 @@ html {
280
297
 
281
298
  &::-webkit-scrollbar {
282
299
  width: 4px !important;
300
+ &:hover {
301
+ width: 10px;
302
+ }
283
303
  }
284
304
  }
285
305
  }
@@ -295,7 +315,7 @@ html {
295
315
  }
296
316
 
297
317
  /**
298
- * layout 面板
318
+ * layout 面板
299
319
  **/
300
320
  .design-slot_resize_horizontal {
301
321
  width: 2px;
@@ -0,0 +1,4 @@
1
+ export declare const DESIGN_MENUBAR_CONTAINER_VIEW_ID = "design_menubar";
2
+ export declare const DESIGN_MENU_BAR_RIGHT = "design_menu_bar_right";
3
+ export declare const DESIGN_MENU_BAR_LEFT = "design_menu_bar_left";
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,mBAAmB,CAAC;AACjE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DESIGN_MENU_BAR_LEFT = exports.DESIGN_MENU_BAR_RIGHT = exports.DESIGN_MENUBAR_CONTAINER_VIEW_ID = void 0;
4
+ exports.DESIGN_MENUBAR_CONTAINER_VIEW_ID = 'design_menubar';
5
+ exports.DESIGN_MENU_BAR_RIGHT = 'design_menu_bar_right';
6
+ exports.DESIGN_MENU_BAR_LEFT = 'design_menu_bar_left';
7
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG,gBAAgB,CAAC;AACpD,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAChD,QAAA,oBAAoB,GAAG,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./constants"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B"}
package/lib/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from './common';
1
2
  //# sourceMappingURL=index.d.ts.map
@@ -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":"AAAA,cAAc,UAAU,CAAC"}
package/lib/index.js CHANGED
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./common"), exports);
2
5
  //# 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":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensumi/ide-design",
3
- "version": "2.27.3-rc-1713855854.0",
3
+ "version": "2.27.3-rc-1714367598.0",
4
4
  "files": [
5
5
  "lib",
6
6
  "src"
@@ -19,12 +19,12 @@
19
19
  "url": "git@github.com:opensumi/core.git"
20
20
  },
21
21
  "dependencies": {
22
- "@opensumi/ide-core-common": "2.27.3-rc-1713855854.0",
23
- "@opensumi/ide-core-node": "2.27.3-rc-1713855854.0"
22
+ "@opensumi/ide-core-common": "2.27.3-rc-1714367598.0",
23
+ "@opensumi/ide-core-node": "2.27.3-rc-1714367598.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@opensumi/ide-core-browser": "2.27.3-rc-1713855854.0",
27
- "@opensumi/ide-dev-tool": "2.27.3-rc-1713855854.0"
26
+ "@opensumi/ide-core-browser": "2.27.3-rc-1714367598.0",
27
+ "@opensumi/ide-dev-tool": "2.27.3-rc-1714367598.0"
28
28
  },
29
- "gitHead": "5d54570c10c2130db6590717fb701147cd7102ef"
29
+ "gitHead": "ec0fc77694997fa304e16d988886fbe2a0f15768"
30
30
  }
@@ -1,15 +1,18 @@
1
1
  import { Autowired, Injectable } from '@opensumi/di';
2
2
  import {
3
+ AppConfig,
3
4
  ClientAppContribution,
4
5
  Domain,
5
6
  SlotLocation,
6
7
  SlotRendererContribution,
7
8
  SlotRendererRegistry,
8
9
  } from '@opensumi/ide-core-browser';
10
+ import { DesignLayoutConfig, LayoutViewSizeConfig } from '@opensumi/ide-core-browser/lib/layout/constants';
9
11
  import { Schemes } from '@opensumi/ide-core-common';
10
12
  import { IFileServiceClient } from '@opensumi/ide-file-service';
11
13
  import { FileServiceClient } from '@opensumi/ide-file-service/lib/browser/file-service-client';
12
14
 
15
+ import { DesignMenubarLayoutConfig } from './layout/layout-config';
13
16
  import { DesignBottomTabRenderer, DesignLeftTabRenderer, DesignRightTabRenderer } from './layout/tabbar.view';
14
17
  import { DesignThemeFileSystemProvider } from './theme/file-system.provider';
15
18
 
@@ -22,8 +25,34 @@ export class DesignCoreContribution implements ClientAppContribution, SlotRender
22
25
  @Autowired()
23
26
  private readonly designThemeFileSystemProvider: DesignThemeFileSystemProvider;
24
27
 
25
- async initialize() {
28
+ @Autowired(AppConfig)
29
+ private appConfig: AppConfig;
30
+
31
+ @Autowired(LayoutViewSizeConfig)
32
+ private layoutViewSize: LayoutViewSizeConfig;
33
+
34
+ @Autowired(DesignLayoutConfig)
35
+ private designLayoutConfig: DesignLayoutConfig;
36
+
37
+ initialize() {
38
+ const { useMenubarView } = this.designLayoutConfig;
39
+
26
40
  this.fileSystem.registerProvider(Schemes.design, this.designThemeFileSystemProvider);
41
+ let layoutConfig = this.appConfig.layoutConfig;
42
+
43
+ if (useMenubarView) {
44
+ this.layoutViewSize.setMenubarHeight(48);
45
+ layoutConfig = {
46
+ ...layoutConfig,
47
+ ...DesignMenubarLayoutConfig,
48
+ };
49
+ }
50
+
51
+ this.layoutViewSize.setEditorTabsHeight(36);
52
+ this.layoutViewSize.setStatusBarHeight(36);
53
+ this.layoutViewSize.setAccordionHeaderSizeHeight(36);
54
+
55
+ this.appConfig.layoutConfig = layoutConfig;
27
56
  }
28
57
 
29
58
  registerRenderer(registry: SlotRendererRegistry): void {
@@ -15,6 +15,7 @@ import { IThemeContribution, IThemeService, IThemeStore } from '@opensumi/ide-th
15
15
  import { ThemeStore } from '@opensumi/ide-theme/lib/browser/theme-store';
16
16
 
17
17
  import { DesignCoreContribution } from './design.contribution';
18
+ import { DesignMenuBarContribution } from './menu-bar/menu-bar.contribution';
18
19
  import { DesignEditorTabService } from './override/editor-tab.service';
19
20
  import { DesignBrowserCtxMenuService } from './override/menu.service';
20
21
  import { DesignSplitPanelService } from './override/split-panel.service';
@@ -24,7 +25,7 @@ import lightTheme from './theme/light-theme';
24
25
 
25
26
  @Injectable()
26
27
  export class DesignModule extends BrowserModule {
27
- providers: Provider[] = [DesignCoreContribution];
28
+ providers: Provider[] = [DesignMenuBarContribution, DesignCoreContribution];
28
29
 
29
30
  preferences = (injector: Injector) => {
30
31
  import('./style/global.less');
@@ -0,0 +1,9 @@
1
+ import { SlotLocation } from '@opensumi/ide-core-browser';
2
+
3
+ import { DESIGN_MENUBAR_CONTAINER_VIEW_ID } from '../../common';
4
+
5
+ export const DesignMenubarLayoutConfig = {
6
+ [SlotLocation.top]: {
7
+ modules: [DESIGN_MENUBAR_CONTAINER_VIEW_ID],
8
+ },
9
+ };
@@ -0,0 +1 @@
1
+ <svg id="layer_1" data-name="layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 86.97 78.11"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#fc3d50;}</style></defs><path d="M64.89,27.54A53.23,53.23,0,0,0,42.64,6.24C39.4,4.54,35.92,4.7,32,5.05c-2.73.25-5.19.15-11.76-.11l-1,0a6.15,6.15,0,0,0-5.43,2.29c-3,3.87-2,11.34-1,14.75,2.83,9.74,8,18.45,14.5,24.53a60.15,60.15,0,0,0,6.17,5C38,54.67,45,58.58,52.4,59l.8,0a16.12,16.12,0,0,0,14.58-9.23C71.46,41.77,67.55,32.41,64.89,27.54Z"/><path class="cls-1" d="M10.05,58.75c-3.83,0-6.49-1.22-7.9-3.61C-1.2,49.47,9.22,39.08,13.86,34.88l1.67-1.51,1,1.51A14.51,14.51,0,0,0,18.07,37L19,38l-1.21,1.29c-4.74,5-5.44,7.92-5.16,8.4.57,1,2.14,1.17,3.35,1.17a19.18,19.18,0,0,0,4.09-.53c1-.23,2-.48,3.05-.76.75-.2,1.49-.42,2.23-.64A91,91,0,0,0,50.13,35.5c0-.06,0-.12,0-.18a6.55,6.55,0,0,1,5.76-7.26,6.36,6.36,0,0,1,3.22.43c1-.89,1.92-1.8,2.81-2.72,2.15-2.18,4.9-5.63,5.88-9.61a1.6,1.6,0,0,0-.08-1.34c-.38-.48-1.53-.76-3.08-.76A30.62,30.62,0,0,0,57,15.34l-1.19.36-.64-.76a14.07,14.07,0,0,0-2-1.91l-2-1.61,3-1.2C61,7.47,67,6,71.37,6c5,0,7.19,1.89,8.12,3.47a5.92,5.92,0,0,1,.36,4.69c-1.31,4.88-7.69,12.32-16.73,19.55l0,.1a6.55,6.55,0,0,1-5.77,7.26,6.61,6.61,0,0,1-.76.05,6.47,6.47,0,0,1-2.84-.66c-2,1.27-3.94,2.49-5.92,3.63C35.31,51.31,24.38,56.1,16.22,58A28.15,28.15,0,0,1,10.05,58.75Z"/><path d="M71.38,7.51c3.38,0,5.74.91,6.82,2.74a4.51,4.51,0,0,1,.21,3.53c-1.23,4.53-7.55,12-16.95,19.34a5.05,5.05,0,0,1-4.26,6.47,3.9,3.9,0,0,1-.59,0,5,5,0,0,1-2.89-.92c-2.11,1.4-4.32,2.77-6.62,4.09C34,50.33,23.43,54.78,15.89,56.49a27.13,27.13,0,0,1-5.84.76c-3.27,0-5.48-1-6.61-2.87C1.54,51.15,5.91,44.11,14.87,36l.35-.31A16.31,16.31,0,0,0,17,38l-.25.26c-4.31,4.59-6.37,8.49-5.36,10.19.75,1.27,2.33,1.91,4.64,1.91a20.42,20.42,0,0,0,4.42-.57c1-.24,2.08-.49,3.11-.77.76-.21,1.52-.42,2.27-.65a92.24,92.24,0,0,0,26-12.19,5,5,0,0,1,4.22-6.62,3.77,3.77,0,0,1,.58,0,5,5,0,0,1,2.7.79C60.58,29.18,61.8,28,63,26.82c2.74-2.8,5.3-6.41,6.26-10.3.75-3.09-1.66-4-4.62-4a32.59,32.59,0,0,0-8.08,1.34l-.25.08A15.56,15.56,0,0,0,54,11.86l.62-.25c6.81-2.72,12.54-4.1,16.72-4.1m0-3C66.77,4.51,60.6,6,53.55,8.83l-.62.25L48.18,11l4,3.21A13.73,13.73,0,0,1,54,15.91l1.27,1.51,1.89-.57.25-.08a29.1,29.1,0,0,1,7.21-1.21,6.53,6.53,0,0,1,1.72.18l0,.06a20.5,20.5,0,0,1-5.49,8.92c-.67.7-1.38,1.39-2.11,2.07a8.16,8.16,0,0,0-2.09-.28,7.26,7.26,0,0,0-.93.06,8,8,0,0,0-7.13,8.17A90.11,90.11,0,0,1,25,45.49l-2.2.62c-1,.27-2,.52-3,.75a18,18,0,0,1-3.75.49,4.45,4.45,0,0,1-1.83-.28c.25-.91,1.38-3.2,4.73-6.76l.25-.27,1.92-2-1.9-2a12.73,12.73,0,0,1-1.42-1.87l-1.9-3-2.65,2.4-.35.32C-.64,46-1.12,52.56.86,55.9c1.17,2,3.71,4.35,9.19,4.35a30,30,0,0,0,6.51-.83c8.3-1.89,19.38-6.73,32-14,1.77-1,3.56-2.11,5.32-3.24a7.93,7.93,0,0,0,2.69.47,7.26,7.26,0,0,0,.93-.06,8.06,8.06,0,0,0,7.14-8.18C73.75,27,79.92,19.69,81.3,14.56a7.39,7.39,0,0,0-.51-5.84C79.65,6.8,77.1,4.51,71.38,4.51Z"/><path class="cls-1" d="M25,48.8C17.71,42,12,32.37,8.85,21.57,7.74,17.73,6.54,9.24,10,4.64a7.73,7.73,0,0,1,6.47-3.07h.46l1.13,0c4.35.17,7,.28,9,.28,1.35,0,2.43,0,3.6-.15,1.43-.13,3-.26,4.48-.26a15.94,15.94,0,0,1,7.71,1.68A60.3,60.3,0,0,1,65.47,23.31l.63,1-.77.85c-1,1.11-2.11,2.25-3.31,3.38l-1.34,1.25-1-1.55A52.53,52.53,0,0,0,39.39,9.8,8.72,8.72,0,0,0,35.17,9c-1.21,0-2.54.12-3.8.23s-2.71.18-4.28.18c-2.21,0-4.9-.11-9.36-.29l-1.25,0a1.53,1.53,0,0,0-.5,0c-.08.13-.79,1.17-.8,4.19A23.52,23.52,0,0,0,16,19.48c2.77,9.52,7.75,18,14,23.85.55.52,1.14,1,1.74,1.55l1.85,1.57-2.23.95c-1.68.73-3.29,1.36-4.77,1.88l-.86.3Z"/><path d="M35.17,3a14.67,14.67,0,0,1,7,1.5,58.7,58.7,0,0,1,22,19.62Q62.79,25.73,61,27.41A53.87,53.87,0,0,0,40.09,8.47a10.24,10.24,0,0,0-4.92-1c-1.27,0-2.64.12-3.94.24s-2.61.17-4.14.17c-2.18,0-4.87-.11-9.32-.29l-1.08,0h-.21c-1.1,0-1.44.33-1.7.67s-1.09,1.81-1.1,5.06a25.11,25.11,0,0,0,.92,6.61c2.84,9.78,8,18.49,14.44,24.53.58.54,1.18,1.07,1.8,1.6-1.69.72-3.24,1.33-4.68,1.84L26,47.71c-7.54-7-12.84-16.72-15.7-26.56C8.65,15.5,7.64,3.07,16.48,3.07h.39c5,.2,8,.33,10.22.33,1.4,0,2.54-.05,3.73-.16C32.28,3.12,33.73,3,35.17,3m0-3C33.58,0,32,.13,30.55.26a33.81,33.81,0,0,1-3.46.15c-2,0-4.66-.11-9-.28L17,.08h-.51A9.2,9.2,0,0,0,8.8,3.74C5,8.8,6.14,17.59,7.41,22,10.63,33,16.49,43,23.94,49.9l.13.12.05,0,1.33,1.23,1.71-.6c1.51-.54,3.15-1.18,4.86-1.92l4.45-1.91-3.69-3.13c-.62-.53-1.17-1-1.69-1.5C25,36.56,20.17,28.33,17.48,19.06a22.06,22.06,0,0,1-.8-5.76,10.27,10.27,0,0,1,.3-2.73l.67,0c4.49.18,7.2.29,9.44.29,1.62,0,3-.06,4.41-.19,1.23-.11,2.52-.22,3.67-.22a7.35,7.35,0,0,1,3.52.65A50.88,50.88,0,0,1,58.44,29l1.93,3.11L63,29.6c1.24-1.17,2.39-2.34,3.41-3.48L68,24.41l-1.25-1.92A61.78,61.78,0,0,0,43.57,1.85,17.4,17.4,0,0,0,35.17,0Z"/><path class="cls-1" d="M81.4,74.71C79,73.93,67,69.9,64.21,67.16a8.37,8.37,0,0,1,3.74-14,8.19,8.19,0,0,1,2.15-.28A8.42,8.42,0,0,1,76,55.34c2.72,2.72,6.76,14.8,7.54,17.19l1,3.23Z"/><path d="M70.1,54.37a6.92,6.92,0,0,1,4.88,2c2.6,2.6,7,16,7.18,16.6l.14.42-.43-.14c-.57-.18-14-4.58-16.6-7.18a6.86,6.86,0,0,1,3.07-11.5,7,7,0,0,1,1.76-.23m0-3a9.86,9.86,0,0,0-6.94,16.86C66,71.05,76.53,74.7,80.94,76.14l.43.14L87,78.11,85.15,72.5,85,72.07c-1.44-4.42-5.1-15-7.91-17.79a9.92,9.92,0,0,0-7-2.91Z"/><path class="cls-2" d="M68.85,64.44a3.22,3.22,0,1,1,4.56-4.56c1.26,1.26,5.47,10,5.47,10s-8.77-4.21-10-5.47Zm0,0"/><path class="cls-1" d="M53.88,62.73l-.94,0c-8.35-.43-16.11-4.79-21.15-8.38-.63-.45-1.25-.9-1.86-1.37l-2-1.54,2.34-1c1.47-.64,3-1.36,4.61-2.13l.8-.38.72.51c7.56,5.33,13.39,6.66,17,6.84l.56,0a11.27,11.27,0,0,0,6-1.75A10.73,10.73,0,0,0,64,48.9a14.34,14.34,0,0,0,.73-8.61A31.32,31.32,0,0,0,62.32,33L61.84,32l.9-.73c1.2-1,2.36-2,3.46-3l1.47-1.35.88,1.79C71.61,34.91,74.47,44,70.77,52A18.61,18.61,0,0,1,53.88,62.73Z"/><path d="M67.21,29.37c3.3,6.7,5.42,15,2.19,22a17.16,17.16,0,0,1-15.52,9.83l-.86,0c-7.29-.37-14.52-4-20.36-8.1l-1.82-1.34q2.21-1,4.65-2.15c7.84,5.52,14,6.92,17.76,7.11l.63,0a12.79,12.79,0,0,0,6.8-2,12.24,12.24,0,0,0,4.65-5.24,15.76,15.76,0,0,0,.84-9.5,32.3,32.3,0,0,0-2.48-7.62c1.24-1,2.41-2,3.52-3m.92-4.91-2.95,2.69c-1.07,1-2.22,2-3.4,2.94L60,31.55l1,2.1a30.18,30.18,0,0,1,2.26,6.91,12.9,12.9,0,0,1-.61,7.71,9.26,9.26,0,0,1-3.52,4,9.81,9.81,0,0,1-5.21,1.52H53.4c-3.37-.18-8.91-1.45-16.18-6.58l-1.44-1-1.59.76c-1.58.76-3.11,1.47-4.56,2.11L25,51.08,29,54.16c.62.47,1.26.94,1.89,1.39,5.2,3.7,13.23,8.21,21.95,8.65.33,0,.67,0,1,0A20.1,20.1,0,0,0,72.13,52.66c4-8.57,1-18.12-2.23-24.62l-1.77-3.58Z"/><path class="cls-1" d="M25.56,14.26a17.41,17.41,0,0,1-8-1.66.72.72,0,0,1-.29-1,.71.71,0,0,1,1-.28c.1.05,7.38,3.87,18.43-1.11a.71.71,0,0,1,1,.36.71.71,0,0,1-.36.95A28.35,28.35,0,0,1,25.56,14.26Z"/><path class="cls-1" d="M78.2,10.25C75.79,6.16,67,6.68,54.66,11.61l-.62.25A15.56,15.56,0,0,1,56.29,14l.25-.08c2.58-.77,14.24-3.68,12.7,2.62-1,3.89-3.52,7.5-6.26,10.3-1.18,1.21-2.4,2.36-3.65,3.48a5,5,0,0,0-7.5,5.87,92.24,92.24,0,0,1-26,12.19c-.75.23-1.51.44-2.27.65-1,.28-2.07.53-3.11.77-4.77,1.08-7.91.62-9.06-1.34-1-1.7,1.05-5.6,5.36-10.19L17,38a15.59,15.59,0,0,1-1.75-2.31l-.35.31c-9,8.12-13.33,15.16-11.43,18.39,1.13,1.91,3.34,2.87,6.61,2.87a27.13,27.13,0,0,0,5.84-.76C23.43,54.78,34,50.33,47.1,42.8c2.3-1.32,4.51-2.69,6.62-4.09a5,5,0,0,0,2.89.92,3.9,3.9,0,0,0,.59,0,5,5,0,0,0,4.26-6.47c9.4-7.39,15.72-14.81,16.95-19.34A4.51,4.51,0,0,0,78.2,10.25Z"/></svg>
@@ -0,0 +1,48 @@
1
+ import { Autowired } from '@opensumi/di';
2
+ import { ComponentContribution, ComponentRegistry, Disposable, Domain } from '@opensumi/ide-core-browser';
3
+ import { IMenuRegistry, IMenubarItem, ISubmenuItem, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
4
+ import { MenubarStore } from '@opensumi/ide-menu-bar/lib/browser/menu-bar.store';
5
+
6
+ import { DESIGN_MENUBAR_CONTAINER_VIEW_ID } from '../../common';
7
+
8
+ import { DesignMenuBarView } from './menu-bar.view';
9
+
10
+ @Domain(ComponentContribution)
11
+ export class DesignMenuBarContribution extends Disposable implements ComponentContribution {
12
+ @Autowired(MenubarStore)
13
+ private readonly menubarStore: MenubarStore;
14
+
15
+ @Autowired(IMenuRegistry)
16
+ private readonly menuRegistry: IMenuRegistry;
17
+
18
+ constructor() {
19
+ super();
20
+
21
+ this.menubarStore.unregisterMenusBarByCompact(MenuId.DesignMenuBarTopExtra);
22
+
23
+ this.addDispose(
24
+ this.menubarStore.onDidMenuBarChange((menubarItems: IMenubarItem[]) => {
25
+ this.menuRegistry.registerMenuItems(
26
+ MenuId.DesignMenuBarTopExtra,
27
+ menubarItems.map(
28
+ (item: IMenubarItem) =>
29
+ ({
30
+ label: item.label,
31
+ submenu: item.id,
32
+ iconClass: item.iconClass,
33
+ group: '1_navigation',
34
+ order: 100,
35
+ } as ISubmenuItem),
36
+ ),
37
+ );
38
+ }),
39
+ );
40
+ }
41
+
42
+ registerComponent(registry: ComponentRegistry): void {
43
+ registry.register(DESIGN_MENUBAR_CONTAINER_VIEW_ID, {
44
+ component: DesignMenuBarView,
45
+ id: DESIGN_MENUBAR_CONTAINER_VIEW_ID,
46
+ });
47
+ }
48
+ }
@@ -0,0 +1,107 @@
1
+ .menu_bar_view {
2
+ display: flex;
3
+ background-color: var(--kt-menubar-background);
4
+ align-items: center;
5
+ width: 100%;
6
+
7
+ .container {
8
+ display: flex;
9
+ justify-content: space-between;
10
+ width: inherit;
11
+ align-items: center;
12
+ padding: 0 12px 0 8px;
13
+
14
+ .left {
15
+ display: flex;
16
+ align-items: center;
17
+ z-index: 2;
18
+
19
+ .enhance_menu {
20
+ padding: 8px;
21
+ }
22
+
23
+ .dividing {
24
+ margin-left: 5px;
25
+ width: 2px;
26
+ height: 12px;
27
+ background-color: var(--editorGroup-border);
28
+ }
29
+
30
+ .top_menus_bar {
31
+ margin-left: 6px;
32
+ display: flex;
33
+ align-items: center;
34
+ border-radius: 6px;
35
+
36
+ .ai_enhance_menu {
37
+ padding: 8px 6px;
38
+ height: 32px;
39
+ }
40
+
41
+ .caret_icon {
42
+ font-size: 14px;
43
+ margin-left: 4px;
44
+ }
45
+
46
+ .logo_container {
47
+ display: flex;
48
+ align-items: center;
49
+
50
+ .extra_top_icon {
51
+ width: 16px;
52
+ height: 16px;
53
+ background-repeat: no-repeat;
54
+ background-size: 100%;
55
+
56
+ &::before {
57
+ content: initial;
58
+ }
59
+
60
+ &:hover {
61
+ background-color: transparent;
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+
68
+ .center {
69
+ text-align: center;
70
+ position: absolute;
71
+ left: 0;
72
+ right: 0;
73
+ z-index: 1;
74
+
75
+ .run {
76
+ .btn {
77
+ border-radius: 6px;
78
+ padding: 0 13px 0 11px;
79
+ border: 0;
80
+ }
81
+ span {
82
+ color: #58ce5f;
83
+ font-size: 12px;
84
+ }
85
+ }
86
+ }
87
+
88
+ .right {
89
+ display: flex;
90
+ align-items: center;
91
+ z-index: 2;
92
+
93
+ .input {
94
+ margin-right: 16px;
95
+ width: 240px;
96
+ flex-shrink: 0;
97
+
98
+ .input_wrapper {
99
+ height: 32px;
100
+ background-color: var(--design-borderColor-common);
101
+ border-radius: 8px;
102
+ border: 1px solid var(--design-input-foreground);
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,136 @@
1
+ import cls from 'classnames';
2
+ import * as React from 'react';
3
+
4
+ import { AINativeConfigService, SlotLocation, SlotRenderer, getIcon, useInjectable } from '@opensumi/ide-core-browser';
5
+ import { Icon } from '@opensumi/ide-core-browser/lib/components';
6
+ import { EnhanceIcon } from '@opensumi/ide-core-browser/lib/components/ai-native';
7
+ import { DesignLayoutConfig } from '@opensumi/ide-core-browser/lib/layout/constants';
8
+ import { VIEW_CONTAINERS } from '@opensumi/ide-core-browser/lib/layout/view-id';
9
+ import { AbstractContextMenuService, ICtxMenuRenderer, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
10
+ import { CommandService } from '@opensumi/ide-core-common';
11
+ import { IMainLayoutService } from '@opensumi/ide-main-layout';
12
+
13
+ import { DESIGN_MENU_BAR_LEFT, DESIGN_MENU_BAR_RIGHT } from '../../common';
14
+
15
+ import OpenSumiLogo from './logo.svg';
16
+ import styles from './menu-bar.module.less';
17
+
18
+ const DesignMenuBarRender = () => {
19
+ const contextmenuService = useInjectable<AbstractContextMenuService>(AbstractContextMenuService);
20
+ const designLayoutConfig = useInjectable<DesignLayoutConfig>(DesignLayoutConfig);
21
+ const ctxMenuRenderer = useInjectable<ICtxMenuRenderer>(ICtxMenuRenderer);
22
+
23
+ const iconRef = React.useRef<HTMLDivElement | null>(null);
24
+ const [anchor, setAnchor] = React.useState<{ x: number; y: number } | undefined>(undefined);
25
+
26
+ React.useEffect(() => {
27
+ if (iconRef.current) {
28
+ const rect = iconRef.current.getBoundingClientRect();
29
+ const { x, y, height } = rect;
30
+
31
+ setAnchor({
32
+ x,
33
+ y: y + height + 4,
34
+ });
35
+ }
36
+ }, []);
37
+
38
+ const extraTopMenus = React.useMemo(
39
+ () =>
40
+ contextmenuService.createMenu({
41
+ id: MenuId.DesignMenuBarTopExtra,
42
+ }),
43
+ [contextmenuService],
44
+ );
45
+
46
+ const handleClick = React.useCallback(() => {
47
+ if (!anchor) {
48
+ return;
49
+ }
50
+
51
+ const menuNodes = extraTopMenus.getMergedMenuNodes();
52
+ extraTopMenus.dispose();
53
+
54
+ ctxMenuRenderer.show({
55
+ anchor,
56
+ menuNodes,
57
+ });
58
+ }, [anchor, extraTopMenus]);
59
+
60
+ const logo = React.useMemo(() => designLayoutConfig.menubarLogo || OpenSumiLogo, [designLayoutConfig.menubarLogo]);
61
+
62
+ return (
63
+ <>
64
+ <EnhanceIcon wrapperClassName={styles.ai_enhance_menu} ref={iconRef} onClick={handleClick}>
65
+ <div className={styles.logo_container}>
66
+ <img className={styles.extra_top_icon} src={logo} alt='' />
67
+ <Icon className={cls(getIcon('down'), styles.caret_icon)} />
68
+ </div>
69
+ </EnhanceIcon>
70
+ </>
71
+ );
72
+ };
73
+
74
+ export const DesignMenuBarView = () => {
75
+ const commandService = useInjectable<CommandService>(CommandService);
76
+ const mainLayoutService = useInjectable<IMainLayoutService>(IMainLayoutService);
77
+ const aiNativeConfigService = useInjectable<AINativeConfigService>(AINativeConfigService);
78
+ const [isLeftPanelVisible, setIsVisiablePanel] = React.useState<boolean>(false);
79
+
80
+ React.useEffect(() => {
81
+ requestAnimationFrame(() => {
82
+ setIsVisiablePanel(isVisiable());
83
+ });
84
+
85
+ const tabbarService = mainLayoutService.getTabbarService(SlotLocation.left);
86
+ const toDispose = tabbarService.onCurrentChange(({ previousId, currentId }) => {
87
+ if (previousId && !currentId) {
88
+ setIsVisiablePanel(false);
89
+ } else if (!previousId && currentId) {
90
+ setIsVisiablePanel(true);
91
+ }
92
+ });
93
+
94
+ return () => {
95
+ toDispose.dispose();
96
+ };
97
+ }, []);
98
+
99
+ const handleLeftMenuVisiable = React.useCallback(() => {
100
+ commandService.executeCommand('main-layout.left-panel.toggle');
101
+ requestAnimationFrame(() => {
102
+ setIsVisiablePanel(isVisiable());
103
+ });
104
+ }, []);
105
+
106
+ const isVisiable = React.useCallback(() => {
107
+ const tabbarService = mainLayoutService.getTabbarService(SlotLocation.left);
108
+ return !!tabbarService.currentContainerId;
109
+ }, [mainLayoutService]);
110
+
111
+ return (
112
+ <div
113
+ id={VIEW_CONTAINERS.MENUBAR}
114
+ className={styles.menu_bar_view}
115
+ style={{ height: aiNativeConfigService.layoutViewSize.menubarHeight }}
116
+ >
117
+ <div className={styles.container}>
118
+ <div className={styles.left}>
119
+ <EnhanceIcon
120
+ wrapperClassName={styles.enhance_menu}
121
+ icon={isLeftPanelVisible ? 'left-nav-open' : 'left-nav-close'}
122
+ onClick={handleLeftMenuVisiable}
123
+ />
124
+ <span className={styles.dividing}></span>
125
+ <div className={styles.top_menus_bar}>
126
+ <DesignMenuBarRender />
127
+ </div>
128
+ <SlotRenderer slot={DESIGN_MENU_BAR_LEFT} flex={1} overflow={'initial'} />
129
+ </div>
130
+ <div className={styles.right}>
131
+ <SlotRenderer slot={DESIGN_MENU_BAR_RIGHT} flex={1} overflow={'initial'} />
132
+ </div>
133
+ </div>
134
+ </div>
135
+ );
136
+ };
@@ -97,6 +97,9 @@
97
97
  }
98
98
 
99
99
  &:not(.disabled):hover {
100
+ background: var(--menu-selectionBackground) !important;
101
+ color: var(--menu-selectionForeground) !important;
102
+
100
103
  .shortcut {
101
104
  color: var(--menu-selectionForeground);
102
105
  }
@@ -310,10 +310,6 @@ div[class*='design-editor_tab_block_container__'] {
310
310
  * ---------------- Override editor panel bottom tabbar style ---------------------
311
311
  */
312
312
  :global(.design_bottom_slot) {
313
- .design-tab_bar {
314
- height: 100%;
315
- }
316
-
317
313
  .design-tab_panel {
318
314
  &::before {
319
315
  content: none;
@@ -327,7 +323,6 @@ div[class*='design-editor_tab_block_container__'] {
327
323
 
328
324
  .design-bottom_bar_container {
329
325
  width: 100%;
330
- height: 32px;
331
326
  }
332
327
 
333
328
  .design-variable_repl_bar {
@@ -541,6 +536,9 @@ div[class*='design-editor_tab_block_container__'] {
541
536
 
542
537
  &::-webkit-scrollbar {
543
538
  width: 4px;
539
+ &:hover {
540
+ width: 10px;
541
+ }
544
542
  }
545
543
  }
546
544
 
@@ -580,8 +578,8 @@ div[class*='design-editor_tab_block_container__'] {
580
578
  }
581
579
 
582
580
  &:hover {
583
- color: var(--design-text-hoverForeground);
584
- background-color: var(--activityBar-activeBorder);
581
+ background-color: var(--badge-background);
582
+ color: var(--badge-foreground);
585
583
  border-radius: 4px;
586
584
  opacity: 1;
587
585
  }
@@ -717,5 +715,9 @@ div[class*='design-editor_tab_block_container__'] {
717
715
  &::-webkit-scrollbar {
718
716
  width: 4px;
719
717
  height: 4px;
718
+
719
+ &:hover {
720
+ width: 10px;
721
+ }
720
722
  }
721
723
  }
@@ -35,6 +35,9 @@
35
35
  &::-webkit-scrollbar {
36
36
  width: 4px;
37
37
  margin: 20px;
38
+ &:hover {
39
+ width: 10px;
40
+ }
38
41
  }
39
42
  }
40
43
 
@@ -146,9 +149,15 @@ html {
146
149
 
147
150
  .vertical {
148
151
  width: 4px !important;
152
+ &:hover {
153
+ width: 10px !important;
154
+ }
149
155
 
150
156
  .slider {
151
157
  width: 4px !important;
158
+ &:hover {
159
+ width: 10px !important;
160
+ }
152
161
  left: unset !important;
153
162
  right: 0;
154
163
  border-radius: 4px !important;
@@ -157,10 +166,15 @@ html {
157
166
 
158
167
  .horizontal {
159
168
  height: 4px !important;
160
-
169
+ &:hover {
170
+ height: 10px !important;
171
+ }
161
172
  .slider {
162
173
  border-radius: 4px !important;
163
174
  height: 4px !important;
175
+ &:hover {
176
+ height: 10px !important;
177
+ }
164
178
  }
165
179
  }
166
180
  }
@@ -175,6 +189,9 @@ html {
175
189
  .xterm .xterm-viewport {
176
190
  &::-webkit-scrollbar {
177
191
  width: 4px;
192
+ &:hover {
193
+ width: 10px;
194
+ }
178
195
  }
179
196
  }
180
197
 
@@ -280,6 +297,9 @@ html {
280
297
 
281
298
  &::-webkit-scrollbar {
282
299
  width: 4px !important;
300
+ &:hover {
301
+ width: 10px;
302
+ }
283
303
  }
284
304
  }
285
305
  }
@@ -295,7 +315,7 @@ html {
295
315
  }
296
316
 
297
317
  /**
298
- * layout 面板
318
+ * layout 面板
299
319
  **/
300
320
  .design-slot_resize_horizontal {
301
321
  width: 2px;
@@ -0,0 +1,3 @@
1
+ export const DESIGN_MENUBAR_CONTAINER_VIEW_ID = 'design_menubar';
2
+ export const DESIGN_MENU_BAR_RIGHT = 'design_menu_bar_right';
3
+ export const DESIGN_MENU_BAR_LEFT = 'design_menu_bar_left';
@@ -0,0 +1 @@
1
+ export * from './constants';
package/src/index.ts CHANGED
@@ -0,0 +1 @@
1
+ export * from './common';