ice-entity-designer 0.0.24 → 0.0.26

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,46 @@
1
+ /**
2
+ * Copyright (c) 2022 大漠穷秋.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ import FlowDesigner from '../flow/FlowDesigner.mjs';
9
+ export declare type StatechartIssue = {
10
+ level: 'error' | 'warning';
11
+ message: string;
12
+ id?: string;
13
+ };
14
+ /**
15
+ * @class StatechartDesigner 状态机设计器(第二个 domain pack)
16
+ *
17
+ * 与 `UmlDesigner` 同构:`FlowDesigner` 的薄扩展,只做四件事 ——
18
+ * 建状态机图元、类型过滤、**几何自动嵌套**(复合状态是容器)、语义校验。
19
+ * 选择 / 增删改 / 连线 / 撤销重做 / 快照 / 适应视图 / 矢量导出全部继承。
20
+ */
21
+ export default class StatechartDesigner extends FlowDesigner {
22
+ private __nesting;
23
+ constructor(ice: any);
24
+ get nodes(): any[];
25
+ get edges(): any[];
26
+ /** 建状态(initial / final / state / composite),复合状态会自动把落在框内的状态收进容器 */
27
+ createState(props?: any): any;
28
+ /** 建一次转移;两端必须都是状态(否则抛错,与 FlowDesigner.createEdge 同一契约) */
29
+ createTransition(props?: any): any;
30
+ /**
31
+ * 几何自动嵌套:新状态的中心落在某个**复合状态**的框内就嵌进去(引擎容器能力)。
32
+ *
33
+ * 与 BPMN 的池/泳道同一套做法:`adoptChild`(**不能**用 removeChild —— 它会 destory 组件),
34
+ * 再把坐标换算成「以父容器左上角为原点」。
35
+ */
36
+ private __nestByGeometry;
37
+ /**
38
+ * 状态机语义校验:
39
+ * - 每个状态机要有**初始状态**(否则没有入口);
40
+ * - **终止状态不应有出边**(它表示流程结束);
41
+ * - **可达性**:从初始状态出发沿转移走不到的普通状态要提醒(画了但永远到不了);
42
+ * - 未连接的状态(既没有入边也没有出边)单独提示,和「不可达」区分开。
43
+ */
44
+ validateStatechart(): StatechartIssue[];
45
+ private __portPoint;
46
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) 2022 大漠穷秋.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ import FlowDesigner from '../flow/FlowDesigner';
9
+ export declare type StatechartIssue = {
10
+ level: 'error' | 'warning';
11
+ message: string;
12
+ id?: string;
13
+ };
14
+ /**
15
+ * @class StatechartDesigner 状态机设计器(第二个 domain pack)
16
+ *
17
+ * 与 `UmlDesigner` 同构:`FlowDesigner` 的薄扩展,只做四件事 ——
18
+ * 建状态机图元、类型过滤、**几何自动嵌套**(复合状态是容器)、语义校验。
19
+ * 选择 / 增删改 / 连线 / 撤销重做 / 快照 / 适应视图 / 矢量导出全部继承。
20
+ */
21
+ export default class StatechartDesigner extends FlowDesigner {
22
+ private __nesting;
23
+ constructor(ice: any);
24
+ get nodes(): any[];
25
+ get edges(): any[];
26
+ /** 建状态(initial / final / state / composite),复合状态会自动把落在框内的状态收进容器 */
27
+ createState(props?: any): any;
28
+ /** 建一次转移;两端必须都是状态(否则抛错,与 FlowDesigner.createEdge 同一契约) */
29
+ createTransition(props?: any): any;
30
+ /**
31
+ * 几何自动嵌套:新状态的中心落在某个**复合状态**的框内就嵌进去(引擎容器能力)。
32
+ *
33
+ * 与 BPMN 的池/泳道同一套做法:`adoptChild`(**不能**用 removeChild —— 它会 destory 组件),
34
+ * 再把坐标换算成「以父容器左上角为原点」。
35
+ */
36
+ private __nestByGeometry;
37
+ /**
38
+ * 状态机语义校验:
39
+ * - 每个状态机要有**初始状态**(否则没有入口);
40
+ * - **终止状态不应有出边**(它表示流程结束);
41
+ * - **可达性**:从初始状态出发沿转移走不到的普通状态要提醒(画了但永远到不了);
42
+ * - 未连接的状态(既没有入边也没有出边)单独提示,和「不可达」区分开。
43
+ */
44
+ validateStatechart(): StatechartIssue[];
45
+ private __portPoint;
46
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "大漠穷秋",
3
3
  "name": "ice-entity-designer",
4
- "version": "0.0.24",
4
+ "version": "0.0.26",
5
5
  "description": "An entity designer based on ice-render.",
6
6
  "repository": {
7
7
  "type": "git",