@opensumi/ide-main-layout 2.12.1-next-079c1930

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 (80) hide show
  1. package/README.md +296 -0
  2. package/lib/browser/accordion/accordion.service.d.ts +85 -0
  3. package/lib/browser/accordion/accordion.service.d.ts.map +1 -0
  4. package/lib/browser/accordion/accordion.service.js +538 -0
  5. package/lib/browser/accordion/accordion.service.js.map +1 -0
  6. package/lib/browser/accordion/accordion.view.d.ts +19 -0
  7. package/lib/browser/accordion/accordion.view.d.ts.map +1 -0
  8. package/lib/browser/accordion/accordion.view.js +43 -0
  9. package/lib/browser/accordion/accordion.view.js.map +1 -0
  10. package/lib/browser/accordion/section.view.d.ts +24 -0
  11. package/lib/browser/accordion/section.view.d.ts.map +1 -0
  12. package/lib/browser/accordion/section.view.js +58 -0
  13. package/lib/browser/accordion/section.view.js.map +1 -0
  14. package/lib/browser/accordion/styles.module.less +189 -0
  15. package/lib/browser/accordion/titlebar.view.d.ts +6 -0
  16. package/lib/browser/accordion/titlebar.view.d.ts.map +1 -0
  17. package/lib/browser/accordion/titlebar.view.js +13 -0
  18. package/lib/browser/accordion/titlebar.view.js.map +1 -0
  19. package/lib/browser/default-config.d.ts +3 -0
  20. package/lib/browser/default-config.d.ts.map +1 -0
  21. package/lib/browser/default-config.js +32 -0
  22. package/lib/browser/default-config.js.map +1 -0
  23. package/lib/browser/index.d.ts +7 -0
  24. package/lib/browser/index.d.ts.map +1 -0
  25. package/lib/browser/index.js +52 -0
  26. package/lib/browser/index.js.map +1 -0
  27. package/lib/browser/input/index.d.ts +6 -0
  28. package/lib/browser/input/index.d.ts.map +1 -0
  29. package/lib/browser/input/index.js +33 -0
  30. package/lib/browser/input/index.js.map +1 -0
  31. package/lib/browser/layout.service.d.ts +58 -0
  32. package/lib/browser/layout.service.d.ts.map +1 -0
  33. package/lib/browser/layout.service.js +431 -0
  34. package/lib/browser/layout.service.js.map +1 -0
  35. package/lib/browser/main-layout.contribution.d.ts +41 -0
  36. package/lib/browser/main-layout.contribution.d.ts.map +1 -0
  37. package/lib/browser/main-layout.contribution.js +304 -0
  38. package/lib/browser/main-layout.contribution.js.map +1 -0
  39. package/lib/browser/tabbar/bar.view.d.ts +28 -0
  40. package/lib/browser/tabbar/bar.view.d.ts.map +1 -0
  41. package/lib/browser/tabbar/bar.view.js +150 -0
  42. package/lib/browser/tabbar/bar.view.js.map +1 -0
  43. package/lib/browser/tabbar/panel.view.d.ts +16 -0
  44. package/lib/browser/tabbar/panel.view.d.ts.map +1 -0
  45. package/lib/browser/tabbar/panel.view.js +108 -0
  46. package/lib/browser/tabbar/panel.view.js.map +1 -0
  47. package/lib/browser/tabbar/renderer.view.d.ts +34 -0
  48. package/lib/browser/tabbar/renderer.view.d.ts.map +1 -0
  49. package/lib/browser/tabbar/renderer.view.js +64 -0
  50. package/lib/browser/tabbar/renderer.view.js.map +1 -0
  51. package/lib/browser/tabbar/styles.module.less +367 -0
  52. package/lib/browser/tabbar/tabbar.service.d.ts +100 -0
  53. package/lib/browser/tabbar/tabbar.service.d.ts.map +1 -0
  54. package/lib/browser/tabbar/tabbar.service.js +675 -0
  55. package/lib/browser/tabbar/tabbar.service.js.map +1 -0
  56. package/lib/browser/tabbar-handler.d.ts +91 -0
  57. package/lib/browser/tabbar-handler.d.ts.map +1 -0
  58. package/lib/browser/tabbar-handler.js +172 -0
  59. package/lib/browser/tabbar-handler.js.map +1 -0
  60. package/lib/browser/views-registry.d.ts +33 -0
  61. package/lib/browser/views-registry.d.ts.map +1 -0
  62. package/lib/browser/views-registry.js +131 -0
  63. package/lib/browser/views-registry.js.map +1 -0
  64. package/lib/browser/welcome.view.d.ts +11 -0
  65. package/lib/browser/welcome.view.d.ts.map +1 -0
  66. package/lib/browser/welcome.view.js +106 -0
  67. package/lib/browser/welcome.view.js.map +1 -0
  68. package/lib/common/index.d.ts +2 -0
  69. package/lib/common/index.d.ts.map +1 -0
  70. package/lib/common/index.js +5 -0
  71. package/lib/common/index.js.map +1 -0
  72. package/lib/common/main-layout.defination.d.ts +101 -0
  73. package/lib/common/main-layout.defination.d.ts.map +1 -0
  74. package/lib/common/main-layout.defination.js +18 -0
  75. package/lib/common/main-layout.defination.js.map +1 -0
  76. package/lib/index.d.ts +2 -0
  77. package/lib/index.d.ts.map +1 -0
  78. package/lib/index.js +5 -0
  79. package/lib/index.js.map +1 -0
  80. package/package.json +28 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;AAAA,wEAAyC"}
@@ -0,0 +1,101 @@
1
+ import { BasicEvent, IDisposable, SlotLocation } from '@opensumi/ide-core-browser';
2
+ import { ViewContainerOptions, View, SideStateManager } from '@opensumi/ide-core-browser/lib/layout';
3
+ import { TabBarHandler } from '../browser/tabbar-handler';
4
+ import { TabbarService } from '../browser/tabbar/tabbar.service';
5
+ import { AccordionService } from '../browser/accordion/accordion.service';
6
+ import { IContextMenu } from '@opensumi/ide-core-browser/lib/menu/next';
7
+ import { Deferred, Event } from '@opensumi/ide-core-common';
8
+ import { IContextKeyExpression } from '@opensumi/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
9
+ export interface ComponentCollection {
10
+ views?: View[];
11
+ options: ViewContainerOptions;
12
+ }
13
+ export interface ViewComponentOptions {
14
+ isReplace?: boolean;
15
+ fromExtension?: boolean;
16
+ }
17
+ export declare const IMainLayoutService: unique symbol;
18
+ export interface IMainLayoutService {
19
+ viewReady: Deferred<void>;
20
+ didMount(): void;
21
+ toggleSlot(location: SlotLocation, show?: boolean, size?: number): void;
22
+ restoreState(): void;
23
+ /**
24
+ * 获取注册到tabbar位置视图的handler,封装了常用的layout操作
25
+ * 请在onRendered事件触发后或onDidRender contribution内获取handle,否则获取到为空
26
+ * @param handlerId container或view id
27
+ */
28
+ getTabbarHandler(handlerId: string): TabBarHandler | undefined;
29
+ /**
30
+ * 注册单个或多个视图到tabbar位置
31
+ * @param views 使用手风琴能力时传入的多个子视图
32
+ * @param options container相关选项
33
+ * @param side 注册的位置,支持left、right、bottom
34
+ */
35
+ collectTabbarComponent(views: View[], options: ViewContainerOptions, side: string): string;
36
+ /**
37
+ * 向侧边栏container内附加新的子视图
38
+ * @param view 子视图信息
39
+ * @param containerId 子视图需要附加的容器id
40
+ * @param props 初始prop
41
+ */
42
+ collectViewComponent(view: View, containerId: string, props?: any, options?: ViewComponentOptions): string;
43
+ /**
44
+ * 替换一个已注册的视图
45
+ * @param view 子视图信息
46
+ * @param props 初始prop
47
+ */
48
+ replaceViewComponent(view: View, props?: any): void;
49
+ /**
50
+ * 从手风琴销毁一个子视图
51
+ * @param viewId 子视图ID
52
+ */
53
+ disposeViewComponent(viewId: string): void;
54
+ /**
55
+ * 销毁一个容器视图
56
+ * @param containerId 容器视图ID
57
+ */
58
+ disposeContainer(containerId: string): void;
59
+ expandBottom(expand: boolean): void;
60
+ bottomExpanded: boolean;
61
+ setFloatSize(size: number): void;
62
+ revealView(viewId: string): void;
63
+ getTabbarService(location: string): TabbarService;
64
+ getAccordionService(containerId: string, noRestore?: boolean): AccordionService;
65
+ isVisible(location: string): boolean;
66
+ isViewVisible(viewId: string): boolean;
67
+ getExtraMenu(): IContextMenu;
68
+ }
69
+ export declare const MainLayoutContribution: unique symbol;
70
+ export interface MainLayoutContribution {
71
+ onDidRender?(): void;
72
+ provideDefaultState?(): SideStateManager;
73
+ }
74
+ /**
75
+ * 当有新的TabBar被注册时发送的新事件
76
+ */
77
+ export declare class TabBarRegistrationEvent extends BasicEvent<{
78
+ tabBarId: string;
79
+ }> {
80
+ }
81
+ export declare const IViewsRegistry: unique symbol;
82
+ export interface IViewsRegistry {
83
+ readonly onDidChangeViewWelcomeContent: Event<string>;
84
+ registerViewWelcomeContent(id: string, descriptor: IViewContentDescriptor): IDisposable;
85
+ registerViewWelcomeContent2<TKey>(id: string, viewContentMap: Map<TKey, IViewContentDescriptor>): Map<TKey, IDisposable>;
86
+ getViewWelcomeContent(id: string): IViewContentDescriptor[];
87
+ }
88
+ export interface IViewContentDescriptor {
89
+ readonly content: string;
90
+ readonly when?: IContextKeyExpression | 'default';
91
+ readonly group?: string;
92
+ readonly order?: number;
93
+ readonly precondition?: IContextKeyExpression | undefined;
94
+ }
95
+ export declare class ViewCollapseChangedEvent extends BasicEvent<{
96
+ viewId: string;
97
+ collapsed: boolean;
98
+ }> {
99
+ }
100
+ export declare const SUPPORT_ACCORDION_LOCATION: Set<string>;
101
+ //# sourceMappingURL=main-layout.defination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-layout.defination.d.ts","sourceRoot":"","sources":["../../src/common/main-layout.defination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2EAA2E,CAAC;AAElH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,QAAQ,CAAC,IAAI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18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPORT_ACCORDION_LOCATION = exports.ViewCollapseChangedEvent = exports.IViewsRegistry = exports.TabBarRegistrationEvent = exports.MainLayoutContribution = exports.IMainLayoutService = void 0;
4
+ const ide_core_browser_1 = require("@opensumi/ide-core-browser");
5
+ exports.IMainLayoutService = Symbol('IMainLayoutService');
6
+ exports.MainLayoutContribution = Symbol('MainLayoutContribution');
7
+ /**
8
+ * 当有新的TabBar被注册时发送的新事件
9
+ */
10
+ class TabBarRegistrationEvent extends ide_core_browser_1.BasicEvent {
11
+ }
12
+ exports.TabBarRegistrationEvent = TabBarRegistrationEvent;
13
+ exports.IViewsRegistry = Symbol('IViewsRegistry');
14
+ class ViewCollapseChangedEvent extends ide_core_browser_1.BasicEvent {
15
+ }
16
+ exports.ViewCollapseChangedEvent = ViewCollapseChangedEvent;
17
+ exports.SUPPORT_ACCORDION_LOCATION = new Set([ide_core_browser_1.SlotLocation.left, ide_core_browser_1.SlotLocation.right]);
18
+ //# sourceMappingURL=main-layout.defination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-layout.defination.js","sourceRoot":"","sources":["../../src/common/main-layout.defination.ts"],"names":[],"mappings":";;;AAAA,iEAAmF;AAmBtE,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AA0DlD,QAAA,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAWvE;;GAEG;AACH,MAAa,uBAAwB,SAAQ,6BAAgC;CAAI;AAAjF,0DAAiF;AAEpE,QAAA,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAiBvD,MAAa,wBAAyB,SAAQ,6BAG5C;CAAG;AAHL,4DAGK;AAEQ,QAAA,0BAA0B,GAAG,IAAI,GAAG,CAAC,CAAC,+BAAY,CAAC,IAAI,EAAE,+BAAY,CAAC,KAAK,CAAC,CAAC,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './common';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./common"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAAyB"}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@opensumi/ide-main-layout",
3
+ "version": "2.12.1-next-079c1930",
4
+ "description": "@opensumi/ide-main-layout",
5
+ "files": [
6
+ "lib"
7
+ ],
8
+ "license": "MIT",
9
+ "main": "lib/index.js",
10
+ "typings": "lib/index.d.ts",
11
+ "scripts": {
12
+ "prepublishOnly": "npm run build",
13
+ "build": "tsc --build ../../configs/ts/references/tsconfig.main-layout.json"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git@github.com:opensumi/core.git"
18
+ },
19
+ "dependencies": {
20
+ "@opensumi/ide-core-common": "2.12.1-next-079c1930",
21
+ "@opensumi/ide-theme": "2.12.1-next-079c1930",
22
+ "@opensumi/ide-components": "2.12.1-next-079c1930"
23
+ },
24
+ "devDependencies": {
25
+ "@opensumi/ide-core-browser": "2.12.1-next-079c1930",
26
+ "@opensumi/ide-dev-tool": "^1.3.1"
27
+ }
28
+ }