@logicflow/core 2.2.0 → 2.2.2

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 (361) hide show
  1. package/dist/docs/api/logicflow-constructor/index.en.md +106 -0
  2. package/dist/docs/api/logicflow-constructor/index.zh.md +106 -0
  3. package/dist/docs/api/logicflow-constructor/use.en.md +61 -0
  4. package/dist/docs/api/logicflow-constructor/use.zh.md +61 -0
  5. package/dist/docs/api/logicflow-instance/canvas.en.md +197 -0
  6. package/dist/docs/api/logicflow-instance/canvas.zh.md +199 -0
  7. package/dist/docs/api/logicflow-instance/edge.en.md +273 -0
  8. package/dist/docs/api/logicflow-instance/edge.zh.md +273 -0
  9. package/dist/docs/api/logicflow-instance/edit-config.en.md +59 -0
  10. package/dist/docs/api/logicflow-instance/edit-config.zh.md +59 -0
  11. package/dist/docs/api/logicflow-instance/element.en.md +375 -0
  12. package/dist/docs/api/logicflow-instance/element.zh.md +379 -0
  13. package/dist/docs/api/logicflow-instance/event.en.md +326 -0
  14. package/dist/docs/api/logicflow-instance/event.zh.md +406 -0
  15. package/dist/docs/api/logicflow-instance/history.en.md +38 -0
  16. package/dist/docs/api/logicflow-instance/history.zh.md +38 -0
  17. package/dist/docs/api/logicflow-instance/index.en.md +41 -0
  18. package/dist/docs/api/logicflow-instance/index.zh.md +41 -0
  19. package/dist/docs/api/logicflow-instance/node.en.md +308 -0
  20. package/dist/docs/api/logicflow-instance/node.zh.md +308 -0
  21. package/dist/docs/api/logicflow-instance/register.en.md +76 -0
  22. package/dist/docs/api/logicflow-instance/register.zh.md +76 -0
  23. package/dist/docs/api/logicflow-instance/render-and-data.en.md +179 -0
  24. package/dist/docs/api/logicflow-instance/render-and-data.zh.md +181 -0
  25. package/dist/docs/api/logicflow-instance/text.en.md +60 -0
  26. package/dist/docs/api/logicflow-instance/text.zh.md +60 -0
  27. package/dist/docs/api/logicflow-instance/theme.en.md +179 -0
  28. package/dist/docs/api/logicflow-instance/theme.zh.md +179 -0
  29. package/dist/docs/api/runtime-model/edgeModel.en.md +29 -0
  30. package/dist/docs/api/runtime-model/edgeModel.zh.md +325 -0
  31. package/dist/docs/api/runtime-model/graphModel.en.md +275 -0
  32. package/dist/docs/api/runtime-model/graphModel.zh.md +1153 -0
  33. package/dist/docs/api/runtime-model/nodeModel.en.md +37 -0
  34. package/dist/docs/api/runtime-model/nodeModel.zh.md +644 -0
  35. package/dist/docs/api/type/MainTypes.en.md +598 -0
  36. package/dist/docs/api/type/MainTypes.zh.md +867 -0
  37. package/dist/docs/api/type/Theme.en.md +187 -0
  38. package/dist/docs/api/type/Theme.zh.md +187 -0
  39. package/dist/docs/api/type/canvas-types.en.md +25 -0
  40. package/dist/docs/api/type/canvas-types.zh.md +25 -0
  41. package/dist/docs/api/type/index.en.md +96 -0
  42. package/dist/docs/api/type/index.zh.md +99 -0
  43. package/dist/docs/api/type/node-types.en.md +21 -0
  44. package/dist/docs/api/type/node-types.zh.md +21 -0
  45. package/dist/docs/api/type/plugin-types.en.md +24 -0
  46. package/dist/docs/api/type/plugin-types.zh.md +24 -0
  47. package/dist/docs/index.md +11 -0
  48. package/dist/docs/tutorial/about.en.md +38 -0
  49. package/dist/docs/tutorial/about.zh.md +65 -0
  50. package/dist/docs/tutorial/advanced/dnd.en.md +62 -0
  51. package/dist/docs/tutorial/advanced/dnd.zh.md +52 -0
  52. package/dist/docs/tutorial/advanced/edge.en.md +64 -0
  53. package/dist/docs/tutorial/advanced/edge.zh.md +66 -0
  54. package/dist/docs/tutorial/advanced/keyboard.en.md +70 -0
  55. package/dist/docs/tutorial/advanced/keyboard.zh.md +67 -0
  56. package/dist/docs/tutorial/advanced/node.en.md +338 -0
  57. package/dist/docs/tutorial/advanced/node.zh.md +338 -0
  58. package/dist/docs/tutorial/advanced/react.en.md +106 -0
  59. package/dist/docs/tutorial/advanced/react.zh.md +114 -0
  60. package/dist/docs/tutorial/advanced/silent-mode.en.md +75 -0
  61. package/dist/docs/tutorial/advanced/silent-mode.zh.md +71 -0
  62. package/dist/docs/tutorial/advanced/snapline.en.md +54 -0
  63. package/dist/docs/tutorial/advanced/vue.en.md +249 -0
  64. package/dist/docs/tutorial/advanced/vue.zh.md +248 -0
  65. package/dist/docs/tutorial/ai.en.md +64 -0
  66. package/dist/docs/tutorial/ai.zh.md +64 -0
  67. package/dist/docs/tutorial/basic/background.en.md +50 -0
  68. package/dist/docs/tutorial/basic/canvas.en.md +164 -0
  69. package/dist/docs/tutorial/basic/canvas.zh.md +183 -0
  70. package/dist/docs/tutorial/basic/class.en.md +106 -0
  71. package/dist/docs/tutorial/basic/class.zh.md +103 -0
  72. package/dist/docs/tutorial/basic/edge.en.md +151 -0
  73. package/dist/docs/tutorial/basic/edge.zh.md +152 -0
  74. package/dist/docs/tutorial/basic/event.en.md +70 -0
  75. package/dist/docs/tutorial/basic/event.zh.md +66 -0
  76. package/dist/docs/tutorial/basic/grid.en.md +77 -0
  77. package/dist/docs/tutorial/basic/node.en.md +358 -0
  78. package/dist/docs/tutorial/basic/node.zh.md +318 -0
  79. package/dist/docs/tutorial/basic/theme.en.md +154 -0
  80. package/dist/docs/tutorial/basic/theme.zh.md +157 -0
  81. package/dist/docs/tutorial/extension/adapter.en.md +446 -0
  82. package/dist/docs/tutorial/extension/adapter.zh.md +429 -0
  83. package/dist/docs/tutorial/extension/bpmn-element.en.md +1427 -0
  84. package/dist/docs/tutorial/extension/bpmn-element.zh.md +1472 -0
  85. package/dist/docs/tutorial/extension/control.en.md +117 -0
  86. package/dist/docs/tutorial/extension/control.zh.md +118 -0
  87. package/dist/docs/tutorial/extension/curved-edge.en.md +46 -0
  88. package/dist/docs/tutorial/extension/curved-edge.zh.md +46 -0
  89. package/dist/docs/tutorial/extension/custom.en.md +142 -0
  90. package/dist/docs/tutorial/extension/custom.zh.md +138 -0
  91. package/dist/docs/tutorial/extension/dnd-panel.en.md +109 -0
  92. package/dist/docs/tutorial/extension/dnd-panel.zh.md +109 -0
  93. package/dist/docs/tutorial/extension/dynamic-group.en.md +606 -0
  94. package/dist/docs/tutorial/extension/dynamic-group.zh.md +606 -0
  95. package/dist/docs/tutorial/extension/group.en.md +217 -0
  96. package/dist/docs/tutorial/extension/group.zh.md +209 -0
  97. package/dist/docs/tutorial/extension/highlight.en.md +50 -0
  98. package/dist/docs/tutorial/extension/highlight.zh.md +50 -0
  99. package/dist/docs/tutorial/extension/insert-node-in-polyline.en.md +52 -0
  100. package/dist/docs/tutorial/extension/insert-node-in-polyline.zh.md +47 -0
  101. package/dist/docs/tutorial/extension/intro.en.md +72 -0
  102. package/dist/docs/tutorial/extension/intro.zh.md +95 -0
  103. package/dist/docs/tutorial/extension/label.en.md +136 -0
  104. package/dist/docs/tutorial/extension/label.zh.md +135 -0
  105. package/dist/docs/tutorial/extension/layout.en.md +156 -0
  106. package/dist/docs/tutorial/extension/layout.zh.md +156 -0
  107. package/dist/docs/tutorial/extension/menu.en.md +319 -0
  108. package/dist/docs/tutorial/extension/menu.zh.md +377 -0
  109. package/dist/docs/tutorial/extension/minimap.en.md +164 -0
  110. package/dist/docs/tutorial/extension/minimap.zh.md +180 -0
  111. package/dist/docs/tutorial/extension/node-resize.en.md +199 -0
  112. package/dist/docs/tutorial/extension/node-resize.zh.md +221 -0
  113. package/dist/docs/tutorial/extension/pool.en.md +227 -0
  114. package/dist/docs/tutorial/extension/pool.zh.md +227 -0
  115. package/dist/docs/tutorial/extension/proximity-connect.en.md +104 -0
  116. package/dist/docs/tutorial/extension/proximity-connect.zh.md +107 -0
  117. package/dist/docs/tutorial/extension/selection.en.md +166 -0
  118. package/dist/docs/tutorial/extension/selection.zh.md +150 -0
  119. package/dist/docs/tutorial/extension/snapshot.en.md +276 -0
  120. package/dist/docs/tutorial/extension/snapshot.zh.md +276 -0
  121. package/dist/docs/tutorial/get-started.en.md +501 -0
  122. package/dist/docs/tutorial/get-started.zh.md +139 -0
  123. package/dist/docs/tutorial/update.en.md +213 -0
  124. package/dist/docs/tutorial/update.zh.md +212 -0
  125. package/dist/index.css +3 -2
  126. package/dist/index.min.js +1 -1
  127. package/dist/index.min.js.map +1 -1
  128. package/es/LogicFlow.d.ts +9 -0
  129. package/es/LogicFlow.js +0 -1
  130. package/es/constant/index.d.ts +1 -1
  131. package/es/constant/index.js +1 -1
  132. package/es/constant/theme.d.ts +136 -0
  133. package/es/constant/theme.js +680 -0
  134. package/es/index.css +3 -2
  135. package/es/model/GraphModel.d.ts +10 -2
  136. package/es/model/GraphModel.js +48 -14
  137. package/es/model/TransformModel.js +9 -9
  138. package/es/model/edge/BaseEdgeModel.js +7 -2
  139. package/es/model/edge/PolylineEdgeModel.d.ts +7 -0
  140. package/es/model/edge/PolylineEdgeModel.js +136 -7
  141. package/es/model/node/BaseNodeModel.d.ts +12 -1
  142. package/es/model/node/BaseNodeModel.js +9 -2
  143. package/es/model/node/HtmlNodeModel.d.ts +12 -0
  144. package/es/model/node/HtmlNodeModel.js +19 -0
  145. package/es/model/node/PolygonNodeModel.js +3 -3
  146. package/es/options.d.ts +4 -2
  147. package/es/style/index.css +3 -2
  148. package/es/style/index.less +3 -2
  149. package/es/style/raw.d.ts +1 -1
  150. package/es/style/raw.js +1 -1
  151. package/es/tool/MultipleSelectTool.js +10 -5
  152. package/es/util/drag.js +0 -1
  153. package/es/util/edge.d.ts +40 -1
  154. package/es/util/edge.js +43 -9
  155. package/es/util/geometry.d.ts +8 -0
  156. package/es/util/geometry.js +79 -0
  157. package/es/util/theme.d.ts +2 -65
  158. package/es/util/theme.js +4 -281
  159. package/es/view/Anchor.d.ts +1 -0
  160. package/es/view/Anchor.js +24 -21
  161. package/es/view/Control.d.ts +5 -0
  162. package/es/view/Control.js +44 -57
  163. package/es/view/edge/BaseEdge.js +9 -0
  164. package/es/view/edge/PolylineEdge.js +13 -2
  165. package/es/view/node/BaseNode.d.ts +1 -0
  166. package/es/view/node/BaseNode.js +23 -11
  167. package/es/view/node/HtmlNode.js +2 -4
  168. package/es/view/overlay/CanvasOverlay.js +5 -2
  169. package/es/view/overlay/Grid.d.ts +12 -1
  170. package/es/view/overlay/Grid.js +85 -23
  171. package/es/view/overlay/OutlineOverlay.d.ts +1 -0
  172. package/es/view/overlay/OutlineOverlay.js +18 -17
  173. package/es/view/overlay/gridConfig.d.ts +46 -0
  174. package/es/view/overlay/gridConfig.js +99 -0
  175. package/es/view/shape/Polygon.d.ts +0 -7
  176. package/es/view/shape/Polygon.js +12 -43
  177. package/lib/LogicFlow.d.ts +9 -0
  178. package/lib/LogicFlow.js +0 -1
  179. package/lib/constant/index.d.ts +1 -1
  180. package/lib/constant/index.js +16 -2
  181. package/lib/constant/theme.d.ts +136 -0
  182. package/lib/constant/theme.js +683 -0
  183. package/lib/index.css +3 -2
  184. package/lib/model/GraphModel.d.ts +10 -2
  185. package/lib/model/GraphModel.js +49 -15
  186. package/lib/model/TransformModel.js +9 -9
  187. package/lib/model/edge/BaseEdgeModel.js +7 -2
  188. package/lib/model/edge/PolylineEdgeModel.d.ts +7 -0
  189. package/lib/model/edge/PolylineEdgeModel.js +136 -7
  190. package/lib/model/node/BaseNodeModel.d.ts +12 -1
  191. package/lib/model/node/BaseNodeModel.js +9 -2
  192. package/lib/model/node/HtmlNodeModel.d.ts +12 -0
  193. package/lib/model/node/HtmlNodeModel.js +19 -0
  194. package/lib/model/node/PolygonNodeModel.js +3 -3
  195. package/lib/options.d.ts +4 -2
  196. package/lib/style/index.css +3 -2
  197. package/lib/style/index.less +3 -2
  198. package/lib/style/raw.d.ts +1 -1
  199. package/lib/style/raw.js +1 -1
  200. package/lib/tool/MultipleSelectTool.js +10 -5
  201. package/lib/util/drag.js +0 -1
  202. package/lib/util/edge.d.ts +40 -1
  203. package/lib/util/edge.js +43 -9
  204. package/lib/util/geometry.d.ts +8 -0
  205. package/lib/util/geometry.js +81 -1
  206. package/lib/util/theme.d.ts +2 -65
  207. package/lib/util/theme.js +15 -292
  208. package/lib/view/Anchor.d.ts +1 -0
  209. package/lib/view/Anchor.js +24 -21
  210. package/lib/view/Control.d.ts +5 -0
  211. package/lib/view/Control.js +44 -57
  212. package/lib/view/edge/BaseEdge.js +9 -0
  213. package/lib/view/edge/PolylineEdge.js +13 -2
  214. package/lib/view/node/BaseNode.d.ts +1 -0
  215. package/lib/view/node/BaseNode.js +22 -10
  216. package/lib/view/node/HtmlNode.js +1 -3
  217. package/lib/view/overlay/CanvasOverlay.js +5 -2
  218. package/lib/view/overlay/Grid.d.ts +12 -1
  219. package/lib/view/overlay/Grid.js +83 -21
  220. package/lib/view/overlay/OutlineOverlay.d.ts +1 -0
  221. package/lib/view/overlay/OutlineOverlay.js +18 -17
  222. package/lib/view/overlay/gridConfig.d.ts +46 -0
  223. package/lib/view/overlay/gridConfig.js +104 -0
  224. package/lib/view/shape/Polygon.d.ts +0 -7
  225. package/lib/view/shape/Polygon.js +13 -45
  226. package/package.json +9 -2
  227. package/scripts/postinstall-ai-prompt.js +67 -0
  228. package/.turbo/turbo-build$colon$dev.log +0 -10
  229. package/.turbo/turbo-build.log +0 -33
  230. package/CHANGELOG.md +0 -1849
  231. package/__tests__/algorithm/egde.test.ts +0 -131
  232. package/__tests__/algorithm/index.test.ts +0 -74
  233. package/__tests__/algorithm/outline.test.ts +0 -43
  234. package/__tests__/bugs/1545-spec.test.ts +0 -42
  235. package/__tests__/event/event.test.ts +0 -22
  236. package/__tests__/history/history.test.ts +0 -28
  237. package/__tests__/logicflow.test.ts +0 -575
  238. package/__tests__/model/graphmodel.test.ts +0 -87
  239. package/__tests__/util/compatible.test.ts +0 -48
  240. package/__tests__/util/edge.test.ts +0 -224
  241. package/__tests__/util/geometry.test.ts +0 -14
  242. package/__tests__/util/graph.test.ts +0 -16
  243. package/__tests__/util/matrix.test.ts +0 -41
  244. package/__tests__/util/node.test.ts +0 -68
  245. package/__tests__/util/sampling.test.ts +0 -12
  246. package/__tests__/util/vector.test.ts +0 -50
  247. package/__tests__/util/zIndex.test.ts +0 -10
  248. package/src/LogicFlow.tsx +0 -2008
  249. package/src/algorithm/edge.ts +0 -67
  250. package/src/algorithm/index.ts +0 -70
  251. package/src/algorithm/outline.ts +0 -77
  252. package/src/algorithm/rotate.ts +0 -55
  253. package/src/common/drag.ts +0 -219
  254. package/src/common/history.ts +0 -108
  255. package/src/common/index.ts +0 -6
  256. package/src/common/keyboard.ts +0 -108
  257. package/src/common/matrix.ts +0 -122
  258. package/src/common/vector.ts +0 -93
  259. package/src/constant/index.ts +0 -179
  260. package/src/event/event.md +0 -66
  261. package/src/event/eventArgs.ts +0 -643
  262. package/src/event/eventEmitter.ts +0 -156
  263. package/src/history/index.ts +0 -119
  264. package/src/index.less +0 -1
  265. package/src/index.ts +0 -26
  266. package/src/keyboard/index.ts +0 -112
  267. package/src/keyboard/shortcut.ts +0 -200
  268. package/src/model/BaseModel.ts +0 -250
  269. package/src/model/EditConfigModel.ts +0 -334
  270. package/src/model/GraphModel.ts +0 -1788
  271. package/src/model/NestedTransformModel.ts +0 -121
  272. package/src/model/SnaplineModel.ts +0 -256
  273. package/src/model/TransformModel.ts +0 -258
  274. package/src/model/edge/BaseEdgeModel.ts +0 -777
  275. package/src/model/edge/BezierEdgeModel.ts +0 -197
  276. package/src/model/edge/LineEdgeModel.ts +0 -36
  277. package/src/model/edge/PolylineEdgeModel.ts +0 -672
  278. package/src/model/edge/index.ts +0 -4
  279. package/src/model/index.ts +0 -9
  280. package/src/model/node/BaseNodeModel.ts +0 -949
  281. package/src/model/node/CircleNodeModel.ts +0 -91
  282. package/src/model/node/DiamondNodeModel.ts +0 -132
  283. package/src/model/node/EllipseNodeModel.ts +0 -98
  284. package/src/model/node/HtmlNodeModel.ts +0 -50
  285. package/src/model/node/PolygonNodeModel.ts +0 -150
  286. package/src/model/node/RectNodeModel.ts +0 -69
  287. package/src/model/node/TextNodeModel.ts +0 -54
  288. package/src/model/node/index.ts +0 -8
  289. package/src/options.ts +0 -145
  290. package/src/style/index.less +0 -261
  291. package/src/style/raw.ts +0 -220
  292. package/src/tool/MultipleSelectTool.tsx +0 -132
  293. package/src/tool/TextEditTool.tsx +0 -193
  294. package/src/tool/index.ts +0 -101
  295. package/src/typings.d.ts +0 -5
  296. package/src/util/animation.ts +0 -29
  297. package/src/util/browser.ts +0 -4
  298. package/src/util/compatible.ts +0 -15
  299. package/src/util/drag.ts +0 -220
  300. package/src/util/edge.ts +0 -1060
  301. package/src/util/geometry.ts +0 -55
  302. package/src/util/graph.ts +0 -46
  303. package/src/util/index.ts +0 -17
  304. package/src/util/matrix.ts +0 -129
  305. package/src/util/mobx.ts +0 -23
  306. package/src/util/node.ts +0 -543
  307. package/src/util/raf.ts +0 -28
  308. package/src/util/resize.ts +0 -606
  309. package/src/util/sampling.ts +0 -85
  310. package/src/util/theme.ts +0 -375
  311. package/src/util/uuid.ts +0 -26
  312. package/src/util/vector.ts +0 -93
  313. package/src/util/zIndex.ts +0 -6
  314. package/src/view/Anchor.tsx +0 -445
  315. package/src/view/Control.tsx +0 -512
  316. package/src/view/Graph.tsx +0 -141
  317. package/src/view/Rotate.tsx +0 -113
  318. package/src/view/behavior/dnd.ts +0 -162
  319. package/src/view/behavior/index.ts +0 -2
  320. package/src/view/behavior/snapline.ts +0 -16
  321. package/src/view/edge/AdjustPoint.tsx +0 -425
  322. package/src/view/edge/Arrow.tsx +0 -54
  323. package/src/view/edge/BaseEdge.tsx +0 -650
  324. package/src/view/edge/BezierEdge.tsx +0 -101
  325. package/src/view/edge/LineEdge.tsx +0 -81
  326. package/src/view/edge/PolylineEdge.tsx +0 -299
  327. package/src/view/edge/index.ts +0 -6
  328. package/src/view/index.ts +0 -8
  329. package/src/view/node/BaseNode.tsx +0 -571
  330. package/src/view/node/CircleNode.tsx +0 -21
  331. package/src/view/node/DiamondNode.tsx +0 -24
  332. package/src/view/node/EllipseNode.tsx +0 -22
  333. package/src/view/node/HtmlNode.tsx +0 -95
  334. package/src/view/node/PolygonNode.tsx +0 -28
  335. package/src/view/node/RectNode.tsx +0 -30
  336. package/src/view/node/TextNode.tsx +0 -39
  337. package/src/view/node/index.ts +0 -8
  338. package/src/view/overlay/BackgroundOverlay.tsx +0 -34
  339. package/src/view/overlay/BezierAdjustOverlay.tsx +0 -150
  340. package/src/view/overlay/CanvasOverlay.tsx +0 -288
  341. package/src/view/overlay/Grid.tsx +0 -162
  342. package/src/view/overlay/ModificationOverlay.tsx +0 -31
  343. package/src/view/overlay/OutlineOverlay.tsx +0 -170
  344. package/src/view/overlay/SnaplineOverlay.tsx +0 -44
  345. package/src/view/overlay/ToolOverlay.tsx +0 -65
  346. package/src/view/overlay/getTransformHoc.tsx +0 -50
  347. package/src/view/overlay/index.ts +0 -8
  348. package/src/view/shape/Circle.tsx +0 -41
  349. package/src/view/shape/Ellipse.tsx +0 -42
  350. package/src/view/shape/Line.tsx +0 -39
  351. package/src/view/shape/Path.tsx +0 -22
  352. package/src/view/shape/Polygon.tsx +0 -91
  353. package/src/view/shape/Polyline.tsx +0 -31
  354. package/src/view/shape/Rect.tsx +0 -44
  355. package/src/view/shape/Text.tsx +0 -169
  356. package/src/view/shape/index.ts +0 -8
  357. package/src/view/text/BaseText.tsx +0 -134
  358. package/src/view/text/LineText.tsx +0 -168
  359. package/src/view/text/index.ts +0 -2
  360. package/stats.html +0 -4842
  361. package/tsconfig.json +0 -18
@@ -0,0 +1,187 @@
1
+ ---
2
+ nav: API
3
+ group:
4
+ title: 类型字典
5
+ order: 3
6
+ title: Theme Types
7
+ toc: content
8
+ order: 2
9
+ ---
10
+ This article mainly introduces the type definitions of LogicFlow theme styles.
11
+
12
+ ## Theme
13
+ The `Theme` type defines the theme styles for various elements in LogicFlow. It includes the style configurations for nodes, edges, text, anchors, arrows, and other elements.
14
+
15
+ | Property Name | Type | Description |
16
+ | ------------- | --------------------------------------- | ----------------------------------------- |
17
+ | baseNode | [CommonTheme](#commontheme) | General theme settings for all nodes. |
18
+ | baseEdge | [EdgeTheme](#edgetheme) | General theme settings for all edges. |
19
+ | rect | [RectTheme](#recttheme) | Rectangle style. |
20
+ | circle | [CircleTheme](#circletheme) | Circle style. |
21
+ | diamond | [PolygonTheme](#polygontheme) | Diamond style. |
22
+ | ellipse | [EllipseTheme](#ellipsetheme) | Ellipse style. |
23
+ | polygon | [PolygonTheme](#polygontheme) | Polygon style. |
24
+ | line | [EdgeTheme](#edgetheme) | Straight line style. |
25
+ | polyline | [EdgePolylineTheme](#edgepolylinetheme) | Polyline style. |
26
+ | bezier | [EdgeBezierTheme](#edgebeziertheme) | Bezier curve style. |
27
+ | anchorLine | [AnchorLineTheme](#anchorlinetheme) | Style for lines drawn from anchors. |
28
+ | text | [TextNodeTheme](#textnodetheme) | Text node style. |
29
+ | nodeText | [NodeTextTheme](#nodetexttheme) | Node text style. |
30
+ | edgeText | [EdgeTextTheme](#edgetexttheme) | Edge text style. |
31
+ | inputText | [CommonTheme](#commontheme) | Input text style. |
32
+ | anchor | [AnchorTheme](#anchortheme) | Anchor style. |
33
+ | arrow | [ArrowTheme](#arrowtheme) | Arrow style on edges. |
34
+ | snapline | [EdgeTheme](#edgetheme) | Snapline style. |
35
+ | rotateControl | [CommonTheme](#commontheme) | Node rotation control point style. |
36
+ | resizeControl | [CommonTheme](#commontheme) | Node resize control point style. |
37
+ | resizeOutline | [CommonTheme](#commontheme) | Outline style when resizing nodes. |
38
+ | edgeAdjust | [CircleTheme](#circletheme) | Adjustment point style for edge segments. |
39
+ | outline | [OutlineTheme](#outlinetheme) | Outline style when nodes are selected. |
40
+ | edgeAnimation | [EdgeAnimation](#edgeanimation) | Edge animation style. |
41
+
42
+ ## CommonTheme
43
+ The `CommonTheme` type defines the common properties that can be applied to various graphical elements in the LogicFlow framework. This type serves as the foundation for other theme types, ensuring consistent styles across different components.
44
+
45
+ | Property Name | Type | Description |
46
+ | ------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47
+ | fill | string \| 'none' | The fill color of the shape. It can be a CSS color string (e.g., #000000, rgba(0, 0, 0, 0)), or the string 'none' to indicate transparency. |
48
+ | stroke | string \| 'none' | The stroke color of the shape. Similar to fill, it can be a CSS color string or 'none'. |
49
+ | strokeWidth | number | The width of the stroke. Defines the thickness of the shape's border. Note: In SVG, acceptable values can be either numbers or percentages (e.g., 10%). |
50
+ | radius | number | The corner radius of the shape, only rect, diamond and polygon can set radius. This property is optional. |
51
+ | rx | number | The x-axis radius of the corners. This property is optional. |
52
+ | ry | number | The y-axis radius of the corners. This property is optional. |
53
+ | width | number | The width of the shape. This property is optional. |
54
+ | height | number | The height of the shape. This property is optional. |
55
+ | path | string | The SVG path string that defines a custom shape. This property is optional. |
56
+ | [key: string] | unknown | Allows additional custom properties to be included in the theme and passed to the DOM. This provides flexibility for extending the theme. For more details, refer to the [SVG attribute specification](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute). |
57
+
58
+ ## Node-Related Theme Types
59
+
60
+ ### RectTheme
61
+
62
+ The `RectTheme` type represents the theme for rectangle nodes, inheriting from [CommonTheme](#commontheme) without additional extensions.
63
+
64
+ ### CircleTheme
65
+
66
+ The `CircleTheme` type represents the theme for circle nodes, inheriting from [CommonTheme](#commontheme) without additional extensions.
67
+
68
+ ### PolygonTheme
69
+
70
+ The `PolygonTheme` type represents the theme for polygon nodes. It inherits from [CommonTheme](#commontheme) without additional extensions.
71
+
72
+ ### EllipseTheme
73
+
74
+ The `EllipseTheme` type represents the theme for ellipse nodes. It inherits from [CommonTheme](#commontheme) without additional extensions.
75
+
76
+ ## Edge-Related Theme Types
77
+
78
+ Various edge theme types defined in LogicFlow extend from [CommonTheme](#commontheme). They are used to define the styles and properties of edges in the flowchart.
79
+
80
+ ### EdgeTheme
81
+ The `EdgeTheme` type represents the theme for straight edges. In addition to the common properties from [CommonTheme](#commontheme), it extends with the following specific properties:
82
+
83
+ | Property Name | Type | Description |
84
+ | --------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------ |
85
+ | strokeDasharray | string | Defines the dash pattern used for the stroke path, including the pattern of dashes and gaps. |
86
+ | animation | [EdgeAnimation](#edgeanimation) | Defines the animation properties for the edge, including stroke color, dash pattern, and animation duration. |
87
+
88
+ ### EdgePolylineTheme
89
+ The `EdgePolylineTheme` type represents the theme for polyline edges. It is the same as the [EdgeTheme](#edgetheme) type without additional extensions.
90
+
91
+ ### EdgeBezierTheme
92
+ The `EdgeBezierTheme` type represents the theme for bezier curve edges. It extends the straight edge with the following specific properties:
93
+
94
+ | Property Name | Type | Description |
95
+ | ------------- | --------------------------- | --------------------------------------------------- |
96
+ | adjustLine | [EdgeTheme](#edgetheme) | Defines the theme for the bezier adjustment line. |
97
+ | adjustAnchor | [CircleTheme](#circletheme) | Defines the theme for the bezier adjustment anchor. |
98
+
99
+ ### EdgeAnimation
100
+ The `EdgeAnimation` type defines the animation style for edges. It includes the following properties:
101
+
102
+ | Property Name | Type | Description |
103
+ | ----------------------- | ------------------------- | -------------------------------------------------------------------------- |
104
+ | stroke | string \| 'none' | The stroke color for the animation. |
105
+ | strokeDasharray | string | The dash pattern for the animation. |
106
+ | strokeDashoffset | ${number}% \| number | The dash offset for the animation. |
107
+ | animationName | string | The name of the animation. |
108
+ | animationDuration | ${number}s \| ${number}ms | The duration of the animation. |
109
+ | animationIterationCount | 'infinite' \| number | The number of iterations for the animation, can be a number or 'infinite'. |
110
+ | animationTimingFunction | string | The timing function for the animation. |
111
+ | animationDirection | string | The direction of the animation. |
112
+
113
+ ## Text-Related Theme Types
114
+
115
+ ### TextTheme
116
+ The `TextTheme` type represents the most basic theme for text. It inherits from [CommonTheme](#commontheme) and extends with the following properties:
117
+
118
+ | Property Name | Type | Description |
119
+ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
120
+ | color | string \| 'none' | The color of the text. |
121
+ | fontSize | number | The font size. |
122
+ | textWidth | number (optional) | The width of the text. |
123
+ | lineHeight | number (optional) | The line height. |
124
+ | textAnchor | 'start' \| 'middle' \| 'end' (optional) | The text anchor. |
125
+ | dominantBaseline | 'auto' \| 'text-bottom' \| 'alphabetic' \| 'ideographic' \| 'middle' \| 'central' \| 'mathematical' \| 'hanging' \| 'text-top' (optional) | The dominant baseline. |
126
+
127
+ ### TextNodeTheme
128
+ The `TextNodeTheme` type defines the theme for text nodes. It inherits from `TextTheme` and extends with the following property:
129
+
130
+ | Property Name | Type | Description |
131
+ | ------------- | ---------------------------------- | --------------------------------------- |
132
+ | background | [RectTheme](#recttheme) (optional) | The background style for the text node. |
133
+
134
+ ### NodeTextTheme
135
+ The `NodeTextTheme` type defines the theme for text on nodes. It inherits from `TextTheme` and extends with the following properties:
136
+
137
+ | Property Name | Type | Description |
138
+ | ------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
139
+ | overflowMode | 'default' \| 'autoWrap' \| 'ellipsis' (optional) | The handling of text overflow: <br> - 'default': No special handling, allows overflow. <br> - 'autoWrap': Automatically wraps text when it overflows. <br> - 'ellipsis': Truncates text with ellipsis when it overflows. |
140
+ | textWidth | number (optional) | The width of the text. |
141
+ | background | [RectTheme](#recttheme) (optional) | The background style for the text. |
142
+ | wrapPadding | string (optional) | The padding for the background area, e.g., '5px,10px'. |
143
+
144
+ ### EdgeTextTheme
145
+ The `EdgeTextTheme` type defines the theme for text on edges. It inherits from `NodeTextTheme` and `TextTheme`, and adds some properties specific to edge text:
146
+
147
+ | Property Name | Type | Description |
148
+ | ------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
149
+ | textWidth | number | The width of the text. |
150
+ | background | { wrapPadding?: string } & [RectTheme](#recttheme) (optional) | The background style for the text, including padding for the background area. <br> - wrapPadding (optional): The padding for the background area, e.g., '5px,10px'. |
151
+ | hover | [EdgeTextTheme](#edgetexttheme) (optional) | The text style when hovered. |
152
+
153
+ ## Other Theme Types
154
+
155
+ ### AnchorTheme
156
+ The `AnchorTheme` type represents the theme for anchors. It inherits from [CommonTheme](#commontheme) and extends with the following specific properties:
157
+
158
+ | Property Name | Type | Description |
159
+ | ------------- | ------------------------------------------------------- | ---------------------------------------- |
160
+ | r | number (optional) | The radius of the anchor. |
161
+ | hover | { r?: number } & [CommonTheme](#commontheme) (optional) | Defines the hover effect for the anchor. |
162
+
163
+ ### OutlineTheme
164
+ The `OutlineTheme` type defines the theme for the outline of nodes when selected. It inherits from [CommonTheme](#commontheme) and `EdgeAnimation`, and extends with the following specific property:
165
+
166
+ | Property Name | Type | Description |
167
+ | ------------- | -------------------------------------- | ----------------------- |
168
+ | hover | [CommonTheme](#commontheme) (optional) | The style when hovered. |
169
+
170
+ ### ArrowTheme
171
+ The `ArrowTheme` type defines the theme for arrows on edges. It inherits from [CommonTheme](#commontheme) and adds some properties specific to arrows:
172
+
173
+ | Property Name | Type | Description |
174
+ | -------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
175
+ | offset | number | The length of the arrow. For example, for the symbol "->", offset represents the width of the greater-than sign. |
176
+ | refX | number (optional) | The x-axis reference point of the SVG marker, used to control the arrow's horizontal offset relative to the edge endpoint. |
177
+ | refY | number (optional) | The y-axis reference point of the SVG marker, used to control the arrow's vertical offset relative to the edge endpoint. |
178
+ | verticalLength | number | The arrow length perpendicular to the edge direction. For example, for the symbol "->", verticalLength represents the height of the greater-than sign. |
179
+ | endArrowType | string (optional) | The end arrow type. LogicFlow internally supports the following 5 types of arrows: <br/>`solid`: Solid arrow (default)<br/>`hollow`: Line arrow<br/>`diamond`: Diamond arrow<br/>`circle`: Circle arrow<br/>`none`: No arrow |
180
+ | startArrowType | string (optional) | The start arrow type. LogicFlow internally supports the following 5 types of arrows: <br/>`solid`: Solid arrow (default)<br/>`hollow`: Line arrow<br/>`diamond`: Diamond arrow<br/>`circle`: Circle arrow<br/>`none`: No arrow |
181
+ | strokeLinecap | string (optional) | The end style of the line, same as SVG strokeLinecap, supports three values: 'butt', 'round', 'square' |
182
+ | strokeLinejoin | string (optional) | The join style of the line, same as SVG strokeLinejoin, supports three values: 'miter', 'round', 'bevel' |
183
+
184
+ ### AnchorLineTheme
185
+ The `AnchorLineTheme` type represents the theme for lines drawn from anchors. It inherits from [EdgeTheme](#edgetheme) and `EdgeAnimation`.
186
+
187
+ These node theme types allow for the customization of node appearances in the LogicFlow library while maintaining a consistent theme structure through the inheritance of [CommonTheme](#commontheme), providing flexible visual representations.
@@ -0,0 +1,187 @@
1
+ ---
2
+ nav: API
3
+ group:
4
+ title: 类型字典
5
+ order: 3
6
+ title: 主题相关
7
+ toc: content
8
+ order: 5
9
+ ---
10
+ 本文主要介绍 LogicFlow 主题样式的类型定义。
11
+
12
+ ## Theme(主题配置)
13
+ `Theme` 类型定义了 LogicFlow 中各种元素的主题样式。它包含了节点、边、文本、锚点、箭头等元素的样式配置。
14
+
15
+ | 属性名 | 类型 | 描述 |
16
+ | ------------- | --------------------------------------- | ------------------------------ |
17
+ | baseNode | [CommonTheme](#commontheme) | 所有节点的通用主题设置。 |
18
+ | baseEdge | [EdgeTheme](#edgetheme) | 所有边的通用主题设置。 |
19
+ | rect | [RectTheme](#recttheme) | 矩形样式。 |
20
+ | circle | [CircleTheme](#circletheme) | 圆形样式。 |
21
+ | diamond | [PolygonTheme](#polygontheme) | 菱形样式。 |
22
+ | ellipse | [EllipseTheme](#ellipsetheme) | 椭圆样式。 |
23
+ | polygon | [PolygonTheme](#polygontheme) | 多边形样式。 |
24
+ | line | [EdgeTheme](#edgetheme) | 直线样式。 |
25
+ | polyline | [EdgePolylineTheme](#edgepolylinetheme) | 折线样式。 |
26
+ | bezier | [EdgeBezierTheme](#edgebeziertheme) | 贝塞尔曲线样式。 |
27
+ | anchorLine | [AnchorLineTheme](#anchorlinetheme) | 从锚点拉出的边的样式。 |
28
+ | text | [TextNodeTheme](#textnodetheme) | 文本节点样式。 |
29
+ | nodeText | [NodeTextTheme](#nodetexttheme) | 节点文本样式。 |
30
+ | edgeText | [EdgeTextTheme](#edgetexttheme) | 边文本样式。 |
31
+ | inputText | [CommonTheme](#commontheme)(可选) | 输入文本样式。 |
32
+ | anchor | [AnchorTheme](#anchortheme) | 锚点样式。 |
33
+ | arrow | [ArrowTheme](#arrowtheme) | 边上箭头的样式。 |
34
+ | snapline | [EdgeTheme](#edgetheme) | 对齐线样式。 |
35
+ | rotateControl | [CommonTheme](#commontheme) | 节点旋转控制点样式。 |
36
+ | resizeControl | [CommonTheme](#commontheme) | 节点缩放控制点样式。 |
37
+ | resizeOutline | [CommonTheme](#commontheme) | 节点调整大小时的外框样式。 |
38
+ | edgeAdjust | [CircleTheme](#circletheme) | 边连段的调整点样式。 |
39
+ | outline | [OutlineTheme](#outlinetheme) | 节点选择状态下外侧的选框样式。 |
40
+ | edgeAnimation | [EdgeAnimation](#edgeanimation) | 边动画样式。 |
41
+
42
+ ## CommonTheme(通用主题)
43
+ `CommonTheme` 类型定义了 LogicFlow 框架中各种图形元素可应用的通用属性。该类型作为其他主题类型的基础,使不同组件之间的样式保持一致。
44
+
45
+ | 属性名 | 类型 | 描述 |
46
+ | ------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47
+ | fill | string \| 'none' | 形状的填充颜色。可以是 CSS 颜色字符串(如 #000000、rgba(0, 0, 0, 0)),或者字符串 'none' 表示透明。 |
48
+ | stroke | string \| 'none' | 形状的描边颜色。与 fill 类似,可以是 CSS 颜色字符串或 'none'。 |
49
+ | strokeWidth | number | 描边的宽度。定义形状边框的厚度。注意:在 SVG 中可接受的值既可以是数字,也可以是百分比(如 10%)。 |
50
+ | radius | number | 形状的圆角半径,目前矩形、多边形和菱形支持设置圆角。此属性为可选项。 |
51
+ | rx | number | x 轴方向的圆角半径。此属性为可选项。 |
52
+ | ry | number | y 轴方向的圆角半径。此属性为可选项。 |
53
+ | width | number | 形状的宽度。此属性为可选项。 |
54
+ | height | number | 形状的高度。此属性为可选项。 |
55
+ | path | string | 定义自定义形状的 SVG 路径字符串。此属性为可选项。 |
56
+ | [key: string] | unknown | 允许在主题中包含额外的自定义属性,并将其传递给 DOM。这为扩展主题提供了灵活性。详情请参考 [svg 属性规范](https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute) |
57
+
58
+ ## NodeTheme(节点主题)
59
+
60
+ ### RectTheme
61
+
62
+ `RectTheme` 类型表示矩形节点的主题,它继承自 [CommonTheme](#commontheme),没有做额外的扩展;
63
+
64
+ ### CircleTheme
65
+
66
+ `CircleTheme` 类型表示圆形节点的主题,它同样继承自 [CommonTheme](#commontheme),没有做额外的扩展;
67
+
68
+ ### PolygonTheme
69
+
70
+ `PolygonTheme` 类型表示多边形节点的主题。它继承自 [CommonTheme](#commontheme),没有做额外的扩展;
71
+
72
+ ### EllipseTheme
73
+
74
+ `EllipseTheme` 类型表示椭圆形节点的主题。它继承自 [CommonTheme](#commontheme),没有做额外的扩展;
75
+
76
+ ## EdgeTheme(边主题)
77
+
78
+ LogicFlow 中定义的各种边主题类型都扩展自 [CommonTheme](#commontheme)。它用于定义流程图中边的样式和属性。
79
+
80
+ `EdgeTheme` 类型表示直线边的主题,除了[CommonTheme](#commontheme)中的通用属性外,还扩展了以下特定的属性:
81
+
82
+ | 属性名 | 类型 | 描述 |
83
+ | --------------- | ------------------------------- | ------------------------------------------------------ |
84
+ | strokeDasharray | string | 定义用于描边路径的虚线模式,包括短划线和间隙的模式。 |
85
+ | animation | [EdgeAnimation](#edgeanimation) | 定义边的动画属性,包括描边颜色、虚线模式和动画时长等。 |
86
+
87
+ ### EdgePolylineTheme
88
+ `EdgePolylineTheme`表示折线边的主题,它与[EdgeTheme](#edgetheme)类型相同,且没有做额外扩展。
89
+
90
+ ### EdgeBezierTheme
91
+ `EdgeBezierTheme` 表示曲线边的主题,曲线边在直线边的基础上扩展了以下特定属性:
92
+
93
+ | 属性名 | 类型 | 描述 |
94
+ | ------------ | --------------------------- | ------------------------ |
95
+ | adjustLine | [EdgeTheme](#edgetheme) | 定义贝塞尔调整线主题。 |
96
+ | adjustAnchor | [CircleTheme](#circletheme) | 定义贝塞尔调整锚点主题。 |
97
+
98
+ ### EdgeAnimation
99
+ `EdgeAnimation` 类型定义了边的动画样式,它包含以下属性:
100
+
101
+ | 属性名 | 类型 | 描述 |
102
+ | ----------------------- | ------------------------- | --------------------------------------- |
103
+ | stroke | string \| 'none' | 动画的边框颜色。 |
104
+ | strokeDasharray | string | 动画的虚线样式。 |
105
+ | strokeDashoffset | ${number}% \| number | 动画的虚线偏移量。 |
106
+ | animationName | string | 动画名称。 |
107
+ | animationDuration | ${number}s \| ${number}ms | 动画持续时间。 |
108
+ | animationIterationCount | 'infinite' \| number | 动画循环次数,可以是数字或 'infinite'。 |
109
+ | animationTimingFunction | string | 动画的时间函数。 |
110
+ | animationDirection | string | 动画的方向。 |
111
+
112
+ ## TextTheme(文本主题)
113
+
114
+ `TextTheme`表示文本最基础的主题,它继承自 [CommonTheme](#commontheme),额外扩展了以下属性:
115
+
116
+ | 属性名 | 类型 | 描述 |
117
+ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
118
+ | color | string \| 'none' | 文本颜色。 |
119
+ | fontSize | number | 字体大小。 |
120
+ | textWidth | number (可选) | 文本宽度。 |
121
+ | lineHeight | number (可选) | 行高。 |
122
+ | textAnchor | 'start' \| 'middle' \| 'end' (可选) | 文本锚点。 |
123
+ | dominantBaseline | 'auto' \| 'text-bottom' \| 'alphabetic' \| 'ideographic' \| 'middle' \| 'central' \| 'mathematical' \| 'hanging' \| 'text-top' (可选) | 基线对齐方式。 |
124
+
125
+ ### TextNodeTheme
126
+ `TextNodeTheme` 类型定义了文本节点的主题样式。它继承自 `TextTheme`,额外扩展了以下属性:
127
+
128
+ | 属性名 | 类型 | 描述 |
129
+ | ---------- | ------------------------------ | -------------------- |
130
+ | background | [RectTheme](#recttheme) (可选) | 文本节点的背景样式。 |
131
+
132
+ ### NodeTextTheme
133
+ `NodeTextTheme` 类型定义了节点上文本的主题样式。它继承自 `TextTheme`,额外扩展了以下属性:
134
+
135
+ | 属性名 | 类型 | 描述 |
136
+ | ------------ | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
137
+ | overflowMode | 'default' \| 'autoWrap' \| 'ellipsis' (可选) | 文本超出指定宽度的处理方式:<br> - 'default': 不特殊处理,允许超出。<br> - 'autoWrap': 超出自动换行。<br> - 'ellipsis': 超出省略。 |
138
+ | textWidth | number (可选) | 文本宽度。 |
139
+ | background | [RectTheme](#recttheme) (可选) | 文本背景样式。 |
140
+ | wrapPadding | string (可选) | 背景区域的内边距,例如 '5px,10px'。 |
141
+
142
+ ### EdgeTextTheme
143
+ `EdgeTextTheme` 类型定义了边上文本的主题样式。它继承自 `NodeTextTheme` 和 `TextTheme`,并添加了一些特定于边文本的属性:
144
+
145
+ | 属性名 | 类型 | 描述 |
146
+ | ---------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
147
+ | textWidth | number | 文本宽度。 |
148
+ | background | { wrapPadding?: string } & [RectTheme](#recttheme) (可选) | 文本背景样式,包含背景区域的内边距。<br> - wrapPadding (可选): 背景区域的内边距,例如 '5px,10px'。 |
149
+ | hover | [EdgeTextTheme](#edgetexttheme) (可选) | 悬停状态下的文本样式。 |
150
+
151
+
152
+ ## 其他主题类型
153
+
154
+ ### AnchorTheme
155
+ `AnchorTheme`类型表示锚点的主题,它继承自 [CommonTheme](#commontheme),扩展了以下特定属性:
156
+
157
+ | 属性名 | 类型 | 描述 |
158
+ | ------ | --------------------------------------------------- | ----------------------- |
159
+ | r | number (可选) | 锚点半径。 |
160
+ | hover | { r?: number } & [CommonTheme](#commontheme) (可选) | 定义锚点的 hover 效果。 |
161
+
162
+ ### OutlineTheme
163
+ `OutlineTheme` 类型定义了节点选择状态下外侧选框的主题样式。它继承自 [CommonTheme](#commontheme) 和 `EdgeAnimation`,扩展了以下特定属性:
164
+
165
+ | 属性名 | 类型 | 描述 |
166
+ | ------ | ---------------------------------- | ------------------ |
167
+ | hover | [CommonTheme](#commontheme) (可选) | 悬停状态下的样式。 |
168
+
169
+ ### ArrowTheme
170
+ `ArrowTheme` 类型定义了边上箭头的主题样式。它继承自 [CommonTheme](#commontheme),并添加了一些特定于箭头的属性:
171
+
172
+ | 属性名 | 类型 | 描述 |
173
+ | -------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
174
+ | offset | number | 箭头长度。例如,对于符号 "->",offset 表示箭头大于号的宽度。 |
175
+ | refX | number (可选) | SVG marker 的 x 轴参考点,用于控制箭头相对边终点的水平偏移。 |
176
+ | refY | number (可选) | SVG marker 的 y 轴参考点,用于控制箭头相对边终点的垂直偏移。 |
177
+ | verticalLength | number | 箭头垂直于边方向的长度。例如,对于符号 "->",verticalLength 表示箭头大于号的高度。 |
178
+ | endArrowType | string (可选) | 终点箭头类型,目前 LogicFlow 内置支持用户设置以下 5 种箭头:<br/>`solid`: 实心箭头<br/>`hollow`: 线条箭头<br/>`diamond`: 菱形箭头<br/>`circle`: 圆形箭头<br/>`none`: 无箭头<br/>内部默认会用 `solid` |
179
+ | startArrowType | string (可选) | 起点箭头类型,目前 LogicFlow 内置支持用户设置以下 5 种箭头:<br/>`solid`: 实心箭头<br/>`hollow`: 线条箭头<br/>`diamond`: 菱形箭头<br/>`circle`: 圆形箭头<br/>`none`: 无箭头<br/>内部默认会用 `solid` |
180
+ | strokeLinecap | string (可选) | 线条的端点样式,作用同SVG strokeLinecap,支持传入:'butt'、'round'、'square' 三个值 |
181
+ | strokeLinejoin | string (可选) | 线条的连接样式,作用同SVG strokeLinecap,支持传入:'miter'、'round'、'bevel' 三个值 |
182
+
183
+ ### AnchorLineTheme
184
+ `AnchorLineTheme`类型表示节点锚点拖出的连线的主题,它继承自 [EdgeTheme](#edgetheme) 和 `EdgeAnimation`。
185
+
186
+ 这些节点主题类型允许在 LogicFlow 库中自定义节点的外观,同时通过继承 [CommonTheme](#commontheme) 保持一致的主题结构,从而提供灵活的可视化表现。
187
+
@@ -0,0 +1,25 @@
1
+ ---
2
+ nav: API
3
+ group:
4
+ title: Type dictionary
5
+ order: 3
6
+ title: Canvas-related types
7
+ toc: content
8
+ order: 2
9
+ ---
10
+
11
+ This page indexes graph, coordinate, and interaction types used when rendering or exporting data. See [`MainTypes.en.md`](./MainTypes.en.md) for full definitions.
12
+
13
+ | Type | Description |
14
+ | :--- | :--- |
15
+ | [`GraphConfigData`](./MainTypes.en.md#graphconfigdata) | Input shape for `render` |
16
+ | [`GraphData`](./MainTypes.en.md#graphdata) | Native LogicFlow graph snapshot |
17
+ | [`GraphElement`](./MainTypes.en.md#graphelement) | Node-or-edge union |
18
+ | [`GraphElementCtor`](./MainTypes.en.md#graphelementctor) | Element constructor typing |
19
+ | [`Position`](./MainTypes.en.md#position) | 2D coordinate |
20
+ | [`Point`](./MainTypes.en.md#point) | Point struct |
21
+ | [`PointTuple`](./MainTypes.en.md#pointtuple) | Tuple pair |
22
+ | [`PropertiesType`](./MainTypes.en.md#propertiestype) | Custom properties bag |
23
+ | [`TextConfig`](./MainTypes.en.md#textconfig) | Text configuration |
24
+ | [`ClientPosition`](./MainTypes.en.md#clientposition) | Pointer payload for events |
25
+ | [`ElementState`](./MainTypes.en.md#elementstate) | Element state codes |
@@ -0,0 +1,25 @@
1
+ ---
2
+ nav: API
3
+ group:
4
+ title: 类型字典
5
+ order: 3
6
+ title: 画布相关
7
+ toc: content
8
+ order: 2
9
+ ---
10
+
11
+ 本页汇总画布渲染、读写与坐标相关类型。详细定义见 [`配置相关`](./MainTypes.zh.md) 对应章节。
12
+
13
+ | 类型 | 说明 |
14
+ | :--- | :--- |
15
+ | [`GraphConfigData`](./MainTypes.zh.md#graphconfigdata流程图渲染数据类型) | 流程图渲染入参类型。 |
16
+ | [`GraphData`](./MainTypes.zh.md#graphdata画布数据) | 画布导出数据类型。 |
17
+ | [`GraphElement`](./MainTypes.zh.md#graphelement) | 画布元素(节点或边)联合类型。 |
18
+ | [`GraphElementCtor`](./MainTypes.zh.md#graphelementctor画布元素构造函数) | 画布元素构造函数类型。 |
19
+ | [`Position`](./MainTypes.zh.md#position坐标类型) | 二维坐标基础类型。 |
20
+ | [`Point`](./MainTypes.zh.md#point点类型) | 点结构类型。 |
21
+ | [`PointTuple`](./MainTypes.zh.md#pointtuple点坐标组) | 点坐标元组类型。 |
22
+ | [`PropertiesType`](./MainTypes.zh.md#propertiestype元素属性) | 元素属性类型。 |
23
+ | [`TextConfig`](./MainTypes.zh.md#textconfig文本配置) | 文本配置类型。 |
24
+ | [`ClientPosition`](./MainTypes.zh.md#clientposition元素位置) | 事件坐标位置类型。 |
25
+ | [`ElementState`](./MainTypes.zh.md#elementstate元素状态) | 元素状态码类型。 |
@@ -0,0 +1,96 @@
1
+ ---
2
+ nav: API
3
+ group:
4
+ title: 类型字典
5
+ order: 3
6
+ title: 类型定义字典
7
+ toc: content
8
+ order: 0
9
+ ---
10
+
11
+ Welcome to the LogicFlow type reference for **API**. This section indexes types used by constructor options and runtime APIs.
12
+
13
+ **Documents in this group**
14
+
15
+ - Theme style types: [`Theme Types`](./Theme.en.md)
16
+ - Full type dictionary: [`Core Types (MainTypes)`](./MainTypes.en.md)
17
+ - Canvas-related index: [`Canvas-related types`](./canvas-types.en.md)
18
+ - Node-related index: [`Node-related types`](./node-types.en.md)
19
+ - Plugin-related index: [`Built-in plugin types`](./plugin-types.en.md)
20
+
21
+ Below is an overview of the types defined in LogicFlow:
22
+
23
+ ## Theme Style Related Types
24
+
25
+ - [Theme](Theme.en.md#theme): The LogicFlow theme configuration for styling supported elements.
26
+ - [CommonTheme](Theme.en.md#commontheme): The base for all theme variants, providing common properties such as `fill`, `stroke`, and `strokeWidth`.
27
+ - [Node-related themes](Theme.en.md#node-related-theme-types): Shape themes such as `RectTheme`, `CircleTheme`, `PolygonTheme`, and `EllipseTheme`, inheriting from `CommonTheme`.
28
+ - [EdgeTheme](Theme.en.md#edgetheme): Extends `CommonTheme` and adds edge-specific styling properties for fine-grained control.
29
+ - [TextTheme](Theme.en.md#texttheme): Text styling properties including `color`, `fontSize`, and `textAnchor`; extends `CommonTheme`.
30
+
31
+ ## Instance Related
32
+
33
+ - [Common](MainTypes.en.md#common): Basic LogicFlow instance configuration, including the canvas DOM node, width, height, etc.
34
+ - [BackgroundConfig](MainTypes.en.md#backgroundconfig): Canvas background configuration, including background image and tiling mode.
35
+ - [GridOptions](MainTypes.en.md#gridoptions): Canvas grid configuration, including grid size, visibility, and grid type.
36
+ - [KeyboardDef](MainTypes.en.md#keyboarddef): Keyboard shortcut configuration, including enable state and key combinations.
37
+ - [EdgeType](MainTypes.en.md#edgetype): Edge types including straight line, polyline, and bezier curve.
38
+ - [AnimationConfig](MainTypes.en.md#animationconfig): Animation configuration, including whether node and edge animations are enabled.
39
+ - [EdgeGeneratorType](MainTypes.en.md#edgegeneratortype): Custom edge generator type, used to generate different edge types based on node type.
40
+ - [customTargetAnchorType](MainTypes.en.md#customtargetanchortype): Custom anchor connection rule function type, used to decide which anchor to connect when a manual connection drops on the target node.
41
+ - [GuardsConfig](MainTypes.en.md#guardsconfig): Guard configuration for intercepting clone or delete actions.
42
+ - [AppendConfig](MainTypes.en.md#appendconfig): Polyline segment selection info, including start and end indices, direction, and whether it is draggable.
43
+ - [ArrowConfig](MainTypes.en.md#arrowconfig): Arrow configuration, including styles for arrow start and end.
44
+ - [AttributesType](MainTypes.en.md#attributestype): Generic attribute type, allowing custom properties to be attached to LogicFlow elements.
45
+ - [RegisterConfig](MainTypes.en.md#registerconfig): Configuration for registering new elements, including element type, view component, and model constructor.
46
+ - [RegisterElement](MainTypes.en.md#registerelement): Configuration for registering new element types, including view component and data model.
47
+ - [RegisterElementFunc](MainTypes.en.md#registerelementfunc): Function type for registering elements; accepts registration parameters and returns the registered element object.
48
+ - [RegisterParam](MainTypes.en.md#registerparam): Parameter type for registering elements, including hyperscript function and other custom properties.
49
+ - [BaseNodeModelCtor](MainTypes.en.md#basenodemodelctor): Constructor type for base node models, used to create node model instances.
50
+ - [BaseEdgeModelCtor](MainTypes.en.md#baseedgemodelctor): Constructor type for base edge models, used to create edge model instances.
51
+
52
+ ## Canvas Related
53
+
54
+ - [GraphConfigData](MainTypes.en.md#graphconfigdata): Flowchart rendering data type, including node and edge configurations.
55
+ - [GraphData](MainTypes.en.md#graphdata): Canvas data type, including the data structures of nodes and edges.
56
+ - [GraphElement](MainTypes.en.md#graphelement): Element type on the canvas, including nodes and edges.
57
+ - [GraphElementCtor](MainTypes.en.md#graphelementctor): Constructor type for canvas elements, used to create node or edge instances.
58
+ - [Position](MainTypes.en.md#position): Coordinate type for a point in 2D space, including x and y.
59
+ - [Point](MainTypes.en.md#point): Extends `Position`, represents a point in 2D space with optional id and other attributes.
60
+ - [PointTuple](MainTypes.en.md#pointtuple): A tuple representing a point in 2D space, with two numeric values for x and y.
61
+ - [PropertiesType](MainTypes.en.md#propertiestype): Element property type, including width, height, style, and text style.
62
+ - [TextConfig](MainTypes.en.md#textconfig): Configuration for text elements, including content, position, editing, and drag options.
63
+ - [ClientPosition](MainTypes.en.md#clientposition): Represents event positions relative to the DOM overlay and the canvas overlay.
64
+
65
+ ## Node Related
66
+
67
+ - [NodeConfig](MainTypes.en.md#nodeconfig): Node configuration structure, including identity, position, and behavior.
68
+ - [OffsetData](MainTypes.en.md#offsetdata): Data structure representing node drag offset.
69
+ - [FakeNodeConfig](MainTypes.en.md#fakenodeconfig): Configuration for a temporary node used during drag-create.
70
+ - [VectorData](MainTypes.en.md#vectordata): Vector data, including changes along the x and y axes.
71
+ - [DomAttributes](MainTypes.en.md#domattributes): DOM attributes for nodes, including CSS class name and other custom attributes.
72
+
73
+ ## Edge Related
74
+
75
+ - [EdgeConfig](MainTypes.en.md#edgeconfig): Edge configuration structure, including edge properties, source, and target.
76
+ - [EdgeData](MainTypes.en.md#edgedata): Extends `EdgeConfig`, representing edge data structure and behavior.
77
+
78
+ ## Plugin Related
79
+
80
+ - [Extension](MainTypes.en.md#extension): Defines the structure and behavior of extensions in the LogicFlow framework, including render and destroy methods.
81
+ - [ExtensionRenderFunc](MainTypes.en.md#extensionrenderfunc): Render function type for plugins, used to render extension content in LogicFlow.
82
+ - [ExtensionType](MainTypes.en.md#extensiontype): Different forms of extensions available in LogicFlow, including constructor and object definitions.
83
+ - [ExtensionConfig](MainTypes.en.md#extensionconfig): Configuration for extensions, including plugin identifier, extension behavior, and extra properties.
84
+ - [IExtensionProps](MainTypes.en.md#iextensionprops): Parameter type for plugins, including LogicFlow instance and extension properties.
85
+ - [ExtensionConstructor](MainTypes.en.md#extensionconstructor): Constructor type for creating plugin instances.
86
+ - [ExtensionDefinition](MainTypes.en.md#extensiondefinition): Object form definition for plugins, including plugin name, install, and render methods.
87
+ - [LabelConfig](MainTypes.en.md#labelconfig): Render data structure supported by the Label plugin, including label position, content, and style.
88
+ - [LabelOption](MainTypes.en.md#labeloption): Configuration settings for the Label plugin, including label direction and maximum count.
89
+ - [MenuConfig](MainTypes.en.md#menuconfig): Menu item configuration in the Menu plugin, including display text, CSS class name, icon, and callback function.
90
+
91
+ For detailed information on each type, please refer to the corresponding documentation linked above.
92
+
93
+ ## See also
94
+
95
+ - Runtime theme APIs: [`LogicFlow Instance > Theme`](../logicflow-instance/theme.en.md)
96
+ - Constructor options: [`LogicFlow Constructor`](../logicflow-constructor/index.en.md)