@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
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Sider = void 0;
|
|
7
|
+
require("./index.less");
|
|
8
|
+
var _dragDataTransfer = require("../../utils/dragDataTransfer");
|
|
9
|
+
var _CanvasLoading = _interopRequireDefault(require("../CanvasLoading"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _groupBy = _interopRequireDefault(require("lodash/groupBy"));
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
var _SearchOutlined = _interopRequireDefault(require("@ant-design/icons/lib/icons/SearchOutlined"));
|
|
14
|
+
var _reactHighlightWords = _interopRequireDefault(require("react-highlight-words"));
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
/**
|
|
20
|
+
* @author: yanxianliang
|
|
21
|
+
* @date: 2025-07-27 11:34
|
|
22
|
+
* @modified:2025/7/27 11:34 by yanxianliang
|
|
23
|
+
* @desc: 节点列表
|
|
24
|
+
*
|
|
25
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
const Sider = ({
|
|
29
|
+
loading,
|
|
30
|
+
nodeTypes = []
|
|
31
|
+
}) => {
|
|
32
|
+
const [filter, setFilter] = (0, _react.useState)('');
|
|
33
|
+
|
|
34
|
+
// 分组
|
|
35
|
+
const nodeCategoryList = (0, _react.useMemo)(() => {
|
|
36
|
+
if (!nodeTypes || !nodeTypes.length) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
// 分组
|
|
40
|
+
const group = (0, _groupBy.default)(nodeTypes.filter(type => !type.hideInSider && type.label && type.label.indexOf(filter) > -1), node => node.group || '');
|
|
41
|
+
return Object.keys(group).map(category => {
|
|
42
|
+
return {
|
|
43
|
+
group: category,
|
|
44
|
+
list: group[category] || []
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
}, [nodeTypes, filter]);
|
|
48
|
+
const onDragStart = (0, _react.useCallback)(ev => {
|
|
49
|
+
const element = ev.target;
|
|
50
|
+
const nodeType = element.getAttribute("data-node-type");
|
|
51
|
+
const rect = element.getBoundingClientRect();
|
|
52
|
+
const offsetX = ev.clientX - rect.left; // 鼠标在元素内的X偏移[6]
|
|
53
|
+
const offsetY = ev.clientY - rect.top; // 鼠标在元素内的Y偏移[6]
|
|
54
|
+
ev.dataTransfer.effectAllowed = 'move';
|
|
55
|
+
ev.dataTransfer.setData('node@drag', nodeType);
|
|
56
|
+
(0, _dragDataTransfer.setDragDataTransfer)({
|
|
57
|
+
width: rect.width,
|
|
58
|
+
height: rect.height,
|
|
59
|
+
offsetX,
|
|
60
|
+
offsetY,
|
|
61
|
+
type: nodeType
|
|
62
|
+
});
|
|
63
|
+
}, []);
|
|
64
|
+
const onSearch = (0, _react.useCallback)(e => {
|
|
65
|
+
setFilter(e.currentTarget.value);
|
|
66
|
+
}, []);
|
|
67
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
68
|
+
className: 'rxflow-sider',
|
|
69
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
70
|
+
className: 'rxflow-sider-search',
|
|
71
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Input, {
|
|
72
|
+
onChange: onSearch,
|
|
73
|
+
prefix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchOutlined.default, {
|
|
74
|
+
style: {
|
|
75
|
+
color: 'rgba(32, 41, 69, 0.62)'
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
placeholder: '搜索节点'
|
|
79
|
+
})
|
|
80
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
|
+
className: 'rxflow-sider-scroll',
|
|
82
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CanvasLoading.default, {
|
|
83
|
+
loading: loading,
|
|
84
|
+
tip: '节点加载中...',
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
86
|
+
className: 'rxflow-sider-content',
|
|
87
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Space, {
|
|
88
|
+
size: 12,
|
|
89
|
+
direction: 'vertical',
|
|
90
|
+
style: {
|
|
91
|
+
width: '100%'
|
|
92
|
+
},
|
|
93
|
+
children: nodeCategoryList.map(categoryItem => {
|
|
94
|
+
const {
|
|
95
|
+
group,
|
|
96
|
+
list
|
|
97
|
+
} = categoryItem;
|
|
98
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
99
|
+
children: [group ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
+
className: 'rxflow-sider-group',
|
|
101
|
+
children: group
|
|
102
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.List, {
|
|
103
|
+
grid: {
|
|
104
|
+
gutter: 0,
|
|
105
|
+
column: 1
|
|
106
|
+
},
|
|
107
|
+
dataSource: list,
|
|
108
|
+
renderItem: item => {
|
|
109
|
+
const {
|
|
110
|
+
icon,
|
|
111
|
+
label
|
|
112
|
+
} = item;
|
|
113
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.List.Item, {
|
|
114
|
+
className: 'rxflow-sider-item',
|
|
115
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
116
|
+
draggable: true,
|
|
117
|
+
className: 'rxflow-sider-card',
|
|
118
|
+
onDragStart: onDragStart,
|
|
119
|
+
"data-node-type": item.type,
|
|
120
|
+
children: [icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
121
|
+
className: 'rxflow-sider-icon',
|
|
122
|
+
children: icon
|
|
123
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
124
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactHighlightWords.default, {
|
|
125
|
+
highlightClassName: 'rxflow-sider-highlight',
|
|
126
|
+
textToHighlight: label || '',
|
|
127
|
+
searchWords: [filter]
|
|
128
|
+
})
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
131
|
+
}, item.type);
|
|
132
|
+
}
|
|
133
|
+
})]
|
|
134
|
+
}, group);
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
})]
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
exports.Sider = Sider;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.rxflow-sider{
|
|
2
|
+
width: 220px;
|
|
3
|
+
position: relative;
|
|
4
|
+
overflow: auto; // 显示滚动条
|
|
5
|
+
user-select: none;
|
|
6
|
+
background: #fff;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
|
|
10
|
+
&-search {
|
|
11
|
+
padding: 12px 10px 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-scroll {
|
|
15
|
+
flex: 1;
|
|
16
|
+
overflow: auto;
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&-highlight{
|
|
21
|
+
color: rgb(255, 115, 0);
|
|
22
|
+
background: transparent;
|
|
23
|
+
mark&{
|
|
24
|
+
padding: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-group {
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
color: rgba(32, 41, 69, 0.62);
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
margin-bottom: 4px;
|
|
33
|
+
padding-left: 4px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-icon {
|
|
37
|
+
font-size: 20px;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-card{
|
|
42
|
+
height: 32px;
|
|
43
|
+
display: flex;
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
padding: 0 6px;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
align-items: center;
|
|
48
|
+
cursor: grab;
|
|
49
|
+
gap: 6px;
|
|
50
|
+
background: #fff;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
-webkit-backface-visibility: hidden;
|
|
53
|
+
transform: translateZ(0);
|
|
54
|
+
&:hover {
|
|
55
|
+
background-color: rgba(87, 104, 161, 0.08);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&-content{
|
|
60
|
+
padding: 10px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-item{
|
|
64
|
+
.rxflow-list-grid .rxflow-col > &.rxflow-list-item{
|
|
65
|
+
margin-bottom: 10px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-08-23 12:46
|
|
4
|
+
* @modified:2025/8/23 12:46 by yanxianliang
|
|
5
|
+
* @desc: 运行状态枚举
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum RunningStatus {
|
|
10
|
+
running = "running",
|
|
11
|
+
success = "success",
|
|
12
|
+
error = "error"
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=RunningStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunningStatus.d.ts","sourceRoot":"","sources":["RunningStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RunningStatus = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @author: yanxianliang
|
|
9
|
+
* @date: 2025-08-23 12:46
|
|
10
|
+
* @modified:2025/8/23 12:46 by yanxianliang
|
|
11
|
+
* @desc: 运行状态枚举
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
14
|
+
*/
|
|
15
|
+
let RunningStatus = exports.RunningStatus = /*#__PURE__*/function (RunningStatus) {
|
|
16
|
+
RunningStatus["running"] = "running";
|
|
17
|
+
RunningStatus["success"] = "success";
|
|
18
|
+
RunningStatus["error"] = "error";
|
|
19
|
+
return RunningStatus;
|
|
20
|
+
}({});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-23 09:42
|
|
4
|
+
* @modified:2025/7/23 09:42 by yanxianliang
|
|
5
|
+
* @desc: Edge 是否高亮
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
import { EdgeProps } from "@xyflow/react";
|
|
10
|
+
/**
|
|
11
|
+
* 检测边是否高亮
|
|
12
|
+
* @param edge
|
|
13
|
+
*/
|
|
14
|
+
export declare function useActiveEdge(edge: Pick<EdgeProps, 'source' | 'target' | 'sourceHandleId' | 'targetHandleId'>): boolean;
|
|
15
|
+
//# sourceMappingURL=useActiveEdge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActiveEdge.d.ts","sourceRoot":"","sources":["useActiveEdge.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAIxC;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,gBAAgB,GAAG,gBAAgB,CAAC,WAY7G"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useActiveEdge = useActiveEdge;
|
|
7
|
+
var _state = require("../state");
|
|
8
|
+
/**
|
|
9
|
+
* @author: yanxianliang
|
|
10
|
+
* @date: 2025-07-23 09:42
|
|
11
|
+
* @modified:2025/7/23 09:42 by yanxianliang
|
|
12
|
+
* @desc: Edge 是否高亮
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 检测边是否高亮
|
|
19
|
+
* @param edge
|
|
20
|
+
*/
|
|
21
|
+
function useActiveEdge(edge) {
|
|
22
|
+
return (0, _state.useSelector)(state => {
|
|
23
|
+
const edgeSet = state.runState?.activeEdges; // active Set
|
|
24
|
+
const {
|
|
25
|
+
source,
|
|
26
|
+
sourceHandleId,
|
|
27
|
+
targetHandleId,
|
|
28
|
+
target
|
|
29
|
+
} = edge;
|
|
30
|
+
if (!edgeSet) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
// 查找是否有对应的边
|
|
34
|
+
return edgeSet.has(`${source},${sourceHandleId},${target},${targetHandleId}`) || edgeSet.has(`${source},${sourceHandleId},${target}`) || edgeSet.has(`${source},${target}`);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves the setDebugStore function from the zustand store within the DebugContext.
|
|
3
|
+
* This function is intended to be used for setting the debug state in a React application.
|
|
4
|
+
* If the DebugContext provider is missing, it will log an error and throw an exception.
|
|
5
|
+
*
|
|
6
|
+
* @throws {Error} Throws an error if the DebugContext provider is not found.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useCleanRunState: () => () => void;
|
|
9
|
+
//# sourceMappingURL=useCleanRunState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCleanRunState.d.ts","sourceRoot":"","sources":["useCleanRunState.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,kBAO5B,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useCleanRunState = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _state = require("../state");
|
|
9
|
+
/**
|
|
10
|
+
* @author: yanxianliang
|
|
11
|
+
* @date: 2025-08-23 18:15
|
|
12
|
+
* @modified:2025/8/23 18:15 by yanxianliang
|
|
13
|
+
* @desc:
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the setDebugStore function from the zustand store within the DebugContext.
|
|
20
|
+
* This function is intended to be used for setting the debug state in a React application.
|
|
21
|
+
* If the DebugContext provider is missing, it will log an error and throw an exception.
|
|
22
|
+
*
|
|
23
|
+
* @throws {Error} Throws an error if the DebugContext provider is not found.
|
|
24
|
+
*/
|
|
25
|
+
const useCleanRunState = () => {
|
|
26
|
+
const setState = (0, _state.useSetState)();
|
|
27
|
+
return (0, _react.useCallback)(() => {
|
|
28
|
+
setState({
|
|
29
|
+
runState: undefined
|
|
30
|
+
});
|
|
31
|
+
}, []);
|
|
32
|
+
};
|
|
33
|
+
exports.useCleanRunState = useCleanRunState;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom hook that retrieves the debug state for a specific node.
|
|
3
|
+
* It uses the `useNodeId` hook to get the node ID and the `DebugContext` context to access the debug store.
|
|
4
|
+
* If the `DebugContext` provider is missing, it throws an error.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare const useNodeRunningState: (nodeId?: string) => import("../..").NodeRunState | undefined;
|
|
8
|
+
//# sourceMappingURL=useNodeRunningState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodeRunningState.d.ts","sourceRoot":"","sources":["useNodeRunningState.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,YAAa,MAAM,6CAIlD,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useNodeRunningState = void 0;
|
|
7
|
+
var _react = require("@xyflow/react");
|
|
8
|
+
var _shallow = require("zustand/react/shallow");
|
|
9
|
+
var _state = require("../state");
|
|
10
|
+
/**
|
|
11
|
+
* @author: yanxianliang
|
|
12
|
+
* @date: 2025-07-19 17:21
|
|
13
|
+
* @modified:2025/7/19 17:21 by yanxianliang
|
|
14
|
+
* @desc: 获取节点运行/调试状态
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A custom hook that retrieves the debug state for a specific node.
|
|
21
|
+
* It uses the `useNodeId` hook to get the node ID and the `DebugContext` context to access the debug store.
|
|
22
|
+
* If the `DebugContext` provider is missing, it throws an error.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
const useNodeRunningState = nodeId => {
|
|
26
|
+
const innerId = (0, _react.useNodeId)();
|
|
27
|
+
const id = nodeId || innerId;
|
|
28
|
+
return (0, _state.useSelector)((0, _shallow.useShallow)(state => id ? state.runState?.nodeRunMap?.[id] : undefined));
|
|
29
|
+
};
|
|
30
|
+
exports.useNodeRunningState = useNodeRunningState;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-24 09:33
|
|
4
|
+
* @modified:2025/7/24 09:33 by yanxianliang
|
|
5
|
+
* @desc: get/set run state
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* useNodeDebugState is a custom hook that provides access to the debug state and allows modification of the running state.
|
|
11
|
+
* It utilizes the DebugContext to retrieve the zustand store, which holds the debug state information.
|
|
12
|
+
* If the DebugContext provider is missing, it throws an error.
|
|
13
|
+
*
|
|
14
|
+
* @returns A tuple where the first element is a boolean indicating if the debug is running,
|
|
15
|
+
* and the second element is a function to set the running state.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useRunState: () => {
|
|
18
|
+
readonly runningStatus: import("../..").RunningStatus | undefined;
|
|
19
|
+
readonly timeSpent: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useRunState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRunState.d.ts","sourceRoot":"","sources":["useRunState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW;;;CAUvB,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useRunState = void 0;
|
|
7
|
+
var _shallow = require("zustand/react/shallow");
|
|
8
|
+
var _state = require("../state");
|
|
9
|
+
/**
|
|
10
|
+
* @author: yanxianliang
|
|
11
|
+
* @date: 2025-07-24 09:33
|
|
12
|
+
* @modified:2025/7/24 09:33 by yanxianliang
|
|
13
|
+
* @desc: get/set run state
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* useNodeDebugState is a custom hook that provides access to the debug state and allows modification of the running state.
|
|
20
|
+
* It utilizes the DebugContext to retrieve the zustand store, which holds the debug state information.
|
|
21
|
+
* If the DebugContext provider is missing, it throws an error.
|
|
22
|
+
*
|
|
23
|
+
* @returns A tuple where the first element is a boolean indicating if the debug is running,
|
|
24
|
+
* and the second element is a function to set the running state.
|
|
25
|
+
*/
|
|
26
|
+
const useRunState = () => {
|
|
27
|
+
const {
|
|
28
|
+
runningStatus,
|
|
29
|
+
timeSpent
|
|
30
|
+
} = (0, _state.useSelector)((0, _shallow.useShallow)(state => ({
|
|
31
|
+
runningStatus: state.runState?.runningStatus,
|
|
32
|
+
timeSpent: state.runState?.timeSpent
|
|
33
|
+
})));
|
|
34
|
+
return {
|
|
35
|
+
runningStatus,
|
|
36
|
+
timeSpent
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.useRunState = useRunState;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-19 19:55
|
|
4
|
+
* @modified:2025/7/19 19:55 by yanxianliang
|
|
5
|
+
* @desc: 设置运行/调试 状态
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
import { WorkflowRunState } from "../..";
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves the setDebugStore function from the zustand store within the DebugContext.
|
|
12
|
+
* This function is intended to be used for setting the debug state in a React application.
|
|
13
|
+
* If the DebugContext provider is missing, it will log an error and throw an exception.
|
|
14
|
+
*
|
|
15
|
+
* @throws {Error} Throws an error if the DebugContext provider is not found.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useSetRunState: () => (runState: Partial<WorkflowRunState>) => void;
|
|
18
|
+
//# sourceMappingURL=useSetRunState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSetRunState.d.ts","sourceRoot":"","sources":["useSetRunState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAC,gBAAgB,EAAC,cAAyB;AAIlD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,mBAEK,QAAQ,gBAAgB,CAAC,SAWxD,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useSetRunState = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _state = require("../state");
|
|
9
|
+
/**
|
|
10
|
+
* @author: yanxianliang
|
|
11
|
+
* @date: 2025-07-19 19:55
|
|
12
|
+
* @modified:2025/7/19 19:55 by yanxianliang
|
|
13
|
+
* @desc: 设置运行/调试 状态
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the setDebugStore function from the zustand store within the DebugContext.
|
|
20
|
+
* This function is intended to be used for setting the debug state in a React application.
|
|
21
|
+
* If the DebugContext provider is missing, it will log an error and throw an exception.
|
|
22
|
+
*
|
|
23
|
+
* @throws {Error} Throws an error if the DebugContext provider is not found.
|
|
24
|
+
*/
|
|
25
|
+
const useSetRunState = () => {
|
|
26
|
+
const setState = (0, _state.useSetState)();
|
|
27
|
+
return (0, _react.useCallback)(runState => {
|
|
28
|
+
setState(state => {
|
|
29
|
+
return {
|
|
30
|
+
...state,
|
|
31
|
+
runState: {
|
|
32
|
+
...state.runState,
|
|
33
|
+
...runState
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}, []);
|
|
38
|
+
};
|
|
39
|
+
exports.useSetRunState = useSetRunState;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WorkflowBaseState } from "..";
|
|
2
|
+
import { ExtractState } from "@rxflow/base";
|
|
3
|
+
import { StoreApi } from 'zustand';
|
|
4
|
+
export declare const useSetState: () => (partial: WorkflowBaseState | Partial<WorkflowBaseState> | ((state: WorkflowBaseState) => WorkflowBaseState | Partial<WorkflowBaseState>), replace?: boolean | undefined) => void;
|
|
5
|
+
export declare const useGetState: () => () => WorkflowBaseState;
|
|
6
|
+
export declare const useSelector: <U>(selector: (state: ExtractState<StoreApi<WorkflowBaseState>>) => U) => U;
|
|
7
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["state.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAC,WAAyB;AACnD,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,eAAO,MAAM,WAAW,yLAAkC,CAAC;AAE3D,eAAO,MAAM,WAAW,+BAAkC,CAAC;AAG3D,eAAO,MAAM,WAAW,wBAAyB,aAAa,SAAS,iBAAiB,CAAC,CAAC,KAAK,CAAC,MAE/F,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useSetState = exports.useSelector = exports.useGetState = void 0;
|
|
7
|
+
var _base = require("@rxflow/base");
|
|
8
|
+
const useSetState = exports.useSetState = _base.useSetState;
|
|
9
|
+
const useGetState = exports.useGetState = _base.useGetState;
|
|
10
|
+
const useSelector = selector => {
|
|
11
|
+
return (0, _base.useSelector)(selector);
|
|
12
|
+
};
|
|
13
|
+
exports.useSelector = useSelector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeleteNode.d.ts","sourceRoot":"","sources":["useDeleteNode.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa,aAEM,MAAM,kBAQrC,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDeleteNode = void 0;
|
|
7
|
+
var _react = require("@xyflow/react");
|
|
8
|
+
var _react2 = require("react");
|
|
9
|
+
/**
|
|
10
|
+
* @author: yanxianliang
|
|
11
|
+
* @date: 2025-08-18 19:45
|
|
12
|
+
* @modified:2025/8/18 19:45 by yanxianliang
|
|
13
|
+
* @desc: 删除节点的 hook
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const useDeleteNode = () => {
|
|
19
|
+
const {
|
|
20
|
+
deleteElements,
|
|
21
|
+
getNode
|
|
22
|
+
} = (0, _react.useReactFlow)();
|
|
23
|
+
return (0, _react2.useCallback)(async id => {
|
|
24
|
+
const node = getNode(id);
|
|
25
|
+
if (node) {
|
|
26
|
+
await deleteElements({
|
|
27
|
+
nodes: [node]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}, []);
|
|
31
|
+
};
|
|
32
|
+
exports.useDeleteNode = useDeleteNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEdgeIsHover.d.ts","sourceRoot":"","sources":["useEdgeIsHover.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,OAAQ,MAAM,YAExC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useEdgeIsHover = void 0;
|
|
7
|
+
var _state = require("./state");
|
|
8
|
+
/**
|
|
9
|
+
* @author: yanxianliang
|
|
10
|
+
* @date: 2025-08-15 22:06
|
|
11
|
+
* @modified:2025/8/15 22:06 by yanxianliang
|
|
12
|
+
* @desc: Edge Hover State
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const useEdgeIsHover = id => {
|
|
18
|
+
return (0, _state.useSelector)(state => state.hoveredEdge === id);
|
|
19
|
+
};
|
|
20
|
+
exports.useEdgeIsHover = useEdgeIsHover;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-08-11 14:18
|
|
4
|
+
* @modified:2025/8/11 14:18 by yanxianliang
|
|
5
|
+
* @desc: 获取选中的节点和边列表
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useGetSelection: () => () => {
|
|
10
|
+
selectedNodes: string[] | undefined;
|
|
11
|
+
selectedEdges: string[] | undefined;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useGetSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetSelection.d.ts","sourceRoot":"","sources":["useGetSelection.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,eAAO,MAAM,eAAe;;;CAS3B,CAAA"}
|