@chamn/engine 0.0.26 → 0.0.27
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/dist/component/Workbench/index.d.ts +11 -0
- package/dist/component/Workbench/style.module.scss.d.ts +1 -0
- package/dist/index.js +33 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3690 -3647
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/Designer/type.d.ts +4 -1
- package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +7 -7
|
@@ -13,6 +13,10 @@ type PanelItem = {
|
|
|
13
13
|
icon: React.ReactNode;
|
|
14
14
|
render: React.ReactNode;
|
|
15
15
|
};
|
|
16
|
+
export type WorkbenchCustomView = {
|
|
17
|
+
key: string;
|
|
18
|
+
view: React.ReactNode;
|
|
19
|
+
};
|
|
16
20
|
type WorkbenchStateType = {
|
|
17
21
|
leftBoxVisible: boolean;
|
|
18
22
|
leftBoxSize: {
|
|
@@ -31,6 +35,7 @@ type WorkbenchStateType = {
|
|
|
31
35
|
rightView: React.ReactNode | null;
|
|
32
36
|
topToolBarView: React.ReactNode | null;
|
|
33
37
|
subTopToolBarView: React.ReactNode | null;
|
|
38
|
+
customViewList: WorkbenchCustomView[];
|
|
34
39
|
};
|
|
35
40
|
export type WorkbenchPropsType = {
|
|
36
41
|
emitter: Emitter<any>;
|
|
@@ -42,6 +47,12 @@ export declare class Workbench extends React.Component<WorkbenchPropsType, Workb
|
|
|
42
47
|
addLeftPanel: (panel: PanelItem) => void;
|
|
43
48
|
/** 替换对应的 panel */
|
|
44
49
|
replaceLeftPanel: (panelName: string, newPanel: PanelItem) => void;
|
|
50
|
+
/**
|
|
51
|
+
* 添加属于插件的自定义视图
|
|
52
|
+
* @param view
|
|
53
|
+
* @returns dispose: 调用后移除 view
|
|
54
|
+
*/
|
|
55
|
+
addCustomView(view: WorkbenchCustomView): () => void;
|
|
45
56
|
openLeftPanel: (currentActiveLeftPanel?: string) => Promise<void>;
|
|
46
57
|
closeLeftPanel: () => Promise<void>;
|
|
47
58
|
toggleLeftPanel: () => void;
|