@chamn/engine 0.3.3 → 0.3.5

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.
@@ -0,0 +1 @@
1
+ export declare const ComponentEditor: () => import("react/jsx-runtime").JSX.Element;
@@ -7,10 +7,12 @@ export declare const calculateElementLayout: (nodes: Node[], edges: Edge[], opti
7
7
  nodes: Node[];
8
8
  edges: Edge[];
9
9
  };
10
+ /** 将 json schema 转换为 react-flow 节点和边信息 */
10
11
  export declare const parseActionLogicToNodeList: (value: TActionLogicItem) => {
11
12
  nodes: Node[];
12
13
  edges: Edge[];
13
14
  };
15
+ /** 将节点格式化json schema */
14
16
  export declare const revertNodeToActionLogic: (params: {
15
17
  nodes: Node[];
16
18
  edges: Edge[];
@@ -17,6 +17,13 @@ export type WorkbenchCustomView = {
17
17
  key: string;
18
18
  view: React.ReactNode;
19
19
  };
20
+ type TWidgetVisible = {
21
+ hiddenTopBar?: boolean;
22
+ hiddenLeftPanel?: boolean;
23
+ hiddenRightPanel?: boolean;
24
+ /** canvas 区域不添加任何 padding margining */
25
+ canvasFull?: boolean;
26
+ };
20
27
  type WorkbenchStateType = {
21
28
  leftBoxVisible: boolean;
22
29
  leftBoxSize: {
@@ -36,14 +43,16 @@ type WorkbenchStateType = {
36
43
  topToolBarView: React.ReactNode | null;
37
44
  subTopToolBarView: React.ReactNode | null;
38
45
  customViewList: WorkbenchCustomView[];
39
- };
46
+ } & TWidgetVisible;
40
47
  export type WorkbenchPropsType = {
41
48
  emitter: Emitter<any>;
42
- };
49
+ } & TWidgetVisible;
43
50
  export declare class Workbench extends React.Component<WorkbenchPropsType, WorkbenchStateType> {
44
51
  emitter: Emitter<any>;
45
52
  leftPanelContentRef: React.RefObject<HTMLDivElement>;
46
53
  constructor(props: WorkbenchPropsType);
54
+ /** 隐藏编辑器的小部件 */
55
+ hiddenWidget(config: Partial<TWidgetVisible>): void;
47
56
  addLeftPanel: (panel: PanelItem) => void;
48
57
  /** 替换对应的 panel */
49
58
  replaceLeftPanel: (panelName: string, newPanel: PanelItem) => void;