@rxflow/base 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 +44 -0
- package/cjs/Flow.d.ts +14 -0
- package/cjs/Flow.d.ts.map +1 -0
- package/cjs/Flow.js +236 -0
- package/cjs/components/CollapseButton/index.d.ts +11 -0
- package/cjs/components/CollapseButton/index.d.ts.map +1 -0
- package/cjs/components/CollapseButton/index.js +58 -0
- package/cjs/components/CollapseButton/index.less +68 -0
- package/cjs/components/Controls/icons.d.ts +8 -0
- package/cjs/components/Controls/icons.d.ts.map +1 -0
- package/cjs/components/Controls/icons.js +85 -0
- package/cjs/components/Controls/index.d.ts +13 -0
- package/cjs/components/Controls/index.d.ts.map +1 -0
- package/cjs/components/Controls/index.js +195 -0
- package/cjs/components/DebugInfo/index.d.ts +5 -0
- package/cjs/components/DebugInfo/index.d.ts.map +1 -0
- package/cjs/components/DebugInfo/index.js +33 -0
- package/cjs/components/DebugInfo/index.less +6 -0
- package/cjs/components/EdgeText/index.d.ts +6 -0
- package/cjs/components/EdgeText/index.d.ts.map +1 -0
- package/cjs/components/EdgeText/index.js +48 -0
- package/cjs/components/Handle/index.d.ts +3 -0
- package/cjs/components/Handle/index.d.ts.map +1 -0
- package/cjs/components/Handle/index.js +24 -0
- package/cjs/components/Handle/index.module.less +9 -0
- package/cjs/components/HiddenHandle/index.css +9 -0
- package/cjs/components/HiddenHandle/index.d.ts +4 -0
- package/cjs/components/HiddenHandle/index.d.ts.map +1 -0
- package/cjs/components/HiddenHandle/index.js +23 -0
- package/cjs/components/Legend/index.d.ts +6 -0
- package/cjs/components/Legend/index.d.ts.map +1 -0
- package/cjs/components/Legend/index.js +72 -0
- package/cjs/components/Legend/index.less +41 -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/MarkerDefinitions/Mark.d.ts +11 -0
- package/cjs/components/MarkerDefinitions/Mark.d.ts.map +1 -0
- package/cjs/components/MarkerDefinitions/Mark.js +48 -0
- package/cjs/components/MarkerDefinitions/Symbols/Arrow.d.ts +11 -0
- package/cjs/components/MarkerDefinitions/Symbols/Arrow.d.ts.map +1 -0
- package/cjs/components/MarkerDefinitions/Symbols/Arrow.js +31 -0
- package/cjs/components/MarkerDefinitions/Symbols/ArrowClosed.d.ts +11 -0
- package/cjs/components/MarkerDefinitions/Symbols/ArrowClosed.d.ts.map +1 -0
- package/cjs/components/MarkerDefinitions/Symbols/ArrowClosed.js +32 -0
- package/cjs/components/MarkerDefinitions/index.d.ts +6 -0
- package/cjs/components/MarkerDefinitions/index.d.ts.map +1 -0
- package/cjs/components/MarkerDefinitions/index.js +45 -0
- package/cjs/components/MarkerDefinitions/styles.less +5 -0
- package/cjs/components/MarkerDefinitions/symbols.d.ts +5 -0
- package/cjs/components/MarkerDefinitions/symbols.d.ts.map +1 -0
- package/cjs/components/MarkerDefinitions/symbols.js +22 -0
- package/cjs/components/MarkerDefinitions/types.d.ts +21 -0
- package/cjs/components/NodeRenderFactory.d.ts +11 -0
- package/cjs/components/NodeRenderFactory.d.ts.map +1 -0
- package/cjs/components/NodeRenderFactory.js +26 -0
- package/cjs/components/Nodes/DefaultNode.d.ts +3 -0
- package/cjs/components/Nodes/DefaultNode.d.ts.map +1 -0
- package/cjs/components/Nodes/DefaultNode.js +30 -0
- package/cjs/components/Nodes/GroupNode.d.ts +3 -0
- package/cjs/components/Nodes/GroupNode.d.ts.map +1 -0
- package/cjs/components/Nodes/GroupNode.js +13 -0
- package/cjs/components/Nodes/InputNode.d.ts +3 -0
- package/cjs/components/Nodes/InputNode.d.ts.map +1 -0
- package/cjs/components/Nodes/InputNode.js +25 -0
- package/cjs/components/Nodes/OutputNode.d.ts +3 -0
- package/cjs/components/Nodes/OutputNode.d.ts.map +1 -0
- package/cjs/components/Nodes/OutputNode.js +25 -0
- package/cjs/components/Popover/index.d.ts +11 -0
- package/cjs/components/Popover/index.d.ts.map +1 -0
- package/cjs/components/Popover/index.js +100 -0
- package/cjs/components/Tooltip/index.d.ts +12 -0
- package/cjs/components/Tooltip/index.d.ts.map +1 -0
- package/cjs/components/Tooltip/index.js +110 -0
- package/cjs/components/index.d.ts +16 -0
- package/cjs/components/index.d.ts.map +1 -0
- package/cjs/components/index.js +100 -0
- package/cjs/constants/InnerFlowType.d.ts +12 -0
- package/cjs/constants/InnerFlowType.d.ts.map +1 -0
- package/cjs/constants/InnerFlowType.js +18 -0
- package/cjs/constants/NodeRoleType.d.ts +16 -0
- package/cjs/constants/NodeRoleType.d.ts.map +1 -0
- package/cjs/constants/NodeRoleType.js +22 -0
- package/cjs/constants/SelectionStrategy.d.ts +14 -0
- package/cjs/constants/SelectionStrategy.d.ts.map +1 -0
- package/cjs/constants/SelectionStrategy.js +20 -0
- package/cjs/edges/SmartEdge/index.d.ts +15 -0
- package/cjs/edges/SmartEdge/index.d.ts.map +1 -0
- package/cjs/edges/SmartEdge/index.js +54 -0
- package/cjs/hoc/createFlow.d.ts +14 -0
- package/cjs/hoc/createFlow.d.ts.map +1 -0
- package/cjs/hoc/createFlow.js +67 -0
- package/cjs/hoc/withFlowProvider.d.ts +11 -0
- package/cjs/hoc/withFlowProvider.d.ts.map +1 -0
- package/cjs/hoc/withFlowProvider.js +29 -0
- package/cjs/hooks/edges/useGetEdgesChangeHandlers.d.ts +11 -0
- package/cjs/hooks/edges/useGetEdgesChangeHandlers.d.ts.map +1 -0
- package/cjs/hooks/edges/useGetEdgesChangeHandlers.js +24 -0
- package/cjs/hooks/edges/useOnEdgesChange.d.ts +11 -0
- package/cjs/hooks/edges/useOnEdgesChange.d.ts.map +1 -0
- package/cjs/hooks/edges/useOnEdgesChange.js +31 -0
- package/cjs/hooks/index.d.ts +22 -0
- package/cjs/hooks/index.d.ts.map +1 -0
- package/cjs/hooks/index.js +159 -0
- package/cjs/hooks/node/useCheckUnMount.d.ts +2 -0
- package/cjs/hooks/node/useCheckUnMount.d.ts.map +1 -0
- package/cjs/hooks/node/useCheckUnMount.js +27 -0
- package/cjs/hooks/node/useInitialized.d.ts +2 -0
- package/cjs/hooks/node/useInitialized.d.ts.map +1 -0
- package/cjs/hooks/node/useInitialized.js +20 -0
- package/cjs/hooks/node/useNodeDragging.d.ts +2 -0
- package/cjs/hooks/node/useNodeDragging.d.ts.map +1 -0
- package/cjs/hooks/node/useNodeDragging.js +20 -0
- package/cjs/hooks/node/useNodeInitialize.d.ts +2 -0
- package/cjs/hooks/node/useNodeInitialize.d.ts.map +1 -0
- package/cjs/hooks/node/useNodeInitialize.js +23 -0
- package/cjs/hooks/node/useNodeTypeMap.d.ts +11 -0
- package/cjs/hooks/node/useNodeTypeMap.d.ts.map +1 -0
- package/cjs/hooks/node/useNodeTypeMap.js +20 -0
- package/cjs/hooks/node/useNodes.d.ts +10 -0
- package/cjs/hooks/node/useNodes.d.ts.map +1 -0
- package/cjs/hooks/node/useNodes.js +12 -0
- package/cjs/hooks/node/useSetNodeDragging.d.ts +2 -0
- package/cjs/hooks/node/useSetNodeDragging.d.ts.map +1 -0
- package/cjs/hooks/node/useSetNodeDragging.js +26 -0
- package/cjs/hooks/props/useGetProps.d.ts +6 -0
- package/cjs/hooks/props/useGetProps.d.ts.map +1 -0
- package/cjs/hooks/props/useGetProps.js +29 -0
- package/cjs/hooks/props/useProps.d.ts +2 -0
- package/cjs/hooks/props/useProps.d.ts.map +1 -0
- package/cjs/hooks/props/useProps.js +20 -0
- package/cjs/hooks/props/usePropsSelector.d.ts +13 -0
- package/cjs/hooks/props/usePropsSelector.d.ts.map +1 -0
- package/cjs/hooks/props/usePropsSelector.js +37 -0
- package/cjs/hooks/render/useForceUpdate.d.ts +2 -0
- package/cjs/hooks/render/useForceUpdate.d.ts.map +1 -0
- package/cjs/hooks/render/useForceUpdate.js +28 -0
- package/cjs/hooks/render/useForceUpdateTimes.d.ts +2 -0
- package/cjs/hooks/render/useForceUpdateTimes.d.ts.map +1 -0
- package/cjs/hooks/render/useForceUpdateTimes.js +20 -0
- package/cjs/hooks/state/useGetState.d.ts +11 -0
- package/cjs/hooks/state/useGetState.d.ts.map +1 -0
- package/cjs/hooks/state/useGetState.js +27 -0
- package/cjs/hooks/state/useSelector.d.ts +13 -0
- package/cjs/hooks/state/useSelector.d.ts.map +1 -0
- package/cjs/hooks/state/useSelector.js +28 -0
- package/cjs/hooks/state/useSetState.d.ts +11 -0
- package/cjs/hooks/state/useSetState.d.ts.map +1 -0
- package/cjs/hooks/state/useSetState.js +27 -0
- package/cjs/hooks/useFlowId.d.ts +6 -0
- package/cjs/hooks/useFlowId.d.ts.map +1 -0
- package/cjs/hooks/useFlowId.js +24 -0
- package/cjs/hooks/useListenRender.d.ts +2 -0
- package/cjs/hooks/useListenRender.d.ts.map +1 -0
- package/cjs/hooks/useListenRender.js +48 -0
- package/cjs/hooks/useNodeTypes.d.ts +14 -0
- package/cjs/hooks/useNodeTypes.d.ts.map +1 -0
- package/cjs/hooks/useNodeTypes.js +54 -0
- package/cjs/hooks/useTheme.d.ts +9 -0
- package/cjs/hooks/useTheme.d.ts.map +1 -0
- package/cjs/hooks/useTheme.js +25 -0
- package/cjs/hooks/useThemeVars.d.ts +15 -0
- package/cjs/hooks/useThemeVars.d.ts.map +1 -0
- package/cjs/hooks/useThemeVars.js +37 -0
- package/cjs/index.d.ts +28 -0
- package/cjs/index.d.ts.map +1 -0
- package/cjs/index.js +180 -0
- package/cjs/index.less +7 -0
- package/cjs/index.module.less +10 -0
- package/cjs/plugins/export/index.d.ts +18 -0
- package/cjs/plugins/export/index.d.ts.map +1 -0
- package/cjs/plugins/export/index.js +52 -0
- package/cjs/plugins/scrollbar/hooks/useScrollerOptions.d.ts +11 -0
- package/cjs/plugins/scrollbar/hooks/useScrollerOptions.d.ts.map +1 -0
- package/cjs/plugins/scrollbar/hooks/useScrollerOptions.js +46 -0
- package/cjs/plugins/scrollbar/index.d.ts +5 -0
- package/cjs/plugins/scrollbar/index.d.ts.map +1 -0
- package/cjs/plugins/scrollbar/index.js +215 -0
- package/cjs/plugins/scrollbar/index.less +10 -0
- package/cjs/plugins/scrollbar/types.d.ts +24 -0
- package/cjs/plugins/scrollbar/types.d.ts.map +1 -0
- package/cjs/plugins/scrollbar/types.js +5 -0
- package/cjs/providers/FlowProvider.d.ts +27 -0
- package/cjs/providers/FlowProvider.d.ts.map +1 -0
- package/cjs/providers/FlowProvider.js +91 -0
- package/cjs/store/PropsStore.d.ts +16 -0
- package/cjs/store/PropsStore.d.ts.map +1 -0
- package/cjs/store/PropsStore.js +75 -0
- package/cjs/types.d.ts +223 -0
- package/cjs/types.d.ts.map +1 -0
- package/cjs/types.js +5 -0
- package/cjs/utils/dimension.d.ts +20 -0
- package/cjs/utils/dimension.d.ts.map +1 -0
- package/cjs/utils/dimension.js +96 -0
- package/cjs/utils/getPopupContainer.d.ts +10 -0
- package/cjs/utils/getPopupContainer.d.ts.map +1 -0
- package/cjs/utils/getPopupContainer.js +19 -0
- package/cjs/utils/getThemeWithDefaultValue.d.ts +10 -0
- package/cjs/utils/getThemeWithDefaultValue.d.ts.map +1 -0
- package/cjs/utils/getThemeWithDefaultValue.js +23 -0
- package/cjs/utils/hasDimensionsChange.d.ts +10 -0
- package/cjs/utils/hasDimensionsChange.d.ts.map +1 -0
- package/cjs/utils/hasDimensionsChange.js +23 -0
- package/cjs/utils/layouts/base.d.ts +16 -0
- package/cjs/utils/layouts/base.d.ts.map +1 -0
- package/cjs/utils/layouts/base.js +27 -0
- package/cjs/utils/layouts/mindmap.d.ts +7 -0
- package/cjs/utils/layouts/mindmap.d.ts.map +1 -0
- package/cjs/utils/layouts/mindmap.js +133 -0
- package/cjs/utils/measureText.d.ts +21 -0
- package/cjs/utils/measureText.d.ts.map +1 -0
- package/cjs/utils/measureText.js +76 -0
- package/cjs/utils/parse.d.ts +11 -0
- package/cjs/utils/parse.d.ts.map +1 -0
- package/cjs/utils/parse.js +29 -0
- package/cjs/utils/preCreateInnerNode.d.ts +11 -0
- package/cjs/utils/preCreateInnerNode.d.ts.map +1 -0
- package/cjs/utils/preCreateInnerNode.js +44 -0
- package/cjs/utils/uuid.d.ts +10 -0
- package/cjs/utils/uuid.d.ts.map +1 -0
- package/cjs/utils/uuid.js +16 -0
- package/esm/Flow.d.ts +14 -0
- package/esm/Flow.d.ts.map +1 -0
- package/esm/Flow.js +251 -0
- package/esm/components/CollapseButton/index.d.ts +11 -0
- package/esm/components/CollapseButton/index.d.ts.map +1 -0
- package/esm/components/CollapseButton/index.js +59 -0
- package/esm/components/CollapseButton/index.less +68 -0
- package/esm/components/Controls/icons.d.ts +8 -0
- package/esm/components/Controls/icons.d.ts.map +1 -0
- package/esm/components/Controls/icons.js +75 -0
- package/esm/components/Controls/index.d.ts +13 -0
- package/esm/components/Controls/index.d.ts.map +1 -0
- package/esm/components/Controls/index.js +201 -0
- package/esm/components/DebugInfo/index.d.ts +5 -0
- package/esm/components/DebugInfo/index.d.ts.map +1 -0
- package/esm/components/DebugInfo/index.js +23 -0
- package/esm/components/DebugInfo/index.less +6 -0
- package/esm/components/EdgeText/index.d.ts +6 -0
- package/esm/components/EdgeText/index.d.ts.map +1 -0
- package/esm/components/EdgeText/index.js +52 -0
- package/esm/components/Handle/index.d.ts +3 -0
- package/esm/components/Handle/index.d.ts.map +1 -0
- package/esm/components/Handle/index.js +21 -0
- package/esm/components/Handle/index.module.less +9 -0
- package/esm/components/HiddenHandle/index.css +9 -0
- package/esm/components/HiddenHandle/index.d.ts +4 -0
- package/esm/components/HiddenHandle/index.d.ts.map +1 -0
- package/esm/components/HiddenHandle/index.js +21 -0
- package/esm/components/Legend/index.d.ts +6 -0
- package/esm/components/Legend/index.d.ts.map +1 -0
- package/esm/components/Legend/index.js +68 -0
- package/esm/components/Legend/index.less +41 -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/MarkerDefinitions/Mark.d.ts +11 -0
- package/esm/components/MarkerDefinitions/Mark.d.ts.map +1 -0
- package/esm/components/MarkerDefinitions/Mark.js +44 -0
- package/esm/components/MarkerDefinitions/Symbols/Arrow.d.ts +11 -0
- package/esm/components/MarkerDefinitions/Symbols/Arrow.d.ts.map +1 -0
- package/esm/components/MarkerDefinitions/Symbols/Arrow.js +25 -0
- package/esm/components/MarkerDefinitions/Symbols/ArrowClosed.d.ts +11 -0
- package/esm/components/MarkerDefinitions/Symbols/ArrowClosed.d.ts.map +1 -0
- package/esm/components/MarkerDefinitions/Symbols/ArrowClosed.js +26 -0
- package/esm/components/MarkerDefinitions/index.d.ts +6 -0
- package/esm/components/MarkerDefinitions/index.d.ts.map +1 -0
- package/esm/components/MarkerDefinitions/index.js +37 -0
- package/esm/components/MarkerDefinitions/styles.less +5 -0
- package/esm/components/MarkerDefinitions/symbols.d.ts +5 -0
- package/esm/components/MarkerDefinitions/symbols.d.ts.map +1 -0
- package/esm/components/MarkerDefinitions/symbols.js +16 -0
- package/esm/components/MarkerDefinitions/types.d.ts +21 -0
- package/esm/components/NodeRenderFactory.d.ts +11 -0
- package/esm/components/NodeRenderFactory.d.ts.map +1 -0
- package/esm/components/NodeRenderFactory.js +23 -0
- package/esm/components/Nodes/DefaultNode.d.ts +3 -0
- package/esm/components/Nodes/DefaultNode.d.ts.map +1 -0
- package/esm/components/Nodes/DefaultNode.js +27 -0
- package/esm/components/Nodes/GroupNode.d.ts +3 -0
- package/esm/components/Nodes/GroupNode.d.ts.map +1 -0
- package/esm/components/Nodes/GroupNode.js +6 -0
- package/esm/components/Nodes/InputNode.d.ts +3 -0
- package/esm/components/Nodes/InputNode.d.ts.map +1 -0
- package/esm/components/Nodes/InputNode.js +21 -0
- package/esm/components/Nodes/OutputNode.d.ts +3 -0
- package/esm/components/Nodes/OutputNode.d.ts.map +1 -0
- package/esm/components/Nodes/OutputNode.js +21 -0
- package/esm/components/Popover/index.d.ts +11 -0
- package/esm/components/Popover/index.d.ts.map +1 -0
- package/esm/components/Popover/index.js +109 -0
- package/esm/components/Tooltip/index.d.ts +12 -0
- package/esm/components/Tooltip/index.d.ts.map +1 -0
- package/esm/components/Tooltip/index.js +121 -0
- package/esm/components/index.d.ts +16 -0
- package/esm/components/index.d.ts.map +1 -0
- package/esm/components/index.js +15 -0
- package/esm/constants/InnerFlowType.d.ts +12 -0
- package/esm/constants/InnerFlowType.d.ts.map +1 -0
- package/esm/constants/InnerFlowType.js +13 -0
- package/esm/constants/NodeRoleType.d.ts +16 -0
- package/esm/constants/NodeRoleType.d.ts.map +1 -0
- package/esm/constants/NodeRoleType.js +16 -0
- package/esm/constants/SelectionStrategy.d.ts +14 -0
- package/esm/constants/SelectionStrategy.d.ts.map +1 -0
- package/esm/constants/SelectionStrategy.js +15 -0
- package/esm/edges/SmartEdge/index.d.ts +15 -0
- package/esm/edges/SmartEdge/index.d.ts.map +1 -0
- package/esm/edges/SmartEdge/index.js +45 -0
- package/esm/hoc/createFlow.d.ts +14 -0
- package/esm/hoc/createFlow.d.ts.map +1 -0
- package/esm/hoc/createFlow.js +66 -0
- package/esm/hoc/withFlowProvider.d.ts +11 -0
- package/esm/hoc/withFlowProvider.d.ts.map +1 -0
- package/esm/hoc/withFlowProvider.js +24 -0
- package/esm/hooks/edges/useGetEdgesChangeHandlers.d.ts +11 -0
- package/esm/hooks/edges/useGetEdgesChangeHandlers.d.ts.map +1 -0
- package/esm/hooks/edges/useGetEdgesChangeHandlers.js +17 -0
- package/esm/hooks/edges/useOnEdgesChange.d.ts +11 -0
- package/esm/hooks/edges/useOnEdgesChange.d.ts.map +1 -0
- package/esm/hooks/edges/useOnEdgesChange.js +24 -0
- package/esm/hooks/index.d.ts +22 -0
- package/esm/hooks/index.d.ts.map +1 -0
- package/esm/hooks/index.js +22 -0
- package/esm/hooks/node/useCheckUnMount.d.ts +2 -0
- package/esm/hooks/node/useCheckUnMount.d.ts.map +1 -0
- package/esm/hooks/node/useCheckUnMount.js +18 -0
- package/esm/hooks/node/useInitialized.d.ts +2 -0
- package/esm/hooks/node/useInitialized.d.ts.map +1 -0
- package/esm/hooks/node/useInitialized.js +12 -0
- package/esm/hooks/node/useNodeDragging.d.ts +2 -0
- package/esm/hooks/node/useNodeDragging.d.ts.map +1 -0
- package/esm/hooks/node/useNodeDragging.js +14 -0
- package/esm/hooks/node/useNodeInitialize.d.ts +2 -0
- package/esm/hooks/node/useNodeInitialize.d.ts.map +1 -0
- package/esm/hooks/node/useNodeInitialize.js +15 -0
- package/esm/hooks/node/useNodeTypeMap.d.ts +11 -0
- package/esm/hooks/node/useNodeTypeMap.d.ts.map +1 -0
- package/esm/hooks/node/useNodeTypeMap.js +14 -0
- package/esm/hooks/node/useNodes.d.ts +10 -0
- package/esm/hooks/node/useNodes.d.ts.map +1 -0
- package/esm/hooks/node/useNodes.js +9 -0
- package/esm/hooks/node/useSetNodeDragging.d.ts +2 -0
- package/esm/hooks/node/useSetNodeDragging.d.ts.map +1 -0
- package/esm/hooks/node/useSetNodeDragging.js +18 -0
- package/esm/hooks/props/useGetProps.d.ts +6 -0
- package/esm/hooks/props/useGetProps.d.ts.map +1 -0
- package/esm/hooks/props/useGetProps.js +21 -0
- package/esm/hooks/props/useProps.d.ts +2 -0
- package/esm/hooks/props/useProps.d.ts.map +1 -0
- package/esm/hooks/props/useProps.js +14 -0
- package/esm/hooks/props/usePropsSelector.d.ts +13 -0
- package/esm/hooks/props/usePropsSelector.d.ts.map +1 -0
- package/esm/hooks/props/usePropsSelector.js +31 -0
- package/esm/hooks/render/useForceUpdate.d.ts +2 -0
- package/esm/hooks/render/useForceUpdate.d.ts.map +1 -0
- package/esm/hooks/render/useForceUpdate.js +20 -0
- package/esm/hooks/render/useForceUpdateTimes.d.ts +2 -0
- package/esm/hooks/render/useForceUpdateTimes.d.ts.map +1 -0
- package/esm/hooks/render/useForceUpdateTimes.js +14 -0
- package/esm/hooks/state/useGetState.d.ts +11 -0
- package/esm/hooks/state/useGetState.d.ts.map +1 -0
- package/esm/hooks/state/useGetState.js +20 -0
- package/esm/hooks/state/useSelector.d.ts +13 -0
- package/esm/hooks/state/useSelector.d.ts.map +1 -0
- package/esm/hooks/state/useSelector.js +21 -0
- package/esm/hooks/state/useSetState.d.ts +11 -0
- package/esm/hooks/state/useSetState.d.ts.map +1 -0
- package/esm/hooks/state/useSetState.js +20 -0
- package/esm/hooks/useFlowId.d.ts +6 -0
- package/esm/hooks/useFlowId.d.ts.map +1 -0
- package/esm/hooks/useFlowId.js +19 -0
- package/esm/hooks/useListenRender.d.ts +2 -0
- package/esm/hooks/useListenRender.d.ts.map +1 -0
- package/esm/hooks/useListenRender.js +39 -0
- package/esm/hooks/useNodeTypes.d.ts +14 -0
- package/esm/hooks/useNodeTypes.d.ts.map +1 -0
- package/esm/hooks/useNodeTypes.js +46 -0
- package/esm/hooks/useTheme.d.ts +9 -0
- package/esm/hooks/useTheme.d.ts.map +1 -0
- package/esm/hooks/useTheme.js +19 -0
- package/esm/hooks/useThemeVars.d.ts +15 -0
- package/esm/hooks/useThemeVars.d.ts.map +1 -0
- package/esm/hooks/useThemeVars.js +26 -0
- package/esm/index.d.ts +28 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +27 -0
- package/esm/index.less +7 -0
- package/esm/index.module.less +10 -0
- package/esm/plugins/export/index.d.ts +18 -0
- package/esm/plugins/export/index.d.ts.map +1 -0
- package/esm/plugins/export/index.js +71 -0
- package/esm/plugins/scrollbar/hooks/useScrollerOptions.d.ts +11 -0
- package/esm/plugins/scrollbar/hooks/useScrollerOptions.d.ts.map +1 -0
- package/esm/plugins/scrollbar/hooks/useScrollerOptions.js +38 -0
- package/esm/plugins/scrollbar/index.d.ts +5 -0
- package/esm/plugins/scrollbar/index.d.ts.map +1 -0
- package/esm/plugins/scrollbar/index.js +198 -0
- package/esm/plugins/scrollbar/index.less +10 -0
- package/esm/plugins/scrollbar/types.d.ts +24 -0
- package/esm/plugins/scrollbar/types.d.ts.map +1 -0
- package/esm/plugins/scrollbar/types.js +1 -0
- package/esm/providers/FlowProvider.d.ts +27 -0
- package/esm/providers/FlowProvider.d.ts.map +1 -0
- package/esm/providers/FlowProvider.js +90 -0
- package/esm/store/PropsStore.d.ts +16 -0
- package/esm/store/PropsStore.d.ts.map +1 -0
- package/esm/store/PropsStore.js +67 -0
- package/esm/types.d.ts +223 -0
- package/esm/types.d.ts.map +1 -0
- package/esm/types.js +1 -0
- package/esm/utils/dimension.d.ts +20 -0
- package/esm/utils/dimension.d.ts.map +1 -0
- package/esm/utils/dimension.js +89 -0
- package/esm/utils/getPopupContainer.d.ts +10 -0
- package/esm/utils/getPopupContainer.d.ts.map +1 -0
- package/esm/utils/getPopupContainer.js +12 -0
- package/esm/utils/getThemeWithDefaultValue.d.ts +10 -0
- package/esm/utils/getThemeWithDefaultValue.d.ts.map +1 -0
- package/esm/utils/getThemeWithDefaultValue.js +22 -0
- package/esm/utils/hasDimensionsChange.d.ts +10 -0
- package/esm/utils/hasDimensionsChange.d.ts.map +1 -0
- package/esm/utils/hasDimensionsChange.js +28 -0
- package/esm/utils/layouts/base.d.ts +16 -0
- package/esm/utils/layouts/base.d.ts.map +1 -0
- package/esm/utils/layouts/base.js +19 -0
- package/esm/utils/layouts/mindmap.d.ts +7 -0
- package/esm/utils/layouts/mindmap.d.ts.map +1 -0
- package/esm/utils/layouts/mindmap.js +131 -0
- package/esm/utils/measureText.d.ts +21 -0
- package/esm/utils/measureText.d.ts.map +1 -0
- package/esm/utils/measureText.js +69 -0
- package/esm/utils/parse.d.ts +11 -0
- package/esm/utils/parse.d.ts.map +1 -0
- package/esm/utils/parse.js +26 -0
- package/esm/utils/preCreateInnerNode.d.ts +11 -0
- package/esm/utils/preCreateInnerNode.d.ts.map +1 -0
- package/esm/utils/preCreateInnerNode.js +42 -0
- package/esm/utils/uuid.d.ts +10 -0
- package/esm/utils/uuid.d.ts.map +1 -0
- package/esm/utils/uuid.js +10 -0
- package/package.json +82 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonProps } from 'antd';
|
|
2
|
+
/**
|
|
3
|
+
* LoadingButton 组件
|
|
4
|
+
* - 支持 loading 状态受控/非受控
|
|
5
|
+
* - 支持点击防抖(防止重复点击)
|
|
6
|
+
* - 支持异步 onClick
|
|
7
|
+
*
|
|
8
|
+
* @param props
|
|
9
|
+
* onClick: 点击事件,支持返回 Promise
|
|
10
|
+
* throttle: 防抖间隔,默认 300ms
|
|
11
|
+
*/
|
|
12
|
+
export declare const LoadingButton: (props: Omit<ButtonProps, "onClick"> & {
|
|
13
|
+
onClick?: ((e: React.MouseEvent<HTMLButtonElement>) => Promise<void> | void) | undefined;
|
|
14
|
+
throttle?: number | undefined;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=LoadingButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingButton.d.ts","sourceRoot":"","sources":["LoadingButton.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAU,WAAW,EAAE,MAAM,MAAM,CAAC;AAG3C;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa;mBAER,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,QAAQ,IAAI,CAAC,GAAG,IAAI;;6CAuD7E,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
8
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
9
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
/*
|
|
17
|
+
* @author: yanxianliang
|
|
18
|
+
* @date: 2025-05-23 15:19
|
|
19
|
+
* @desc: Loading Button
|
|
20
|
+
*
|
|
21
|
+
* 支持业务防抖
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { useControllableValue, useMemoizedFn } from 'ahooks';
|
|
27
|
+
import { Button } from 'antd';
|
|
28
|
+
import { useRef } from 'react';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* LoadingButton 组件
|
|
32
|
+
* - 支持 loading 状态受控/非受控
|
|
33
|
+
* - 支持点击防抖(防止重复点击)
|
|
34
|
+
* - 支持异步 onClick
|
|
35
|
+
*
|
|
36
|
+
* @param props
|
|
37
|
+
* onClick: 点击事件,支持返回 Promise
|
|
38
|
+
* throttle: 防抖间隔,默认 300ms
|
|
39
|
+
*/
|
|
40
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
41
|
+
export var LoadingButton = function LoadingButton(props) {
|
|
42
|
+
var _props$throttle;
|
|
43
|
+
var lockRef = useRef(false); // 点击锁,loading 无法解决鼠标连击问题
|
|
44
|
+
var throttle = (_props$throttle = props.throttle) !== null && _props$throttle !== void 0 ? _props$throttle : 300;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* loading 状态受控/非受控
|
|
48
|
+
*/
|
|
49
|
+
var _useControllableValue = useControllableValue(props, {
|
|
50
|
+
valuePropName: 'loading',
|
|
51
|
+
trigger: 'onLoadingChange'
|
|
52
|
+
}),
|
|
53
|
+
_useControllableValue2 = _slicedToArray(_useControllableValue, 2),
|
|
54
|
+
loading = _useControllableValue2[0],
|
|
55
|
+
setLoading = _useControllableValue2[1];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 包装点击事件,支持防抖和 loading
|
|
59
|
+
*/
|
|
60
|
+
var onButtonClick = useMemoizedFn(function (e) {
|
|
61
|
+
var _props$onClick;
|
|
62
|
+
if (lockRef.current) {
|
|
63
|
+
return; // 防抖拦截
|
|
64
|
+
}
|
|
65
|
+
lockRef.current = true;
|
|
66
|
+
var result = (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, e);
|
|
67
|
+
if (result && result instanceof Promise) {
|
|
68
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
69
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
70
|
+
while (1) switch (_context.prev = _context.next) {
|
|
71
|
+
case 0:
|
|
72
|
+
setLoading(true);
|
|
73
|
+
_context.prev = 1;
|
|
74
|
+
_context.next = 4;
|
|
75
|
+
return result;
|
|
76
|
+
case 4:
|
|
77
|
+
_context.next = 8;
|
|
78
|
+
break;
|
|
79
|
+
case 6:
|
|
80
|
+
_context.prev = 6;
|
|
81
|
+
_context.t0 = _context["catch"](1);
|
|
82
|
+
case 8:
|
|
83
|
+
_context.prev = 8;
|
|
84
|
+
setLoading(false);
|
|
85
|
+
setTimeout(function () {
|
|
86
|
+
lockRef.current = false;
|
|
87
|
+
}, throttle);
|
|
88
|
+
return _context.finish(8);
|
|
89
|
+
case 12:
|
|
90
|
+
case "end":
|
|
91
|
+
return _context.stop();
|
|
92
|
+
}
|
|
93
|
+
}, _callee, null, [[1, 6, 8, 12]]);
|
|
94
|
+
}))();
|
|
95
|
+
} else {
|
|
96
|
+
setTimeout(function () {
|
|
97
|
+
/**
|
|
98
|
+
* 纯前端交互的,进行前端防抖
|
|
99
|
+
*/
|
|
100
|
+
lockRef.current = false;
|
|
101
|
+
}, throttle);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 渲染按钮
|
|
107
|
+
*/
|
|
108
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, props), {}, {
|
|
109
|
+
loading: loading,
|
|
110
|
+
onClick: onButtonClick
|
|
111
|
+
}));
|
|
112
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-23 16:29
|
|
4
|
+
* @modified:2025/7/23 16:29 by yanxianliang
|
|
5
|
+
* @desc: Mark
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
import { MarkerProps } from "@xyflow/system";
|
|
10
|
+
export declare const Marker: ({ id, type, color, width, height, markerUnits, strokeWidth, orient, }: MarkerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
//# sourceMappingURL=Mark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mark.d.ts","sourceRoot":"","sources":["Mark.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAI3C,eAAO,MAAM,MAAM,0EAUd,WAAW,mDAsBf,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-23 16:29
|
|
4
|
+
* @modified:2025/7/23 16:29 by yanxianliang
|
|
5
|
+
* @desc: Mark
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { symbols } from "./symbols";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
export var Marker = function Marker(_ref) {
|
|
13
|
+
var id = _ref.id,
|
|
14
|
+
type = _ref.type,
|
|
15
|
+
color = _ref.color,
|
|
16
|
+
_ref$width = _ref.width,
|
|
17
|
+
width = _ref$width === void 0 ? 12.5 : _ref$width,
|
|
18
|
+
_ref$height = _ref.height,
|
|
19
|
+
height = _ref$height === void 0 ? 12.5 : _ref$height,
|
|
20
|
+
_ref$markerUnits = _ref.markerUnits,
|
|
21
|
+
markerUnits = _ref$markerUnits === void 0 ? 'strokeWidth' : _ref$markerUnits,
|
|
22
|
+
strokeWidth = _ref.strokeWidth,
|
|
23
|
+
_ref$orient = _ref.orient,
|
|
24
|
+
orient = _ref$orient === void 0 ? 'auto-start-reverse' : _ref$orient;
|
|
25
|
+
var _Symbol = symbols[type];
|
|
26
|
+
if (!_Symbol) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return /*#__PURE__*/_jsx("marker", {
|
|
30
|
+
className: "react-flow__arrowhead",
|
|
31
|
+
id: id,
|
|
32
|
+
markerWidth: "".concat(width),
|
|
33
|
+
markerHeight: "".concat(height),
|
|
34
|
+
viewBox: "-10 -10 20 20",
|
|
35
|
+
markerUnits: markerUnits,
|
|
36
|
+
orient: orient,
|
|
37
|
+
refX: "0",
|
|
38
|
+
refY: "0",
|
|
39
|
+
children: /*#__PURE__*/_jsx(_Symbol, {
|
|
40
|
+
color: color,
|
|
41
|
+
strokeWidth: strokeWidth
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SymbolProps } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* @author: yanxianliang
|
|
4
|
+
* @date: 2025-07-23 16:19
|
|
5
|
+
* @modified:2025/7/23 16:19 by yanxianliang
|
|
6
|
+
* @desc: Arrow Symbol
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Arrow: ({ color, strokeWidth }: SymbolProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Arrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Arrow.d.ts","sourceRoot":"","sources":["Arrow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,2BAAyC,WAAW,4CAarE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @author: yanxianliang
|
|
4
|
+
* @date: 2025-07-23 16:19
|
|
5
|
+
* @modified:2025/7/23 16:19 by yanxianliang
|
|
6
|
+
* @desc: Arrow Symbol
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
export var Arrow = function Arrow(_ref) {
|
|
11
|
+
var _ref$color = _ref.color,
|
|
12
|
+
color = _ref$color === void 0 ? 'none' : _ref$color,
|
|
13
|
+
_ref$strokeWidth = _ref.strokeWidth,
|
|
14
|
+
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth;
|
|
15
|
+
return /*#__PURE__*/_jsx("polyline", {
|
|
16
|
+
style: {
|
|
17
|
+
stroke: color,
|
|
18
|
+
strokeWidth: strokeWidth
|
|
19
|
+
},
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeLinejoin: "round",
|
|
22
|
+
fill: "none",
|
|
23
|
+
points: "-5,-4 0,0 -5,4"
|
|
24
|
+
});
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-23 16:12
|
|
4
|
+
* @modified:2025/7/23 16:12 by yanxianliang
|
|
5
|
+
* @desc: ArrowClosedSymbol
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
import { SymbolProps } from "../types";
|
|
10
|
+
export declare const ArrowClosedSymbol: ({ color, strokeWidth, }: SymbolProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ArrowClosed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowClosed.d.ts","sourceRoot":"","sources":["ArrowClosed.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,iBAAiB,4BAIzB,WAAW,4CAaf,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @author: yanxianliang
|
|
4
|
+
* @date: 2025-07-23 16:12
|
|
5
|
+
* @modified:2025/7/23 16:12 by yanxianliang
|
|
6
|
+
* @desc: ArrowClosedSymbol
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export var ArrowClosedSymbol = function ArrowClosedSymbol(_ref) {
|
|
12
|
+
var _ref$color = _ref.color,
|
|
13
|
+
color = _ref$color === void 0 ? 'none' : _ref$color,
|
|
14
|
+
_ref$strokeWidth = _ref.strokeWidth,
|
|
15
|
+
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth;
|
|
16
|
+
return /*#__PURE__*/_jsx("polyline", {
|
|
17
|
+
style: {
|
|
18
|
+
stroke: color,
|
|
19
|
+
fill: color,
|
|
20
|
+
strokeWidth: strokeWidth
|
|
21
|
+
},
|
|
22
|
+
strokeLinecap: "round",
|
|
23
|
+
strokeLinejoin: "round",
|
|
24
|
+
points: "-5,-4 0,0 -5,4 -5,-4"
|
|
25
|
+
});
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAEvC,OAAO,eAAe,CAAC;AAKvB,eAAO,MAAM,iBAAiB;WAInB,cAAc,EAAE;6CAsB1B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-23 15:02
|
|
4
|
+
* @modified:2025/7/23 15:02 by yanxianliang
|
|
5
|
+
* @desc: inner mark 定义
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* 可以放到 workflow内部,自定义,不需要再遍历进行更新
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
import { getMarkerId, MarkerType } from '@xyflow/system';
|
|
13
|
+
import { useFlowId } from "../..";
|
|
14
|
+
import "./styles.less";
|
|
15
|
+
import cls from 'classcat';
|
|
16
|
+
import { Marker } from "./Mark";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
export var MarkerDefinitions = function MarkerDefinitions(_ref) {
|
|
19
|
+
var marks = _ref.marks;
|
|
20
|
+
var flowId = useFlowId();
|
|
21
|
+
return /*#__PURE__*/_jsx("svg", {
|
|
22
|
+
className: cls(["react-flow__marker", 'rxflow-marks']),
|
|
23
|
+
"aria-hidden": "true",
|
|
24
|
+
children: /*#__PURE__*/_jsx("defs", {
|
|
25
|
+
children: marks.map(function (mark, index) {
|
|
26
|
+
return /*#__PURE__*/_jsx(Marker, {
|
|
27
|
+
id: getMarkerId(mark, flowId),
|
|
28
|
+
type: MarkerType.ArrowClosed,
|
|
29
|
+
color: mark.color,
|
|
30
|
+
width: mark.width,
|
|
31
|
+
height: mark.height,
|
|
32
|
+
strokeWidth: mark.strokeWidth
|
|
33
|
+
}, index);
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const symbols: {
|
|
2
|
+
arrowclosed: ({ color, strokeWidth, }: import("./types").SymbolProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
arrow: ({ color, strokeWidth }: import("./types").SymbolProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=symbols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["symbols.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,OAAO;;;CAGnB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
/**
|
|
6
|
+
* @author: yanxianliang
|
|
7
|
+
* @date: 2025-07-23 16:13
|
|
8
|
+
* @modified:2025/7/23 16:13 by yanxianliang
|
|
9
|
+
* @desc: symbols
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
12
|
+
*/
|
|
13
|
+
import { MarkerType } from '@xyflow/system';
|
|
14
|
+
import { ArrowClosedSymbol } from "./Symbols/ArrowClosed";
|
|
15
|
+
import { Arrow } from "./Symbols/Arrow";
|
|
16
|
+
export var symbols = _defineProperty(_defineProperty({}, MarkerType.ArrowClosed, ArrowClosedSymbol), MarkerType.Arrow, Arrow);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-23 16:12
|
|
4
|
+
* @modified:2025/7/23 16:12 by yanxianliang
|
|
5
|
+
* @desc: 类型定义
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export type SymbolProps = {
|
|
11
|
+
color?: string;
|
|
12
|
+
strokeWidth?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type MarkDefinition = {
|
|
16
|
+
type: MarkerType;
|
|
17
|
+
color?: string;
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
strokeWidth?: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-12 17:54
|
|
4
|
+
* @desc: Node Render 支持通用逻辑
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
7
|
+
*/
|
|
8
|
+
import { ComponentType } from "react";
|
|
9
|
+
import { NodeRenderProps } from "../types";
|
|
10
|
+
export declare const nodeRenderFactory: (NodeComponent: ComponentType<NodeRenderProps>) => (props: NodeRenderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=NodeRenderFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeRenderFactory.d.ts","sourceRoot":"","sources":["NodeRenderFactory.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AACpC,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AAIzC,eAAO,MAAM,iBAAiB,kBAAmB,cAAc,eAAe,CAAC,aAC9D,eAAe,4CAO/B,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
/**
|
|
8
|
+
* @author: yanxianliang
|
|
9
|
+
* @date: 2025-07-12 17:54
|
|
10
|
+
* @desc: Node Render 支持通用逻辑
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { useNodeInitialize } from "../hooks";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
export var nodeRenderFactory = function nodeRenderFactory(NodeComponent) {
|
|
18
|
+
return function (props) {
|
|
19
|
+
// id 绑定
|
|
20
|
+
useNodeInitialize(props.id);
|
|
21
|
+
return /*#__PURE__*/_jsx(NodeComponent, _objectSpread({}, props));
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultNode.d.ts","sourceRoot":"","sources":["DefaultNode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAS,MAAM,eAAe,CAAC;AAI7D,wBAAgB,WAAW,CACzB,EACE,EAAE,EACF,IAAI,EACJ,aAAa,EACb,cAA6B,EAC7B,cAAgC,GACjC,EAAE,SAAS,CAAC,WAAW,CAAC,2CAS1B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Handle } from '@xyflow/react';
|
|
2
|
+
import { Position } from '@xyflow/system';
|
|
3
|
+
import { useNodeInitialize } from "../..";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export function DefaultNode(_ref) {
|
|
8
|
+
var id = _ref.id,
|
|
9
|
+
data = _ref.data,
|
|
10
|
+
isConnectable = _ref.isConnectable,
|
|
11
|
+
_ref$targetPosition = _ref.targetPosition,
|
|
12
|
+
targetPosition = _ref$targetPosition === void 0 ? Position.Top : _ref$targetPosition,
|
|
13
|
+
_ref$sourcePosition = _ref.sourcePosition,
|
|
14
|
+
sourcePosition = _ref$sourcePosition === void 0 ? Position.Bottom : _ref$sourcePosition;
|
|
15
|
+
useNodeInitialize(id);
|
|
16
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
17
|
+
children: [/*#__PURE__*/_jsx(Handle, {
|
|
18
|
+
type: "target",
|
|
19
|
+
position: targetPosition,
|
|
20
|
+
isConnectable: isConnectable
|
|
21
|
+
}), data === null || data === void 0 ? void 0 : data.label, /*#__PURE__*/_jsx(Handle, {
|
|
22
|
+
type: "source",
|
|
23
|
+
position: sourcePosition,
|
|
24
|
+
isConnectable: isConnectable
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupNode.d.ts","sourceRoot":"","sources":["GroupNode.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,wBAAgB,SAAS,CAAC,EAAC,EAAE,EAAC,EAAE,SAAS,QAGxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputNode.d.ts","sourceRoot":"","sources":["InputNode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAS,MAAM,eAAe,CAAC;AAI7D,wBAAgB,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,cAAgC,EAAE,EAAE,SAAS,CAAC,WAAW,CAAC,2CAQ9G"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Handle } from '@xyflow/react';
|
|
2
|
+
import { Position } from '@xyflow/system';
|
|
3
|
+
import { useNodeInitialize } from "../..";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export function InputNode(_ref) {
|
|
8
|
+
var id = _ref.id,
|
|
9
|
+
data = _ref.data,
|
|
10
|
+
isConnectable = _ref.isConnectable,
|
|
11
|
+
_ref$sourcePosition = _ref.sourcePosition,
|
|
12
|
+
sourcePosition = _ref$sourcePosition === void 0 ? Position.Bottom : _ref$sourcePosition;
|
|
13
|
+
useNodeInitialize(id);
|
|
14
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
15
|
+
children: [data === null || data === void 0 ? void 0 : data.label, /*#__PURE__*/_jsx(Handle, {
|
|
16
|
+
type: "source",
|
|
17
|
+
position: sourcePosition,
|
|
18
|
+
isConnectable: isConnectable
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OutputNode.d.ts","sourceRoot":"","sources":["OutputNode.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAS,MAAM,eAAe,CAAC;AAI7D,wBAAgB,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,cAA6B,EAAE,EAAE,SAAS,CAAC,WAAW,CAAC,2CAQ5G"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Handle } from '@xyflow/react';
|
|
2
|
+
import { Position } from '@xyflow/system';
|
|
3
|
+
import { useNodeInitialize } from "../..";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export function OutputNode(_ref) {
|
|
8
|
+
var id = _ref.id,
|
|
9
|
+
data = _ref.data,
|
|
10
|
+
isConnectable = _ref.isConnectable,
|
|
11
|
+
_ref$targetPosition = _ref.targetPosition,
|
|
12
|
+
targetPosition = _ref$targetPosition === void 0 ? Position.Top : _ref$targetPosition;
|
|
13
|
+
useNodeInitialize(id);
|
|
14
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
15
|
+
children: [/*#__PURE__*/_jsx(Handle, {
|
|
16
|
+
type: "target",
|
|
17
|
+
position: targetPosition,
|
|
18
|
+
isConnectable: isConnectable
|
|
19
|
+
}), data === null || data === void 0 ? void 0 : data.label]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PopoverProps } from "antd/es/popover";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare function Popover(props: PopoverProps & {
|
|
4
|
+
children: React.ReactElement<{
|
|
5
|
+
onMouseEnter?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
6
|
+
onMouseLeave?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
7
|
+
onPointerEnter?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
8
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
9
|
+
}>;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,KAAmC,MAAM,OAAO,CAAC;AAKxD,wBAAgB,OAAO,CACrB,KAAK,EAAE,YAAY,GAAG;IACpB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;QAC3B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC9D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC9D,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;KAC1D,CAAC,CAAC;CACJ,2CAsFF"}
|