@logicflow/core 1.1.19 → 1.1.20

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@logicflow/core",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "LogicFlow core, to quickly build flowchart editor",
5
- "main": "dist/logic-flow.js",
6
- "unpkg": "dist/logic-flow.js",
7
- "jsdelivr": "dist/logic-flow.js",
5
+ "main": "dist/entry.js",
6
+ "unpkg": "dist/logic-flow.min.js",
7
+ "jsdelivr": "dist/logic-flow.min.js",
8
8
  "license": "Apache-2.0",
9
9
  "homepage": "http://logic-flow.org/",
10
10
  "types": "types/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "dev": "cross-env NODE_ENV=development webpack-dev-server --client-log-level warning --config scripts/webpack.config.dev.js",
18
18
  "clean": "rimraf dist lib esm cjs",
19
19
  "build": "npm run build:umd",
20
- "build:umd": "cross-env NODE_ENV=production webpack --config scripts/webpack.config.build.js && cp -r src/style/ dist/style",
20
+ "build:umd": "cross-env NODE_ENV=production webpack --config scripts/webpack.config.build.js && cp -r src/style/ dist/style && cp scripts/entry.js dist",
21
21
  "build-analyse": "cross-env analyse=true npm run build",
22
22
  "types": "tsc -d --declarationDir ./types --outDir temp && rimraf temp",
23
23
  "lint": "eslint . --ext .ts,.tsx",
@@ -1,6 +1,6 @@
1
1
  import { IBaseModel } from '../BaseModel';
2
2
  import GraphModel from '../GraphModel';
3
- import { Point, AdditionData, EdgeData, MenuConfig, EdgeConfig } from '../../type/index';
3
+ import { Point, AdditionData, EdgeData, MenuConfig, EdgeConfig, ShapeStyleAttribute } from '../../type/index';
4
4
  import { ModelType, ElementType } from '../../constant/constant';
5
5
  import { OutlineTheme } from '../../constant/DefaultTheme';
6
6
  declare class BaseEdgeModel implements IBaseModel {
@@ -37,6 +37,7 @@ declare class BaseEdgeModel implements IBaseModel {
37
37
  menu?: MenuConfig[];
38
38
  customTextPosition: boolean;
39
39
  animationData: import("../../constant/DefaultAnimation").Animation;
40
+ style: ShapeStyleAttribute;
40
41
  arrowConfig: {
41
42
  markerEnd: string;
42
43
  markerStart: string;
@@ -66,7 +67,12 @@ declare class BaseEdgeModel implements IBaseModel {
66
67
  * 获取当前节点样式
67
68
  * @returns 自定义边样式
68
69
  */
69
- getEdgeStyle(): import("../../constant/DefaultTheme").CommonTheme;
70
+ getEdgeStyle(): {
71
+ [x: string]: any;
72
+ fill?: string;
73
+ stroke?: string;
74
+ strokeWidth?: number;
75
+ };
70
76
  /**
71
77
  * @overridable 支持重写
72
78
  * 获取当前节点文本样式
@@ -122,6 +128,9 @@ declare class BaseEdgeModel implements IBaseModel {
122
128
  getHistoryData(): EdgeData;
123
129
  setProperty(key: any, val: any): void;
124
130
  setProperties(properties: any): void;
131
+ setStyle(key: any, val: any): void;
132
+ setStyles(styles: any): void;
133
+ updateStyles(styles: any): void;
125
134
  /**
126
135
  * 内部方法,处理初始化文本格式
127
136
  */
@@ -49,6 +49,7 @@ export default class BaseNodeModel implements IBaseNodeModel {
49
49
  zIndex: number;
50
50
  state: number;
51
51
  autoToFront: boolean;
52
+ style: ShapeStyleAttribute;
52
53
  readonly BaseType = ElementType.NODE;
53
54
  modelType: ModelType;
54
55
  additionStateData: AdditionData;
@@ -192,6 +193,9 @@ export default class BaseNodeModel implements IBaseNodeModel {
192
193
  setElementState(state: number, additionStateData?: AdditionData): void;
193
194
  setProperty(key: any, val: any): void;
194
195
  setProperties(properties: any): void;
196
+ setStyle(key: any, val: any): void;
197
+ setStyles(styles: any): void;
198
+ updateStyles(styles: any): void;
195
199
  setZIndex(zindex?: number): void;
196
200
  updateAttributes(attributes: any): void;
197
201
  }