@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.
- package/README.md +43 -0
- package/cjs/components/CanvasLoading/index.d.ts +14 -0
- package/cjs/components/CanvasLoading/index.d.ts.map +1 -0
- package/cjs/components/CanvasLoading/index.js +51 -0
- package/cjs/components/CanvasLoading/index.less +69 -0
- package/cjs/components/CodeEditor/DebugPanel/index.d.ts +16 -0
- package/cjs/components/CodeEditor/DebugPanel/index.d.ts.map +1 -0
- package/cjs/components/CodeEditor/DebugPanel/index.js +156 -0
- package/cjs/components/CodeEditor/DebugPanel/index.less +56 -0
- package/cjs/components/CodeEditor/FileTree/LibraryIcon.d.ts +11 -0
- package/cjs/components/CodeEditor/FileTree/LibraryIcon.d.ts.map +1 -0
- package/cjs/components/CodeEditor/FileTree/LibraryIcon.js +33 -0
- package/cjs/components/CodeEditor/FileTree/icons/Javascript.d.ts +11 -0
- package/cjs/components/CodeEditor/FileTree/icons/Javascript.d.ts.map +1 -0
- package/cjs/components/CodeEditor/FileTree/icons/Javascript.js +37 -0
- package/cjs/components/CodeEditor/FileTree/icons/Python.d.ts +11 -0
- package/cjs/components/CodeEditor/FileTree/icons/Python.d.ts.map +1 -0
- package/cjs/components/CodeEditor/FileTree/icons/Python.js +37 -0
- package/cjs/components/CodeEditor/FileTree/index.d.ts +9 -0
- package/cjs/components/CodeEditor/FileTree/index.d.ts.map +1 -0
- package/cjs/components/CodeEditor/FileTree/index.js +73 -0
- package/cjs/components/CodeEditor/FileTree/index.less +83 -0
- package/cjs/components/CodeEditor/FileTree/useFileIcon.d.ts +11 -0
- package/cjs/components/CodeEditor/FileTree/useFileIcon.d.ts.map +1 -0
- package/cjs/components/CodeEditor/FileTree/useFileIcon.js +44 -0
- package/cjs/components/CodeEditor/Header/index.d.ts +15 -0
- package/cjs/components/CodeEditor/Header/index.d.ts.map +1 -0
- package/cjs/components/CodeEditor/Header/index.js +51 -0
- package/cjs/components/CodeEditor/Header/style.less +23 -0
- package/cjs/components/CodeEditor/Terminal/XTerm.d.ts +5 -0
- package/cjs/components/CodeEditor/Terminal/XTerm.d.ts.map +1 -0
- package/cjs/components/CodeEditor/Terminal/XTerm.js +54 -0
- package/cjs/components/CodeEditor/Terminal/index.d.ts +15 -0
- package/cjs/components/CodeEditor/Terminal/index.d.ts.map +1 -0
- package/cjs/components/CodeEditor/Terminal/index.js +30 -0
- package/cjs/components/CodeEditor/Terminal/index.less +28 -0
- package/cjs/components/CodeEditor/Terminal/types.d.ts +13 -0
- package/cjs/components/CodeEditor/editors/JSON.d.ts +12 -0
- package/cjs/components/CodeEditor/editors/JSON.d.ts.map +1 -0
- package/cjs/components/CodeEditor/editors/JSON.js +43 -0
- package/cjs/components/CodeEditor/editors/Python.d.ts +4 -0
- package/cjs/components/CodeEditor/editors/Python.d.ts.map +1 -0
- package/cjs/components/CodeEditor/editors/Python.js +43 -0
- package/cjs/components/CodeEditor/editors/index.less +11 -0
- package/cjs/components/CodeEditor/editors/types.d.ts +24 -0
- package/cjs/components/CodeEditor/index.d.ts +7 -0
- package/cjs/components/CodeEditor/index.d.ts.map +1 -0
- package/cjs/components/CodeEditor/index.js +230 -0
- package/cjs/components/CodeEditor/style.less +49 -0
- package/cjs/components/CodeEditor/types.d.ts +46 -0
- package/cjs/components/Handle/NodePopover.d.ts +15 -0
- package/cjs/components/Handle/NodePopover.d.ts.map +1 -0
- package/cjs/components/Handle/NodePopover.js +169 -0
- package/cjs/components/Handle/index.d.ts +24 -0
- package/cjs/components/Handle/index.d.ts.map +1 -0
- package/cjs/components/Handle/index.js +165 -0
- package/cjs/components/Handle/index.less +111 -0
- package/cjs/components/InlineCodeEditor/index.d.ts +11 -0
- package/cjs/components/InlineCodeEditor/index.d.ts.map +1 -0
- package/cjs/components/InlineCodeEditor/index.js +31 -0
- package/cjs/components/InlineCodeEditor/index.module.less +0 -0
- package/cjs/components/InlineCodeEditor/types.d.ts +22 -0
- package/cjs/components/Layout/index.d.ts +14 -0
- package/cjs/components/Layout/index.d.ts.map +1 -0
- package/cjs/components/Layout/index.js +49 -0
- package/cjs/components/Layout/index.less +14 -0
- package/cjs/components/LoadingButton.d.ts +16 -0
- package/cjs/components/LoadingButton.d.ts.map +1 -0
- package/cjs/components/LoadingButton.js +86 -0
- package/cjs/components/Sider/index.d.ts +15 -0
- package/cjs/components/Sider/index.d.ts.map +1 -0
- package/cjs/components/Sider/index.js +142 -0
- package/cjs/components/Sider/index.less +68 -0
- package/cjs/constants/RunningStatus.d.ts +14 -0
- package/cjs/constants/RunningStatus.d.ts.map +1 -0
- package/cjs/constants/RunningStatus.js +20 -0
- package/cjs/hooks/run/useActiveEdge.d.ts +15 -0
- package/cjs/hooks/run/useActiveEdge.d.ts.map +1 -0
- package/cjs/hooks/run/useActiveEdge.js +36 -0
- package/cjs/hooks/run/useCleanRunState.d.ts +9 -0
- package/cjs/hooks/run/useCleanRunState.d.ts.map +1 -0
- package/cjs/hooks/run/useCleanRunState.js +33 -0
- package/cjs/hooks/run/useNodeRunningState.d.ts +8 -0
- package/cjs/hooks/run/useNodeRunningState.d.ts.map +1 -0
- package/cjs/hooks/run/useNodeRunningState.js +30 -0
- package/cjs/hooks/run/useRunState.d.ts +21 -0
- package/cjs/hooks/run/useRunState.d.ts.map +1 -0
- package/cjs/hooks/run/useRunState.js +39 -0
- package/cjs/hooks/run/useSetRunState.d.ts +18 -0
- package/cjs/hooks/run/useSetRunState.d.ts.map +1 -0
- package/cjs/hooks/run/useSetRunState.js +39 -0
- package/cjs/hooks/state.d.ts +7 -0
- package/cjs/hooks/state.d.ts.map +1 -0
- package/cjs/hooks/state.js +13 -0
- package/cjs/hooks/useDeleteNode.d.ts +2 -0
- package/cjs/hooks/useDeleteNode.d.ts.map +1 -0
- package/cjs/hooks/useDeleteNode.js +32 -0
- package/cjs/hooks/useEdgeIsHover.d.ts +2 -0
- package/cjs/hooks/useEdgeIsHover.d.ts.map +1 -0
- package/cjs/hooks/useEdgeIsHover.js +20 -0
- package/cjs/hooks/useGetSelection.d.ts +13 -0
- package/cjs/hooks/useGetSelection.d.ts.map +1 -0
- package/cjs/hooks/useGetSelection.js +28 -0
- package/cjs/hooks/useGetUpstreamNodes.d.ts +14 -0
- package/cjs/hooks/useGetUpstreamNodes.d.ts.map +1 -0
- package/cjs/hooks/useGetUpstreamNodes.js +81 -0
- package/cjs/hooks/useGetWillDropTarget.d.ts +5 -0
- package/cjs/hooks/useGetWillDropTarget.d.ts.map +1 -0
- package/cjs/hooks/useGetWillDropTarget.js +27 -0
- package/cjs/hooks/useGroupIsWillDrop.d.ts +2 -0
- package/cjs/hooks/useGroupIsWillDrop.d.ts.map +1 -0
- package/cjs/hooks/useGroupIsWillDrop.js +20 -0
- package/cjs/hooks/useIsValidConnection.d.ts +12 -0
- package/cjs/hooks/useIsValidConnection.d.ts.map +1 -0
- package/cjs/hooks/useIsValidConnection.js +83 -0
- package/cjs/hooks/useMouseEvents.d.ts +19 -0
- package/cjs/hooks/useMouseEvents.d.ts.map +1 -0
- package/cjs/hooks/useMouseEvents.js +49 -0
- package/cjs/hooks/useNodeDragHandles.d.ts +10 -0
- package/cjs/hooks/useNodeDragHandles.d.ts.map +1 -0
- package/cjs/hooks/useNodeDragHandles.js +273 -0
- package/cjs/hooks/useNodes.d.ts +9 -0
- package/cjs/hooks/useNodes.d.ts.map +1 -0
- package/cjs/hooks/useNodes.js +19 -0
- package/cjs/hooks/useOnBeforeDelete.d.ts +19 -0
- package/cjs/hooks/useOnBeforeDelete.d.ts.map +1 -0
- package/cjs/hooks/useOnBeforeDelete.js +104 -0
- package/cjs/hooks/useOnConnect.d.ts +12 -0
- package/cjs/hooks/useOnConnect.d.ts.map +1 -0
- package/cjs/hooks/useOnConnect.js +36 -0
- package/cjs/hooks/useOnEdgeMouseEnter.d.ts +13 -0
- package/cjs/hooks/useOnEdgeMouseEnter.d.ts.map +1 -0
- package/cjs/hooks/useOnEdgeMouseEnter.js +27 -0
- package/cjs/hooks/useOnEdgeMouseLeave.d.ts +13 -0
- package/cjs/hooks/useOnEdgeMouseLeave.d.ts.map +1 -0
- package/cjs/hooks/useOnEdgeMouseLeave.js +27 -0
- package/cjs/hooks/useOnNodesChange.d.ts +4 -0
- package/cjs/hooks/useOnNodesChange.d.ts.map +1 -0
- package/cjs/hooks/useOnNodesChange.js +102 -0
- package/cjs/hooks/useOnSelectionChange.d.ts +13 -0
- package/cjs/hooks/useOnSelectionChange.d.ts.map +1 -0
- package/cjs/hooks/useOnSelectionChange.js +130 -0
- package/cjs/hooks/useSetEdges.d.ts +12 -0
- package/cjs/hooks/useSetEdges.d.ts.map +1 -0
- package/cjs/hooks/useSetEdges.js +29 -0
- package/cjs/hooks/useSetSelection.d.ts +3 -0
- package/cjs/hooks/useSetSelection.d.ts.map +1 -0
- package/cjs/hooks/useSetSelection.js +40 -0
- package/cjs/hooks/useSetWillDropTargets.d.ts +2 -0
- package/cjs/hooks/useSetWillDropTargets.d.ts.map +1 -0
- package/cjs/hooks/useSetWillDropTargets.js +26 -0
- package/cjs/hooks/useUpstream.d.ts +3 -0
- package/cjs/hooks/useUpstream.d.ts.map +1 -0
- package/cjs/hooks/useUpstream.js +105 -0
- package/cjs/hooks/useWatchSelectionNodes.d.ts +2 -0
- package/cjs/hooks/useWatchSelectionNodes.d.ts.map +1 -0
- package/cjs/hooks/useWatchSelectionNodes.js +22 -0
- package/cjs/hooks/useWorkFlow.d.ts +12 -0
- package/cjs/hooks/useWorkFlow.d.ts.map +1 -0
- package/cjs/hooks/useWorkFlow.js +93 -0
- package/cjs/hooks/useWorkFlowProps.d.ts +485 -0
- package/cjs/hooks/useWorkFlowProps.d.ts.map +1 -0
- package/cjs/hooks/useWorkFlowProps.js +98 -0
- package/cjs/index.d.ts +23 -0
- package/cjs/index.d.ts.map +1 -0
- package/cjs/index.js +77 -0
- package/cjs/types.d.ts +103 -0
- package/cjs/types.d.ts.map +1 -0
- package/cjs/types.js +8 -0
- package/cjs/utils/arrayUtils.d.ts +2 -0
- package/cjs/utils/arrayUtils.d.ts.map +1 -0
- package/cjs/utils/arrayUtils.js +23 -0
- package/cjs/utils/checkChildren.d.ts +11 -0
- package/cjs/utils/checkChildren.d.ts.map +1 -0
- package/cjs/utils/checkChildren.js +27 -0
- package/cjs/utils/dimensions.d.ts +12 -0
- package/cjs/utils/dimensions.d.ts.map +1 -0
- package/cjs/utils/dimensions.js +23 -0
- package/cjs/utils/dragDataTransfer.d.ts +19 -0
- package/cjs/utils/dragDataTransfer.d.ts.map +1 -0
- package/cjs/utils/dragDataTransfer.js +29 -0
- package/cjs/utils/dropTargetsCheck.d.ts +20 -0
- package/cjs/utils/dropTargetsCheck.d.ts.map +1 -0
- package/cjs/utils/dropTargetsCheck.js +105 -0
- package/cjs/utils/edgeEqualConnect.d.ts +11 -0
- package/cjs/utils/edgeEqualConnect.d.ts.map +1 -0
- package/cjs/utils/edgeEqualConnect.js +19 -0
- package/cjs/utils/events.d.ts +11 -0
- package/cjs/utils/events.d.ts.map +1 -0
- package/cjs/utils/events.js +19 -0
- package/cjs/utils/getEdgeId.d.ts +12 -0
- package/cjs/utils/getEdgeId.d.ts.map +1 -0
- package/cjs/utils/getEdgeId.js +22 -0
- package/cjs/utils/getParentFlow.d.ts +5 -0
- package/cjs/utils/getParentFlow.d.ts.map +1 -0
- package/cjs/utils/getParentFlow.js +36 -0
- package/cjs/utils/graph.d.ts +12 -0
- package/cjs/utils/graph.d.ts.map +1 -0
- package/cjs/utils/graph.js +55 -0
- package/cjs/utils/index.d.ts +18 -0
- package/cjs/utils/index.d.ts.map +1 -0
- package/cjs/utils/index.js +104 -0
- package/cjs/utils/isInSameParent.d.ts +11 -0
- package/cjs/utils/isInSameParent.d.ts.map +1 -0
- package/cjs/utils/isInSameParent.js +19 -0
- package/cjs/utils/parent.d.ts +23 -0
- package/cjs/utils/parent.d.ts.map +1 -0
- package/cjs/utils/parent.js +166 -0
- package/cjs/utils/position.d.ts +29 -0
- package/cjs/utils/position.d.ts.map +1 -0
- package/cjs/utils/position.js +67 -0
- package/cjs/utils/prepareInnerLookup.d.ts +16 -0
- package/cjs/utils/prepareInnerLookup.d.ts.map +1 -0
- package/cjs/utils/prepareInnerLookup.js +93 -0
- package/cjs/utils/scheduleCallback.d.ts +2 -0
- package/cjs/utils/scheduleCallback.d.ts.map +1 -0
- package/cjs/utils/scheduleCallback.js +38 -0
- package/cjs/utils/serialize.d.ts +31 -0
- package/cjs/utils/serialize.d.ts.map +1 -0
- package/cjs/utils/serialize.js +60 -0
- package/cjs/utils/triggerConnect.d.ts +12 -0
- package/cjs/utils/triggerConnect.d.ts.map +1 -0
- package/cjs/utils/triggerConnect.js +50 -0
- package/esm/components/CanvasLoading/index.d.ts +14 -0
- package/esm/components/CanvasLoading/index.d.ts.map +1 -0
- package/esm/components/CanvasLoading/index.js +45 -0
- package/esm/components/CanvasLoading/index.less +69 -0
- package/esm/components/CodeEditor/DebugPanel/index.d.ts +16 -0
- package/esm/components/CodeEditor/DebugPanel/index.d.ts.map +1 -0
- package/esm/components/CodeEditor/DebugPanel/index.js +199 -0
- package/esm/components/CodeEditor/DebugPanel/index.less +56 -0
- package/esm/components/CodeEditor/FileTree/LibraryIcon.d.ts +11 -0
- package/esm/components/CodeEditor/FileTree/LibraryIcon.d.ts.map +1 -0
- package/esm/components/CodeEditor/FileTree/LibraryIcon.js +27 -0
- package/esm/components/CodeEditor/FileTree/icons/Javascript.d.ts +11 -0
- package/esm/components/CodeEditor/FileTree/icons/Javascript.d.ts.map +1 -0
- package/esm/components/CodeEditor/FileTree/icons/Javascript.js +32 -0
- package/esm/components/CodeEditor/FileTree/icons/Python.d.ts +11 -0
- package/esm/components/CodeEditor/FileTree/icons/Python.d.ts.map +1 -0
- package/esm/components/CodeEditor/FileTree/icons/Python.js +32 -0
- package/esm/components/CodeEditor/FileTree/index.d.ts +9 -0
- package/esm/components/CodeEditor/FileTree/index.d.ts.map +1 -0
- package/esm/components/CodeEditor/FileTree/index.js +62 -0
- package/esm/components/CodeEditor/FileTree/index.less +83 -0
- package/esm/components/CodeEditor/FileTree/useFileIcon.d.ts +11 -0
- package/esm/components/CodeEditor/FileTree/useFileIcon.d.ts.map +1 -0
- package/esm/components/CodeEditor/FileTree/useFileIcon.js +39 -0
- package/esm/components/CodeEditor/Header/index.d.ts +15 -0
- package/esm/components/CodeEditor/Header/index.d.ts.map +1 -0
- package/esm/components/CodeEditor/Header/index.js +43 -0
- package/esm/components/CodeEditor/Header/style.less +23 -0
- package/esm/components/CodeEditor/Terminal/XTerm.d.ts +5 -0
- package/esm/components/CodeEditor/Terminal/XTerm.d.ts.map +1 -0
- package/esm/components/CodeEditor/Terminal/XTerm.js +59 -0
- package/esm/components/CodeEditor/Terminal/index.d.ts +15 -0
- package/esm/components/CodeEditor/Terminal/index.d.ts.map +1 -0
- package/esm/components/CodeEditor/Terminal/index.js +23 -0
- package/esm/components/CodeEditor/Terminal/index.less +28 -0
- package/esm/components/CodeEditor/Terminal/types.d.ts +13 -0
- package/esm/components/CodeEditor/editors/JSON.d.ts +12 -0
- package/esm/components/CodeEditor/editors/JSON.d.ts.map +1 -0
- package/esm/components/CodeEditor/editors/JSON.js +35 -0
- package/esm/components/CodeEditor/editors/Python.d.ts +4 -0
- package/esm/components/CodeEditor/editors/Python.d.ts.map +1 -0
- package/esm/components/CodeEditor/editors/Python.js +34 -0
- package/esm/components/CodeEditor/editors/index.less +11 -0
- package/esm/components/CodeEditor/editors/types.d.ts +24 -0
- package/esm/components/CodeEditor/index.d.ts +7 -0
- package/esm/components/CodeEditor/index.d.ts.map +1 -0
- package/esm/components/CodeEditor/index.js +233 -0
- package/esm/components/CodeEditor/style.less +49 -0
- package/esm/components/CodeEditor/types.d.ts +46 -0
- package/esm/components/Handle/NodePopover.d.ts +15 -0
- package/esm/components/Handle/NodePopover.d.ts.map +1 -0
- package/esm/components/Handle/NodePopover.js +165 -0
- package/esm/components/Handle/index.d.ts +24 -0
- package/esm/components/Handle/index.d.ts.map +1 -0
- package/esm/components/Handle/index.js +190 -0
- package/esm/components/Handle/index.less +111 -0
- package/esm/components/InlineCodeEditor/index.d.ts +11 -0
- package/esm/components/InlineCodeEditor/index.d.ts.map +1 -0
- package/esm/components/InlineCodeEditor/index.js +24 -0
- package/esm/components/InlineCodeEditor/index.module.less +0 -0
- package/esm/components/InlineCodeEditor/types.d.ts +22 -0
- package/esm/components/Layout/index.d.ts +14 -0
- package/esm/components/Layout/index.d.ts.map +1 -0
- package/esm/components/Layout/index.js +43 -0
- package/esm/components/Layout/index.less +14 -0
- package/esm/components/LoadingButton.d.ts +16 -0
- package/esm/components/LoadingButton.d.ts.map +1 -0
- package/esm/components/LoadingButton.js +112 -0
- package/esm/components/Sider/index.d.ts +15 -0
- package/esm/components/Sider/index.d.ts.map +1 -0
- package/esm/components/Sider/index.js +142 -0
- package/esm/components/Sider/index.less +68 -0
- package/esm/constants/RunningStatus.d.ts +14 -0
- package/esm/constants/RunningStatus.d.ts.map +1 -0
- package/esm/constants/RunningStatus.js +15 -0
- package/esm/hooks/run/useActiveEdge.d.ts +15 -0
- package/esm/hooks/run/useActiveEdge.d.ts.map +1 -0
- package/esm/hooks/run/useActiveEdge.js +30 -0
- package/esm/hooks/run/useCleanRunState.d.ts +9 -0
- package/esm/hooks/run/useCleanRunState.d.ts.map +1 -0
- package/esm/hooks/run/useCleanRunState.js +26 -0
- package/esm/hooks/run/useNodeRunningState.d.ts +8 -0
- package/esm/hooks/run/useNodeRunningState.d.ts.map +1 -0
- package/esm/hooks/run/useNodeRunningState.js +26 -0
- package/esm/hooks/run/useRunState.d.ts +21 -0
- package/esm/hooks/run/useRunState.d.ts.map +1 -0
- package/esm/hooks/run/useRunState.js +35 -0
- package/esm/hooks/run/useSetRunState.d.ts +18 -0
- package/esm/hooks/run/useSetRunState.d.ts.map +1 -0
- package/esm/hooks/run/useSetRunState.js +35 -0
- package/esm/hooks/state.d.ts +7 -0
- package/esm/hooks/state.d.ts.map +1 -0
- package/esm/hooks/state.js +6 -0
- package/esm/hooks/useDeleteNode.d.ts +2 -0
- package/esm/hooks/useDeleteNode.d.ts.map +1 -0
- package/esm/hooks/useDeleteNode.js +44 -0
- package/esm/hooks/useEdgeIsHover.d.ts +2 -0
- package/esm/hooks/useEdgeIsHover.d.ts.map +1 -0
- package/esm/hooks/useEdgeIsHover.js +14 -0
- package/esm/hooks/useGetSelection.d.ts +13 -0
- package/esm/hooks/useGetSelection.d.ts.map +1 -0
- package/esm/hooks/useGetSelection.js +21 -0
- package/esm/hooks/useGetUpstreamNodes.d.ts +14 -0
- package/esm/hooks/useGetUpstreamNodes.d.ts.map +1 -0
- package/esm/hooks/useGetUpstreamNodes.js +71 -0
- package/esm/hooks/useGetWillDropTarget.d.ts +5 -0
- package/esm/hooks/useGetWillDropTarget.d.ts.map +1 -0
- package/esm/hooks/useGetWillDropTarget.js +21 -0
- package/esm/hooks/useGroupIsWillDrop.d.ts +2 -0
- package/esm/hooks/useGroupIsWillDrop.d.ts.map +1 -0
- package/esm/hooks/useGroupIsWillDrop.js +14 -0
- package/esm/hooks/useIsValidConnection.d.ts +12 -0
- package/esm/hooks/useIsValidConnection.d.ts.map +1 -0
- package/esm/hooks/useIsValidConnection.js +82 -0
- package/esm/hooks/useMouseEvents.d.ts +19 -0
- package/esm/hooks/useMouseEvents.d.ts.map +1 -0
- package/esm/hooks/useMouseEvents.js +40 -0
- package/esm/hooks/useNodeDragHandles.d.ts +10 -0
- package/esm/hooks/useNodeDragHandles.d.ts.map +1 -0
- package/esm/hooks/useNodeDragHandles.js +311 -0
- package/esm/hooks/useNodes.d.ts +9 -0
- package/esm/hooks/useNodes.d.ts.map +1 -0
- package/esm/hooks/useNodes.js +14 -0
- package/esm/hooks/useOnBeforeDelete.d.ts +19 -0
- package/esm/hooks/useOnBeforeDelete.d.ts.map +1 -0
- package/esm/hooks/useOnBeforeDelete.js +138 -0
- package/esm/hooks/useOnConnect.d.ts +12 -0
- package/esm/hooks/useOnConnect.d.ts.map +1 -0
- package/esm/hooks/useOnConnect.js +26 -0
- package/esm/hooks/useOnEdgeMouseEnter.d.ts +13 -0
- package/esm/hooks/useOnEdgeMouseEnter.d.ts.map +1 -0
- package/esm/hooks/useOnEdgeMouseEnter.js +20 -0
- package/esm/hooks/useOnEdgeMouseLeave.d.ts +13 -0
- package/esm/hooks/useOnEdgeMouseLeave.d.ts.map +1 -0
- package/esm/hooks/useOnEdgeMouseLeave.js +20 -0
- package/esm/hooks/useOnNodesChange.d.ts +4 -0
- package/esm/hooks/useOnNodesChange.d.ts.map +1 -0
- package/esm/hooks/useOnNodesChange.js +107 -0
- package/esm/hooks/useOnSelectionChange.d.ts +13 -0
- package/esm/hooks/useOnSelectionChange.d.ts.map +1 -0
- package/esm/hooks/useOnSelectionChange.js +171 -0
- package/esm/hooks/useSetEdges.d.ts +12 -0
- package/esm/hooks/useSetEdges.d.ts.map +1 -0
- package/esm/hooks/useSetEdges.js +22 -0
- package/esm/hooks/useSetSelection.d.ts +3 -0
- package/esm/hooks/useSetSelection.d.ts.map +1 -0
- package/esm/hooks/useSetSelection.js +33 -0
- package/esm/hooks/useSetWillDropTargets.d.ts +2 -0
- package/esm/hooks/useSetWillDropTargets.d.ts.map +1 -0
- package/esm/hooks/useSetWillDropTargets.js +18 -0
- package/esm/hooks/useUpstream.d.ts +3 -0
- package/esm/hooks/useUpstream.d.ts.map +1 -0
- package/esm/hooks/useUpstream.js +101 -0
- package/esm/hooks/useWatchSelectionNodes.d.ts +2 -0
- package/esm/hooks/useWatchSelectionNodes.d.ts.map +1 -0
- package/esm/hooks/useWatchSelectionNodes.js +14 -0
- package/esm/hooks/useWorkFlow.d.ts +12 -0
- package/esm/hooks/useWorkFlow.d.ts.map +1 -0
- package/esm/hooks/useWorkFlow.js +92 -0
- package/esm/hooks/useWorkFlowProps.d.ts +485 -0
- package/esm/hooks/useWorkFlowProps.d.ts.map +1 -0
- package/esm/hooks/useWorkFlowProps.js +102 -0
- package/esm/index.d.ts +23 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +28 -0
- package/esm/types.d.ts +103 -0
- package/esm/types.d.ts.map +1 -0
- package/esm/types.js +4 -0
- package/esm/utils/arrayUtils.d.ts +2 -0
- package/esm/utils/arrayUtils.d.ts.map +1 -0
- package/esm/utils/arrayUtils.js +16 -0
- package/esm/utils/checkChildren.d.ts +11 -0
- package/esm/utils/checkChildren.d.ts.map +1 -0
- package/esm/utils/checkChildren.js +16 -0
- package/esm/utils/dimensions.d.ts +12 -0
- package/esm/utils/dimensions.d.ts.map +1 -0
- package/esm/utils/dimensions.js +17 -0
- package/esm/utils/dragDataTransfer.d.ts +19 -0
- package/esm/utils/dragDataTransfer.d.ts.map +1 -0
- package/esm/utils/dragDataTransfer.js +21 -0
- package/esm/utils/dropTargetsCheck.d.ts +20 -0
- package/esm/utils/dropTargetsCheck.d.ts.map +1 -0
- package/esm/utils/dropTargetsCheck.js +116 -0
- package/esm/utils/edgeEqualConnect.d.ts +11 -0
- package/esm/utils/edgeEqualConnect.d.ts.map +1 -0
- package/esm/utils/edgeEqualConnect.js +12 -0
- package/esm/utils/events.d.ts +11 -0
- package/esm/utils/events.d.ts.map +1 -0
- package/esm/utils/events.js +12 -0
- package/esm/utils/getEdgeId.d.ts +12 -0
- package/esm/utils/getEdgeId.d.ts.map +1 -0
- package/esm/utils/getEdgeId.js +16 -0
- package/esm/utils/getParentFlow.d.ts +5 -0
- package/esm/utils/getParentFlow.d.ts.map +1 -0
- package/esm/utils/getParentFlow.js +28 -0
- package/esm/utils/graph.d.ts +12 -0
- package/esm/utils/graph.d.ts.map +1 -0
- package/esm/utils/graph.js +51 -0
- package/esm/utils/index.d.ts +18 -0
- package/esm/utils/index.d.ts.map +1 -0
- package/esm/utils/index.js +18 -0
- package/esm/utils/isInSameParent.d.ts +11 -0
- package/esm/utils/isInSameParent.d.ts.map +1 -0
- package/esm/utils/isInSameParent.js +12 -0
- package/esm/utils/parent.d.ts +23 -0
- package/esm/utils/parent.d.ts.map +1 -0
- package/esm/utils/parent.js +186 -0
- package/esm/utils/position.d.ts +29 -0
- package/esm/utils/position.d.ts.map +1 -0
- package/esm/utils/position.js +61 -0
- package/esm/utils/prepareInnerLookup.d.ts +16 -0
- package/esm/utils/prepareInnerLookup.d.ts.map +1 -0
- package/esm/utils/prepareInnerLookup.js +79 -0
- package/esm/utils/scheduleCallback.d.ts +2 -0
- package/esm/utils/scheduleCallback.d.ts.map +1 -0
- package/esm/utils/scheduleCallback.js +36 -0
- package/esm/utils/serialize.d.ts +31 -0
- package/esm/utils/serialize.d.ts.map +1 -0
- package/esm/utils/serialize.js +64 -0
- package/esm/utils/triggerConnect.d.ts +12 -0
- package/esm/utils/triggerConnect.d.ts.map +1 -0
- package/esm/utils/triggerConnect.js +59 -0
- package/package.json +70 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @rxflow/workflow
|
|
2
|
+
|
|
3
|
+
工作流组件,用于构建和展示工作流程。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @rxflow/workflow @rxflow/base
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @rxflow/workflow @rxflow/base
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 使用
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import WorkFlow from '@rxflow/workflow';
|
|
17
|
+
|
|
18
|
+
function App() {
|
|
19
|
+
return (
|
|
20
|
+
<WorkFlow
|
|
21
|
+
nodes={nodes}
|
|
22
|
+
edges={edges}
|
|
23
|
+
// ... other props
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 特性
|
|
30
|
+
|
|
31
|
+
- 工作流编排
|
|
32
|
+
- 节点状态管理
|
|
33
|
+
- 执行追踪
|
|
34
|
+
- 自定义节点类型
|
|
35
|
+
- 主题定制
|
|
36
|
+
|
|
37
|
+
## API 文档
|
|
38
|
+
|
|
39
|
+
访问 [完整文档](https://tree-graph.publib.cn/work-flow/examples) 查看详细 API。
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
MIT
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
interface CanvasLoadingProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
tip?: string | null;
|
|
7
|
+
size?: 'small';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 画布加载组件
|
|
11
|
+
*/
|
|
12
|
+
declare const CanvasLoading: import("react").NamedExoticComponent<CanvasLoadingProps>;
|
|
13
|
+
export default CanvasLoading;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAOA,OAAO,cAAc,CAAC;AAItB,OAAO,EAAO,SAAS,EAAC,MAAM,OAAO,CAAC;AAEtC,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,QAAA,MAAM,aAAa,0DAoClB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
require("./index.less");
|
|
8
|
+
var _classcat = _interopRequireDefault(require("classcat"));
|
|
9
|
+
var _lodash = require("lodash");
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/*
|
|
14
|
+
* @author: yanxianliang
|
|
15
|
+
* @date: 2025-05-07 12:35
|
|
16
|
+
* @desc: CanvasLoading
|
|
17
|
+
*
|
|
18
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 画布加载组件
|
|
23
|
+
*/
|
|
24
|
+
const CanvasLoading = /*#__PURE__*/(0, _react.memo)(({
|
|
25
|
+
children,
|
|
26
|
+
loading,
|
|
27
|
+
tip = '工作流加载中...',
|
|
28
|
+
size
|
|
29
|
+
}) => {
|
|
30
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
31
|
+
className: (0, _classcat.default)(['flow-canvas-loading-container', 'flow-canvas-loading-center', {
|
|
32
|
+
'flow-canvas-loading-small': size === 'small'
|
|
33
|
+
}]),
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
35
|
+
className: (0, _classcat.default)(['flow-canvas-loading-center', 'flow-canvas-loading-box']),
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
+
className: 'flow-canvas-loading-loader'
|
|
38
|
+
})
|
|
39
|
+
}), !(0, _lodash.isNull)(tip) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
40
|
+
className: 'flow-canvas-loading-tip',
|
|
41
|
+
children: tip
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// 空状态
|
|
46
|
+
if (!children) return content;
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
48
|
+
children: [loading ? content : null, children]
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
var _default = exports.default = CanvasLoading;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.flow-canvas-loading {
|
|
2
|
+
&-container {
|
|
3
|
+
position: absolute;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
z-index: 100;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
background: rgba(255, 255, 255, 0.5);
|
|
10
|
+
backdrop-filter: blur(20px);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&-center {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&-box {
|
|
21
|
+
width: 100px;
|
|
22
|
+
height: 100px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-small &-box {
|
|
26
|
+
width: 20px;
|
|
27
|
+
height: 20px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-small &-loader {
|
|
31
|
+
width: 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-loader {
|
|
35
|
+
position: relative;
|
|
36
|
+
width: 20px;
|
|
37
|
+
background: rgba(0, 0, 0, 0.85);
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2);
|
|
40
|
+
animation: l2 1.5s infinite linear;
|
|
41
|
+
aspect-ratio: 1;
|
|
42
|
+
|
|
43
|
+
&::before,
|
|
44
|
+
&::after {
|
|
45
|
+
position: absolute;
|
|
46
|
+
border-radius: inherit;
|
|
47
|
+
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2);
|
|
48
|
+
animation: inherit;
|
|
49
|
+
animation-delay: -0.5s;
|
|
50
|
+
content: '';
|
|
51
|
+
inset: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::after {
|
|
55
|
+
animation-delay: -1s;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes l2 {
|
|
59
|
+
100% {
|
|
60
|
+
box-shadow: 0 0 0 40px rgba(0, 0, 0, 0);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-tip {
|
|
66
|
+
margin-top: 12px;
|
|
67
|
+
color: rgba(0, 0, 0, 0.75);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface DebugPanelProps {
|
|
4
|
+
onExecute: (input: Record<string, any>) => Promise<{
|
|
5
|
+
result: any;
|
|
6
|
+
stdout?: string;
|
|
7
|
+
stderr?: string;
|
|
8
|
+
}>;
|
|
9
|
+
onSyncSchema?: (output?: Record<string, any>) => void;
|
|
10
|
+
closeModal?: () => void;
|
|
11
|
+
writeToTerminal?: (data: string) => void;
|
|
12
|
+
defaultInputValue?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export declare const DebugPanel: React.FC<DebugPanelProps>;
|
|
15
|
+
export default DebugPanel;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,cAAc,CAAC;AAKtB,UAAU,eAAe;IACvB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC;QACjD,MAAM,EAAE,GAAG,CAAC;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IACtD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACzC;AAID,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6IhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.DebugPanel = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _antd = require("antd");
|
|
9
|
+
var _icons = require("@ant-design/icons");
|
|
10
|
+
var _JSON = require("../editors/JSON");
|
|
11
|
+
require("./index.less");
|
|
12
|
+
var _ahooks = require("ahooks");
|
|
13
|
+
var _LoadingButton = require("../../LoadingButton");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const prefixCls = 'rxflow-debug-panel';
|
|
18
|
+
const DebugPanel = ({
|
|
19
|
+
onExecute,
|
|
20
|
+
onSyncSchema,
|
|
21
|
+
closeModal,
|
|
22
|
+
writeToTerminal,
|
|
23
|
+
defaultInputValue
|
|
24
|
+
}) => {
|
|
25
|
+
const [inputJson, setInputJson] = (0, _react.useState)(() => {
|
|
26
|
+
return defaultInputValue ? JSON.stringify(defaultInputValue, null, 2) : '{}';
|
|
27
|
+
});
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
setInputJson(defaultInputValue ? JSON.stringify(defaultInputValue, null, 2) : '{}');
|
|
30
|
+
}, [defaultInputValue]);
|
|
31
|
+
const [outputJson, setOutputJson] = (0, _react.useState)('');
|
|
32
|
+
const [api, contextHolder] = _antd.message.useMessage();
|
|
33
|
+
const handleRun = (0, _ahooks.useMemoizedFn)(async () => {
|
|
34
|
+
try {
|
|
35
|
+
// 验证输入 JSON 格式
|
|
36
|
+
let parsedInput;
|
|
37
|
+
try {
|
|
38
|
+
parsedInput = JSON.parse(inputJson || '');
|
|
39
|
+
} catch (error) {
|
|
40
|
+
api.error('输入的 JSON 格式不正确');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
// 执行运行操作
|
|
44
|
+
const {
|
|
45
|
+
result,
|
|
46
|
+
stdout,
|
|
47
|
+
stderr
|
|
48
|
+
} = await onExecute(parsedInput);
|
|
49
|
+
|
|
50
|
+
// 格式化输出结果
|
|
51
|
+
setOutputJson(JSON.stringify(result, null, 2));
|
|
52
|
+
api.success('运行成功, 执行结果请查看终端信息');
|
|
53
|
+
|
|
54
|
+
// stdout 需要输出到终端
|
|
55
|
+
writeToTerminal?.((stdout || stderr || '').replace(/\n/g, '\r\n')); // 对于
|
|
56
|
+
} catch (error) {
|
|
57
|
+
const msg = typeof error === 'object' && error && 'message' in error ? error.message : '未知错误';
|
|
58
|
+
setOutputJson('');
|
|
59
|
+
api.error(msg || '执行失败');
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const handleClearOutput = (0, _react.useCallback)(() => {
|
|
63
|
+
setOutputJson('');
|
|
64
|
+
}, []);
|
|
65
|
+
const handleFormatInput = (0, _ahooks.useMemoizedFn)(() => {
|
|
66
|
+
try {
|
|
67
|
+
const parsed = JSON.parse(inputJson || '');
|
|
68
|
+
setInputJson(JSON.stringify(parsed, null, 2));
|
|
69
|
+
api.success('JSON 格式化完成');
|
|
70
|
+
} catch (error) {
|
|
71
|
+
api.error('JSON 格式不正确,无法格式化');
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
const onSync = (0, _ahooks.useMemoizedFn)(async () => {
|
|
75
|
+
let parsedOutput;
|
|
76
|
+
try {
|
|
77
|
+
parsedOutput = JSON.parse(outputJson || '');
|
|
78
|
+
} catch (error) {
|
|
79
|
+
api.error('输出的 JSON 格式不正确');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
await onSyncSchema?.(parsedOutput);
|
|
84
|
+
closeModal?.();
|
|
85
|
+
} catch (error) {
|
|
86
|
+
const msg = typeof error === 'object' && error && 'message' in error ? error.message : '未知错误';
|
|
87
|
+
api.error(msg || '执行失败');
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
91
|
+
className: prefixCls,
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
93
|
+
className: `${prefixCls}-header-bar`,
|
|
94
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
95
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.BugOutlined, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
96
|
+
children: "\u8C03\u8BD5\u9762\u677F"
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
}), contextHolder, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
+
className: `${prefixCls}-body`,
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
102
|
+
direction: 'vertical',
|
|
103
|
+
size: 16,
|
|
104
|
+
className: `${prefixCls}-content`,
|
|
105
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
106
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
107
|
+
className: `${prefixCls}-header`,
|
|
108
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
109
|
+
className: `${prefixCls}-title`,
|
|
110
|
+
children: "\u8F93\u5165 JSON"
|
|
111
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
112
|
+
size: "small",
|
|
113
|
+
onClick: handleFormatInput,
|
|
114
|
+
children: "\u683C\u5F0F\u5316"
|
|
115
|
+
})]
|
|
116
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JSON.JsonEditor, {
|
|
117
|
+
height: 200,
|
|
118
|
+
value: inputJson,
|
|
119
|
+
onChange: value => setInputJson(value),
|
|
120
|
+
placeholder: "\u8BF7\u8F93\u5165 JSON \u6570\u636E"
|
|
121
|
+
})]
|
|
122
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
124
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingButton.LoadingButton, {
|
|
125
|
+
type: "primary",
|
|
126
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.PlayCircleOutlined, {}),
|
|
127
|
+
onClick: handleRun,
|
|
128
|
+
children: "\u8FD0\u884C"
|
|
129
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
130
|
+
onClick: handleClearOutput,
|
|
131
|
+
children: "\u6E05\u7A7A\u8F93\u51FA"
|
|
132
|
+
})]
|
|
133
|
+
})
|
|
134
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Divider, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
135
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
136
|
+
className: `${prefixCls}-header`,
|
|
137
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
138
|
+
className: `${prefixCls}-title`,
|
|
139
|
+
children: "\u8F93\u51FA\u7ED3\u679C"
|
|
140
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingButton.LoadingButton, {
|
|
141
|
+
onClick: onSync,
|
|
142
|
+
children: "\u540C\u6B65\u8F93\u51FA\u5230\u914D\u7F6E"
|
|
143
|
+
})]
|
|
144
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JSON.JsonEditor, {
|
|
145
|
+
readOnly: true,
|
|
146
|
+
height: 200,
|
|
147
|
+
value: outputJson,
|
|
148
|
+
placeholder: "\u8FD0\u884C\u7ED3\u679C\u5C06\u5728\u8FD9\u91CC\u663E\u793A"
|
|
149
|
+
})]
|
|
150
|
+
})]
|
|
151
|
+
})
|
|
152
|
+
})]
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
exports.DebugPanel = DebugPanel;
|
|
156
|
+
var _default = exports.default = DebugPanel;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.rxflow-debug {
|
|
2
|
+
&-panel{
|
|
3
|
+
display: flex;
|
|
4
|
+
flex: 1;
|
|
5
|
+
height: 100%;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
color: rgba(255,255,255,0.85);
|
|
8
|
+
background-color: #1f1f1f;
|
|
9
|
+
&-header-bar {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex: 0;
|
|
12
|
+
align-items: center;
|
|
13
|
+
padding: 8px 12px;
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
line-height: 1.5;
|
|
16
|
+
border-bottom: 1px solid rgba(253, 253, 253, 0.12);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-body {
|
|
20
|
+
flex: 1;
|
|
21
|
+
min-width: 0;
|
|
22
|
+
min-height: 0;
|
|
23
|
+
padding: 24px;
|
|
24
|
+
overflow: auto;
|
|
25
|
+
scrollbar-width: thin;
|
|
26
|
+
scrollbar-color: #4c4d4f transparent;
|
|
27
|
+
}
|
|
28
|
+
&-content{
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-header {
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
align-items: center;
|
|
36
|
+
margin-bottom: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-title {
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
margin-bottom: 2px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export declare const LibraryIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=LibraryIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LibraryIcon.d.ts","sourceRoot":"","sources":["LibraryIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,cAAc,CAAC;AAItB,eAAO,MAAM,WAAW,+CAMhB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LibraryIcon = void 0;
|
|
7
|
+
require("./index.less");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* @author: yanxianliang
|
|
11
|
+
* @date: 2025-07-24 21:29
|
|
12
|
+
* @modified:2025/7/24 21:29 by yanxianliang
|
|
13
|
+
* @desc: LibraryIcon
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const prefixCls = 'rxflow-code-editor';
|
|
19
|
+
const LibraryIcon = () => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
20
|
+
className: `${prefixCls}-tree-icon`,
|
|
21
|
+
viewBox: "0 0 1024 1024",
|
|
22
|
+
version: "1.1",
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
+
"p-id": "2843",
|
|
25
|
+
width: "1em",
|
|
26
|
+
height: "1em",
|
|
27
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
28
|
+
fill: 'currentColor',
|
|
29
|
+
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",
|
|
30
|
+
"p-id": "2844"
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
exports.LibraryIcon = LibraryIcon;
|
|
@@ -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,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Javascript = void 0;
|
|
7
|
+
require("../index.less");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* @author: yanxianliang
|
|
11
|
+
* @date: 2025-07-24 23:09
|
|
12
|
+
* @modified:2025/7/24 23:09 by yanxianliang
|
|
13
|
+
* @desc: Javascript Icon
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const prefixCls = 'rxflow-code-editor';
|
|
19
|
+
const Javascript = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
20
|
+
className: `${prefixCls}-file-icon`,
|
|
21
|
+
viewBox: "0 0 1024 1024",
|
|
22
|
+
version: "1.1",
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
+
"p-id": "8513",
|
|
25
|
+
width: "1em",
|
|
26
|
+
height: "1em",
|
|
27
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
28
|
+
d: "M128 128m128 0l512 0q128 0 128 128l0 512q0 128-128 128l-512 0q-128 0-128-128l0-512q0-128 128-128Z",
|
|
29
|
+
fill: "#FFBF00",
|
|
30
|
+
"p-id": "8514"
|
|
31
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
32
|
+
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",
|
|
33
|
+
fill: "#FFFFFF",
|
|
34
|
+
"p-id": "8515"
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
exports.Javascript = Javascript;
|
|
@@ -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,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PythonIcon = void 0;
|
|
7
|
+
require("../index.less");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* @author: yanxianliang
|
|
11
|
+
* @date: 2025-07-24 22:46
|
|
12
|
+
* @modified:2025/7/24 22:46 by yanxianliang
|
|
13
|
+
* @desc: 文件 icon
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const prefixCls = 'rxflow-code-editor';
|
|
19
|
+
const PythonIcon = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
20
|
+
className: `${prefixCls}-file-icon`,
|
|
21
|
+
viewBox: "0 0 1024 1024",
|
|
22
|
+
version: "1.1",
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
+
"p-id": "3836",
|
|
25
|
+
width: "1em",
|
|
26
|
+
height: "1em",
|
|
27
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
28
|
+
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",
|
|
29
|
+
fill: "#3C78AA",
|
|
30
|
+
"p-id": "3837"
|
|
31
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
32
|
+
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",
|
|
33
|
+
fill: "#FDD835",
|
|
34
|
+
"p-id": "3838"
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
exports.PythonIcon = PythonIcon;
|
|
@@ -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,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FileTree = void 0;
|
|
7
|
+
var _antd = require("antd");
|
|
8
|
+
require("./index.less");
|
|
9
|
+
var _LibraryIcon = require("./LibraryIcon");
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _useFileIcon = require("./useFileIcon");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
/**
|
|
14
|
+
* @author: yanxianliang
|
|
15
|
+
* @date: 2025-07-21 18:31
|
|
16
|
+
* @modified:2025/7/21 18:31 by yanxianliang
|
|
17
|
+
* @desc: 文件树
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
DirectoryTree
|
|
24
|
+
} = _antd.Tree;
|
|
25
|
+
const prefixCls = 'rxflow-code-editor';
|
|
26
|
+
const libraryRender = data => {
|
|
27
|
+
const {
|
|
28
|
+
title,
|
|
29
|
+
version
|
|
30
|
+
} = data;
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
32
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
33
|
+
className: `${prefixCls}-libraries-title`,
|
|
34
|
+
children: title
|
|
35
|
+
}), version ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
36
|
+
className: `${prefixCls}-libraries-version`,
|
|
37
|
+
children: version
|
|
38
|
+
}) : null]
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const FileTree = ({
|
|
42
|
+
files,
|
|
43
|
+
value,
|
|
44
|
+
onChange,
|
|
45
|
+
libraries
|
|
46
|
+
}) => {
|
|
47
|
+
const _files = (0, _useFileIcon.useFileIcon)(files);
|
|
48
|
+
const libraryData = (0, _react.useMemo)(() => {
|
|
49
|
+
return libraries ? [{
|
|
50
|
+
title: libraries.title,
|
|
51
|
+
key: libraries.title,
|
|
52
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LibraryIcon.LibraryIcon, {}),
|
|
53
|
+
children: libraries.children
|
|
54
|
+
}] : undefined;
|
|
55
|
+
}, [libraries]);
|
|
56
|
+
const _libraries = (0, _useFileIcon.useFileIcon)(libraryData);
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
58
|
+
className: `${prefixCls}-file-panel`,
|
|
59
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DirectoryTree, {
|
|
60
|
+
activeKey: value,
|
|
61
|
+
onActiveChange: onChange,
|
|
62
|
+
className: `${prefixCls}-file-tree`,
|
|
63
|
+
defaultExpandAll: true,
|
|
64
|
+
treeData: _files
|
|
65
|
+
}), libraries ? /*#__PURE__*/(0, _jsxRuntime.jsx)(DirectoryTree, {
|
|
66
|
+
defaultExpandAll: true,
|
|
67
|
+
className: `${prefixCls}-libraries`,
|
|
68
|
+
treeData: _libraries,
|
|
69
|
+
titleRender: libraryRender
|
|
70
|
+
}) : null]
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
exports.FileTree = FileTree;
|