@rxflow/workflow 0.0.1-alpha.0

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 (446) hide show
  1. package/README.md +43 -0
  2. package/cjs/components/CanvasLoading/index.d.ts +14 -0
  3. package/cjs/components/CanvasLoading/index.d.ts.map +1 -0
  4. package/cjs/components/CanvasLoading/index.js +51 -0
  5. package/cjs/components/CanvasLoading/index.less +69 -0
  6. package/cjs/components/CodeEditor/DebugPanel/index.d.ts +16 -0
  7. package/cjs/components/CodeEditor/DebugPanel/index.d.ts.map +1 -0
  8. package/cjs/components/CodeEditor/DebugPanel/index.js +156 -0
  9. package/cjs/components/CodeEditor/DebugPanel/index.less +56 -0
  10. package/cjs/components/CodeEditor/FileTree/LibraryIcon.d.ts +11 -0
  11. package/cjs/components/CodeEditor/FileTree/LibraryIcon.d.ts.map +1 -0
  12. package/cjs/components/CodeEditor/FileTree/LibraryIcon.js +33 -0
  13. package/cjs/components/CodeEditor/FileTree/icons/Javascript.d.ts +11 -0
  14. package/cjs/components/CodeEditor/FileTree/icons/Javascript.d.ts.map +1 -0
  15. package/cjs/components/CodeEditor/FileTree/icons/Javascript.js +37 -0
  16. package/cjs/components/CodeEditor/FileTree/icons/Python.d.ts +11 -0
  17. package/cjs/components/CodeEditor/FileTree/icons/Python.d.ts.map +1 -0
  18. package/cjs/components/CodeEditor/FileTree/icons/Python.js +37 -0
  19. package/cjs/components/CodeEditor/FileTree/index.d.ts +9 -0
  20. package/cjs/components/CodeEditor/FileTree/index.d.ts.map +1 -0
  21. package/cjs/components/CodeEditor/FileTree/index.js +73 -0
  22. package/cjs/components/CodeEditor/FileTree/index.less +83 -0
  23. package/cjs/components/CodeEditor/FileTree/useFileIcon.d.ts +11 -0
  24. package/cjs/components/CodeEditor/FileTree/useFileIcon.d.ts.map +1 -0
  25. package/cjs/components/CodeEditor/FileTree/useFileIcon.js +44 -0
  26. package/cjs/components/CodeEditor/Header/index.d.ts +15 -0
  27. package/cjs/components/CodeEditor/Header/index.d.ts.map +1 -0
  28. package/cjs/components/CodeEditor/Header/index.js +51 -0
  29. package/cjs/components/CodeEditor/Header/style.less +23 -0
  30. package/cjs/components/CodeEditor/Terminal/XTerm.d.ts +5 -0
  31. package/cjs/components/CodeEditor/Terminal/XTerm.d.ts.map +1 -0
  32. package/cjs/components/CodeEditor/Terminal/XTerm.js +54 -0
  33. package/cjs/components/CodeEditor/Terminal/index.d.ts +15 -0
  34. package/cjs/components/CodeEditor/Terminal/index.d.ts.map +1 -0
  35. package/cjs/components/CodeEditor/Terminal/index.js +30 -0
  36. package/cjs/components/CodeEditor/Terminal/index.less +28 -0
  37. package/cjs/components/CodeEditor/Terminal/types.d.ts +13 -0
  38. package/cjs/components/CodeEditor/editors/JSON.d.ts +12 -0
  39. package/cjs/components/CodeEditor/editors/JSON.d.ts.map +1 -0
  40. package/cjs/components/CodeEditor/editors/JSON.js +43 -0
  41. package/cjs/components/CodeEditor/editors/Python.d.ts +4 -0
  42. package/cjs/components/CodeEditor/editors/Python.d.ts.map +1 -0
  43. package/cjs/components/CodeEditor/editors/Python.js +43 -0
  44. package/cjs/components/CodeEditor/editors/index.less +11 -0
  45. package/cjs/components/CodeEditor/editors/types.d.ts +24 -0
  46. package/cjs/components/CodeEditor/index.d.ts +7 -0
  47. package/cjs/components/CodeEditor/index.d.ts.map +1 -0
  48. package/cjs/components/CodeEditor/index.js +230 -0
  49. package/cjs/components/CodeEditor/style.less +49 -0
  50. package/cjs/components/CodeEditor/types.d.ts +46 -0
  51. package/cjs/components/Handle/NodePopover.d.ts +15 -0
  52. package/cjs/components/Handle/NodePopover.d.ts.map +1 -0
  53. package/cjs/components/Handle/NodePopover.js +169 -0
  54. package/cjs/components/Handle/index.d.ts +24 -0
  55. package/cjs/components/Handle/index.d.ts.map +1 -0
  56. package/cjs/components/Handle/index.js +165 -0
  57. package/cjs/components/Handle/index.less +111 -0
  58. package/cjs/components/InlineCodeEditor/index.d.ts +11 -0
  59. package/cjs/components/InlineCodeEditor/index.d.ts.map +1 -0
  60. package/cjs/components/InlineCodeEditor/index.js +31 -0
  61. package/cjs/components/InlineCodeEditor/index.module.less +0 -0
  62. package/cjs/components/InlineCodeEditor/types.d.ts +22 -0
  63. package/cjs/components/Layout/index.d.ts +14 -0
  64. package/cjs/components/Layout/index.d.ts.map +1 -0
  65. package/cjs/components/Layout/index.js +49 -0
  66. package/cjs/components/Layout/index.less +14 -0
  67. package/cjs/components/LoadingButton.d.ts +16 -0
  68. package/cjs/components/LoadingButton.d.ts.map +1 -0
  69. package/cjs/components/LoadingButton.js +86 -0
  70. package/cjs/components/Sider/index.d.ts +15 -0
  71. package/cjs/components/Sider/index.d.ts.map +1 -0
  72. package/cjs/components/Sider/index.js +142 -0
  73. package/cjs/components/Sider/index.less +68 -0
  74. package/cjs/constants/RunningStatus.d.ts +14 -0
  75. package/cjs/constants/RunningStatus.d.ts.map +1 -0
  76. package/cjs/constants/RunningStatus.js +20 -0
  77. package/cjs/hooks/run/useActiveEdge.d.ts +15 -0
  78. package/cjs/hooks/run/useActiveEdge.d.ts.map +1 -0
  79. package/cjs/hooks/run/useActiveEdge.js +36 -0
  80. package/cjs/hooks/run/useCleanRunState.d.ts +9 -0
  81. package/cjs/hooks/run/useCleanRunState.d.ts.map +1 -0
  82. package/cjs/hooks/run/useCleanRunState.js +33 -0
  83. package/cjs/hooks/run/useNodeRunningState.d.ts +8 -0
  84. package/cjs/hooks/run/useNodeRunningState.d.ts.map +1 -0
  85. package/cjs/hooks/run/useNodeRunningState.js +30 -0
  86. package/cjs/hooks/run/useRunState.d.ts +21 -0
  87. package/cjs/hooks/run/useRunState.d.ts.map +1 -0
  88. package/cjs/hooks/run/useRunState.js +39 -0
  89. package/cjs/hooks/run/useSetRunState.d.ts +18 -0
  90. package/cjs/hooks/run/useSetRunState.d.ts.map +1 -0
  91. package/cjs/hooks/run/useSetRunState.js +39 -0
  92. package/cjs/hooks/state.d.ts +7 -0
  93. package/cjs/hooks/state.d.ts.map +1 -0
  94. package/cjs/hooks/state.js +13 -0
  95. package/cjs/hooks/useDeleteNode.d.ts +2 -0
  96. package/cjs/hooks/useDeleteNode.d.ts.map +1 -0
  97. package/cjs/hooks/useDeleteNode.js +32 -0
  98. package/cjs/hooks/useEdgeIsHover.d.ts +2 -0
  99. package/cjs/hooks/useEdgeIsHover.d.ts.map +1 -0
  100. package/cjs/hooks/useEdgeIsHover.js +20 -0
  101. package/cjs/hooks/useGetSelection.d.ts +13 -0
  102. package/cjs/hooks/useGetSelection.d.ts.map +1 -0
  103. package/cjs/hooks/useGetSelection.js +28 -0
  104. package/cjs/hooks/useGetUpstreamNodes.d.ts +14 -0
  105. package/cjs/hooks/useGetUpstreamNodes.d.ts.map +1 -0
  106. package/cjs/hooks/useGetUpstreamNodes.js +81 -0
  107. package/cjs/hooks/useGetWillDropTarget.d.ts +5 -0
  108. package/cjs/hooks/useGetWillDropTarget.d.ts.map +1 -0
  109. package/cjs/hooks/useGetWillDropTarget.js +27 -0
  110. package/cjs/hooks/useGroupIsWillDrop.d.ts +2 -0
  111. package/cjs/hooks/useGroupIsWillDrop.d.ts.map +1 -0
  112. package/cjs/hooks/useGroupIsWillDrop.js +20 -0
  113. package/cjs/hooks/useIsValidConnection.d.ts +12 -0
  114. package/cjs/hooks/useIsValidConnection.d.ts.map +1 -0
  115. package/cjs/hooks/useIsValidConnection.js +83 -0
  116. package/cjs/hooks/useMouseEvents.d.ts +19 -0
  117. package/cjs/hooks/useMouseEvents.d.ts.map +1 -0
  118. package/cjs/hooks/useMouseEvents.js +49 -0
  119. package/cjs/hooks/useNodeDragHandles.d.ts +10 -0
  120. package/cjs/hooks/useNodeDragHandles.d.ts.map +1 -0
  121. package/cjs/hooks/useNodeDragHandles.js +273 -0
  122. package/cjs/hooks/useNodes.d.ts +9 -0
  123. package/cjs/hooks/useNodes.d.ts.map +1 -0
  124. package/cjs/hooks/useNodes.js +19 -0
  125. package/cjs/hooks/useOnBeforeDelete.d.ts +19 -0
  126. package/cjs/hooks/useOnBeforeDelete.d.ts.map +1 -0
  127. package/cjs/hooks/useOnBeforeDelete.js +104 -0
  128. package/cjs/hooks/useOnConnect.d.ts +12 -0
  129. package/cjs/hooks/useOnConnect.d.ts.map +1 -0
  130. package/cjs/hooks/useOnConnect.js +36 -0
  131. package/cjs/hooks/useOnEdgeMouseEnter.d.ts +13 -0
  132. package/cjs/hooks/useOnEdgeMouseEnter.d.ts.map +1 -0
  133. package/cjs/hooks/useOnEdgeMouseEnter.js +27 -0
  134. package/cjs/hooks/useOnEdgeMouseLeave.d.ts +13 -0
  135. package/cjs/hooks/useOnEdgeMouseLeave.d.ts.map +1 -0
  136. package/cjs/hooks/useOnEdgeMouseLeave.js +27 -0
  137. package/cjs/hooks/useOnNodesChange.d.ts +4 -0
  138. package/cjs/hooks/useOnNodesChange.d.ts.map +1 -0
  139. package/cjs/hooks/useOnNodesChange.js +102 -0
  140. package/cjs/hooks/useOnSelectionChange.d.ts +13 -0
  141. package/cjs/hooks/useOnSelectionChange.d.ts.map +1 -0
  142. package/cjs/hooks/useOnSelectionChange.js +130 -0
  143. package/cjs/hooks/useSetEdges.d.ts +12 -0
  144. package/cjs/hooks/useSetEdges.d.ts.map +1 -0
  145. package/cjs/hooks/useSetEdges.js +29 -0
  146. package/cjs/hooks/useSetSelection.d.ts +3 -0
  147. package/cjs/hooks/useSetSelection.d.ts.map +1 -0
  148. package/cjs/hooks/useSetSelection.js +40 -0
  149. package/cjs/hooks/useSetWillDropTargets.d.ts +2 -0
  150. package/cjs/hooks/useSetWillDropTargets.d.ts.map +1 -0
  151. package/cjs/hooks/useSetWillDropTargets.js +26 -0
  152. package/cjs/hooks/useUpstream.d.ts +3 -0
  153. package/cjs/hooks/useUpstream.d.ts.map +1 -0
  154. package/cjs/hooks/useUpstream.js +105 -0
  155. package/cjs/hooks/useWatchSelectionNodes.d.ts +2 -0
  156. package/cjs/hooks/useWatchSelectionNodes.d.ts.map +1 -0
  157. package/cjs/hooks/useWatchSelectionNodes.js +22 -0
  158. package/cjs/hooks/useWorkFlow.d.ts +12 -0
  159. package/cjs/hooks/useWorkFlow.d.ts.map +1 -0
  160. package/cjs/hooks/useWorkFlow.js +93 -0
  161. package/cjs/hooks/useWorkFlowProps.d.ts +485 -0
  162. package/cjs/hooks/useWorkFlowProps.d.ts.map +1 -0
  163. package/cjs/hooks/useWorkFlowProps.js +98 -0
  164. package/cjs/index.d.ts +23 -0
  165. package/cjs/index.d.ts.map +1 -0
  166. package/cjs/index.js +77 -0
  167. package/cjs/types.d.ts +103 -0
  168. package/cjs/types.d.ts.map +1 -0
  169. package/cjs/types.js +8 -0
  170. package/cjs/utils/arrayUtils.d.ts +2 -0
  171. package/cjs/utils/arrayUtils.d.ts.map +1 -0
  172. package/cjs/utils/arrayUtils.js +23 -0
  173. package/cjs/utils/checkChildren.d.ts +11 -0
  174. package/cjs/utils/checkChildren.d.ts.map +1 -0
  175. package/cjs/utils/checkChildren.js +27 -0
  176. package/cjs/utils/dimensions.d.ts +12 -0
  177. package/cjs/utils/dimensions.d.ts.map +1 -0
  178. package/cjs/utils/dimensions.js +23 -0
  179. package/cjs/utils/dragDataTransfer.d.ts +19 -0
  180. package/cjs/utils/dragDataTransfer.d.ts.map +1 -0
  181. package/cjs/utils/dragDataTransfer.js +29 -0
  182. package/cjs/utils/dropTargetsCheck.d.ts +20 -0
  183. package/cjs/utils/dropTargetsCheck.d.ts.map +1 -0
  184. package/cjs/utils/dropTargetsCheck.js +105 -0
  185. package/cjs/utils/edgeEqualConnect.d.ts +11 -0
  186. package/cjs/utils/edgeEqualConnect.d.ts.map +1 -0
  187. package/cjs/utils/edgeEqualConnect.js +19 -0
  188. package/cjs/utils/events.d.ts +11 -0
  189. package/cjs/utils/events.d.ts.map +1 -0
  190. package/cjs/utils/events.js +19 -0
  191. package/cjs/utils/getEdgeId.d.ts +12 -0
  192. package/cjs/utils/getEdgeId.d.ts.map +1 -0
  193. package/cjs/utils/getEdgeId.js +22 -0
  194. package/cjs/utils/getParentFlow.d.ts +5 -0
  195. package/cjs/utils/getParentFlow.d.ts.map +1 -0
  196. package/cjs/utils/getParentFlow.js +36 -0
  197. package/cjs/utils/graph.d.ts +12 -0
  198. package/cjs/utils/graph.d.ts.map +1 -0
  199. package/cjs/utils/graph.js +55 -0
  200. package/cjs/utils/index.d.ts +18 -0
  201. package/cjs/utils/index.d.ts.map +1 -0
  202. package/cjs/utils/index.js +104 -0
  203. package/cjs/utils/isInSameParent.d.ts +11 -0
  204. package/cjs/utils/isInSameParent.d.ts.map +1 -0
  205. package/cjs/utils/isInSameParent.js +19 -0
  206. package/cjs/utils/parent.d.ts +23 -0
  207. package/cjs/utils/parent.d.ts.map +1 -0
  208. package/cjs/utils/parent.js +166 -0
  209. package/cjs/utils/position.d.ts +29 -0
  210. package/cjs/utils/position.d.ts.map +1 -0
  211. package/cjs/utils/position.js +67 -0
  212. package/cjs/utils/prepareInnerLookup.d.ts +16 -0
  213. package/cjs/utils/prepareInnerLookup.d.ts.map +1 -0
  214. package/cjs/utils/prepareInnerLookup.js +93 -0
  215. package/cjs/utils/scheduleCallback.d.ts +2 -0
  216. package/cjs/utils/scheduleCallback.d.ts.map +1 -0
  217. package/cjs/utils/scheduleCallback.js +38 -0
  218. package/cjs/utils/serialize.d.ts +31 -0
  219. package/cjs/utils/serialize.d.ts.map +1 -0
  220. package/cjs/utils/serialize.js +60 -0
  221. package/cjs/utils/triggerConnect.d.ts +12 -0
  222. package/cjs/utils/triggerConnect.d.ts.map +1 -0
  223. package/cjs/utils/triggerConnect.js +50 -0
  224. package/esm/components/CanvasLoading/index.d.ts +14 -0
  225. package/esm/components/CanvasLoading/index.d.ts.map +1 -0
  226. package/esm/components/CanvasLoading/index.js +45 -0
  227. package/esm/components/CanvasLoading/index.less +69 -0
  228. package/esm/components/CodeEditor/DebugPanel/index.d.ts +16 -0
  229. package/esm/components/CodeEditor/DebugPanel/index.d.ts.map +1 -0
  230. package/esm/components/CodeEditor/DebugPanel/index.js +199 -0
  231. package/esm/components/CodeEditor/DebugPanel/index.less +56 -0
  232. package/esm/components/CodeEditor/FileTree/LibraryIcon.d.ts +11 -0
  233. package/esm/components/CodeEditor/FileTree/LibraryIcon.d.ts.map +1 -0
  234. package/esm/components/CodeEditor/FileTree/LibraryIcon.js +27 -0
  235. package/esm/components/CodeEditor/FileTree/icons/Javascript.d.ts +11 -0
  236. package/esm/components/CodeEditor/FileTree/icons/Javascript.d.ts.map +1 -0
  237. package/esm/components/CodeEditor/FileTree/icons/Javascript.js +32 -0
  238. package/esm/components/CodeEditor/FileTree/icons/Python.d.ts +11 -0
  239. package/esm/components/CodeEditor/FileTree/icons/Python.d.ts.map +1 -0
  240. package/esm/components/CodeEditor/FileTree/icons/Python.js +32 -0
  241. package/esm/components/CodeEditor/FileTree/index.d.ts +9 -0
  242. package/esm/components/CodeEditor/FileTree/index.d.ts.map +1 -0
  243. package/esm/components/CodeEditor/FileTree/index.js +62 -0
  244. package/esm/components/CodeEditor/FileTree/index.less +83 -0
  245. package/esm/components/CodeEditor/FileTree/useFileIcon.d.ts +11 -0
  246. package/esm/components/CodeEditor/FileTree/useFileIcon.d.ts.map +1 -0
  247. package/esm/components/CodeEditor/FileTree/useFileIcon.js +39 -0
  248. package/esm/components/CodeEditor/Header/index.d.ts +15 -0
  249. package/esm/components/CodeEditor/Header/index.d.ts.map +1 -0
  250. package/esm/components/CodeEditor/Header/index.js +43 -0
  251. package/esm/components/CodeEditor/Header/style.less +23 -0
  252. package/esm/components/CodeEditor/Terminal/XTerm.d.ts +5 -0
  253. package/esm/components/CodeEditor/Terminal/XTerm.d.ts.map +1 -0
  254. package/esm/components/CodeEditor/Terminal/XTerm.js +59 -0
  255. package/esm/components/CodeEditor/Terminal/index.d.ts +15 -0
  256. package/esm/components/CodeEditor/Terminal/index.d.ts.map +1 -0
  257. package/esm/components/CodeEditor/Terminal/index.js +23 -0
  258. package/esm/components/CodeEditor/Terminal/index.less +28 -0
  259. package/esm/components/CodeEditor/Terminal/types.d.ts +13 -0
  260. package/esm/components/CodeEditor/editors/JSON.d.ts +12 -0
  261. package/esm/components/CodeEditor/editors/JSON.d.ts.map +1 -0
  262. package/esm/components/CodeEditor/editors/JSON.js +35 -0
  263. package/esm/components/CodeEditor/editors/Python.d.ts +4 -0
  264. package/esm/components/CodeEditor/editors/Python.d.ts.map +1 -0
  265. package/esm/components/CodeEditor/editors/Python.js +34 -0
  266. package/esm/components/CodeEditor/editors/index.less +11 -0
  267. package/esm/components/CodeEditor/editors/types.d.ts +24 -0
  268. package/esm/components/CodeEditor/index.d.ts +7 -0
  269. package/esm/components/CodeEditor/index.d.ts.map +1 -0
  270. package/esm/components/CodeEditor/index.js +233 -0
  271. package/esm/components/CodeEditor/style.less +49 -0
  272. package/esm/components/CodeEditor/types.d.ts +46 -0
  273. package/esm/components/Handle/NodePopover.d.ts +15 -0
  274. package/esm/components/Handle/NodePopover.d.ts.map +1 -0
  275. package/esm/components/Handle/NodePopover.js +165 -0
  276. package/esm/components/Handle/index.d.ts +24 -0
  277. package/esm/components/Handle/index.d.ts.map +1 -0
  278. package/esm/components/Handle/index.js +190 -0
  279. package/esm/components/Handle/index.less +111 -0
  280. package/esm/components/InlineCodeEditor/index.d.ts +11 -0
  281. package/esm/components/InlineCodeEditor/index.d.ts.map +1 -0
  282. package/esm/components/InlineCodeEditor/index.js +24 -0
  283. package/esm/components/InlineCodeEditor/index.module.less +0 -0
  284. package/esm/components/InlineCodeEditor/types.d.ts +22 -0
  285. package/esm/components/Layout/index.d.ts +14 -0
  286. package/esm/components/Layout/index.d.ts.map +1 -0
  287. package/esm/components/Layout/index.js +43 -0
  288. package/esm/components/Layout/index.less +14 -0
  289. package/esm/components/LoadingButton.d.ts +16 -0
  290. package/esm/components/LoadingButton.d.ts.map +1 -0
  291. package/esm/components/LoadingButton.js +112 -0
  292. package/esm/components/Sider/index.d.ts +15 -0
  293. package/esm/components/Sider/index.d.ts.map +1 -0
  294. package/esm/components/Sider/index.js +142 -0
  295. package/esm/components/Sider/index.less +68 -0
  296. package/esm/constants/RunningStatus.d.ts +14 -0
  297. package/esm/constants/RunningStatus.d.ts.map +1 -0
  298. package/esm/constants/RunningStatus.js +15 -0
  299. package/esm/hooks/run/useActiveEdge.d.ts +15 -0
  300. package/esm/hooks/run/useActiveEdge.d.ts.map +1 -0
  301. package/esm/hooks/run/useActiveEdge.js +30 -0
  302. package/esm/hooks/run/useCleanRunState.d.ts +9 -0
  303. package/esm/hooks/run/useCleanRunState.d.ts.map +1 -0
  304. package/esm/hooks/run/useCleanRunState.js +26 -0
  305. package/esm/hooks/run/useNodeRunningState.d.ts +8 -0
  306. package/esm/hooks/run/useNodeRunningState.d.ts.map +1 -0
  307. package/esm/hooks/run/useNodeRunningState.js +26 -0
  308. package/esm/hooks/run/useRunState.d.ts +21 -0
  309. package/esm/hooks/run/useRunState.d.ts.map +1 -0
  310. package/esm/hooks/run/useRunState.js +35 -0
  311. package/esm/hooks/run/useSetRunState.d.ts +18 -0
  312. package/esm/hooks/run/useSetRunState.d.ts.map +1 -0
  313. package/esm/hooks/run/useSetRunState.js +35 -0
  314. package/esm/hooks/state.d.ts +7 -0
  315. package/esm/hooks/state.d.ts.map +1 -0
  316. package/esm/hooks/state.js +6 -0
  317. package/esm/hooks/useDeleteNode.d.ts +2 -0
  318. package/esm/hooks/useDeleteNode.d.ts.map +1 -0
  319. package/esm/hooks/useDeleteNode.js +44 -0
  320. package/esm/hooks/useEdgeIsHover.d.ts +2 -0
  321. package/esm/hooks/useEdgeIsHover.d.ts.map +1 -0
  322. package/esm/hooks/useEdgeIsHover.js +14 -0
  323. package/esm/hooks/useGetSelection.d.ts +13 -0
  324. package/esm/hooks/useGetSelection.d.ts.map +1 -0
  325. package/esm/hooks/useGetSelection.js +21 -0
  326. package/esm/hooks/useGetUpstreamNodes.d.ts +14 -0
  327. package/esm/hooks/useGetUpstreamNodes.d.ts.map +1 -0
  328. package/esm/hooks/useGetUpstreamNodes.js +71 -0
  329. package/esm/hooks/useGetWillDropTarget.d.ts +5 -0
  330. package/esm/hooks/useGetWillDropTarget.d.ts.map +1 -0
  331. package/esm/hooks/useGetWillDropTarget.js +21 -0
  332. package/esm/hooks/useGroupIsWillDrop.d.ts +2 -0
  333. package/esm/hooks/useGroupIsWillDrop.d.ts.map +1 -0
  334. package/esm/hooks/useGroupIsWillDrop.js +14 -0
  335. package/esm/hooks/useIsValidConnection.d.ts +12 -0
  336. package/esm/hooks/useIsValidConnection.d.ts.map +1 -0
  337. package/esm/hooks/useIsValidConnection.js +82 -0
  338. package/esm/hooks/useMouseEvents.d.ts +19 -0
  339. package/esm/hooks/useMouseEvents.d.ts.map +1 -0
  340. package/esm/hooks/useMouseEvents.js +40 -0
  341. package/esm/hooks/useNodeDragHandles.d.ts +10 -0
  342. package/esm/hooks/useNodeDragHandles.d.ts.map +1 -0
  343. package/esm/hooks/useNodeDragHandles.js +311 -0
  344. package/esm/hooks/useNodes.d.ts +9 -0
  345. package/esm/hooks/useNodes.d.ts.map +1 -0
  346. package/esm/hooks/useNodes.js +14 -0
  347. package/esm/hooks/useOnBeforeDelete.d.ts +19 -0
  348. package/esm/hooks/useOnBeforeDelete.d.ts.map +1 -0
  349. package/esm/hooks/useOnBeforeDelete.js +138 -0
  350. package/esm/hooks/useOnConnect.d.ts +12 -0
  351. package/esm/hooks/useOnConnect.d.ts.map +1 -0
  352. package/esm/hooks/useOnConnect.js +26 -0
  353. package/esm/hooks/useOnEdgeMouseEnter.d.ts +13 -0
  354. package/esm/hooks/useOnEdgeMouseEnter.d.ts.map +1 -0
  355. package/esm/hooks/useOnEdgeMouseEnter.js +20 -0
  356. package/esm/hooks/useOnEdgeMouseLeave.d.ts +13 -0
  357. package/esm/hooks/useOnEdgeMouseLeave.d.ts.map +1 -0
  358. package/esm/hooks/useOnEdgeMouseLeave.js +20 -0
  359. package/esm/hooks/useOnNodesChange.d.ts +4 -0
  360. package/esm/hooks/useOnNodesChange.d.ts.map +1 -0
  361. package/esm/hooks/useOnNodesChange.js +107 -0
  362. package/esm/hooks/useOnSelectionChange.d.ts +13 -0
  363. package/esm/hooks/useOnSelectionChange.d.ts.map +1 -0
  364. package/esm/hooks/useOnSelectionChange.js +171 -0
  365. package/esm/hooks/useSetEdges.d.ts +12 -0
  366. package/esm/hooks/useSetEdges.d.ts.map +1 -0
  367. package/esm/hooks/useSetEdges.js +22 -0
  368. package/esm/hooks/useSetSelection.d.ts +3 -0
  369. package/esm/hooks/useSetSelection.d.ts.map +1 -0
  370. package/esm/hooks/useSetSelection.js +33 -0
  371. package/esm/hooks/useSetWillDropTargets.d.ts +2 -0
  372. package/esm/hooks/useSetWillDropTargets.d.ts.map +1 -0
  373. package/esm/hooks/useSetWillDropTargets.js +18 -0
  374. package/esm/hooks/useUpstream.d.ts +3 -0
  375. package/esm/hooks/useUpstream.d.ts.map +1 -0
  376. package/esm/hooks/useUpstream.js +101 -0
  377. package/esm/hooks/useWatchSelectionNodes.d.ts +2 -0
  378. package/esm/hooks/useWatchSelectionNodes.d.ts.map +1 -0
  379. package/esm/hooks/useWatchSelectionNodes.js +14 -0
  380. package/esm/hooks/useWorkFlow.d.ts +12 -0
  381. package/esm/hooks/useWorkFlow.d.ts.map +1 -0
  382. package/esm/hooks/useWorkFlow.js +92 -0
  383. package/esm/hooks/useWorkFlowProps.d.ts +485 -0
  384. package/esm/hooks/useWorkFlowProps.d.ts.map +1 -0
  385. package/esm/hooks/useWorkFlowProps.js +102 -0
  386. package/esm/index.d.ts +23 -0
  387. package/esm/index.d.ts.map +1 -0
  388. package/esm/index.js +28 -0
  389. package/esm/types.d.ts +103 -0
  390. package/esm/types.d.ts.map +1 -0
  391. package/esm/types.js +4 -0
  392. package/esm/utils/arrayUtils.d.ts +2 -0
  393. package/esm/utils/arrayUtils.d.ts.map +1 -0
  394. package/esm/utils/arrayUtils.js +16 -0
  395. package/esm/utils/checkChildren.d.ts +11 -0
  396. package/esm/utils/checkChildren.d.ts.map +1 -0
  397. package/esm/utils/checkChildren.js +16 -0
  398. package/esm/utils/dimensions.d.ts +12 -0
  399. package/esm/utils/dimensions.d.ts.map +1 -0
  400. package/esm/utils/dimensions.js +17 -0
  401. package/esm/utils/dragDataTransfer.d.ts +19 -0
  402. package/esm/utils/dragDataTransfer.d.ts.map +1 -0
  403. package/esm/utils/dragDataTransfer.js +21 -0
  404. package/esm/utils/dropTargetsCheck.d.ts +20 -0
  405. package/esm/utils/dropTargetsCheck.d.ts.map +1 -0
  406. package/esm/utils/dropTargetsCheck.js +116 -0
  407. package/esm/utils/edgeEqualConnect.d.ts +11 -0
  408. package/esm/utils/edgeEqualConnect.d.ts.map +1 -0
  409. package/esm/utils/edgeEqualConnect.js +12 -0
  410. package/esm/utils/events.d.ts +11 -0
  411. package/esm/utils/events.d.ts.map +1 -0
  412. package/esm/utils/events.js +12 -0
  413. package/esm/utils/getEdgeId.d.ts +12 -0
  414. package/esm/utils/getEdgeId.d.ts.map +1 -0
  415. package/esm/utils/getEdgeId.js +16 -0
  416. package/esm/utils/getParentFlow.d.ts +5 -0
  417. package/esm/utils/getParentFlow.d.ts.map +1 -0
  418. package/esm/utils/getParentFlow.js +28 -0
  419. package/esm/utils/graph.d.ts +12 -0
  420. package/esm/utils/graph.d.ts.map +1 -0
  421. package/esm/utils/graph.js +51 -0
  422. package/esm/utils/index.d.ts +18 -0
  423. package/esm/utils/index.d.ts.map +1 -0
  424. package/esm/utils/index.js +18 -0
  425. package/esm/utils/isInSameParent.d.ts +11 -0
  426. package/esm/utils/isInSameParent.d.ts.map +1 -0
  427. package/esm/utils/isInSameParent.js +12 -0
  428. package/esm/utils/parent.d.ts +23 -0
  429. package/esm/utils/parent.d.ts.map +1 -0
  430. package/esm/utils/parent.js +186 -0
  431. package/esm/utils/position.d.ts +29 -0
  432. package/esm/utils/position.d.ts.map +1 -0
  433. package/esm/utils/position.js +61 -0
  434. package/esm/utils/prepareInnerLookup.d.ts +16 -0
  435. package/esm/utils/prepareInnerLookup.d.ts.map +1 -0
  436. package/esm/utils/prepareInnerLookup.js +79 -0
  437. package/esm/utils/scheduleCallback.d.ts +2 -0
  438. package/esm/utils/scheduleCallback.d.ts.map +1 -0
  439. package/esm/utils/scheduleCallback.js +36 -0
  440. package/esm/utils/serialize.d.ts +31 -0
  441. package/esm/utils/serialize.d.ts.map +1 -0
  442. package/esm/utils/serialize.js +64 -0
  443. package/esm/utils/triggerConnect.d.ts +12 -0
  444. package/esm/utils/triggerConnect.d.ts.map +1 -0
  445. package/esm/utils/triggerConnect.js +59 -0
  446. package/package.json +70 -0
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-24 21:29
4
+ * @modified:2025/7/24 21:29 by yanxianliang
5
+ * @desc: LibraryIcon
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import "./index.less";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ var prefixCls = 'rxflow-code-editor';
12
+ export var LibraryIcon = function LibraryIcon() {
13
+ return /*#__PURE__*/_jsx("svg", {
14
+ className: "".concat(prefixCls, "-tree-icon"),
15
+ viewBox: "0 0 1024 1024",
16
+ version: "1.1",
17
+ xmlns: "http://www.w3.org/2000/svg",
18
+ "p-id": "2843",
19
+ width: "1em",
20
+ height: "1em",
21
+ children: /*#__PURE__*/_jsx("path", {
22
+ fill: 'currentColor',
23
+ d: "M307.478 848l29.217 29.217h123.362L489.275 848V179.246l-29.217-32.464H336.696l-29.217 32.464V848z m120.116-639.536v610.319h-58.435V208.464h58.435z m363.594 652.522l38.956 16.232 113.623-42.203L960 796.058 732.754 166.261l-38.956-16.232-113.623 42.203-19.478 38.957 230.491 629.797z m-107.13-642.783l211.014 571.362-58.435 19.478L628.87 237.681l55.188-19.478zM64 848l29.217 29.217H216.58L245.797 848V179.246l-29.217-32.464H93.217L64 179.246V848z m120.116-639.536v610.319h-58.435V208.464h58.435z",
24
+ "p-id": "2844"
25
+ })
26
+ });
27
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-24 23:09
4
+ * @modified:2025/7/24 23:09 by yanxianliang
5
+ * @desc: Javascript Icon
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import '../index.less';
10
+ export declare const Javascript: () => import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=Javascript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Javascript.d.ts","sourceRoot":"","sources":["Javascript.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,eAAe,CAAC;AAIvB,eAAO,MAAM,UAAU,+CAQf,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-24 23:09
4
+ * @modified:2025/7/24 23:09 by yanxianliang
5
+ * @desc: Javascript Icon
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import "../index.less";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ var prefixCls = 'rxflow-code-editor';
13
+ export var Javascript = function Javascript() {
14
+ return /*#__PURE__*/_jsxs("svg", {
15
+ className: "".concat(prefixCls, "-file-icon"),
16
+ viewBox: "0 0 1024 1024",
17
+ version: "1.1",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ "p-id": "8513",
20
+ width: "1em",
21
+ height: "1em",
22
+ children: [/*#__PURE__*/_jsx("path", {
23
+ d: "M128 128m128 0l512 0q128 0 128 128l0 512q0 128-128 128l-512 0q-128 0-128-128l0-512q0-128 128-128Z",
24
+ fill: "#FFBF00",
25
+ "p-id": "8514"
26
+ }), /*#__PURE__*/_jsx("path", {
27
+ d: "M359.744 674.272a104.672 104.672 0 0 1-82.016-32.736l41.216-40.768a50.848 50.848 0 0 0 40.8 17.888c30.464 0 50.176-17.888 50.176-54.624v-211.616h62.336v214.4a105.184 105.184 0 0 1-112.512 107.456zM619.168 674.272a149.984 149.984 0 0 1-116.576-42.112l40.352-40.384a104.416 104.416 0 0 0 77.088 26.88c36.768 0 56.512-13.888 56.512-39.424a35.488 35.488 0 0 0-9.888-26.88 47.52 47.52 0 0 0-28.256-11.2l-38.4-5.376a108.8 108.8 0 0 1-61.888-26.432 84.576 84.576 0 0 1-22.816-62.816c0-56.864 42.112-96.8 111.136-96.8a136.608 136.608 0 0 1 103.104 37.248l-39.456 39.008a88.512 88.512 0 0 0-65.408-22.016c-33.216 0-49.344 18.368-49.344 40.384a30.72 30.72 0 0 0 9.408 22.816 54.4 54.4 0 0 0 29.6 12.544l37.664 5.376a105.6 105.6 0 0 1 60.96 24.704 89.216 89.216 0 0 1 24.64 67.68c-0.128 61.824-51.68 96.8-118.432 96.8z",
28
+ fill: "#FFFFFF",
29
+ "p-id": "8515"
30
+ })]
31
+ });
32
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-24 22:46
4
+ * @modified:2025/7/24 22:46 by yanxianliang
5
+ * @desc: 文件 icon
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import '../index.less';
10
+ export declare const PythonIcon: () => import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=Python.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Python.d.ts","sourceRoot":"","sources":["Python.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,eAAe,CAAC;AAIvB,eAAO,MAAM,UAAU,+CASjB,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-24 22:46
4
+ * @modified:2025/7/24 22:46 by yanxianliang
5
+ * @desc: 文件 icon
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import "../index.less";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ var prefixCls = 'rxflow-code-editor';
13
+ export var PythonIcon = function PythonIcon() {
14
+ return /*#__PURE__*/_jsxs("svg", {
15
+ className: "".concat(prefixCls, "-file-icon"),
16
+ viewBox: "0 0 1024 1024",
17
+ version: "1.1",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ "p-id": "3836",
20
+ width: "1em",
21
+ height: "1em",
22
+ children: [/*#__PURE__*/_jsx("path", {
23
+ d: "M420.693333 85.333333C353.28 85.333333 298.666667 139.946667 298.666667 207.36v71.68h183.04c16.64 0 30.293333 24.32 30.293333 40.96H207.36C139.946667 320 85.333333 374.613333 85.333333 442.026667v161.322666c0 67.413333 54.613333 122.026667 122.026667 122.026667h50.346667v-114.346667c0-67.413333 54.186667-122.026667 121.6-122.026666h224c67.413333 0 122.026667-54.229333 122.026666-121.642667V207.36C725.333333 139.946667 670.72 85.333333 603.306667 85.333333z m-30.72 68.693334c17.066667 0 30.72 5.12 30.72 30.293333s-13.653333 38.016-30.72 38.016c-16.64 0-30.293333-12.8-30.293333-37.973333s13.653333-30.336 30.293333-30.336z",
24
+ fill: "#3C78AA",
25
+ "p-id": "3837"
26
+ }), /*#__PURE__*/_jsx("path", {
27
+ d: "M766.250667 298.666667v114.346666a121.6 121.6 0 0 1-121.6 121.984H420.693333A121.6 121.6 0 0 0 298.666667 656.597333v160a122.026667 122.026667 0 0 0 122.026666 122.026667h182.613334A122.026667 122.026667 0 0 0 725.333333 816.64v-71.68h-183.082666c-16.64 0-30.250667-24.32-30.250667-40.96h304.64A122.026667 122.026667 0 0 0 938.666667 581.973333v-161.28a122.026667 122.026667 0 0 0-122.026667-122.026666zM354.986667 491.221333l-0.170667 0.170667c0.512-0.085333 1.066667-0.042667 1.621333-0.170667z m279.04 310.442667c16.64 0 30.293333 12.8 30.293333 37.973333a30.293333 30.293333 0 0 1-30.293333 30.293334c-17.066667 0-30.72-5.12-30.72-30.293334s13.653333-37.973333 30.72-37.973333z",
28
+ fill: "#FDD835",
29
+ "p-id": "3838"
30
+ })]
31
+ });
32
+ };
@@ -0,0 +1,9 @@
1
+ import './index.less';
2
+ import { CodeEditorProps, Library } from "../types";
3
+ export declare const FileTree: ({ files, value, onChange, libraries }: {
4
+ files: CodeEditorProps['files'];
5
+ value?: string | undefined;
6
+ onChange?: ((fileKey?: string) => void) | undefined;
7
+ libraries?: Library | undefined;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AASA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAC,eAAe,EAAE,OAAO,EAAU,MAAM,UAAU,CAAC;AAsB3D,eAAO,MAAM,QAAQ;WAOV,eAAe,CAAC,OAAO,CAAC;;2BAET,MAAM,KAAK,IAAI;;6CAsCxC,CAAA"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-21 18:31
4
+ * @modified:2025/7/21 18:31 by yanxianliang
5
+ * @desc: 文件树
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import { Tree } from 'antd';
10
+ import "./index.less";
11
+ import { LibraryIcon } from "./LibraryIcon";
12
+ import { useMemo } from "react";
13
+ import { useFileIcon } from "./useFileIcon";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { Fragment as _Fragment } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ var DirectoryTree = Tree.DirectoryTree;
18
+ var prefixCls = 'rxflow-code-editor';
19
+ var libraryRender = function libraryRender(data) {
20
+ var title = data.title,
21
+ version = data.version;
22
+ return /*#__PURE__*/_jsxs(_Fragment, {
23
+ children: [/*#__PURE__*/_jsx("div", {
24
+ className: "".concat(prefixCls, "-libraries-title"),
25
+ children: title
26
+ }), version ? /*#__PURE__*/_jsx("div", {
27
+ className: "".concat(prefixCls, "-libraries-version"),
28
+ children: version
29
+ }) : null]
30
+ });
31
+ };
32
+ export var FileTree = function FileTree(_ref) {
33
+ var files = _ref.files,
34
+ value = _ref.value,
35
+ onChange = _ref.onChange,
36
+ libraries = _ref.libraries;
37
+ var _files = useFileIcon(files);
38
+ var libraryData = useMemo(function () {
39
+ return libraries ? [{
40
+ title: libraries.title,
41
+ key: libraries.title,
42
+ icon: /*#__PURE__*/_jsx(LibraryIcon, {}),
43
+ children: libraries.children
44
+ }] : undefined;
45
+ }, [libraries]);
46
+ var _libraries = useFileIcon(libraryData);
47
+ return /*#__PURE__*/_jsxs("div", {
48
+ className: "".concat(prefixCls, "-file-panel"),
49
+ children: [/*#__PURE__*/_jsx(DirectoryTree, {
50
+ activeKey: value,
51
+ onActiveChange: onChange,
52
+ className: "".concat(prefixCls, "-file-tree"),
53
+ defaultExpandAll: true,
54
+ treeData: _files
55
+ }), libraries ? /*#__PURE__*/_jsx(DirectoryTree, {
56
+ defaultExpandAll: true,
57
+ className: "".concat(prefixCls, "-libraries"),
58
+ treeData: _libraries,
59
+ titleRender: libraryRender
60
+ }) : null]
61
+ });
62
+ };
@@ -0,0 +1,83 @@
1
+ .rxflow-code-editor {
2
+
3
+ &-file-tree, &-libraries {
4
+ &.rxflow-tree{
5
+ border-radius: 0;
6
+ background-color: transparent;
7
+ .rxflow-tree-switcher {
8
+ width: 14px;
9
+ margin-inline-end: 0;
10
+
11
+ &:before {
12
+ display: none;
13
+ }
14
+ }
15
+ &.rxflow-tree-directory{
16
+ color: rgba(255,255,255,0.85);
17
+ }
18
+ &.rxflow-tree-directory .rxflow-tree-node-content-wrapper {
19
+ color: rgba(255,255,255,0.85);
20
+ padding-inline-start: 0;
21
+ &:before {
22
+ border-radius: 2px;
23
+ bottom: 0;
24
+ height: unset;
25
+ }
26
+ }
27
+ &.rxflow-tree-directory .rxflow-tree-treenode .rxflow-tree-node-content-wrapper:hover:before{
28
+ background-color: #44464c;
29
+ }
30
+ &.rxflow-tree-directory .rxflow-tree-treenode-selected .rxflow-tree-node-content-wrapper {
31
+ &:before {
32
+ border-radius: 2px;
33
+ background-color: #44464c;
34
+ }
35
+ &:hover:before {
36
+ background-color: #324771;
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ &-file-panel {
43
+ min-width: 260px;
44
+ padding: 12px;
45
+ box-sizing: border-box;
46
+ }
47
+
48
+ &-libraries {
49
+ .rxflow-tree-node-content-wrapper {
50
+ display: flex;
51
+ .rxflow-tree-title {
52
+ flex: 1;
53
+ display: flex;
54
+
55
+ }
56
+ }
57
+
58
+ &-title {
59
+ flex: 1;
60
+ }
61
+ &-version {
62
+ color: #ffa940;
63
+ }
64
+ }
65
+
66
+
67
+ &-file-icon {
68
+ font-size: 18px;
69
+ top: 0.15em;
70
+ width: 1em;
71
+ height: 1em;
72
+ position: relative;
73
+ }
74
+
75
+ &-tree-icon {
76
+ top: 0.125em;
77
+ width: 1em;
78
+ height: 1em;
79
+ fill: currentColor;
80
+ position: relative;
81
+ }
82
+
83
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-24 22:56
4
+ * @modified:2025/7/24 22:56 by yanxianliang
5
+ * @desc: 文件 icon 处理
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import { DataNode } from "antd/es/tree";
10
+ export declare const useFileIcon: (treeData?: DataNode[]) => DataNode[] | undefined;
11
+ //# sourceMappingURL=useFileIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFileIcon.d.ts","sourceRoot":"","sources":["useFileIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAKtC,eAAO,MAAM,WAAW,cAAe,QAAQ,EAAE,2BAqBhD,CAAA"}
@@ -0,0 +1,39 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ /**
8
+ * @author: yanxianliang
9
+ * @date: 2025-07-24 22:56
10
+ * @modified:2025/7/24 22:56 by yanxianliang
11
+ * @desc: 文件 icon 处理
12
+ *
13
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
14
+ */
15
+
16
+ import { useCallback, useMemo } from "react";
17
+ import { PythonIcon } from "./icons/Python";
18
+ import { Javascript } from "./icons/Javascript";
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ export var useFileIcon = function useFileIcon(treeData) {
21
+ var fillIcon = useCallback(function (treeItem) {
22
+ var title = treeItem.title,
23
+ isLeaf = treeItem.isLeaf,
24
+ children = treeItem.children;
25
+ if (isLeaf) {
26
+ return _objectSpread(_objectSpread({}, treeItem), {}, {
27
+ children: children === null || children === void 0 ? void 0 : children.map(fillIcon),
28
+ icon: /\.py$/.test(title) ? /*#__PURE__*/_jsx(PythonIcon, {}) : /\.js$/.test(title) ? /*#__PURE__*/_jsx(Javascript, {}) : undefined
29
+ });
30
+ } else {
31
+ return _objectSpread(_objectSpread({}, treeItem), {}, {
32
+ children: children === null || children === void 0 ? void 0 : children.map(fillIcon)
33
+ });
34
+ }
35
+ }, []);
36
+ return useMemo(function () {
37
+ return treeData === null || treeData === void 0 ? void 0 : treeData.map(fillIcon);
38
+ }, [treeData]);
39
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-22 15:43
4
+ * @modified:2025/7/22 15:43 by yanxianliang
5
+ * @desc: Header
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import './style.less';
10
+ export declare const Header: ({ debug, onClose, onDebug }: {
11
+ debug?: boolean | undefined;
12
+ onClose?: (() => void) | undefined;
13
+ onDebug?: (() => void) | undefined;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,cAAc,CAAC;AAItB,eAAO,MAAM,MAAM;;qBAOC,IAAI;qBACJ,IAAI;6CA2BvB,CAAA"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-22 15:43
4
+ * @modified:2025/7/22 15:43 by yanxianliang
5
+ * @desc: Header
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import "./style.less";
10
+ import { BugOutlined, CloseOutlined } from '@ant-design/icons';
11
+ import { Button, Tooltip } from 'antd';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ export var Header = function Header(_ref) {
15
+ var debug = _ref.debug,
16
+ onClose = _ref.onClose,
17
+ onDebug = _ref.onDebug;
18
+ return /*#__PURE__*/_jsxs("div", {
19
+ className: 'rxflow-code-editor-header',
20
+ children: [/*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsxs("div", {
21
+ className: 'rxflow-code-editor-header-tools',
22
+ children: [onDebug ? /*#__PURE__*/_jsx(Tooltip, {
23
+ title: '调试',
24
+ children: /*#__PURE__*/_jsx(Button, {
25
+ onClick: onDebug,
26
+ className: 'rxflow-code-editor-header-button',
27
+ type: debug ? 'primary' : 'text',
28
+ size: 'small',
29
+ children: /*#__PURE__*/_jsx(BugOutlined, {})
30
+ })
31
+ }) : null, onClose ? /*#__PURE__*/_jsx(Tooltip, {
32
+ title: '关闭',
33
+ children: /*#__PURE__*/_jsx(Button, {
34
+ onClick: onClose,
35
+ className: 'rxflow-code-editor-header-button',
36
+ type: 'text',
37
+ size: 'small',
38
+ children: /*#__PURE__*/_jsx(CloseOutlined, {})
39
+ })
40
+ }) : null]
41
+ })]
42
+ });
43
+ };
@@ -0,0 +1,23 @@
1
+ .rxflow-code-editor {
2
+ &-header {
3
+ height: 38px;
4
+ min-height: 38px;
5
+ color: rgba(255,255,255,0.8);
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: space-between;
9
+ padding: 0 6px;
10
+
11
+ &-tools {
12
+ display: flex;
13
+ gap: 2px;
14
+ }
15
+
16
+ &-button {
17
+ color: #ccced2;
18
+ width: 32px;
19
+ height: 32px;
20
+ font-size: 16px;
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import '@xterm/xterm/css/xterm.css';
3
+ import { XTermRef } from "./types";
4
+ export declare const XTerm: import("react").ForwardRefExoticComponent<import("react").RefAttributes<XTermRef>>;
5
+ //# sourceMappingURL=XTerm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XTerm.d.ts","sourceRoot":"","sources":["XTerm.tsx"],"names":[],"mappings":";AAWA,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,eAAO,MAAM,KAAK,oFAkChB,CAAA"}
@@ -0,0 +1,59 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ /**
8
+ * @author: yanxianliang
9
+ * @date: 2025-07-25 16:45
10
+ * @modified:2025/7/25 16:45 by yanxianliang
11
+ * @desc: 控制台
12
+ *
13
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
14
+ */
15
+ import { useEffect, useRef, forwardRef, useImperativeHandle, useState } from "react";
16
+ import { Terminal } from '@xterm/xterm';
17
+ import { FitAddon } from '@xterm/addon-fit';
18
+ import '@xterm/xterm/css/xterm.css';
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ export var XTerm = /*#__PURE__*/forwardRef(function (props, ref) {
21
+ var containerRef = useRef(null);
22
+ var _useState = useState(function () {
23
+ return new Terminal({
24
+ cursorStyle: "bar",
25
+ cursorInactiveStyle: 'bar',
26
+ fontSize: 12,
27
+ lineHeight: 1.3
28
+ });
29
+ }),
30
+ _useState2 = _slicedToArray(_useState, 1),
31
+ term = _useState2[0];
32
+ useEffect(function () {
33
+ var fitAddon = new FitAddon();
34
+ term.loadAddon(fitAddon);
35
+ term.open(containerRef.current);
36
+ fitAddon.fit();
37
+ var resizeObserver = new ResizeObserver(function () {
38
+ return fitAddon.fit();
39
+ });
40
+ resizeObserver.observe(containerRef.current);
41
+ }, []);
42
+ useImperativeHandle(ref, function () {
43
+ return {
44
+ writeIn: function writeIn(data) {
45
+ term.writeln(data);
46
+ },
47
+ clear: function clear() {
48
+ term.clear();
49
+ }
50
+ };
51
+ }, []);
52
+ return /*#__PURE__*/_jsx("div", {
53
+ className: 'rxflow-terminal-xterm-container',
54
+ children: /*#__PURE__*/_jsx("div", {
55
+ className: 'rxflow-terminal-xterm',
56
+ ref: containerRef
57
+ })
58
+ });
59
+ });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-25 16:25
4
+ * @modified:2025/7/25 16:25 by yanxianliang
5
+ * @desc: 终端
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import './index.less';
10
+ import { RefObject } from "react";
11
+ import { XTermRef } from "./types";
12
+ export declare const Terminal: (props: {
13
+ xTermRef: RefObject<XTermRef | null>;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,eAAO,MAAM,QAAQ,UAAU;IAC7B,QAAQ,EAAE,UAAU,QAAQ,GAAG,IAAI,CAAC,CAAC;CACtC,4CASA,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-25 16:25
4
+ * @modified:2025/7/25 16:25 by yanxianliang
5
+ * @desc: 终端
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import "./index.less";
10
+ import { XTerm } from "./XTerm";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ export var Terminal = function Terminal(props) {
14
+ return /*#__PURE__*/_jsxs("div", {
15
+ className: 'rxflow-terminal',
16
+ children: [/*#__PURE__*/_jsx("div", {
17
+ className: 'rxflow-terminal-header',
18
+ children: "\u7EC8\u7AEF"
19
+ }), /*#__PURE__*/_jsx(XTerm, {
20
+ ref: props.xTermRef
21
+ })]
22
+ });
23
+ };
@@ -0,0 +1,28 @@
1
+
2
+ .rxflow-terminal {
3
+ display: flex;
4
+ flex-direction: column;
5
+ height: 100%;
6
+ &-header {
7
+ height: 32px;
8
+ font-size: 14px;
9
+ line-height: 32px;
10
+ color: rgba(255, 255, 255, 0.65);
11
+ padding: 0 8px;
12
+ }
13
+ &-xterm{
14
+ flex: 1;
15
+ overflow: auto;
16
+ &-container {
17
+ padding: 6px 0 6px 6px;
18
+ flex: 1;
19
+ display: flex;
20
+ height: 0;
21
+ background-color: rgb(0, 0, 0);
22
+ }
23
+ .xterm-viewport {
24
+ scrollbar-width: thin;
25
+ scrollbar-color: #4c4d4f transparent;
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-25 16:57
4
+ * @modified:2025/7/25 16:57 by yanxianliang
5
+ * @desc: 类型定义
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+
10
+ export type XTermRef = {
11
+ writeIn: (data: string)=>void;
12
+ clear: ()=>void;
13
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-22 13:37
4
+ * @modified:2025/7/22 13:37 by yanxianliang
5
+ * @desc: JSON editor
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+ import { EditorProps } from "./types";
10
+ import './index.less';
11
+ export declare const JsonEditor: ({ value, height, placeholder, readOnly, onChange }: EditorProps) => import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=JSON.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JSON.d.ts","sourceRoot":"","sources":["JSON.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,UAAU,uDAOlB,WAAW,4CAef,CAAA"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @author: yanxianliang
3
+ * @date: 2025-07-22 13:37
4
+ * @modified:2025/7/22 13:37 by yanxianliang
5
+ * @desc: JSON editor
6
+ *
7
+ * Copyright (c) 2025 by yanxianliang, All Rights Reserved.
8
+ */
9
+
10
+ import { json } from "@codemirror/lang-json";
11
+ import ReactCodeMirror from '@uiw/react-codemirror';
12
+ import { oneDark } from '@codemirror/theme-one-dark';
13
+ import "./index.less";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ export var JsonEditor = function JsonEditor(_ref) {
16
+ var _ref$value = _ref.value,
17
+ value = _ref$value === void 0 ? '' : _ref$value,
18
+ height = _ref.height,
19
+ placeholder = _ref.placeholder,
20
+ readOnly = _ref.readOnly,
21
+ onChange = _ref.onChange;
22
+ return /*#__PURE__*/_jsx("div", {
23
+ className: 'rxflow-code-editor',
24
+ children: /*#__PURE__*/_jsx(ReactCodeMirror, {
25
+ editable: !readOnly,
26
+ readOnly: readOnly,
27
+ placeholder: placeholder,
28
+ theme: 'dark',
29
+ extensions: [json(), oneDark],
30
+ height: height ? "".concat(height, "px") : '100%',
31
+ value: value,
32
+ onChange: onChange
33
+ })
34
+ });
35
+ };
@@ -0,0 +1,4 @@
1
+ import { EditorProps } from "./types";
2
+ import './index.less';
3
+ export declare const PythonEditor: ({ height, value, placeholder, readOnly, onChange }: EditorProps) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=Python.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Python.d.ts","sourceRoot":"","sources":["Python.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,eAAO,MAAM,YAAY,uDAOpB,WAAW,4CAef,CAAA"}