@yh-ui/flow 0.1.21
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/LICENSE +21 -0
- package/README.md +234 -0
- package/dist/Flow.d.vue.ts +306 -0
- package/dist/Flow.vue +959 -0
- package/dist/Flow.vue.d.ts +306 -0
- package/dist/__tests__/ai-workflow.ssr.test.cjs +352 -0
- package/dist/__tests__/ai-workflow.ssr.test.d.ts +1 -0
- package/dist/__tests__/ai-workflow.ssr.test.mjs +283 -0
- package/dist/__tests__/ai-workflow.test.cjs +109 -0
- package/dist/__tests__/ai-workflow.test.d.ts +1 -0
- package/dist/__tests__/ai-workflow.test.mjs +112 -0
- package/dist/__tests__/bpmn.ssr.test.cjs +278 -0
- package/dist/__tests__/bpmn.ssr.test.d.ts +1 -0
- package/dist/__tests__/bpmn.ssr.test.mjs +237 -0
- package/dist/__tests__/bpmn.test.cjs +103 -0
- package/dist/__tests__/bpmn.test.d.ts +1 -0
- package/dist/__tests__/bpmn.test.mjs +106 -0
- package/dist/__tests__/custom-types.test.cjs +300 -0
- package/dist/__tests__/custom-types.test.d.ts +1 -0
- package/dist/__tests__/custom-types.test.mjs +248 -0
- package/dist/__tests__/edge.test.cjs +56 -0
- package/dist/__tests__/edge.test.d.ts +1 -0
- package/dist/__tests__/edge.test.mjs +69 -0
- package/dist/__tests__/event-bus.test.cjs +80 -0
- package/dist/__tests__/event-bus.test.d.ts +1 -0
- package/dist/__tests__/event-bus.test.mjs +51 -0
- package/dist/__tests__/flow.ssr.test.cjs +156 -0
- package/dist/__tests__/flow.ssr.test.d.ts +1 -0
- package/dist/__tests__/flow.ssr.test.mjs +112 -0
- package/dist/__tests__/geometry.test.cjs +191 -0
- package/dist/__tests__/geometry.test.d.ts +1 -0
- package/dist/__tests__/geometry.test.mjs +105 -0
- package/dist/__tests__/graph.test.cjs +115 -0
- package/dist/__tests__/graph.test.d.ts +1 -0
- package/dist/__tests__/graph.test.mjs +85 -0
- package/dist/__tests__/history-plugin.test.cjs +191 -0
- package/dist/__tests__/history-plugin.test.d.ts +1 -0
- package/dist/__tests__/history-plugin.test.mjs +161 -0
- package/dist/__tests__/history.test.cjs +81 -0
- package/dist/__tests__/history.test.d.ts +1 -0
- package/dist/__tests__/history.test.mjs +43 -0
- package/dist/__tests__/layout.test.cjs +213 -0
- package/dist/__tests__/layout.test.d.ts +1 -0
- package/dist/__tests__/layout.test.mjs +170 -0
- package/dist/__tests__/node-edit-panel.ssr.test.cjs +168 -0
- package/dist/__tests__/node-edit-panel.ssr.test.d.ts +1 -0
- package/dist/__tests__/node-edit-panel.ssr.test.mjs +118 -0
- package/dist/__tests__/node-group-plugin.test.cjs +235 -0
- package/dist/__tests__/node-group-plugin.test.d.ts +1 -0
- package/dist/__tests__/node-group-plugin.test.mjs +187 -0
- package/dist/__tests__/node-handles.test.cjs +340 -0
- package/dist/__tests__/node-handles.test.d.ts +1 -0
- package/dist/__tests__/node-handles.test.mjs +230 -0
- package/dist/__tests__/plugin.test.cjs +151 -0
- package/dist/__tests__/plugin.test.d.ts +1 -0
- package/dist/__tests__/plugin.test.mjs +116 -0
- package/dist/__tests__/transform.test.cjs +58 -0
- package/dist/__tests__/transform.test.d.ts +1 -0
- package/dist/__tests__/transform.test.mjs +38 -0
- package/dist/__tests__/useAlignment.test.cjs +91 -0
- package/dist/__tests__/useAlignment.test.d.ts +1 -0
- package/dist/__tests__/useAlignment.test.mjs +52 -0
- package/dist/__tests__/useEdges.test.cjs +117 -0
- package/dist/__tests__/useEdges.test.d.ts +1 -0
- package/dist/__tests__/useEdges.test.mjs +80 -0
- package/dist/__tests__/useKeyboard.test.cjs +88 -0
- package/dist/__tests__/useKeyboard.test.d.ts +1 -0
- package/dist/__tests__/useKeyboard.test.mjs +56 -0
- package/dist/__tests__/useNodes.test.cjs +150 -0
- package/dist/__tests__/useNodes.test.d.ts +1 -0
- package/dist/__tests__/useNodes.test.mjs +80 -0
- package/dist/__tests__/useSelection.test.cjs +112 -0
- package/dist/__tests__/useSelection.test.d.ts +1 -0
- package/dist/__tests__/useSelection.test.mjs +76 -0
- package/dist/__tests__/useViewport.test.cjs +171 -0
- package/dist/__tests__/useViewport.test.d.ts +1 -0
- package/dist/__tests__/useViewport.test.mjs +82 -0
- package/dist/__tests__/utils/ssr.cjs +124 -0
- package/dist/__tests__/utils/ssr.d.ts +33 -0
- package/dist/__tests__/utils/ssr.mjs +129 -0
- package/dist/__tests__/validation.test.cjs +95 -0
- package/dist/__tests__/validation.test.d.ts +1 -0
- package/dist/__tests__/validation.test.mjs +36 -0
- package/dist/components/AiNodeEditPanel.d.vue.ts +13 -0
- package/dist/components/AiNodeEditPanel.vue +413 -0
- package/dist/components/AiNodeEditPanel.vue.d.ts +13 -0
- package/dist/components/EdgeEditPanel.d.vue.ts +14 -0
- package/dist/components/EdgeEditPanel.vue +205 -0
- package/dist/components/EdgeEditPanel.vue.d.ts +14 -0
- package/dist/components/NodeEditPanel.d.vue.ts +13 -0
- package/dist/components/NodeEditPanel.vue +214 -0
- package/dist/components/NodeEditPanel.vue.d.ts +13 -0
- package/dist/components/edges/BaseEdge.d.vue.ts +23 -0
- package/dist/components/edges/BaseEdge.vue +55 -0
- package/dist/components/edges/BaseEdge.vue.d.ts +23 -0
- package/dist/components/edges/BezierEdge.d.vue.ts +22 -0
- package/dist/components/edges/BezierEdge.vue +57 -0
- package/dist/components/edges/BezierEdge.vue.d.ts +22 -0
- package/dist/components/edges/DataFlowEdge.d.vue.ts +41 -0
- package/dist/components/edges/DataFlowEdge.vue +211 -0
- package/dist/components/edges/DataFlowEdge.vue.d.ts +41 -0
- package/dist/components/edges/SmoothEdge.d.vue.ts +22 -0
- package/dist/components/edges/SmoothEdge.vue +53 -0
- package/dist/components/edges/SmoothEdge.vue.d.ts +22 -0
- package/dist/components/edges/StepEdge.d.vue.ts +22 -0
- package/dist/components/edges/StepEdge.vue +42 -0
- package/dist/components/edges/StepEdge.vue.d.ts +22 -0
- package/dist/components/edges/index.cjs +41 -0
- package/dist/components/edges/index.d.ts +5 -0
- package/dist/components/edges/index.mjs +5 -0
- package/dist/components/nodes/BaseNode.d.vue.ts +25 -0
- package/dist/components/nodes/BaseNode.vue +93 -0
- package/dist/components/nodes/BaseNode.vue.d.ts +25 -0
- package/dist/components/nodes/CustomNode.d.vue.ts +36 -0
- package/dist/components/nodes/CustomNode.vue +44 -0
- package/dist/components/nodes/CustomNode.vue.d.ts +36 -0
- package/dist/components/nodes/DatabaseNode.d.vue.ts +19 -0
- package/dist/components/nodes/DatabaseNode.vue +62 -0
- package/dist/components/nodes/DatabaseNode.vue.d.ts +19 -0
- package/dist/components/nodes/DiamondNode.d.vue.ts +19 -0
- package/dist/components/nodes/DiamondNode.vue +62 -0
- package/dist/components/nodes/DiamondNode.vue.d.ts +19 -0
- package/dist/components/nodes/GroupNode.d.vue.ts +31 -0
- package/dist/components/nodes/GroupNode.vue +48 -0
- package/dist/components/nodes/GroupNode.vue.d.ts +31 -0
- package/dist/components/nodes/InputNode.d.vue.ts +23 -0
- package/dist/components/nodes/InputNode.vue +63 -0
- package/dist/components/nodes/InputNode.vue.d.ts +23 -0
- package/dist/components/nodes/NodeResizer.d.vue.ts +27 -0
- package/dist/components/nodes/NodeResizer.vue +89 -0
- package/dist/components/nodes/NodeResizer.vue.d.ts +27 -0
- package/dist/components/nodes/NodeToolbar.d.vue.ts +32 -0
- package/dist/components/nodes/NodeToolbar.vue +101 -0
- package/dist/components/nodes/NodeToolbar.vue.d.ts +32 -0
- package/dist/components/nodes/OutputNode.d.vue.ts +21 -0
- package/dist/components/nodes/OutputNode.vue +53 -0
- package/dist/components/nodes/OutputNode.vue.d.ts +21 -0
- package/dist/components/nodes/ai-workflow/AiAgentNode.d.vue.ts +20 -0
- package/dist/components/nodes/ai-workflow/AiAgentNode.vue +59 -0
- package/dist/components/nodes/ai-workflow/AiAgentNode.vue.d.ts +20 -0
- package/dist/components/nodes/ai-workflow/AiConditionNode.d.vue.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiConditionNode.vue +65 -0
- package/dist/components/nodes/ai-workflow/AiConditionNode.vue.d.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiEndNode.d.vue.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiEndNode.vue +47 -0
- package/dist/components/nodes/ai-workflow/AiEndNode.vue.d.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiLlmNode.d.vue.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiLlmNode.vue +64 -0
- package/dist/components/nodes/ai-workflow/AiLlmNode.vue.d.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiMemoryNode.d.vue.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiMemoryNode.vue +59 -0
- package/dist/components/nodes/ai-workflow/AiMemoryNode.vue.d.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiPromptNode.d.vue.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiPromptNode.vue +61 -0
- package/dist/components/nodes/ai-workflow/AiPromptNode.vue.d.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiStartNode.d.vue.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiStartNode.vue +47 -0
- package/dist/components/nodes/ai-workflow/AiStartNode.vue.d.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiToolNode.d.vue.ts +19 -0
- package/dist/components/nodes/ai-workflow/AiToolNode.vue +59 -0
- package/dist/components/nodes/ai-workflow/AiToolNode.vue.d.ts +19 -0
- package/dist/components/nodes/ai-workflow/index.cjs +109 -0
- package/dist/components/nodes/ai-workflow/index.d.ts +23 -0
- package/dist/components/nodes/ai-workflow/index.mjs +37 -0
- package/dist/components/nodes/bpmn/BpmnEndEvent.d.vue.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnEndEvent.vue +50 -0
- package/dist/components/nodes/bpmn/BpmnEndEvent.vue.d.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnExclusiveGateway.d.vue.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnExclusiveGateway.vue +60 -0
- package/dist/components/nodes/bpmn/BpmnExclusiveGateway.vue.d.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnInclusiveGateway.d.vue.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnInclusiveGateway.vue +60 -0
- package/dist/components/nodes/bpmn/BpmnInclusiveGateway.vue.d.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnParallelGateway.d.vue.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnParallelGateway.vue +60 -0
- package/dist/components/nodes/bpmn/BpmnParallelGateway.vue.d.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnServiceTask.d.vue.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnServiceTask.vue +55 -0
- package/dist/components/nodes/bpmn/BpmnServiceTask.vue.d.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnStartEvent.d.vue.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnStartEvent.vue +50 -0
- package/dist/components/nodes/bpmn/BpmnStartEvent.vue.d.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnTask.d.vue.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnTask.vue +54 -0
- package/dist/components/nodes/bpmn/BpmnTask.vue.d.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnUserTask.d.vue.ts +19 -0
- package/dist/components/nodes/bpmn/BpmnUserTask.vue +55 -0
- package/dist/components/nodes/bpmn/BpmnUserTask.vue.d.ts +19 -0
- package/dist/components/nodes/bpmn/index.cjs +109 -0
- package/dist/components/nodes/bpmn/index.d.ts +23 -0
- package/dist/components/nodes/bpmn/index.mjs +37 -0
- package/dist/components/nodes/index.cjs +246 -0
- package/dist/components/nodes/index.d.ts +13 -0
- package/dist/components/nodes/index.mjs +44 -0
- package/dist/core/FlowContext.cjs +21 -0
- package/dist/core/FlowContext.d.ts +10 -0
- package/dist/core/FlowContext.mjs +13 -0
- package/dist/core/index.cjs +104 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.mjs +9 -0
- package/dist/core/useAlignment.cjs +81 -0
- package/dist/core/useAlignment.d.ts +33 -0
- package/dist/core/useAlignment.mjs +71 -0
- package/dist/core/useEdges.cjs +132 -0
- package/dist/core/useEdges.d.ts +29 -0
- package/dist/core/useEdges.mjs +89 -0
- package/dist/core/useFlow.cjs +40 -0
- package/dist/core/useFlow.d.ts +31 -0
- package/dist/core/useFlow.mjs +32 -0
- package/dist/core/useHistory.cjs +63 -0
- package/dist/core/useHistory.d.ts +15 -0
- package/dist/core/useHistory.mjs +54 -0
- package/dist/core/useKeyboard.cjs +54 -0
- package/dist/core/useKeyboard.d.ts +18 -0
- package/dist/core/useKeyboard.mjs +45 -0
- package/dist/core/useNodeDistribution.cjs +171 -0
- package/dist/core/useNodeDistribution.d.ts +12 -0
- package/dist/core/useNodeDistribution.mjs +145 -0
- package/dist/core/useNodes.cjs +146 -0
- package/dist/core/useNodes.d.ts +26 -0
- package/dist/core/useNodes.mjs +101 -0
- package/dist/core/useSelection.cjs +83 -0
- package/dist/core/useSelection.d.ts +18 -0
- package/dist/core/useSelection.mjs +53 -0
- package/dist/core/useViewport.cjs +157 -0
- package/dist/core/useViewport.d.ts +65 -0
- package/dist/core/useViewport.mjs +125 -0
- package/dist/flow.cjs +240 -0
- package/dist/flow.d.ts +276 -0
- package/dist/flow.mjs +230 -0
- package/dist/index.cjs +378 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.mjs +50 -0
- package/dist/plugins/index.cjs +96 -0
- package/dist/plugins/index.d.ts +34 -0
- package/dist/plugins/index.mjs +47 -0
- package/dist/plugins/plugin.cjs +117 -0
- package/dist/plugins/plugin.d.ts +72 -0
- package/dist/plugins/plugin.mjs +110 -0
- package/dist/plugins/plugins/controls.cjs +38 -0
- package/dist/plugins/plugins/controls.d.ts +12 -0
- package/dist/plugins/plugins/controls.mjs +28 -0
- package/dist/plugins/plugins/export.cjs +102 -0
- package/dist/plugins/plugins/export.d.ts +12 -0
- package/dist/plugins/plugins/export.mjs +89 -0
- package/dist/plugins/plugins/grid.cjs +36 -0
- package/dist/plugins/plugins/grid.d.ts +11 -0
- package/dist/plugins/plugins/grid.mjs +26 -0
- package/dist/plugins/plugins/history.cjs +140 -0
- package/dist/plugins/plugins/history.d.ts +53 -0
- package/dist/plugins/plugins/history.mjs +132 -0
- package/dist/plugins/plugins/index.cjs +104 -0
- package/dist/plugins/plugins/index.d.ts +9 -0
- package/dist/plugins/plugins/index.mjs +9 -0
- package/dist/plugins/plugins/keyboard.cjs +27 -0
- package/dist/plugins/plugins/keyboard.d.ts +10 -0
- package/dist/plugins/plugins/keyboard.mjs +18 -0
- package/dist/plugins/plugins/layout.cjs +275 -0
- package/dist/plugins/plugins/layout.d.ts +34 -0
- package/dist/plugins/plugins/layout.mjs +246 -0
- package/dist/plugins/plugins/minimap.cjs +60 -0
- package/dist/plugins/plugins/minimap.d.ts +25 -0
- package/dist/plugins/plugins/minimap.mjs +50 -0
- package/dist/plugins/plugins/node-group.cjs +209 -0
- package/dist/plugins/plugins/node-group.d.ts +26 -0
- package/dist/plugins/plugins/node-group.mjs +178 -0
- package/dist/plugins/plugins/snap.cjs +36 -0
- package/dist/plugins/plugins/snap.d.ts +12 -0
- package/dist/plugins/plugins/snap.mjs +26 -0
- package/dist/renderer/AlignmentLines.d.vue.ts +5 -0
- package/dist/renderer/AlignmentLines.vue +113 -0
- package/dist/renderer/AlignmentLines.vue.d.ts +5 -0
- package/dist/renderer/Background.d.vue.ts +7 -0
- package/dist/renderer/Background.vue +86 -0
- package/dist/renderer/Background.vue.d.ts +7 -0
- package/dist/renderer/Controls.d.vue.ts +13 -0
- package/dist/renderer/Controls.vue +82 -0
- package/dist/renderer/Controls.vue.d.ts +13 -0
- package/dist/renderer/EdgeHandlesRenderer.d.vue.ts +11 -0
- package/dist/renderer/EdgeHandlesRenderer.vue +75 -0
- package/dist/renderer/EdgeHandlesRenderer.vue.d.ts +11 -0
- package/dist/renderer/EdgeRenderer.d.vue.ts +39 -0
- package/dist/renderer/EdgeRenderer.vue +204 -0
- package/dist/renderer/EdgeRenderer.vue.d.ts +39 -0
- package/dist/renderer/FlowBackground.d.vue.ts +11 -0
- package/dist/renderer/FlowBackground.vue +82 -0
- package/dist/renderer/FlowBackground.vue.d.ts +11 -0
- package/dist/renderer/Minimap.d.vue.ts +30 -0
- package/dist/renderer/Minimap.vue +290 -0
- package/dist/renderer/Minimap.vue.d.ts +30 -0
- package/dist/renderer/NodeRenderer.d.vue.ts +56 -0
- package/dist/renderer/NodeRenderer.vue +328 -0
- package/dist/renderer/NodeRenderer.vue.d.ts +56 -0
- package/dist/renderer/SelectionBox.d.vue.ts +11 -0
- package/dist/renderer/SelectionBox.vue +28 -0
- package/dist/renderer/SelectionBox.vue.d.ts +11 -0
- package/dist/types/edge.cjs +13 -0
- package/dist/types/edge.d.ts +65 -0
- package/dist/types/edge.mjs +6 -0
- package/dist/types/events.cjs +1 -0
- package/dist/types/events.d.ts +115 -0
- package/dist/types/events.mjs +0 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.ts +366 -0
- package/dist/types/index.mjs +0 -0
- package/dist/types/node.cjs +9 -0
- package/dist/types/node.d.ts +90 -0
- package/dist/types/node.mjs +3 -0
- package/dist/types/viewport.cjs +42 -0
- package/dist/types/viewport.d.ts +62 -0
- package/dist/types/viewport.mjs +36 -0
- package/dist/utils/bpmn-engine.cjs +390 -0
- package/dist/utils/bpmn-engine.d.ts +164 -0
- package/dist/utils/bpmn-engine.mjs +378 -0
- package/dist/utils/bpmn.cjs +492 -0
- package/dist/utils/bpmn.d.ts +53 -0
- package/dist/utils/bpmn.mjs +430 -0
- package/dist/utils/collaboration.cjs +537 -0
- package/dist/utils/collaboration.d.ts +189 -0
- package/dist/utils/collaboration.mjs +521 -0
- package/dist/utils/custom-types.cjs +138 -0
- package/dist/utils/custom-types.d.ts +78 -0
- package/dist/utils/custom-types.mjs +108 -0
- package/dist/utils/edge.cjs +235 -0
- package/dist/utils/edge.d.ts +79 -0
- package/dist/utils/edge.mjs +172 -0
- package/dist/utils/event-bus.cjs +91 -0
- package/dist/utils/event-bus.d.ts +39 -0
- package/dist/utils/event-bus.mjs +82 -0
- package/dist/utils/geometry.cjs +178 -0
- package/dist/utils/geometry.d.ts +186 -0
- package/dist/utils/geometry.mjs +144 -0
- package/dist/utils/graph.cjs +158 -0
- package/dist/utils/graph.d.ts +40 -0
- package/dist/utils/graph.mjs +147 -0
- package/dist/utils/index.cjs +137 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.mjs +12 -0
- package/dist/utils/performance.cjs +94 -0
- package/dist/utils/performance.d.ts +18 -0
- package/dist/utils/performance.mjs +82 -0
- package/dist/utils/screenshot.cjs +87 -0
- package/dist/utils/screenshot.d.ts +22 -0
- package/dist/utils/screenshot.mjs +66 -0
- package/dist/utils/theme.cjs +228 -0
- package/dist/utils/theme.d.ts +92 -0
- package/dist/utils/theme.mjs +217 -0
- package/dist/utils/transform.cjs +76 -0
- package/dist/utils/transform.d.ts +45 -0
- package/dist/utils/transform.mjs +57 -0
- package/dist/utils/validation.cjs +107 -0
- package/dist/utils/validation.d.ts +29 -0
- package/dist/utils/validation.mjs +85 -0
- package/package.json +61 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, watch } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
node: { type: [Object, null], required: true },
|
|
5
|
+
visible: { type: Boolean, required: true }
|
|
6
|
+
});
|
|
7
|
+
const emit = defineEmits(["update", "close"]);
|
|
8
|
+
const localNode = ref({
|
|
9
|
+
label: "",
|
|
10
|
+
description: ""
|
|
11
|
+
});
|
|
12
|
+
watch(
|
|
13
|
+
() => props.node,
|
|
14
|
+
(node) => {
|
|
15
|
+
if (node) {
|
|
16
|
+
const data = node.data;
|
|
17
|
+
const displayLabel = data.label || data.title || data.name || data.text || node.id;
|
|
18
|
+
localNode.value = {
|
|
19
|
+
label: String(displayLabel),
|
|
20
|
+
description: data.description || data.desc || "",
|
|
21
|
+
labelColor: node.labelColor || "#303133",
|
|
22
|
+
descriptionColor: node.descriptionColor || "#909399",
|
|
23
|
+
width: node.width || document.getElementById(`node-${node.id}`)?.offsetWidth || 150,
|
|
24
|
+
height: node.height || document.getElementById(`node-${node.id}`)?.offsetHeight || 40,
|
|
25
|
+
type: node.type
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{ immediate: true }
|
|
30
|
+
);
|
|
31
|
+
const updateLabelColor = (color) => {
|
|
32
|
+
localNode.value.labelColor = color;
|
|
33
|
+
emit("update", { labelColor: color });
|
|
34
|
+
};
|
|
35
|
+
const updateDescriptionColor = (color) => {
|
|
36
|
+
localNode.value.descriptionColor = color;
|
|
37
|
+
emit("update", { descriptionColor: color });
|
|
38
|
+
};
|
|
39
|
+
const updateLabel = () => {
|
|
40
|
+
if (!props.node) return;
|
|
41
|
+
const data = { ...props.node.data };
|
|
42
|
+
if ("label" in data || !("title" in data || "name" in data || "text" in data)) {
|
|
43
|
+
data.label = localNode.value.label;
|
|
44
|
+
} else if ("title" in data) {
|
|
45
|
+
data.title = localNode.value.label;
|
|
46
|
+
} else if ("name" in data) {
|
|
47
|
+
data.name = localNode.value.label;
|
|
48
|
+
} else if ("text" in data) {
|
|
49
|
+
data.text = localNode.value.label;
|
|
50
|
+
}
|
|
51
|
+
emit("update", { data });
|
|
52
|
+
};
|
|
53
|
+
const updateDescription = () => {
|
|
54
|
+
if (!props.node) return;
|
|
55
|
+
const data = { ...props.node.data };
|
|
56
|
+
if ("description" in data || !("desc" in data)) {
|
|
57
|
+
data.description = localNode.value.description;
|
|
58
|
+
} else {
|
|
59
|
+
data.desc = localNode.value.description;
|
|
60
|
+
}
|
|
61
|
+
emit("update", { data });
|
|
62
|
+
};
|
|
63
|
+
const updateStyle = (key, value) => {
|
|
64
|
+
const newStyle = { ...props.node?.style, [key]: value };
|
|
65
|
+
emit("update", { style: newStyle });
|
|
66
|
+
};
|
|
67
|
+
const updateSize = () => {
|
|
68
|
+
emit("update", {
|
|
69
|
+
width: localNode.value.width,
|
|
70
|
+
height: localNode.value.height
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
const handleClose = () => {
|
|
74
|
+
emit("close");
|
|
75
|
+
};
|
|
76
|
+
const handleBorderRadius = (event) => {
|
|
77
|
+
const value = event.target.value;
|
|
78
|
+
updateStyle("borderRadius", `${value}px`);
|
|
79
|
+
};
|
|
80
|
+
const getBorderColor = () => {
|
|
81
|
+
const border = props.node?.style?.border;
|
|
82
|
+
if (typeof border === "string") {
|
|
83
|
+
const match = border.match(/#(?:[0-9a-fA-F]{3}){1,2}|rgb\(.*?\)|rgba\(.*?\)/);
|
|
84
|
+
return match ? match[0] : "#dddddd";
|
|
85
|
+
}
|
|
86
|
+
return "#dddddd";
|
|
87
|
+
};
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<template>
|
|
91
|
+
<Teleport to="body">
|
|
92
|
+
<Transition name="slide-fade">
|
|
93
|
+
<div v-if="visible && node" class="node-edit-panel">
|
|
94
|
+
<div class="panel-header">
|
|
95
|
+
<span class="panel-title">编辑节点</span>
|
|
96
|
+
<button class="close-btn" @click="handleClose">×</button>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div class="panel-content">
|
|
100
|
+
<div class="form-group">
|
|
101
|
+
<label>标签</label>
|
|
102
|
+
<input
|
|
103
|
+
v-model="localNode.label"
|
|
104
|
+
type="text"
|
|
105
|
+
placeholder="节点标签"
|
|
106
|
+
@blur="updateLabel"
|
|
107
|
+
@keyup.enter="updateLabel"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div class="form-group">
|
|
112
|
+
<label>描述</label>
|
|
113
|
+
<textarea
|
|
114
|
+
v-model="localNode.description"
|
|
115
|
+
placeholder="节点描述"
|
|
116
|
+
rows="2"
|
|
117
|
+
@blur="updateDescription"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div class="form-group">
|
|
122
|
+
<label>尺寸</label>
|
|
123
|
+
<div class="size-inputs">
|
|
124
|
+
<input
|
|
125
|
+
v-model.number="localNode.width"
|
|
126
|
+
type="number"
|
|
127
|
+
min="50"
|
|
128
|
+
max="800"
|
|
129
|
+
placeholder="宽度"
|
|
130
|
+
@blur="updateSize"
|
|
131
|
+
/>
|
|
132
|
+
<span>×</span>
|
|
133
|
+
<input
|
|
134
|
+
v-model.number="localNode.height"
|
|
135
|
+
type="number"
|
|
136
|
+
min="30"
|
|
137
|
+
max="600"
|
|
138
|
+
placeholder="高度"
|
|
139
|
+
@blur="updateSize"
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div class="form-group">
|
|
145
|
+
<label>背景色</label>
|
|
146
|
+
<div class="color-picker-row">
|
|
147
|
+
<input
|
|
148
|
+
type="color"
|
|
149
|
+
:value="node.style?.backgroundColor || '#ffffff'"
|
|
150
|
+
class="modern-color-picker"
|
|
151
|
+
@input="e => updateStyle('backgroundColor', e.target.value)"
|
|
152
|
+
/>
|
|
153
|
+
<span class="color-value">{{ node.style?.backgroundColor || "#ffffff" }}</span>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<div class="form-group">
|
|
158
|
+
<label>边框颜色</label>
|
|
159
|
+
<div class="color-picker-row">
|
|
160
|
+
<input
|
|
161
|
+
type="color"
|
|
162
|
+
:value="getBorderColor()"
|
|
163
|
+
class="modern-color-picker"
|
|
164
|
+
@input="e => updateStyle('border', `1px solid ${e.target.value}`)"
|
|
165
|
+
/>
|
|
166
|
+
<span class="color-value">{{ getBorderColor() }}</span>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div class="form-group">
|
|
171
|
+
<label>圆角</label>
|
|
172
|
+
<input
|
|
173
|
+
:value="parseInt(String(node.style?.borderRadius || '8'))"
|
|
174
|
+
type="range"
|
|
175
|
+
min="0"
|
|
176
|
+
max="20"
|
|
177
|
+
@input="handleBorderRadius"
|
|
178
|
+
/>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div class="form-group">
|
|
182
|
+
<label>标签文字颜色</label>
|
|
183
|
+
<div class="color-picker-row">
|
|
184
|
+
<input
|
|
185
|
+
type="color"
|
|
186
|
+
:value="localNode.labelColor"
|
|
187
|
+
class="modern-color-picker"
|
|
188
|
+
@input="e => updateLabelColor(e.target.value)"
|
|
189
|
+
/>
|
|
190
|
+
<span class="color-value">{{ localNode.labelColor }}</span>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div class="form-group">
|
|
195
|
+
<label>文字描述颜色</label>
|
|
196
|
+
<div class="color-picker-row">
|
|
197
|
+
<input
|
|
198
|
+
type="color"
|
|
199
|
+
:value="localNode.descriptionColor"
|
|
200
|
+
class="modern-color-picker"
|
|
201
|
+
@input="e => updateDescriptionColor(e.target.value)"
|
|
202
|
+
/>
|
|
203
|
+
<span class="color-value">{{ localNode.descriptionColor }}</span>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</Transition>
|
|
209
|
+
</Teleport>
|
|
210
|
+
</template>
|
|
211
|
+
|
|
212
|
+
<style scoped>
|
|
213
|
+
.node-edit-panel{background:#fff;border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,.15);position:fixed;right:20px;top:100px;width:280px;z-index:1000}.panel-header{align-items:center;border-bottom:1px solid #eee;display:flex;justify-content:space-between;padding:12px 16px}.panel-title{color:#333;font-size:14px;font-weight:600}.close-btn{background:none;border:none;color:#999;cursor:pointer;font-size:20px;line-height:1;padding:0}.close-btn:hover{color:#333}.panel-content{max-height:70vh;overflow-y:auto;padding:16px}.form-group{margin-bottom:16px}.form-group label{color:#666;display:block;font-size:12px;margin-bottom:6px}.form-group input[type=number],.form-group input[type=text],.form-group textarea{border:1px solid #ddd;border-radius:4px;box-sizing:border-box;font-size:13px;padding:8px 10px;width:100%}.form-group input:focus,.form-group textarea:focus{border-color:#3b82f6;outline:none}.form-group textarea{resize:vertical}.size-inputs{align-items:center;display:flex;gap:8px}.size-inputs input{flex:1}.size-inputs span{color:#999}.color-picker-row{align-items:center;display:flex;gap:12px}.modern-color-picker{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;cursor:pointer;height:36px;padding:0;width:36px}.modern-color-picker::-webkit-color-swatch{border:1px solid #e2e8f0;border-radius:6px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.modern-color-picker::-moz-color-swatch{border:1px solid #e2e8f0;border-radius:6px}.color-value{color:#64748b;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;text-transform:uppercase}.color-swatch.active{border-color:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,.3)}.form-group input[type=range]{width:100%}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .3s ease}.slide-fade-enter-from,.slide-fade-leave-to{opacity:0;transform:translateX(20px)}
|
|
214
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Node, NodeData } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node: Node | null;
|
|
4
|
+
visible: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
close: () => any;
|
|
8
|
+
update: (node: Partial<Node<NodeData>>) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onClose?: (() => any) | undefined;
|
|
11
|
+
onUpdate?: ((node: Partial<Node<NodeData>>) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Position, EdgeStyle } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
id: string;
|
|
4
|
+
sourceX: number;
|
|
5
|
+
sourceY: number;
|
|
6
|
+
targetX: number;
|
|
7
|
+
targetY: number;
|
|
8
|
+
sourcePosition?: Position;
|
|
9
|
+
targetPosition?: Position;
|
|
10
|
+
style?: EdgeStyle;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
animated?: boolean;
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
16
|
+
label: string;
|
|
17
|
+
style: EdgeStyle;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
animated: boolean;
|
|
20
|
+
sourcePosition: Position;
|
|
21
|
+
targetPosition: Position;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
id: { type: String, required: true },
|
|
5
|
+
sourceX: { type: Number, required: true },
|
|
6
|
+
sourceY: { type: Number, required: true },
|
|
7
|
+
targetX: { type: Number, required: true },
|
|
8
|
+
targetY: { type: Number, required: true },
|
|
9
|
+
sourcePosition: { type: String, required: false, default: "right" },
|
|
10
|
+
targetPosition: { type: String, required: false, default: "left" },
|
|
11
|
+
style: { type: Object, required: false, default: () => ({}) },
|
|
12
|
+
selected: { type: Boolean, required: false, default: false },
|
|
13
|
+
animated: { type: Boolean, required: false, default: false },
|
|
14
|
+
label: { type: String, required: false, default: "" }
|
|
15
|
+
});
|
|
16
|
+
const path = computed(() => {
|
|
17
|
+
const { sourceX, sourceY, targetX, targetY } = props;
|
|
18
|
+
return `M ${sourceX} ${sourceY} L ${targetX} ${targetY}`;
|
|
19
|
+
});
|
|
20
|
+
const pathStyle = computed(() => ({
|
|
21
|
+
...props.style,
|
|
22
|
+
strokeDasharray: props.animated ? "5,5" : void 0,
|
|
23
|
+
animation: props.animated ? "dash 0.5s linear infinite" : void 0
|
|
24
|
+
}));
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<g :class="['flow-base-edge', {
|
|
29
|
+
selected,
|
|
30
|
+
animated
|
|
31
|
+
}]">
|
|
32
|
+
<path :d="path" fill="none" :style="pathStyle" stroke-width="2" stroke="#b1b1b7" />
|
|
33
|
+
<path
|
|
34
|
+
v-if="label"
|
|
35
|
+
:d="path"
|
|
36
|
+
fill="none"
|
|
37
|
+
stroke="transparent"
|
|
38
|
+
stroke-width="20"
|
|
39
|
+
class="flow-edge-label-path"
|
|
40
|
+
/>
|
|
41
|
+
<foreignObject
|
|
42
|
+
v-if="label"
|
|
43
|
+
:x="(sourceX + targetX) / 2 - 30"
|
|
44
|
+
:y="(sourceY + targetY) / 2 - 10"
|
|
45
|
+
width="60"
|
|
46
|
+
height="20"
|
|
47
|
+
>
|
|
48
|
+
<div class="flow-edge-label">{{ label }}</div>
|
|
49
|
+
</foreignObject>
|
|
50
|
+
</g>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<style scoped>
|
|
54
|
+
.flow-edge-label{background:#fff;border-radius:4px;color:#666;font-size:12px;padding:2px 6px;text-align:center}@keyframes dash{to{stroke-dashoffset:-10}}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Position, EdgeStyle } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
id: string;
|
|
4
|
+
sourceX: number;
|
|
5
|
+
sourceY: number;
|
|
6
|
+
targetX: number;
|
|
7
|
+
targetY: number;
|
|
8
|
+
sourcePosition?: Position;
|
|
9
|
+
targetPosition?: Position;
|
|
10
|
+
style?: EdgeStyle;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
animated?: boolean;
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
16
|
+
label: string;
|
|
17
|
+
style: EdgeStyle;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
animated: boolean;
|
|
20
|
+
sourcePosition: Position;
|
|
21
|
+
targetPosition: Position;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Position, EdgeStyle } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
sourceX: number;
|
|
4
|
+
sourceY: number;
|
|
5
|
+
targetX: number;
|
|
6
|
+
targetY: number;
|
|
7
|
+
sourcePosition?: Position;
|
|
8
|
+
targetPosition?: Position;
|
|
9
|
+
style?: EdgeStyle;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
animated?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
15
|
+
label: string;
|
|
16
|
+
style: EdgeStyle;
|
|
17
|
+
selected: boolean;
|
|
18
|
+
animated: boolean;
|
|
19
|
+
sourcePosition: Position;
|
|
20
|
+
targetPosition: Position;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
sourceX: { type: Number, required: true },
|
|
5
|
+
sourceY: { type: Number, required: true },
|
|
6
|
+
targetX: { type: Number, required: true },
|
|
7
|
+
targetY: { type: Number, required: true },
|
|
8
|
+
sourcePosition: { type: String, required: false, default: "right" },
|
|
9
|
+
targetPosition: { type: String, required: false, default: "left" },
|
|
10
|
+
style: { type: Object, required: false, default: () => ({}) },
|
|
11
|
+
selected: { type: Boolean, required: false, default: false },
|
|
12
|
+
animated: { type: Boolean, required: false, default: false },
|
|
13
|
+
label: { type: String, required: false, default: "" }
|
|
14
|
+
});
|
|
15
|
+
const path = computed(() => {
|
|
16
|
+
const { sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition } = props;
|
|
17
|
+
const curvature = 0.5;
|
|
18
|
+
let sourceControlX = sourceX;
|
|
19
|
+
let sourceControlY = sourceY;
|
|
20
|
+
let targetControlX = targetX;
|
|
21
|
+
let targetControlY = targetY;
|
|
22
|
+
const deltaX = Math.abs(targetX - sourceX) * curvature;
|
|
23
|
+
const deltaY = Math.abs(targetY - sourceY) * curvature;
|
|
24
|
+
if (sourcePosition === "right") sourceControlX += deltaX;
|
|
25
|
+
else if (sourcePosition === "left") sourceControlX -= deltaX;
|
|
26
|
+
else if (sourcePosition === "bottom") sourceControlY += deltaY;
|
|
27
|
+
else if (sourcePosition === "top") sourceControlY -= deltaY;
|
|
28
|
+
if (targetPosition === "right") targetControlX += deltaX;
|
|
29
|
+
else if (targetPosition === "left") targetControlX -= deltaX;
|
|
30
|
+
else if (targetPosition === "bottom") targetControlY += deltaY;
|
|
31
|
+
else if (targetPosition === "top") targetControlY -= deltaY;
|
|
32
|
+
return `M ${sourceX} ${sourceY} C ${sourceControlX} ${sourceControlY}, ${targetControlX} ${targetControlY}, ${targetX} ${targetY}`;
|
|
33
|
+
});
|
|
34
|
+
const centerX = computed(() => (props.sourceX + props.targetX) / 2);
|
|
35
|
+
const centerY = computed(() => (props.sourceY + props.targetY) / 2);
|
|
36
|
+
const pathStyle = computed(() => ({
|
|
37
|
+
...props.style,
|
|
38
|
+
strokeDasharray: props.animated ? "5,5" : void 0,
|
|
39
|
+
animation: props.animated ? "dash 0.5s linear infinite" : void 0
|
|
40
|
+
}));
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<g :class="['flow-bezier-edge', {
|
|
45
|
+
selected,
|
|
46
|
+
animated
|
|
47
|
+
}]">
|
|
48
|
+
<path :d="path" fill="none" :style="pathStyle" stroke-width="2" stroke="#b1b1b7" />
|
|
49
|
+
<foreignObject v-if="label" :x="centerX - 30" :y="centerY - 10" width="60" height="20">
|
|
50
|
+
<div class="flow-edge-label">{{ label }}</div>
|
|
51
|
+
</foreignObject>
|
|
52
|
+
</g>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<style scoped>
|
|
56
|
+
.flow-edge-label{background:#fff;border-radius:4px;color:#666;font-size:12px;padding:2px 6px;text-align:center}@keyframes dash{to{stroke-dashoffset:-10}}
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Position, EdgeStyle } from '../../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
sourceX: number;
|
|
4
|
+
sourceY: number;
|
|
5
|
+
targetX: number;
|
|
6
|
+
targetY: number;
|
|
7
|
+
sourcePosition?: Position;
|
|
8
|
+
targetPosition?: Position;
|
|
9
|
+
style?: EdgeStyle;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
animated?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
15
|
+
label: string;
|
|
16
|
+
style: EdgeStyle;
|
|
17
|
+
selected: boolean;
|
|
18
|
+
animated: boolean;
|
|
19
|
+
sourcePosition: Position;
|
|
20
|
+
targetPosition: Position;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Edge, Position, EdgeStyle } from '../../types';
|
|
2
|
+
export type DataFlowStatus = 'idle' | 'processing' | 'success' | 'error' | 'warning';
|
|
3
|
+
export type DataFlowEffect = 'particles' | 'glow' | 'pulse' | 'wave' | 'none';
|
|
4
|
+
interface Props {
|
|
5
|
+
/** EdgeRenderer 注入:完整边对象 */
|
|
6
|
+
edge: Edge;
|
|
7
|
+
/** EdgeRenderer 注入:预计算 SVG 路径 */
|
|
8
|
+
path: string;
|
|
9
|
+
/** EdgeRenderer 注入:源点 X */
|
|
10
|
+
sourceX: number;
|
|
11
|
+
/** EdgeRenderer 注入:源点 Y */
|
|
12
|
+
sourceY: number;
|
|
13
|
+
/** EdgeRenderer 注入:目标点 X */
|
|
14
|
+
targetX: number;
|
|
15
|
+
/** EdgeRenderer 注入:目标点 Y */
|
|
16
|
+
targetY: number;
|
|
17
|
+
/** EdgeRenderer 注入:中心 X(用于标签) */
|
|
18
|
+
labelX?: number;
|
|
19
|
+
/** EdgeRenderer 注入:中心 Y(用于标签) */
|
|
20
|
+
labelY?: number;
|
|
21
|
+
/** EdgeRenderer 注入:边样式 */
|
|
22
|
+
style?: EdgeStyle;
|
|
23
|
+
/** EdgeRenderer 注入:线条颜色 */
|
|
24
|
+
stroke?: string;
|
|
25
|
+
/** EdgeRenderer 注入:线条宽度 */
|
|
26
|
+
strokeWidth?: number;
|
|
27
|
+
/** 源点方向(EdgeRenderer 从 sourceHandle 推导) */
|
|
28
|
+
sourcePosition?: Position;
|
|
29
|
+
/** 目标点方向 */
|
|
30
|
+
targetPosition?: Position;
|
|
31
|
+
}
|
|
32
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
33
|
+
style: EdgeStyle;
|
|
34
|
+
stroke: string;
|
|
35
|
+
strokeWidth: number;
|
|
36
|
+
sourcePosition: Position;
|
|
37
|
+
targetPosition: Position;
|
|
38
|
+
labelX: number;
|
|
39
|
+
labelY: number;
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
export default _default;
|