generated from arvinxx/npm-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix: vercel workflow, constants export. add CanvasLoading tips. (#73)
* 📝 feat: pressure test * fix: CI and vercel (#67) * 🐛 fix: src/index export * 🐛 fix: refact type export * 🐛 fix: ci --------- Co-authored-by: jiangchu <jiangchu.wzy@antgroup.com> * fix(minimap): import Language from './constants' (#71) * 🐛 fix: src/index export * 🐛 fix: refact type export * 🐛 fix: ci * 🐛 fix: import --------- Co-authored-by: jiangchu <jiangchu.wzy@antgroup.com> * 🐛 fix(flowview): flow view md (#72) Co-authored-by: liangchaofei <liangchaofei@liangchaofeideMacBook-Pro.local> * ✨ feat: CanvasLoading supports custom tips (#69) * 🐛 fix: fixed an error in the progress component of demo * 🐛 fix(floweditor): flow editor md parse waring * ✨ feat: CanvasLoading supports custom tips --------- Co-authored-by: jiangchu <jiangchu.wzy@antgroup.com> Co-authored-by: curry <chaofei_liang@126.com> Co-authored-by: liangchaofei <liangchaofei@liangchaofeideMacBook-Pro.local> Co-authored-by: zhangqimeng <36561218+supuwoerc@users.noreply.github.com>
- Loading branch information
1 parent
39927cd
commit dbf9b07
Showing
12 changed files
with
132 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* compact: true | ||
* defaultShowCode: true | ||
*/ | ||
import { FlowEdge, FlowNode, FlowView } from '@ant-design/pro-flow'; | ||
|
||
const nodes: FlowNode[] = []; | ||
const edges: FlowEdge[] = []; | ||
|
||
nodes.push({ | ||
id: `a${0}`, | ||
data: { | ||
title: `节点${0}`, | ||
logo: 'https://mdn.alipayobjects.com/huamei_ntgeqc/afts/img/A*kgyiRKi04eUAAAAAAAAAAAAADvuvAQ/original', | ||
describe: 'XXX_XXX_XXX_API', | ||
}, | ||
}); | ||
|
||
for (let i = 1; i < 1000; i += 1) { | ||
nodes.push({ | ||
id: `a${i}`, | ||
data: { | ||
title: `节点${i}`, | ||
logo: 'https://mdn.alipayobjects.com/huamei_ntgeqc/afts/img/A*kgyiRKi04eUAAAAAAAAAAAAADvuvAQ/original', | ||
describe: 'XXX_XXX_XXX_API', | ||
}, | ||
}); | ||
|
||
if ((i - 1) % 10 === 0) { | ||
edges.push({ | ||
id: `a${i}-${Math.random()}-${Date.now() * Math.random()}`, | ||
source: 'a0', | ||
target: `a${i}`, | ||
}); | ||
} else { | ||
edges.push({ | ||
id: `a${i}-${Math.random()}-${Date.now() * Math.random()}`, | ||
source: `a${i - 1}`, | ||
target: `a${i}`, | ||
}); | ||
} | ||
} | ||
|
||
function App() { | ||
return ( | ||
<div | ||
style={{ | ||
width: '100%', | ||
height: '800px', | ||
}} | ||
> | ||
<FlowView minZoom={0.01} stepLessZooming={false} nodes={nodes} edges={edges}></FlowView> | ||
</div> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
nav: 案例展示 | ||
order: 100 | ||
group: | ||
title: 压力测试 | ||
order: 1 | ||
title: 1000节点 | ||
description: | ||
--- | ||
|
||
## Default | ||
|
||
<code src='./demos/pressureTest.tsx'></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,35 @@ | ||
import { | ||
export { | ||
BaseEdge, | ||
Connection, | ||
EdgeChange, | ||
EdgeLabelRenderer, | ||
EdgeProps, | ||
Handle, | ||
NodeChange, | ||
Position, | ||
getBezierPath, | ||
getSmoothStepPath, | ||
} from 'reactflow'; | ||
|
||
export * from './Background'; | ||
export { default as Background } from './Background'; | ||
export { default as BasicNode } from './BasicNode'; | ||
export { default as CanvasLoading } from './CanvasLoading'; | ||
export * from './ControlInput'; | ||
export { default as EditNode } from './EditNode'; | ||
export { default as EditableText } from './EditableText'; | ||
export * from './FlowEditor'; | ||
export * from './FlowPanel'; | ||
export { default as FlowPanel } from './FlowPanel'; | ||
export { FlowStoreProvider, type FlowEditorStoreProviderProps } from './FlowStoreProvider'; | ||
export { FlowStoreProvider } from './FlowStoreProvider'; | ||
export { default as FlowView } from './FlowView/FlowView'; | ||
export { useEdgesState, useNodesState } from './FlowView/hooks/useFlowState'; | ||
export * from './FlowView/hooks/useFlowView'; | ||
export * from './FlowView/provider/FlowViewProvider'; | ||
export * from './Input'; | ||
export { default as Inspector } from './Inspector'; | ||
export * from './MiniMap'; | ||
export { default as MiniMap } from './MiniMap'; | ||
export { NodeField, useNodeFieldStyles } from './NodeField'; | ||
export type { ExtraAction } from './NodeField'; | ||
export { default as RadiusEdge } from './RadiusEdge'; | ||
|
||
export * from './Background'; | ||
export * from './ControlInput'; | ||
export * from './FlowEditor'; | ||
export * from './FlowPanel'; | ||
export * from './FlowView/hooks/useFlowView'; | ||
export * from './FlowView/provider/FlowViewProvider'; | ||
export * from './Input'; | ||
export * from './MiniMap'; | ||
export * from './constants'; | ||
export { | ||
BaseEdge, | ||
Connection, | ||
EdgeChange, | ||
EdgeLabelRenderer, | ||
EdgeProps, | ||
Handle, | ||
NodeChange, | ||
Position, | ||
getBezierPath, | ||
getSmoothStepPath, | ||
}; | ||
|
||
export type { Connection, EdgeChange, EdgeProps, NodeChange } from 'reactflow'; | ||
export type { FlowEditorStoreProviderProps } from './FlowStoreProvider'; | ||
export type { ExtraAction } from './NodeField'; |