@logicflow/layout 1.2.0-alpha.14
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/README.md +17 -0
- package/cjs/dagre.js +146 -0
- package/cjs/index.js +13 -0
- package/es/dagre.d.ts +26 -0
- package/es/dagre.js +143 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/lib/dagre.js +24 -0
- package/package.json +85 -0
- package/types/dagre.d.ts +26 -0
- package/types/index.d.ts +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@logicflow/layout",
|
|
3
|
+
"version": "1.2.0-alpha.14",
|
|
4
|
+
"description": "LogicFlow layout",
|
|
5
|
+
"main": "cjs/index.js",
|
|
6
|
+
"module": "es/index.js",
|
|
7
|
+
"homepage": "http://logic-flow.org/",
|
|
8
|
+
"types": "es/index.d.ts",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/didi/LogicFlow",
|
|
12
|
+
"directory": "packages/layout"
|
|
13
|
+
},
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"dev": "cross-env NODE_ENV=development webpack-dev-server --client-log-level warning --config scripts/webpack.config.dev.js",
|
|
17
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
18
|
+
"types": "tsc -d --declarationDir ./types --outDir temp && rimraf -R temp",
|
|
19
|
+
"build:esm": "tsc --module esnext --target es5 --outDir ./es -d",
|
|
20
|
+
"build:cjs": "tsc --module commonjs --target es5 --outDir ./cjs",
|
|
21
|
+
"build:umd": "cross-env NODE_ENV=production webpack --config scripts/webpack.config.build.js",
|
|
22
|
+
"build": "rimraf ./es ./cjs ./lib && npm run build:esm & npm run build:cjs & npm run build:umd",
|
|
23
|
+
"publish-lib": "npm run build && npm publish"
|
|
24
|
+
},
|
|
25
|
+
"author": "",
|
|
26
|
+
"files": [
|
|
27
|
+
"cjs",
|
|
28
|
+
"es",
|
|
29
|
+
"lib",
|
|
30
|
+
"types",
|
|
31
|
+
"readme.md"
|
|
32
|
+
],
|
|
33
|
+
"standard-version": {
|
|
34
|
+
"skip": {
|
|
35
|
+
"tag": true,
|
|
36
|
+
"commit": true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"logicflow",
|
|
41
|
+
"layout",
|
|
42
|
+
"flowchart",
|
|
43
|
+
"diagram"
|
|
44
|
+
],
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@babel/core": "^7.9.0",
|
|
47
|
+
"@babel/plugin-proposal-decorators": "^7.12.1",
|
|
48
|
+
"@babel/plugin-syntax-jsx": "^7.8.3",
|
|
49
|
+
"@babel/plugin-transform-react-jsx": "^7.10.4",
|
|
50
|
+
"@babel/preset-env": "^7.9.5",
|
|
51
|
+
"@babel/preset-typescript": "^7.9.0",
|
|
52
|
+
"@commitlint/config-conventional": "^8.3.4",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^4.7.0",
|
|
54
|
+
"@typescript-eslint/parser": "^3.2.0",
|
|
55
|
+
"babel-core": "^7.0.0-bridge.0",
|
|
56
|
+
"babel-loader": "^8.1.0",
|
|
57
|
+
"babel-plugin-import": "^1.13.0",
|
|
58
|
+
"case-sensitive-paths-webpack-plugin": "^2.3.0",
|
|
59
|
+
"core-js": "^3.6.5",
|
|
60
|
+
"cross-env": "^7.0.2",
|
|
61
|
+
"css-loader": "^4.2.1",
|
|
62
|
+
"eslint": "^7.0.0",
|
|
63
|
+
"eslint-config-airbnb-typescript": "^9.0.0",
|
|
64
|
+
"eslint-plugin-import": "^2.22.0",
|
|
65
|
+
"eslint-plugin-jsx-a11y": "^6.3.1",
|
|
66
|
+
"eslint-plugin-react": "^7.20.6",
|
|
67
|
+
"eslint-plugin-standard": "^4.0.1",
|
|
68
|
+
"eslint-webpack-plugin": "^2.1.0",
|
|
69
|
+
"html-webpack-plugin": "^4.2.0",
|
|
70
|
+
"less-loader": "^6.0.0",
|
|
71
|
+
"prettier": "^2.2.1",
|
|
72
|
+
"rimraf": "^3.0.2",
|
|
73
|
+
"standard-version": "^9.0.0",
|
|
74
|
+
"style-loader": "^1.2.0",
|
|
75
|
+
"typescript": "^3.8.3",
|
|
76
|
+
"url-loader": "^4.1.0",
|
|
77
|
+
"webpack": "^4.43.0",
|
|
78
|
+
"webpack-bundle-analyzer": "^4.1.0",
|
|
79
|
+
"webpack-cli": "^3.3.11",
|
|
80
|
+
"webpack-dev-server": "^3.10.3"
|
|
81
|
+
},
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"@antv/layout": "^0.1.31"
|
|
84
|
+
}
|
|
85
|
+
}
|
package/types/dagre.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DagreLayoutOptions } from '@antv/layout';
|
|
2
|
+
export declare class Dagre {
|
|
3
|
+
static pluginName: string;
|
|
4
|
+
lf: any;
|
|
5
|
+
option: DagreLayoutOptions;
|
|
6
|
+
render(lf: any): void;
|
|
7
|
+
/**
|
|
8
|
+
* option: {
|
|
9
|
+
* rankdir: "TB", // layout 方向, 可选 TB, BT, LR, RL
|
|
10
|
+
* align: undefined, // 节点对齐方式,可选 UL, UR, DL, DR
|
|
11
|
+
* nodeSize: undefined, // 节点大小
|
|
12
|
+
* nodesepFunc: undefined, // 节点水平间距(px)
|
|
13
|
+
* ranksepFunc: undefined, // 每一层节点之间间距
|
|
14
|
+
* nodesep: 50, // 节点水平间距(px)
|
|
15
|
+
* ranksep: 50, // 每一层节点之间间距
|
|
16
|
+
* controlPoints: false, // 是否保留布局连线的控制点
|
|
17
|
+
* radial: false, // 是否基于 dagre 进行辐射布局
|
|
18
|
+
* focusNode: null, // radial 为 true 时生效,关注的节点
|
|
19
|
+
* };
|
|
20
|
+
*/
|
|
21
|
+
layout(option?: {}): void;
|
|
22
|
+
calcPointsList(model: any, nodes: any): {
|
|
23
|
+
x: any;
|
|
24
|
+
y: any;
|
|
25
|
+
}[];
|
|
26
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dagre';
|