@logicflow/layout 2.1.0-alpha.2 → 2.1.0-alpha.4

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.
Files changed (47) hide show
  1. package/.turbo/turbo-build.log +7 -6
  2. package/CHANGELOG.md +15 -0
  3. package/README.md +9 -2
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/es/{dagre.d.ts → dagre/index.d.ts} +18 -20
  7. package/es/dagre/index.js +126 -0
  8. package/es/dagre/index.js.map +1 -0
  9. package/es/elkLayout/config.d.ts +26 -0
  10. package/es/elkLayout/config.js +27 -0
  11. package/es/elkLayout/config.js.map +1 -0
  12. package/es/elkLayout/index.d.ts +107 -0
  13. package/es/elkLayout/index.js +187 -0
  14. package/es/elkLayout/index.js.map +1 -0
  15. package/es/index.d.ts +1 -0
  16. package/es/index.js +1 -0
  17. package/es/index.js.map +1 -1
  18. package/es/utils/processEdge.d.ts +3 -0
  19. package/es/utils/processEdge.js +479 -0
  20. package/es/utils/processEdge.js.map +1 -0
  21. package/lib/{dagre.d.ts → dagre/index.d.ts} +18 -20
  22. package/lib/dagre/index.js +152 -0
  23. package/lib/dagre/index.js.map +1 -0
  24. package/lib/elkLayout/config.d.ts +26 -0
  25. package/lib/elkLayout/config.js +30 -0
  26. package/lib/elkLayout/config.js.map +1 -0
  27. package/lib/elkLayout/index.d.ts +107 -0
  28. package/lib/elkLayout/index.js +193 -0
  29. package/lib/elkLayout/index.js.map +1 -0
  30. package/lib/index.d.ts +1 -0
  31. package/lib/index.js +1 -0
  32. package/lib/index.js.map +1 -1
  33. package/lib/utils/processEdge.d.ts +3 -0
  34. package/lib/utils/processEdge.js +483 -0
  35. package/lib/utils/processEdge.js.map +1 -0
  36. package/package.json +3 -2
  37. package/src/dagre/index.ts +177 -0
  38. package/src/elkLayout/config.ts +26 -0
  39. package/src/elkLayout/index.ts +255 -0
  40. package/src/index.ts +2 -0
  41. package/src/utils/processEdge.ts +585 -0
  42. package/stats.html +1 -1
  43. package/es/dagre.js +0 -376
  44. package/es/dagre.js.map +0 -1
  45. package/lib/dagre.js +0 -402
  46. package/lib/dagre.js.map +0 -1
  47. package/src/dagre.ts +0 -438
@@ -1,23 +1,24 @@
1
1
 
2
- > @logicflow/layout@2.1.0-alpha.1 prebuild /Users/didi/Desktop/github/LogicFlow/packages/layout
2
+ > @logicflow/layout@2.1.0-alpha.4 prebuild /Users/didi/Desktop/github/LogicFlow/packages/layout
3
3
  > rss
4
4
 
5
5
  > [prebuild] run-s -s clean:build
6
6
  > [clean:build] rimraf dist es lib
7
7
 
8
- > @logicflow/layout@2.1.0-alpha.1 build /Users/didi/Desktop/github/LogicFlow/packages/layout
8
+ > @logicflow/layout@2.1.0-alpha.4 build /Users/didi/Desktop/github/LogicFlow/packages/layout
9
9
  > run-p -s build:dev build:umd
10
10
 
11
11
  
12
12
  ./src/index.ts → dist/index.min.js...
13
+ [BABEL] Note: The code generator has deoptimised the styling of /Users/didi/Desktop/github/LogicFlow/node_modules/.pnpm/elkjs@0.11.0/node_modules/elkjs/lib/elk.bundled.js as it exceeds the max of 500KB.
13
14
  +------------------------------------+
14
15
  | |
15
16
  | Bundle Format: umd |
16
17
  | Bundle Name: Layout |
17
18
  | Destination: dist/index.min.js |
18
- | Bundle Size: 85.59 KB |
19
- | Minified Size: 84.96 KB |
20
- | GZipped Size: 28.43 KB |
19
+ | Bundle Size: 1.52 MB |
20
+ | Minified Size: 1.5 MB |
21
+ | GZipped Size: 460.05 KB |
21
22
  | |
22
23
  +------------------------------------+
23
- created dist/index.min.js in 9.7s
24
+ created dist/index.min.js in 40.5s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.1.0-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: 修复已知问题&layout包新增elk布局
8
+ - Updated dependencies
9
+ - @logicflow/core@2.2.0-alpha.4
10
+
11
+ ## 2.1.0-alpha.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+ - @logicflow/core@2.2.0-alpha.3
17
+
3
18
  ## 2.1.0-alpha.2
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -19,15 +19,17 @@ pnpm add @logicflow/layout
19
19
 
20
20
  ```js
21
21
  import LogicFlow from '@logicflow/core';
22
- import { Dagre } from '@logicflow/layout';
22
+ import { Dagre, ElkLayout } from '@logicflow/layout';
23
23
 
24
+ // 提供两种布局插件:Dagre 和 ElkLayout。调用参数相同,按需使用即可
24
25
  const lf = new LogicFlow({
25
26
  container: '#app',
26
- plugins: [Dagre]
27
+ plugins: [Dagre, ElkLayout]
27
28
  })
28
29
 
29
30
  // 基本使用方式 - 无参数
30
31
  lf.extension.dagre.layout()
32
+ lf.extension.elkLayout.layout()
31
33
 
32
34
  // 使用布局参数
33
35
  lf.extension.dagre.layout({
@@ -35,6 +37,11 @@ lf.extension.dagre.layout({
35
37
  ranksep: 100 // 层级间距
36
38
  nodesep: 50, // 节点间距
37
39
  })
40
+ lf.extension.elkLayout.layout({
41
+ rankdir: 'LR', // 从坐到右布局
42
+ ranksep: 100 // 层级间距
43
+ nodesep: 50, // 节点间距
44
+ })
38
45
  ```
39
46
 
40
47
  ## DagreOption 参数说明