@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,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 计算文案宽度,根据内容自动计算节点宽度
|
|
3
|
+
* @param text
|
|
4
|
+
* @param fontStyle
|
|
5
|
+
*/
|
|
6
|
+
export declare function measureTextWidth(text: string, fontStyle?: string): number;
|
|
7
|
+
/**
|
|
8
|
+
* 文本宽度是否超出了允许的最大宽度
|
|
9
|
+
* @param text
|
|
10
|
+
* @param maxWidth
|
|
11
|
+
* @param fontStyle
|
|
12
|
+
*/
|
|
13
|
+
export declare function isTextOverflow(text: string, maxWidth: number, fontStyle: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 文本根据宽度计算溢出显示结果
|
|
16
|
+
* @param text
|
|
17
|
+
* @param maxWidth
|
|
18
|
+
* @param fontStyle
|
|
19
|
+
*/
|
|
20
|
+
export declare function truncateTextWithEllipsis(text: string, maxWidth: number, fontStyle: string): string;
|
|
21
|
+
//# sourceMappingURL=measureText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureText.d.ts","sourceRoot":"","sources":["measureText.ts"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAsC,UAG7F;AAGD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,WAG/E;AAkBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAmBxF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isTextOverflow = isTextOverflow;
|
|
7
|
+
exports.measureTextWidth = measureTextWidth;
|
|
8
|
+
exports.truncateTextWithEllipsis = truncateTextWithEllipsis;
|
|
9
|
+
/*
|
|
10
|
+
* @author: yanxianliang
|
|
11
|
+
* @date: 2025-05-16 23:49
|
|
12
|
+
* @desc: 检测文字宽度
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// 离线canvas,支持在worker 中使用
|
|
18
|
+
const canvas = new OffscreenCanvas(2000, 200);
|
|
19
|
+
const context = canvas.getContext('2d');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 计算文案宽度,根据内容自动计算节点宽度
|
|
23
|
+
* @param text
|
|
24
|
+
* @param fontStyle
|
|
25
|
+
*/
|
|
26
|
+
function measureTextWidth(text, fontStyle = '14px Arial, helvetica, sans-serif') {
|
|
27
|
+
context.font = fontStyle; // 设置字体样式
|
|
28
|
+
return context.measureText(text).width;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 文本宽度是否超出了允许的最大宽度
|
|
33
|
+
* @param text
|
|
34
|
+
* @param maxWidth
|
|
35
|
+
* @param fontStyle
|
|
36
|
+
*/
|
|
37
|
+
function isTextOverflow(text, maxWidth, fontStyle) {
|
|
38
|
+
const textWidth = measureTextWidth(text, fontStyle);
|
|
39
|
+
return textWidth > maxWidth;
|
|
40
|
+
}
|
|
41
|
+
const ellipsisCalcCache = new Map();
|
|
42
|
+
const ellipsis = '...';
|
|
43
|
+
function calcEllipsisWidth(fontStyle) {
|
|
44
|
+
if (ellipsisCalcCache.has(fontStyle)) {
|
|
45
|
+
return ellipsisCalcCache.get(fontStyle);
|
|
46
|
+
}
|
|
47
|
+
const width = measureTextWidth(ellipsis, fontStyle);
|
|
48
|
+
ellipsisCalcCache.set(fontStyle, width);
|
|
49
|
+
return width;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 文本根据宽度计算溢出显示结果
|
|
54
|
+
* @param text
|
|
55
|
+
* @param maxWidth
|
|
56
|
+
* @param fontStyle
|
|
57
|
+
*/
|
|
58
|
+
function truncateTextWithEllipsis(text, maxWidth, fontStyle) {
|
|
59
|
+
if (!isTextOverflow(text, maxWidth, fontStyle)) {
|
|
60
|
+
return text;
|
|
61
|
+
}
|
|
62
|
+
const ellipsisWidth = calcEllipsisWidth(fontStyle);
|
|
63
|
+
const contentMaxWidth = maxWidth - ellipsisWidth;
|
|
64
|
+
let low = 0,
|
|
65
|
+
high = text.length;
|
|
66
|
+
while (low <= high) {
|
|
67
|
+
const mid = Math.floor((low + high) / 2);
|
|
68
|
+
const currentText = text.substring(0, mid);
|
|
69
|
+
if (measureTextWidth(currentText) <= contentMaxWidth) {
|
|
70
|
+
low = mid + 1;
|
|
71
|
+
} else {
|
|
72
|
+
high = mid - 1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return text.substring(0, high) + ellipsis;
|
|
76
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-10-09 13:00
|
|
4
|
+
* @modified:2025/10/9 13:00 by yanxianliang
|
|
5
|
+
* @desc: 数据转换
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
import { NodeHandle, NodeHandleBounds } from "@xyflow/system";
|
|
10
|
+
export declare const parseHandles: (handles?: NodeHandle[] | NodeHandleBounds) => NodeHandle[] | undefined;
|
|
11
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["parse.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAE5D,eAAO,MAAM,YAAY,aAAc,UAAU,EAAE,GAAG,gBAAgB,6BASrE,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.parseHandles = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @author: yanxianliang
|
|
9
|
+
* @date: 2025-10-09 13:00
|
|
10
|
+
* @modified:2025/10/9 13:00 by yanxianliang
|
|
11
|
+
* @desc: 数据转换
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const parseHandles = handles => {
|
|
17
|
+
if (!handles) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
if (Array.isArray(handles)) {
|
|
21
|
+
return handles;
|
|
22
|
+
}
|
|
23
|
+
const {
|
|
24
|
+
source,
|
|
25
|
+
target
|
|
26
|
+
} = handles;
|
|
27
|
+
return [...(source || []), ...(target || [])];
|
|
28
|
+
};
|
|
29
|
+
exports.parseHandles = parseHandles;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-08 13:41
|
|
4
|
+
* @desc: 预创建内部节点实例,创建之后首次渲染virtual才会生效
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
7
|
+
*/
|
|
8
|
+
import { type Node, NodeOrigin, type InternalNode } from '@xyflow/react';
|
|
9
|
+
import { NodeTypeComponent } from "..";
|
|
10
|
+
export declare const preCreateInnerNode: <NodeType extends Node = Node>(node: NodeType, nodeTypes?: Record<string, NodeTypeComponent>, nodeOrigin?: NodeOrigin) => InternalNode<NodeType>;
|
|
11
|
+
//# sourceMappingURL=preCreateInnerNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preCreateInnerNode.d.ts","sourceRoot":"","sources":["preCreateInnerNode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,KAAK,IAAI,EAAE,UAAU,EAAE,KAAK,YAAY,EAAC,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAC,iBAAiB,EAAC,WAAqB;AAE/C,eAAO,MAAM,kBAAkB,uCACvB,QAAQ,cACF,OAAO,MAAM,EAAE,iBAAiB,CAAC,eAChC,UAAU,2BAuBxB,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.preCreateInnerNode = void 0;
|
|
7
|
+
var _system = require("@xyflow/system");
|
|
8
|
+
/**
|
|
9
|
+
* @author: yanxianliang
|
|
10
|
+
* @date: 2025-07-08 13:41
|
|
11
|
+
* @desc: 预创建内部节点实例,创建之后首次渲染virtual才会生效
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const preCreateInnerNode = (node, nodeTypes, nodeOrigin) => {
|
|
17
|
+
const {
|
|
18
|
+
id,
|
|
19
|
+
type,
|
|
20
|
+
measured,
|
|
21
|
+
position
|
|
22
|
+
} = node;
|
|
23
|
+
const definition = nodeTypes?.[type];
|
|
24
|
+
const handles = definition?.measureHandles?.(node);
|
|
25
|
+
return {
|
|
26
|
+
id,
|
|
27
|
+
type: node.type,
|
|
28
|
+
measured: measured,
|
|
29
|
+
...measured,
|
|
30
|
+
position,
|
|
31
|
+
data: node.data,
|
|
32
|
+
selected: node.selected,
|
|
33
|
+
deletable: node.deletable,
|
|
34
|
+
sourcePosition: node.sourcePosition,
|
|
35
|
+
targetPosition: node.targetPosition,
|
|
36
|
+
dragHandle: node.dragHandle,
|
|
37
|
+
parentId: node.parentId,
|
|
38
|
+
internals: {
|
|
39
|
+
handleBounds: handles,
|
|
40
|
+
positionAbsolute: (0, _system.getNodePositionWithOrigin)(node, nodeOrigin)
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
exports.preCreateInnerNode = preCreateInnerNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["uuid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _uuid = require("uuid");
|
|
7
|
+
Object.keys(_uuid).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _uuid[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _uuid[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/esm/Flow.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-07-27 16:33
|
|
4
|
+
* @modified:2025/7/27 16:33 by yanxianliang
|
|
5
|
+
* @desc: Flow
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
8
|
+
*/
|
|
9
|
+
import '@xyflow/react/dist/style.css';
|
|
10
|
+
import { IBaseFlowProps } from "./types";
|
|
11
|
+
import { Edge, Node } from "@xyflow/react";
|
|
12
|
+
import "./index.less";
|
|
13
|
+
export declare function Flow<NodeType extends Node = Node, EdgeType extends Edge = Edge>(props: IBaseFlowProps<NodeType, EdgeType>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=Flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["Flow.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAQvC,OAAO,EAGL,IAAI,EAGJ,IAAI,EAOL,MAAM,eAAe,CAAC;AAavB,OAAO,cAAc,CAAC;AAMtB,wBAAgB,IAAI,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,2CAoPzH"}
|
package/esm/Flow.js
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
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); }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
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."); }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
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; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
/**
|
|
18
|
+
* @author: yanxianliang
|
|
19
|
+
* @date: 2025-07-27 16:33
|
|
20
|
+
* @modified:2025/7/27 16:33 by yanxianliang
|
|
21
|
+
* @desc: Flow
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
24
|
+
*/
|
|
25
|
+
import '@xyflow/react/dist/style.css';
|
|
26
|
+
import { Legend } from "./components";
|
|
27
|
+
import { MarkerDefinitions } from "./components";
|
|
28
|
+
import { useForceUpdate } from "./hooks";
|
|
29
|
+
import { useGetState } from "./hooks";
|
|
30
|
+
import { useNodeTypes } from "./hooks";
|
|
31
|
+
import { useTheme } from "./hooks";
|
|
32
|
+
import { useThemeVars } from "./hooks";
|
|
33
|
+
import { Background, BackgroundVariant, MiniMap, ReactFlow, SelectionMode, useReactFlow, useStoreApi } from "@xyflow/react";
|
|
34
|
+
import { useMemoizedFn } from "ahooks";
|
|
35
|
+
import { omit } from "lodash";
|
|
36
|
+
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
37
|
+
import Controls from "./components/Controls";
|
|
38
|
+
import { DebugInfo } from "./components/DebugInfo";
|
|
39
|
+
import { SmartEdge } from "./edges/SmartEdge";
|
|
40
|
+
import { useGetEdgesChangeHandlers } from "./hooks/edges/useGetEdgesChangeHandlers";
|
|
41
|
+
import { useSetNodeDragging } from "./hooks/node/useSetNodeDragging";
|
|
42
|
+
import { useForceUpdateTimes } from "./hooks/render/useForceUpdateTimes";
|
|
43
|
+
import { useListenRender } from "./hooks/useListenRender";
|
|
44
|
+
import { Scrollbar } from "./plugins/scrollbar";
|
|
45
|
+
import { hasDimensionsChange } from "./utils/hasDimensionsChange";
|
|
46
|
+
import "./index.less";
|
|
47
|
+
import { baseLayout } from "./utils/layouts/base";
|
|
48
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
49
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
50
|
+
var proOptions = {
|
|
51
|
+
hideAttribution: true
|
|
52
|
+
}; // 默认隐藏水印
|
|
53
|
+
|
|
54
|
+
export function Flow(props) {
|
|
55
|
+
var width = props.width,
|
|
56
|
+
height = props.height,
|
|
57
|
+
_props$showControls = props.showControls,
|
|
58
|
+
showControls = _props$showControls === void 0 ? true : _props$showControls,
|
|
59
|
+
_props$controlsPositi = props.controlsPosition,
|
|
60
|
+
controlsPosition = _props$controlsPositi === void 0 ? 'top-right' : _props$controlsPositi,
|
|
61
|
+
showMiniMap = props.showMiniMap,
|
|
62
|
+
showLegend = props.showLegend,
|
|
63
|
+
_props$background = props.background,
|
|
64
|
+
background = _props$background === void 0 ? '#F2F7FAFF' : _props$background,
|
|
65
|
+
showFullscreen = props.showFullscreen,
|
|
66
|
+
showForceLayout = props.showForceLayout,
|
|
67
|
+
showInteractive = props.showInteractive,
|
|
68
|
+
showFitView = props.showFitView,
|
|
69
|
+
showZoom = props.showZoom,
|
|
70
|
+
_props$onlyRenderVisi = props.onlyRenderVisibleElements,
|
|
71
|
+
onlyRenderVisibleElements = _props$onlyRenderVisi === void 0 ? true : _props$onlyRenderVisi,
|
|
72
|
+
_rootStyle = props.rootStyle,
|
|
73
|
+
fitViewOptions = props.fitViewOptions,
|
|
74
|
+
nodes = props.nodes,
|
|
75
|
+
edges = props.edges,
|
|
76
|
+
_props$layout = props.layout,
|
|
77
|
+
layout = _props$layout === void 0 ? baseLayout : _props$layout,
|
|
78
|
+
_props$autoCenter = props.autoCenter,
|
|
79
|
+
autoCenter = _props$autoCenter === void 0 ? false : _props$autoCenter,
|
|
80
|
+
_props$omitProps = props.omitProps,
|
|
81
|
+
omitProps = _props$omitProps === void 0 ? [] : _props$omitProps,
|
|
82
|
+
_props$forceLayout = props.forceLayout,
|
|
83
|
+
forceLayout = _props$forceLayout === void 0 ? !!props.layout : _props$forceLayout,
|
|
84
|
+
getMiniMapNodeColor = props.getMiniMapNodeColor,
|
|
85
|
+
markers = props.markers,
|
|
86
|
+
plugins = props.plugins,
|
|
87
|
+
readOnly = props.readOnly,
|
|
88
|
+
onZoomOut = props.onZoomOut,
|
|
89
|
+
onZoomIn = props.onZoomIn,
|
|
90
|
+
onFitView = props.onFitView,
|
|
91
|
+
onInteractiveChange = props.onInteractiveChange,
|
|
92
|
+
customControls = props.customControls,
|
|
93
|
+
_nodeTypes = props.nodeTypes,
|
|
94
|
+
onEdgesChange = props.onEdgesChange,
|
|
95
|
+
children = props.children,
|
|
96
|
+
forceFitView = props.forceFitView;
|
|
97
|
+
useListenRender(); // 性能监听 hook
|
|
98
|
+
|
|
99
|
+
var _useState = useState(!!(showMiniMap && !showControls)),
|
|
100
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
101
|
+
minimapVisible = _useState2[0],
|
|
102
|
+
setMinimapVisible = _useState2[1]; // 不显示控制器是默认按照字段控制 miniMap显示状态
|
|
103
|
+
|
|
104
|
+
var storeApi = useStoreApi();
|
|
105
|
+
var containerRef = useRef(null);
|
|
106
|
+
var theme = useTheme();
|
|
107
|
+
var themeVars = useThemeVars();
|
|
108
|
+
var nodeTypes = useNodeTypes(_nodeTypes); // 获取注册的节点类型
|
|
109
|
+
var forceUpdateTimes = useForceUpdateTimes();
|
|
110
|
+
var triggerLayout = useForceUpdate();
|
|
111
|
+
var setNodeDragging = useSetNodeDragging();
|
|
112
|
+
var instance = useReactFlow();
|
|
113
|
+
var getState = useGetState();
|
|
114
|
+
var rootStyle = useMemo(function () {
|
|
115
|
+
return _objectSpread(_objectSpread({
|
|
116
|
+
width: typeof width === 'number' ? "".concat(width, "px") : width,
|
|
117
|
+
height: typeof height === 'number' ? "".concat(height, "px") : height
|
|
118
|
+
}, _rootStyle), themeVars);
|
|
119
|
+
}, [width, height, _rootStyle, themeVars]);
|
|
120
|
+
var _useMemo = useMemo(function () {
|
|
121
|
+
var store = storeApi.getState();
|
|
122
|
+
return layout({
|
|
123
|
+
nodeTypes: nodeTypes,
|
|
124
|
+
originNodes: nodes || [],
|
|
125
|
+
originEdges: edges || [],
|
|
126
|
+
theme: theme,
|
|
127
|
+
onlyRenderVisibleElements: onlyRenderVisibleElements,
|
|
128
|
+
// 不支持修改该参数
|
|
129
|
+
store: store,
|
|
130
|
+
state: getState(),
|
|
131
|
+
flowProps: props
|
|
132
|
+
});
|
|
133
|
+
}, [nodes, edges, forceUpdateTimes]),
|
|
134
|
+
_nodes = _useMemo.nodes,
|
|
135
|
+
_edges = _useMemo.edges;
|
|
136
|
+
var flowProps = useMemo(function () {
|
|
137
|
+
var options = _objectSpread(_objectSpread({
|
|
138
|
+
selectNodesOnDrag: false,
|
|
139
|
+
preventScrolling: true,
|
|
140
|
+
panOnScroll: false,
|
|
141
|
+
zoomOnScroll: true,
|
|
142
|
+
nodesDraggable: false,
|
|
143
|
+
proOptions: proOptions,
|
|
144
|
+
fitViewOptions: _objectSpread({
|
|
145
|
+
nodes: _nodes !== null && _nodes !== void 0 && _nodes.length && autoCenter ? [_nodes[0]] : undefined
|
|
146
|
+
}, props.fitViewOptions),
|
|
147
|
+
fitView: true,
|
|
148
|
+
onlyRenderVisibleElements: onlyRenderVisibleElements
|
|
149
|
+
}, omit(props, ['flowInstanceRef', 'width', 'height', 'nodes', 'edges', 'fitViewOptions', 'theme', 'background', 'nodeTypes', 'showControls', 'showMiniMap', 'autoCenter', 'rootStyle', 'layout', 'onNodesChange', 'omitProps', 'forceLayout', 'controlsPosition', 'getMiniMapNodeColor', 'markers', 'onBeforeLayout', 'onLayout', 'onAfterLayout', 'plugins', 'readOnly', 'showFitView', 'showFullscreen', 'showInteractive', 'showZoom', 'showForceLayout', 'onInteractiveChange', 'onZoomOut', 'onZoomIn', 'onFitView', 'customControls'].concat(_toConsumableArray(omitProps)))), {}, {
|
|
150
|
+
edgeTypes: _objectSpread({
|
|
151
|
+
smart: SmartEdge
|
|
152
|
+
}, props.edgeTypes || {})
|
|
153
|
+
});
|
|
154
|
+
if (plugins !== null && plugins !== void 0 && plugins.scroller) {
|
|
155
|
+
var _options$panOnDrag, _options$selectionOnD, _options$selectionMod;
|
|
156
|
+
// 只读模式也需要
|
|
157
|
+
options.zoomOnScroll = false;
|
|
158
|
+
options.panOnScroll = true;
|
|
159
|
+
options.panOnDrag = (_options$panOnDrag = options.panOnDrag) !== null && _options$panOnDrag !== void 0 ? _options$panOnDrag : [1, 2];
|
|
160
|
+
options.selectionOnDrag = (_options$selectionOnD = options.selectionOnDrag) !== null && _options$selectionOnD !== void 0 ? _options$selectionOnD : true;
|
|
161
|
+
options.selectionMode = (_options$selectionMod = options.selectionMode) !== null && _options$selectionMod !== void 0 ? _options$selectionMod : SelectionMode.Partial;
|
|
162
|
+
}
|
|
163
|
+
if (readOnly) {
|
|
164
|
+
options.nodesDraggable = false;
|
|
165
|
+
options.nodesConnectable = false;
|
|
166
|
+
options.elementsSelectable = false;
|
|
167
|
+
}
|
|
168
|
+
return options;
|
|
169
|
+
}, [props, _nodes, readOnly, onlyRenderVisibleElements]);
|
|
170
|
+
var onNodesChange = useMemoizedFn(function (changes) {
|
|
171
|
+
var _props$onNodesChange;
|
|
172
|
+
if (forceLayout && hasDimensionsChange(changes)) {
|
|
173
|
+
// 强制布局
|
|
174
|
+
triggerLayout();
|
|
175
|
+
}
|
|
176
|
+
(_props$onNodesChange = props.onNodesChange) === null || _props$onNodesChange === void 0 || _props$onNodesChange.call(props, changes);
|
|
177
|
+
});
|
|
178
|
+
var onNodeDragStart = useMemoizedFn(function (event, node, nodes) {
|
|
179
|
+
var _flowProps$onNodeDrag;
|
|
180
|
+
setNodeDragging(true);
|
|
181
|
+
(_flowProps$onNodeDrag = flowProps.onNodeDragStart) === null || _flowProps$onNodeDrag === void 0 || _flowProps$onNodeDrag.call(flowProps, event, node, nodes);
|
|
182
|
+
});
|
|
183
|
+
var onNodeDragStop = useMemoizedFn(function (event, node, nodes) {
|
|
184
|
+
var _flowProps$onNodeDrag2;
|
|
185
|
+
setNodeDragging(false);
|
|
186
|
+
(_flowProps$onNodeDrag2 = flowProps.onNodeDragStop) === null || _flowProps$onNodeDrag2 === void 0 || _flowProps$onNodeDrag2.call(flowProps, event, node, nodes);
|
|
187
|
+
});
|
|
188
|
+
var getEdgesChangeHandlers = useGetEdgesChangeHandlers();
|
|
189
|
+
var _onEdgesChange = useMemoizedFn(function (changes) {
|
|
190
|
+
var _getEdgesChangeHandle;
|
|
191
|
+
onEdgesChange === null || onEdgesChange === void 0 || onEdgesChange(changes);
|
|
192
|
+
// 触发注册事件
|
|
193
|
+
(_getEdgesChangeHandle = getEdgesChangeHandlers()) === null || _getEdgesChangeHandle === void 0 || _getEdgesChangeHandle.forEach(function (onEdgesChange) {
|
|
194
|
+
onEdgesChange === null || onEdgesChange === void 0 || onEdgesChange(changes);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
useEffect(function () {
|
|
198
|
+
if (forceFitView) {
|
|
199
|
+
instance.fitView(fitViewOptions);
|
|
200
|
+
}
|
|
201
|
+
}, [nodes]);
|
|
202
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
203
|
+
ref: containerRef,
|
|
204
|
+
style: rootStyle,
|
|
205
|
+
children: [/*#__PURE__*/_jsx(DebugInfo, {
|
|
206
|
+
debug: props.debug
|
|
207
|
+
}), markers ? /*#__PURE__*/_jsx(MarkerDefinitions, {
|
|
208
|
+
marks: markers
|
|
209
|
+
}) : null, /*#__PURE__*/_jsxs(ReactFlow, _objectSpread(_objectSpread({
|
|
210
|
+
nodeTypes: nodeTypes
|
|
211
|
+
}, flowProps), {}, {
|
|
212
|
+
nodes: _nodes,
|
|
213
|
+
edges: _edges,
|
|
214
|
+
onNodesChange: onNodesChange,
|
|
215
|
+
onNodeDragStart: onNodeDragStart,
|
|
216
|
+
onNodeDragStop: onNodeDragStop,
|
|
217
|
+
onEdgesChange: _onEdgesChange,
|
|
218
|
+
children: [plugins !== null && plugins !== void 0 && plugins.scroller ? /*#__PURE__*/_jsx(Scrollbar, _objectSpread(_objectSpread({}, plugins.scroller), {}, {
|
|
219
|
+
width: width,
|
|
220
|
+
height: height
|
|
221
|
+
})) : null, /*#__PURE__*/_jsx(Background, {
|
|
222
|
+
bgColor: background,
|
|
223
|
+
className: 'rxflow-bg-hide-pattern',
|
|
224
|
+
variant: BackgroundVariant.Lines
|
|
225
|
+
}), minimapVisible && /*#__PURE__*/_jsx(MiniMap, {
|
|
226
|
+
zoomable: true,
|
|
227
|
+
pannable: true,
|
|
228
|
+
nodeColor: getMiniMapNodeColor
|
|
229
|
+
}), showControls && /*#__PURE__*/_jsx(Controls, {
|
|
230
|
+
showFullscreen: showFullscreen,
|
|
231
|
+
containerRef: containerRef,
|
|
232
|
+
fitViewOptions: fitViewOptions,
|
|
233
|
+
position: controlsPosition,
|
|
234
|
+
showInteractive: showInteractive,
|
|
235
|
+
showMiniMap: showMiniMap,
|
|
236
|
+
showFitView: showFitView,
|
|
237
|
+
showZoom: showZoom,
|
|
238
|
+
setMinimapVisible: setMinimapVisible,
|
|
239
|
+
minimapVisible: minimapVisible,
|
|
240
|
+
showForceLayout: showForceLayout,
|
|
241
|
+
onFitView: onFitView,
|
|
242
|
+
onZoomOut: onZoomOut,
|
|
243
|
+
onZoomIn: onZoomIn,
|
|
244
|
+
onInteractiveChange: onInteractiveChange,
|
|
245
|
+
children: customControls
|
|
246
|
+
}), showLegend && /*#__PURE__*/_jsx(Legend, {
|
|
247
|
+
showLegend: showLegend
|
|
248
|
+
}), children]
|
|
249
|
+
}))]
|
|
250
|
+
});
|
|
251
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author: yanxianliang
|
|
3
|
+
* @date: 2025-06-21 13:53
|
|
4
|
+
* @desc: 折叠按钮
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
7
|
+
*/
|
|
8
|
+
import { CollapseButtonProps } from "../../types";
|
|
9
|
+
import './index.less';
|
|
10
|
+
export declare function CollapseButton(props: CollapseButtonProps): 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":"AAAA;;;;;;GAMG;AAQH,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,cAAc,CAAC;AAItB,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CA4CxD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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-06-21 13:53
|
|
8
|
+
* @desc: 折叠按钮
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2025 by yanxianliang, All Rights Reserved.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import LoadingOutlined from "@ant-design/icons/lib/icons/LoadingOutlined";
|
|
14
|
+
import MinusOutlined from '@ant-design/icons/MinusOutlined';
|
|
15
|
+
import PlusOutlined from '@ant-design/icons/PlusOutlined';
|
|
16
|
+
import { useMemoizedFn } from "ahooks";
|
|
17
|
+
import cc from 'classcat';
|
|
18
|
+
import { useTheme } from "../../hooks";
|
|
19
|
+
import "./index.less";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
var stopClickEvent = function stopClickEvent(event) {
|
|
23
|
+
return event.stopPropagation();
|
|
24
|
+
};
|
|
25
|
+
export function CollapseButton(props) {
|
|
26
|
+
var _props$collapsed = props.collapsed,
|
|
27
|
+
collapsed = _props$collapsed === void 0 ? true : _props$collapsed,
|
|
28
|
+
_props$position = props.position,
|
|
29
|
+
position = _props$position === void 0 ? 'right' : _props$position,
|
|
30
|
+
count = props.count,
|
|
31
|
+
onCollapse = props.onCollapse,
|
|
32
|
+
loading = props.loading,
|
|
33
|
+
_props$direction = props.direction,
|
|
34
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
|
35
|
+
_props$autoHideCountW = props.autoHideCountWhenExpanded,
|
|
36
|
+
_autoHideCountWhenExpanded = _props$autoHideCountW === void 0 ? false : _props$autoHideCountW;
|
|
37
|
+
var theme = useTheme();
|
|
38
|
+
var _theme$collapseButton = theme.collapseButtonShape,
|
|
39
|
+
collapseButtonShape = _theme$collapseButton === void 0 ? 'rect' : _theme$collapseButton,
|
|
40
|
+
_theme$autoHideCountW = theme.autoHideCountWhenExpanded,
|
|
41
|
+
autoHideCountWhenExpanded = _theme$autoHideCountW === void 0 ? false : _theme$autoHideCountW,
|
|
42
|
+
_theme$showCount = theme.showCount,
|
|
43
|
+
showCount = _theme$showCount === void 0 ? true : _theme$showCount;
|
|
44
|
+
var onClick = useMemoizedFn(function () {
|
|
45
|
+
onCollapse === null || onCollapse === void 0 || onCollapse(!collapsed);
|
|
46
|
+
});
|
|
47
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
48
|
+
className: cc(['rxflow-collapse', "rxflow-collapse-".concat(position)]),
|
|
49
|
+
onClick: stopClickEvent,
|
|
50
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
51
|
+
className: cc(["rxflow-collapse-icon", "rxflow-collapse-shape-".concat(collapseButtonShape), _defineProperty({}, 'rxflow-collapse-loading', loading)]),
|
|
52
|
+
onClick: loading ? undefined : onClick,
|
|
53
|
+
children: loading ? /*#__PURE__*/_jsx(LoadingOutlined, {}) : collapsed ? /*#__PURE__*/_jsx(PlusOutlined, {}) : /*#__PURE__*/_jsx(MinusOutlined, {})
|
|
54
|
+
}), (autoHideCountWhenExpanded || _autoHideCountWhenExpanded) && !collapsed || !showCount ? null : /*#__PURE__*/_jsx("div", {
|
|
55
|
+
className: cc(["rxflow-collapse-count", direction === 'vertical' ? 'rxflow-collapse-vertical' : null]),
|
|
56
|
+
children: count
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.rxflow{
|
|
2
|
+
&-collapse {
|
|
3
|
+
position: absolute;
|
|
4
|
+
display: flex;
|
|
5
|
+
top: 50%;
|
|
6
|
+
align-items: center;
|
|
7
|
+
transform: translate3d(0, -50%, 0);
|
|
8
|
+
|
|
9
|
+
&-right {
|
|
10
|
+
left: 100%;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
margin-left: 2px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&-right &-vertical {
|
|
16
|
+
left: 3px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-left {
|
|
20
|
+
right: 100%;
|
|
21
|
+
flex-direction: row-reverse;
|
|
22
|
+
margin-right: 2px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-left &-vertical {
|
|
26
|
+
right: 3px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-icon {
|
|
30
|
+
display: flex;
|
|
31
|
+
width: 16px;
|
|
32
|
+
height: 16px;
|
|
33
|
+
border: 1px solid rgba(5, 5, 5, 0.06);
|
|
34
|
+
background-color: #fff;
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
color: #1677ff;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
&-shape-rect {
|
|
44
|
+
border-radius: 2px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&-shape-circle {
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&-loading {
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
&-count {
|
|
57
|
+
font-size: 10px;
|
|
58
|
+
color: #333;
|
|
59
|
+
cursor: grab;
|
|
60
|
+
margin-left: 2px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-vertical {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: -18px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|